Previous Up Next

13.3.1  Antiderivatives and definite integrals

The int and integrate commands compute a primitive or a definite integral. A difference between the two commands is that if you input quest() just after the evaluation of integrate, the answer is written with the ∫ symbol.

Int is the inert form of integrate; namely, it evaluates to integrate for later evaluation.

Examples

integrate(x^2)
     
x3
3
          
integrate(t^2,t)
     
t3
3
          
integrate(x^2,x,1,2)
     
7
3
          
integrate(1/(sin(x)+2),x,0,2*pi)
     
2
3
 π  
3
          

Int is the inert form of integrate, it prevents evaluation, for example to avoid a symbolic computation that might not be successful if you just want a numeric evaluation, like for example:

evalf(Int(exp(x^2),x,0,1))

or:

evalf(int(exp(x^2),x,0,1))
     
1.46265174591           

Let f(x)=x/x2−1+ln(x+1/x−1). Find a primitive of f.

int(x/(x^2-1)+ln((x+1)/(x-1)))

or:

f(x):=x/(x^2-1)+ln((x+1)/(x-1)):; int(f(x))
     
x ln


x+1
x−1



+
2
2
 ln
x2−1
+
ln
x2−1
2
          

Compute ∫2/x6+2x4+x2  dx.

int(2/(x^6+2*x^4+x^2))
     




−3 x2−2

x3+x
3
2
 arctanx



          

Compute ∫1/sin(x)+sin(2 x)  dx.

integrate(1/(sin(x)+sin(2*x)))
     



ln


1−cosx
1+cosx



12
ln


1−cosx
1+cosx
−3


3



          

Previous Up Next