Status: New
Owner: ----
Labels: Type-Defect Priority-Medium
New issue 3600 by lorenzo....@gmail.com: Strange behaviour with the solve()
function
http://code.google.com/p/sympy/issues/detail?id=3600
Hello,
I have a function with some parameters and when I ask sympy to solve it
in the general form, it take some time (30 secs or so) and when I replace
the parameters with some values, instead of solving it much faster, my
computer starts using much more memory (one of the cores is at 100%) and
after some minutes and before it eats all my memory, I stop the process.
I attach here my code:
from sympy import *
r=var('r', real=True)
q=var('q', real=True)
rho=var('rho', real=True)
shame=var('shame', real=True)
gamma1=var('gamma1', real=True)
beta1=var('beta1', real=True)
w=var('w', real=True)
U1 = (1-
(1-shame)*((1-r)/(1+rho*r))**2)*gamma1*(1-r*(q+rho*q-rho))/(1+rho*r)+beta1*ln(w/(1+rho*r))
U1prime = U1.diff(r)
U1primeSub = U1prime.subs({rho:0.25, shame:-0.3, gamma1:1, beta1:4.7, w:1})
So, if I do:
rstar= solve(U1prime, r)
I get a generic solution (depending on rho, shame, gamma1, beta1 and w) in
30 secs or so. If, instead, I do:
rstar= solve(U1primeSub, r)
It get stucked. It should be, I think, the way around.
Thank you in advance,
Lorenzo
--
You received this message because you are subscribed to the Google Groups
"sympy-issues" group.
To post to this group, send email to sympy-issues@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.