Definite integral is an important part of Mathematical Analysis. During Mathematical Analysis lessons, students always find it quite hard to calculate the definite integral. And the software Mathematic is so complex that very few students can master its usage.
So can you develop a simple tool to help the students calculate the definite integral? It’s the final challenge in this contest. This task requires many skills and is so challenging that probably only the god can solve it in 5 hours. Can you solve it and become a god-like person?
Next is the format for all functions in this challenge:
There are six types of basic elementary function:
1、 constant function: C;
2、 power function: x^C;
3、 exponential function: e^x;
4、 logarithmic function: ln(x);
5、 trigonometric function: sin(x), cos(x), tan(x), cot(x), sec(x), cot(x);
6、 inverse circular trigonometric function: asin(x), acos(x), atan(x).
C is a constant number between -100 and 100.
Elementary function is basic elementary function and their composite functions. There are ten types of composite functions. (A and B represent elementary functions)
1、 A+B;
2、 A-B;
3、 -A;
4、 A*B;
5、 A/B;
6、 A^B;
7、 e^A;
8、 ln(A);
9、 sin(A), cos(A), tan(A), cot(A), sec(A), csc(A);
10、 asin(A), acos(A), atan(A).
Arithmetic priority: () > ^ > *, / > +,-
In this problem, the task can be proper integral, improper integral; it is also possible that its indefinite integral isn’t even an elementary function. But you can assume that, if the integrating range is [a,b], then (a,b) will be a subset of the function’s definitions. You can also assume that for any improper integral, the result of it will converge. Finally, it is guaranteed that the final result is between -10,000 and 10,000.