Bug in limit or integrate
- Subject: Bug in limit or integrate
- From: Aleksas Domarkas
- Date: Tue, 3 Jan 2012 17:06:13 +0200
from
http://www.math.utexas.edu/pipermail/maxima/2012/027277.html
On Jan. 1, 2012, Barton Willis wrote:
---------------------------
>*Some definite integrals of exp(-x^4) are broken:*>**>* (%i6) integrate(exp(-t^4),t,0,1);*>* (%o6) (%i*(gamma(1/4)-gamma_incomplete(1/4,1)))/4*-----------------------------------
the definite integral of the real function exp(-x^n) over
the real interval (0,1) is broken (spurious imaginary parts,
wrong real parts) for n = 3 through 15, and probably forever.
-----------------------------------------------------------------
(%i1) exp_test(n) :=
( print (n," qags = ", first( quad_qags (exp(-x^n),x,0,1)),
" integrate = ",
expand(float(rectform(integrate(exp(-x^n),x,0,1))))))$
(%i2) for m thru 15 do exp_test(m)$
1 qags = 0.63212055882856 integrate = 0.63212055882856
2 qags = 0.74682413281243 integrate = 0.74682413281243
3 qags = 0.80751118213967 integrate =
0.69932519757296*%i-0.40375559106984
4 qags = 0.8448385947571 integrate = 0.8448385947571*%i
5 qags = 0.87007466768589 integrate =
0.82749018236601*%i+0.26886785869008
6 qags = 0.88826369875194 integrate =
0.76925892837871*%i+0.44413184937597
7 qags = 0.90199160301324 integrate =
0.70520543215755*%i+0.56238256584096
8 qags = 0.91271857185875 integrate =
0.64538949147622*%i+0.64538949147622
9 qags = 0.9213308364909 integrate =
0.59222004611848*%i+0.70578036756801
10 qags = 0.92839720283799 integrate =
0.54569818409775*%i+0.7510891146261
11 qags = 0.93429939205577 integrate =
0.5051203870693*%i+0.78598266428894
12 qags = 0.93930307080183 integrate =
0.46965153540091*%i+0.81346032116712
13 qags = 0.94359882032526 integrate =
0.43851223691831*%i+0.83551526125626
14 qags = 0.94732690220079 integrate =
0.41102973849353*%i+0.85351204660935
15 qags = 0.95059283193 integrate =
0.38664093739113*%i+0.86840976367727
------------------------------------------------
Ted
*************************************************************************************************************
Correct results are:
(%i1) S(k):='integrate(exp(-x^k),x,0,1)$
(%i2) for k:1 thru 15 do
(changevar(S(k),y=-x,y,x),ev(%%,nouns),
print((S(k)=%%)=float(%%)));
integrate(%e^(-x),x,0,1)
=1-%e^(-1)
=0.632120558828558
integrate(%e^(-x^2),x,0,1)
=(sqrt(%pi)*erf(1))/2
=0.746824132812427
integrate(%e^(-x^3),x,0,1) =(gamma(1/3)-gamma_incomplete(1/3,1))/3
=0.807511182139671
integrate(%e^(-x^4),x,0,1) =(gamma(1/4)-gamma_incomplete(1/4,1))/4
=0.844838594757102
integrate(%e^(-x^5),x,0,1) =(gamma(1/5)-gamma_incomplete(1/5,1))/5
=0.870074667685893
integrate(%e^(-x^6),x,0,1) =(gamma(1/6)-gamma_incomplete(1/6,1))/6
=0.888263698751937
integrate(%e^(-x^7),x,0,1) =(gamma(1/7)-gamma_incomplete(1/7,1))/7
=0.901991603013235
integrate(%e^(-x^8),x,0,1) =(gamma(1/8)-gamma_incomplete(1/8,1))/8
=0.91271857185875
integrate(%e^(-x^9),x,0,1) =(gamma(1/9)-gamma_incomplete(1/9,1))/9
=0.921330836490897
integrate(%e^(-x^10),x,0,1)=(gamma(1/10)-gamma_incomplete(1/10,1))/10=0.928397202837989
integrate(%e^(-x^11),x,0,1)=(gamma(1/11)-gamma_incomplete(1/11,1))/11
=0.934299392055766
integrate(%e^(-x^12),x,0,1)=(gamma(1/12)-gamma_incomplete(1/12,1))/12=0.939303070801829
integrate(%e^(-x^13),x,0,1)=(gamma(1/13)-gamma_incomplete(1/13,1))/13=0.94359882032526
integrate(%e^(-x^14),x,0,1)=(gamma(1/14)-gamma_incomplete(1/14,1))/14=0.947326902200789
integrate(%e^(-x^15),x,0,1)=(gamma(1/15)-gamma_incomplete(1/15,1))/15=0.950592831930002
(%o2) done
Questions:
1. How exact compute sum(1/((3*i+1)*i!),i=0..infinity) ?
2. WolframAlpha(http://www.wolframalpha.com/) return
sum_(i=0)^infinity1/((3 i+1) i!) = -1/3 (-1)^(2/3) (3 Gamma(4/3)-Gamma(1/3,
-1))~~1.3419
How compute this with maxima ?
3. How compute (-1)^(2/3) ?
(%i1) (-1)^(2/3);
(%o1) 1
or
(%i2) polarform(-1)^(2/3);
(%o2) (sqrt(3)*%i)/2-1/2
4. Prove, that sum(1/((3*i+1)*i!),i=0..infinity)
=integrate(exp(x^3),x,0,1)
Aleksas D