Updates:
        Labels: Solvers

Comment #1 on issue 472 by [email protected]: use numerical solver automatically?
http://code.google.com/p/sympy/issues/detail?id=472

This shouldn't be necessary since the solver can solve this equation. But probably a hint is needed to make it work:

from sympy.solvers.solvers import _tsolve as ts
e=exp(1)
a = 0.004*(8*e**(-300*t) -8*e**(-1200*t))*(720000*e**(-300*t)-11520000*e**(-
1200*t)) +0.004*(9600*e**(-1200*t) - 2400*e**(-300*t))**2
ta=terms_gcd(a)
ta
(46080.0 - 576000.0*exp(-900*t) + 737280.0*exp(-1800*t))*exp(-600*t)
_.subs(e**(-600*t),u)
u*(-576000.0*u**(3/2) + 737280.0*u**3 + 46080.0)
solve(_,u)
[0, 0.201541162404989, 0.781429110349124]
[ts(w-e**(-600*t),t) for w in _]
[[zoo], [0.00266960273088699], [0.000411051404934985]]
ans = _[1:]
[a.subs(t,ai[0]).n(2) for ai in ans]
[-2.8e-11, 8.0e-11]

_tsolve has to be used or else several hundred results are going to come back:

solve(e**(-t)-x,t)
[log(1/x)]
solve(e**(-2*t)-x,t)
[log(-sqrt(1/x)), log(sqrt(1/x))]
solve(e**(-3*t)-x,t)
[log(-(1/x)**(1/3)/2 - sqrt(3)*I*(1/x)**(1/3)/2), log(-(1/x)**(1/3)/2 + sqrt(3)*
I*(1/x)**(1/3)/2), log((1/x)**(1/3))]

Should a hint like 'principle' or 'real' be used here to just get a simple inversion of the e**(-600*t) - u -> t = log(u)/-600 ?

--
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.

Reply via email to