Issue 3845 in sympy: dsolve gives different answers

2 views
Skip to first unread message

sy...@googlecode.com

unread,
May 22, 2013, 1:57:06 PM5/22/13
to sympy-...@googlegroups.com
Status: Valid
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 3845 by smi...@gmail.com: dsolve gives different answers
http://code.google.com/p/sympy/issues/detail?id=3845

in PR 1964 I worked around different forms of the solution of an ode that
are being returned. I didn't track down the source of the variability.

eq2 = (2*x*f(x) + 1)/f(x) + (f(x) - x)/f(x)**2*f(x).diff(x)
sol2 = Eq(f(x), C1*exp(-x**2 + LambertW(C2*x*exp(x**2))))
sol2b = Eq(log(f(x)) + x/f(x) + x**2, C1)
sol2c = Eq(f(x), exp(C1 - x**2 + LambertW(C2*x*exp(x**2))))
# XXX why is there more than one form coming back from this?
# sol2 comes back with PYTHONHASHSEED=3016992991
# sol2c comes back with PYTHONHASHSEED=7938055
assert dsolve(eq2, f(x), hint='1st_exact') in [sol2, sol2b, sol2c]


--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

sy...@googlecode.com

unread,
May 23, 2013, 6:55:27 AM5/23/13
to sympy-...@googlegroups.com
Updates:
Labels: NeedsReview smichr

Comment #1 on issue 3845 by smi...@gmail.com: dsolve gives different answers
http://code.google.com/p/sympy/issues/detail?id=3845

A serial replacement was being used in constsimp and I think that was the
source of the indeterminism. PR 1964 will show if this is the case or not.

sy...@googlecode.com

unread,
Jun 14, 2013, 2:36:34 PM6/14/13
to sympy-...@googlegroups.com
Updates:
Status: Fixed

Comment #2 on issue 3845 by smi...@gmail.com: dsolve gives different answers
http://code.google.com/p/sympy/issues/detail?id=3845

(No comment was entered for this change.)
Reply all
Reply to author
Forward
0 new messages