# [Maxima] The definite integral

Aleksas Domarkas aleksasd873 at gmail.com
Sun Jan 8 04:38:17 CST 2012

``` The definite integral
A.Domarkas

Example
(%i1) S:'integrate(exp(x^4),x,0,1);
(%o1) integrate(%e^x^4,x,0,1)

(%i2) changevar(S, x=y^(1/4), y, x);
"Is  "x"  positive, negative, or zero?"p;
(%o2) integrate(%e^y/y^(3/4),y,0,1)/4

Symbolic solution:
(%i3) s_sol:ev(%, nouns),factor;
(%o3) ((-1)^(3/4)*(gamma_incomplete(1/4,-1)-gamma(1/4)))/4

Numeric solution:
(%i4) float(s_sol),expand;
(%o4) -.8989357327127359*(-1)^(3/4)*%i-.8989357327127361*(-1)^(3/4)
(%i5) rectform(%);
(%o5) 1.797871465425472/sqrt(2)-(2.220446049250313*10^-16*%i)/sqrt(2)
(%i6) n_sol:float(realpart(%));
(%o6) 1.271287104904147

(%o7) 1.271287104904147
(%i8) %-n_sol;
(%o8) 2.220446049250313*10^-16

Direct short solution wrong:
(%i9) integrate(exp(x^4),x,0,1);
(%o9) (%i*((-1)^(3/4)*gamma_incomplete(1/4,-1)-(-1)^(3/4)*gamma(1/4)))/4
(%i10) float(%),expand;
(%o10) .8989357327127359*(-1)^(3/4)-.8989357327127361*(-1)^(3/4)*%i
(%i11) rectform(%);
(%o11) (1.797871465425472*%i)/sqrt(2)+(2.220446049250313*10^-16)/sqrt(2)
(%i12) float(realpart(%));
(%o12) 1.570092458683775*10^-16

In a similar way you can find other integrals
integrate(exp(x^k),x,0,1), integrate(exp(-x^k),x,0,1).

(%i13) build_info()\$
Maxima version: 5.26.0
Maxima build date: 18:42 12/19/2011
Host type: i686-pc-linux-gnu
Lisp implementation type: SBCL
Lisp implementation version: 1.0.50.0.debian

Conclusion:

Full solution of the problem must include:
a) show steps (perhaps by hand)
b) test of solution(numeric, other solving way, other CAS)

Direct short solution of the problem is bad for the following reasons:
a) pedagogically incorrect
b) may be wrong
c) may be fail

Aleksas D.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.math.utexas.edu/pipermail/maxima/attachments/20120108/5a71f441/attachment-0001.html>
```