Somehow I feel like advanced mathematics would be a lot less scary if we could express it in a programming language.
For instance, solving the integral of sin(x) dx from 0 to pi, would get rid of the big curly integral sign and turn it into a function call: Integrate("sin(x)", x, new Range(0, Constants.Pi)). The function signature would just be: Integrate(string expression, string withRespectTo, IntegralRange range = null). I suspect we don't do this because it's tedious to write that out on paper.
I think there are two more reasons. First, writing it another way doesn't really make it any easier to integrate the function. Second, your proposal is only marginally more readable to the average person. Sure, it has a few more words, but it also has a bunch of really unnecessary parentheses and quotation marks and you're calling pi Constants.Pi. Obviously I get why you're doing this, you're trying to write it like code, but most people who can't code would just find that confusing. The reason why it looks way better to you is because you are used to code, and that's how mathematicians feel about mathematical notation too.
2
u/Korzag Oct 06 '21
Somehow I feel like advanced mathematics would be a lot less scary if we could express it in a programming language.
For instance, solving the integral of sin(x) dx from 0 to pi, would get rid of the big curly integral sign and turn it into a function call:
Integrate("sin(x)", x, new Range(0, Constants.Pi)). The function signature would just be:Integrate(string expression, string withRespectTo, IntegralRange range = null). I suspect we don't do this because it's tedious to write that out on paper.