Status: Valid
Owner: ----
Labels: Type-Defect Priority-Medium
New issue 3363 by [email protected]: Integration of cos(x^n)/x^n and
cosh(x^n)/x^n
http://code.google.com/p/sympy/issues/detail?id=3363
Integration of cos(x^n)/x^n and cosh(x^n)/x^n gives invalid results
In [23]: integrate(cos(x**n)/x**n, x, meijerg=True)
Out[23]: x*x**(-n)*gamma(-1/2 + 1/(2*n))*hyper((-1/2 + 1/(2*n),), (1/2,
1/2 + 1/(2*n)), -x**(2*n)/4)/(2*n*gamma(1/2 + 1/(2*n)))
In [24]: combsimp(_)
Out[24]: x*x**(-n)*gamma(-1/2 + 1/(2*n))*hyper((-1/2 + 1/(2*n),), (1/2,
1/2 + 1/(2*n)), -x**(2*n)/4)/(2*n*gamma(1/2 + 1/(2*n)))
In [25]: _.subs(n,1)
Out[25]: zoo*hyper((0,), (1/2, 1), -x**2/4)
In [26]: hyperexpand(_)
Out[26]: zoo
and
In [32]: integrate(cosh(x**n)/x**n, x, meijerg=True)
Out[32]: x*x**(-n)*gamma(-1/2 + 1/(2*n))*hyper((-1/2 + 1/(2*n),), (1/2,
1/2 + 1/(2*n)), x**(2*n)/4)/(2*n*gamma(1/2 + 1/(2*n)))
In [33]: combsimp(_)
Out[33]: x*x**(-n)*gamma(-1/2 + 1/(2*n))*hyper((-1/2 + 1/(2*n),), (1/2,
1/2 + 1/(2*n)), x**(2*n)/4)/(2*n*gamma(1/2 + 1/(2*n)))
In [34]: hyperexpand(_)
Out[34]: x*x**(-n)*gamma(-1/2 + 1/(2*n))*hyper((-1/2 + 1/(2*n),), (1/2,
1/2 + 1/(2*n)), x**(2*n)/4)/(2*n*gamma(1/2 + 1/(2*n)))
In [35]: _.subs(n,1)
Out[35]: zoo*hyper((0,), (1/2, 1), x**2/4)
In [36]: hyperexpand(_)
Out[36]: zoo
The complex infinity comes probably from wrongly simplified gamma
prefactors.
--
You received this message because you are subscribed to the Google Groups
"sympy-issues" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sympy-issues?hl=en.