Updates:
        Status: Started

Comment #7 on issue 2077 by smi...@gmail.com: classify_ode() doesn't catch a 1st_linear/separable ode
http://code.google.com/p/sympy/issues/detail?id=2077

OK, although we returned 4 classifications, I think the exact one is wrong. It should be linear, if I'm not mistaken. Here's the equation and proof (via sympy):


[Dbg]>>> eq
x*Derivative(f(x), x)/(k*x*f(x) + k*f(x)) + z + 2*f(x)/(k*x*f(x) + k*f(x)) + Derivative(f(x), x)/(k*x*f(x) + k*f(x))
[Dbg]>>> collect(eq, df, exact = True)
z + (x/(k*x*f(x) + k*f(x)) + 1/(k*x*f(x) + k*f(x)))*Derivative(f(x), x) + 2*f(x)/(k*x*f(x) + k*f(x))
[Dbg]>>> r[d]
2*_y/(_y*k*x + _y*k) + z
[Dbg]>>> r[e]
x/(_y*k*x + _y*k) + 1/(_y*k*x + _y*k)
[Dbg]>>> r[d].diff(y)
2*_y*(-k*x - k)/(_y*k*x + _y*k)**2 + 2/(_y*k*x + _y*k)
[Dbg]>>> r[e].diff(x)
-_y*k*x/(_y*k*x + _y*k)**2 - _y*k/(_y*k*x + _y*k)**2 + 1/(_y*k*x + _y*k)
[Dbg]>>> _-r[d].diff(y)
-2*_y*(-k*x - k)/(_y*k*x + _y*k)**2 + k*x*f(x) + k*f(x) - 2/(_y*k*x + _y*k)
[Dbg]>>> simplify(_)
k*(x + 1)*f(x)

That last term should be zero and it's clearly not. I don't know why this previously passed. It's fixed in my pull request https://github.com/sympy/sympy/pull/669 (to be updated after tests pass).

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

Reply via email to