[SciPy-user] symbolic math & scipy (& maxima)...

Xavier Gnata gnata at obs.univ-lyon1.fr
Mon Aug 7 09:32:17 CDT 2006


Hi,

I perform the same kind of job with mathematica and python :
1) Compute what you want using mathematica/maxima/...
2) export the result as text in a syntax as close as possible as python 
once (mathematica can export to C code for instance)
3) Perform tiny modification on the resulting strings so that it 
corresponds with python syntax.
4) use exec() and that's it.

Maybe it is uglly but it is powerfull and simple ;)

Xavier.

> Hi,
>
> I need to find out the (first) derivative of associated Legendre polynomials
> defined in lpmn(m,n,x).
>
> The problem is that I want to derive vs theta where x=cos(theta).
>
> For instance, for m=1 & n=0,
> P_0^1(cos(theta)) = cos(theta) -> P_0^1'(cos(theta)) = -sin(theta)
>
> I know that scipy has not symbolic math module (and pythonica seems
> to be quite old & unmaintained).
>
> But I use maxima.
>
> So I wonder if it would be possible to run maxima, derive
> assoc_legendre_p(n,m,cos(theta)) vs. theta and "send" the result to python.
>
>
> How could I do that ?
>
> Cheers,
> _______________________________________________
> SciPy-user mailing list
> SciPy-user at scipy.org
> http://projects.scipy.org/mailman/listinfo/scipy-user
>
>   


-- 
############################################
Xavier Gnata
CRAL - Observatoire de Lyon
9, avenue Charles André
69561 Saint Genis Laval cedex
Phone: +33 4 78 86 85 28
Fax: +33 4 78 86 83 86
E-mail: gnata at obs.univ-lyon1.fr
############################################ 



More information about the SciPy-user mailing list