[Maxima] About computing integral integrate(exp(-x^k),x,0,1)

Aleksas Domarkas aleksasd873 at gmail.com
Mon Jan 9 04:10:18 CST 2012


About computing integral integrate(exp(-x^k),x,0,1)

A.Domarkas

The correct formula is

integrate(exp(x^k),x,0,1)=(gamma(1/k)-gamma_incomplete(1/k,-1))*%e^(-(%i*%pi)/k))/k,

where k is natural number.

 Proof.
(%i13) S:'integrate(exp(x^k),x,0,1);
(%o13) integrate(%e^x^k,x,0,1)
(%i14) assume(k>0)$ declare(k,integer)$
(%i16) changevar(S, y=x^k, y, x);
(%o16) integrate(%e^y/y^((k-1)/k),y,0,1)/k
(%i17) ev(%, nouns),factor;
(%o17) -(gamma_incomplete(1/k,-1)-gamma(1/k))/(k*(-1)^(1/k))
(%i18) subst(-1=polarform(-1),%),ratsimp;
(%o18) -((gamma_incomplete(1/k,-1)-gamma(1/k))*%e^(-(%i*%pi)/k))/k
 q. e. d.

(%i19) define(F(k),%);
(%o19) F(k):=-((gamma_incomplete(1/k,-1)-gamma(1/k))*%e^(-(%i*%pi)/k))/k

 For example, we compute 'integrate(exp(x^3),x,0,1) using this formula:
(%i20) F(3);
(%o20) -((1/2-(sqrt(3)*%i)/2)*(gamma_incomplete(1/3,-1)-gamma(1/3)))/3
(%i21) float(%),expand; realpart(%);
(%o21) 1.34190441797742-3.33066907387547*10^-16*%i
(%o22) 1.34190441797742

(%i22) /* test*/
first(quad_qags(exp(x^3),x,0,1));
(%o23) 1.34190441797742

Aleksas D.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.math.utexas.edu/pipermail/maxima/attachments/20120109/51cd5131/attachment.html>


More information about the Maxima mailing list