Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 1792 by kirzhanov: SymPy does not integrate a real power of sine/cosine
http://code.google.com/p/sympy/issues/detail?id=1792

I want to get a general explicit expression of an integral of this function:

     delta
  cos      (theta)

where delta is any positive real, but not integer value. It seems to me that this problem has a known solution, but SymPy
does no offer it.

A minimal program to demonstrate an issue is discussed below:

  1 #!/usr/bin/python
  2
  3 from sympy import *
  4

These are my variables:

  5 t=Symbol('theta')
  6 d=Symbol('delta')

This is the function which will be integrated:

  7 myfunction=cos(t)**(d)

First, let's try d=1 (or any other integer). Such integrals are very
well-known, the integration result can be found either on wikipedia
[http://en.wikipedia.org/wiki/List_of_integrals_of_trigonometric_functions]
or in a handbook (for example, Dwight H.B. Tables of integrals. 1957)

  8 print integrate(myfunction.subs({d:1}),(t,0,pi/2))

In this case SciPy gives an expected result: "1".

Now let's try to integrate expression cos(theta)**delta, were delta is not integer. In the next line value 1.5 is given to
delta variable, but you can try any other real non-integer value:

  9 print integrate(myfunction.subs({d:1.5}),(t,0,pi/2))

The result is "-Cos_2k_integrate(0.75, 0) + Cos_2k_integrate(0.75, pi/2)". It seems that I cannot do anything with this result - neither get an algebraic expression (which can contain special functions), nor calculate numerical value.

It seems that such integrals can be expressed via hypergeometric special function [http://en.wikipedia.org/wiki/Euler_hypergeometric_integral]. The antiderivative, given by Mathematica 7 to function

       delta
   cos      (theta)

is (Latex notation is used):

-\frac{\cos^{2+\delta}\theta \sin\theta}{(2 + \delta) |\sin\theta| }\;_2\mathbf{F}_1\left( \frac{2 +
delta}{2},\frac{1}{2},\frac{4+\delta}{2},\cos^2\theta \right)

Is it possible to implement calculation of antiderivatives for such functions?

Cheers,
Dima



--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
-- 
You received this message because you are subscribed to the Google Groups 
"sympy-issues" group.
To post to this group, send email to sympy-iss...@googlegroups.com.
To unsubscribe from this group, send email to 
sympy-issues+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sympy-issues?hl=en.


Reply via email to