Integration of algebraic expressions

We will look at indefinite and definite integrals, and for the second, we will look at proper and improper integrals. To calculate a definite proper integral of a mathematical expression, we use the int(...) function as follows:

[> int( f(x), x = a..b );

$\int_a^b f(x) dx$

Because $f$ is unkonwn, nothing is done. However, we can do the following: find $\int_0^{10} e^x dx$:

[> int( exp( x ), x = 0..10 );

$e^{10} - 1$

Similarly, we can find $\int_0^{10} x (x + 1)^2 \sin(x) \cos(2x) dx$:

[> int( x*(x + 1)^2*sin(x)*cos(2*x), x = 0..10 );

$\frac{52}{27} - \frac{335}{2} \sin(10) + 573 \cos(10) + \frac{1021}{54} \sin(30) - \frac{5413}{27} \cos(30)$

Indefinite integration is also possible, meaning, to find an antiderivative; however, no constant of integration is provided:

[> int( x*(x + 1)^2*sin(x)*cos(2*x), x );

$\frac{1}{2}x^{3} \cos (x) - \frac{3}{2} x^{2} \sin (x)+\frac{5}{2} \sin (x) - \frac{5}{2} x \cos (x) + x^{2} \cos (x) - 2 \cos (x) - 2 x \sin (x)$ $ - \frac{1}{6} x^{3} \cos (3 x) + \frac{1}{6}x^{2} \sin (3 x) +\frac{1}{54}\sin (3 x)-\frac{1}{18}x \cos (3 x)-\frac{1}{3}x^{2} \cos (3 x)+\frac{2}{27} \cos (3 x)+\frac{2}{9} x \sin (3 x)$