On Thu, Mar 26, 2009 at 9:58 PM, Ondrej Certik <ond...@certik.cz> wrote:
>
> Hi,
>
> today I had to solve some function for my chemical kinetics class, so
> I tried it in sympy first and I was surprised it just worked:

Do you have a nicely documented description of the algorithm sympy
uses to implement its solve?  E.g., Maxima at least claims in the
documentation to describe what its solve does.

William

>
> In [1]: var("E R T A beta")
> Out[1]: (E, R, T, A, β)
>
> In [2]: eq = Eq(E/(R*T**2), A/beta * exp(-E/(R*T)))
>
> In [3]: eq
> Out[3]:
>           -E
>          ───
>          R⋅T
>  E     A⋅ℯ
> ──── = ──────
>   2     β
> R⋅T
>
> In [4]: solve(eq, E)
> Out[4]:
> ⎡            ⎛A⋅T⎞⎤
> ⎢R⋅T⋅LambertW⎜───⎟⎥
> ⎣            ⎝ β ⎠⎦
>
>
> or if you don't use fixed width fonts:
>
> In [5]: print eq
> E/(R*T**2) == A*exp(-E/(R*T))/beta
>
> In [6]: print solve(eq, E)
> [R*T*LambertW(A*T/beta)]
>
>
> And then Sage:
>
> sage: var("E R T A beta")
> (E, R, T, A, beta)
> sage: eq = (E/(R*T**2) == A/beta * exp(-E/(R*T)))
> sage: eq
> E/(R*T^2) == A*e^(-(E/(R*T)))/beta
> sage: solve(eq, E)
> [E == A*R*T^2*e^(-(E/(R*T)))/beta]
>
> So it seems Maxima can't do it. Nor sympy in Sage though for some
> reason, even though sympy 0.6.3 outside sage can do it, so it shows
> some sage <-> sympy conversion bug. After we release 0.6.4, I'll look
> into that, in the meantime I created an issue for it:
>
> http://code.google.com/p/sympy/issues/detail?id=1353
>
>
> Ondrej
>
> >
>



-- 
William Stein
Associate Professor of Mathematics
University of Washington
http://wstein.org

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To post to this group, send email to sympy@googlegroups.com
To unsubscribe from this group, send email to sympy+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sympy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to