The error message gives a hint (unable to solve for coefficients). So somehow the point where solve() is called on the coefficients it doesn't work. You'll have to put some print statements in the code to see what is the input and output of solve that doesn't work.
Aaron Meurer On Thu, Mar 20, 2014 at 1:50 PM, Kundan Kumar <[email protected]> wrote: > Aaron, > When I am running dsolve for nonhomogeneous euler equation it is giving > error > > NotImplementedError: Could not solve `-x + 2*f(x) - exp(x) - > 3*Derivative(f(x), x) + Derivative(f(x), x, x)` using the method of > undetermined coefficients (unable to solve for coefficients File > "sympy/solvers/ode.py", line 561, in dsolve > return _helper_simplify(eq, hint, hints, simplify) > File "sympy/solvers/ode.py", line 583, in _helper_simplify > rv = odesimp(solvefunc(eq, func, order, match), func, order, hint) > File "sympy/solvers/ode.py", line 3300, in > ode_nth_linear_euler_eq_nonhomogeneous > return ode_nth_linear_constant_coeff_undetermined_coefficients(eq, func, > order, match).replace(x,log(x)) > File "sympy/solvers/ode.py", line 3862, in > ode_nth_linear_constant_coeff_undetermined_coefficients > return _solve_undetermined_coefficients(eq, func, order, match) > File "sympy/solvers/ode.py", line 3963, in > _solve_undetermined_coefficients > "(unable to solve for coefficients)." % eq) > NotImplementedError: Could not solve `-x + 2*f(x) - exp(x) - > 3*Derivative(f(x), x) + Derivative(f(x), x, x)` using the method of > undetermined coefficients (unable to solve for coefficients)) > > I read the code of undetermined coefficients, this error comes only when > there is no value of "list" of coefficients of Particular solution like a0, > a1, .. > Since the equation it is showing is perfect and it can easily solved by > method of undetermined coefficients. I checked collectterms, r['list'], > r['sol'], these are working fine. The most probably error may be arising due > to trialset. > Since you know the inside-out of this undetermined function, can you suggest > why this is happening? -- You received this message because you are subscribed to the Google Groups "sympy" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/sympy. To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/CAKgW%3D6JyvyrQw%2BrdmLz%2BGZWqGc72_3UNf45iU%2B%3DQti%2BNsd8OJw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
