On Thu, Aug 30, 2012 at 2:56 PM, Chris Smith <[email protected]> wrote:
>> There might even be some automated algorithm to do all the steps above
>> and spit out the final coefficients "a", "b" and "x",
>> but for now I am happy to do it explicitly.
>
> Maybe like this?
>
>
>>>> eq
> 2*Z*F(r) - 2*l*lam*F(r) + 2*l*Derivative(F(r), r) -
> 2*lam*r*Derivative(F(r), r) - 2*lam*F(r) + r*Derivative(F(r), r, r) +
> 2*Derivative(F(r), r)
>>>> f,df,d2f
> (F(r), Derivative(F(r), r), Derivative(F(r), r, r))
>>>> a,b,x
> (a, b, x)
>>>> solve([eq.coeff(w) - z for w, z in [ (d2f, x), (df, b-x), (f, -a) ]], 
>>>> a,b,x)
> {x: r, b: 2*l - 2*lam*r + r + 2, a: -2*Z + 2*l*lam + 2*lam}

Yes, but as I said, this gives the wrong a=-2*Z + 2*l*lam + 2*lam,
because one first has to transform the derivatives from "r" to "x".
After doing that, then one gets the correct a= l + 1 - Z/lam.

More importantly, in order to get this equation:

>>> eq
2*Z*F(r) - 2*l*lam*F(r) + 2*l*Derivative(F(r), r) -
2*lam*r*Derivative(F(r), r) - 2*lam*F(r) + r*Derivative(F(r), r, r) +
2*Derivative(F(r), r)

in the first place, one has to do some manipulation already. My
comment was that it'd be nice if sympy can figure this out
automatically, from the initial equation up to the final equation for
the hypergeometric function.

> Don't forget about the integral.transform method, too. It uses a
> change of variables as I recall and it might provide some help.

Ah yes, very useful.

SymPy is getting really cool things. Here is an older article about
special functions in Mathematica and how it was very important early
on:

http://www.stephenwolfram.com/publications/recent/specialfunctions/

Eventually our dsolve() will be able to handle hypergeometric functions too.

Ondrej

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" 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?hl=en.

Reply via email to