Comment #2 on issue 2069 by asmeurer: (-x).match(a*f(x)**b) fails to give
a, b = -x, 0 (was "classify_ode() doesn't catch homogeneous_coeff when y is
used")
http://code.google.com/p/sympy/issues/detail?id=2069
Ah, you're right. I assumed it was the y, because I know I used that symbol
as a dummy symbol for f(x) all over ode.py, but it seems that it's the sign
that really matters:
In [59]: classify_ode(diff(v(r),r) + 2*k/r*v(r) - q0, v(r))
Out[59]:
(1st_linear, 1st_homogeneous_coeff_best,
1st_homogeneous_coeff_subs_indep_div_dep,
1st_homogeneous_coeff_subs_dep_div_indep, 1st_linear_Integral,
1st_homogeneous_coeff_subs_indep_div_dep_Integral, 1st
_homogeneous_coeff_subs_dep_div_indep_Integral)
In [60]: classify_ode(diff(v(r),r) + 2*k/r*v(r) + q0, v(r))
Out[60]: (1st_linear, Bernoulli, 1st_linear_Integral, Bernoulli_Integral)
In [61]: classify_ode(diff(v(r),r) + 2*k/r*v(r) + y, v(r))
Out[61]: (1st_linear, Bernoulli, 1st_linear_Integral, Bernoulli_Integral)
In [62]: classify_ode(diff(v(r),r) + 2*k/r*v(r) - y, v(r))
Out[62]:
(1st_linear, 1st_homogeneous_coeff_best,
1st_homogeneous_coeff_subs_indep_div_dep,
1st_homogeneous_coeff_subs_dep_div_indep, 1st_linear_Integral,
1st_homogeneous_coeff_subs_indep_div_dep_Integral, 1st
_homogeneous_coeff_subs_dep_div_indep_Integral)
--
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.