Menu

#550 ode2( 'diff(y,x)=%i*y+sin(x), y, x) => div by 0

closed
nobody
Lisp Core (457)
5
2009-06-28
2004-04-08
No

ode2( 'diff(y,x)=%i*y+sin(x), y, x) gives division by 0

Discussion

  • Stavros Macrakis

    Logged In: YES
    user_id=588346

    Same problem if you solve the equation 'diff(y,x)=
    k*y+sin(x) -- the solution is not valid at k=%i, but it
    doesn't ask.

    Correct solution for k=%i is

    y = -((-x-%i*%c-%i)*sin(x)+(%i*x-%c)*cos(x))/2

     
  • Robert Dodier

    Robert Dodier - 2006-07-29
    • labels: --> Lisp Core
     
  • Robert Dodier

    Robert Dodier - 2006-07-29

    Logged In: YES
    user_id=501686

    Observed in 5.9.3cvs.

     
  • Dieter Kaiser

    Dieter Kaiser - 2009-06-28
    • status: open --> closed
     
  • Dieter Kaiser

    Dieter Kaiser - 2009-06-28

    With the current CVS version 5.18post this differential equation gives a correct result:

    (%i53) ode2('diff(y,x)-%i*y-sin(x),y,x);
    (%o53) y = (%c-%i*(x-%i*%e^-(2*%i*x)/2)/2)*%e^(%i*x)
    (%i54) expand(%);
    (%o54) y = -%i*x*%e^(%i*x)/2+%c*%e^(%i*x)-%e^-(%i*x)/4

    I think this is now correct because of an improvement of the routine SCE-INT in sin.lisp with revision 1.48.

    Closing this bug report as fixed.

    Dieter Kaiser

     

Log in to post a comment.