MAT2680 Differential Equations, FA2013

You must be logged in to reply to this topic.

  • code for backwards euler method for maple
  • #13605

    Keven Deng
    Participant

    backwards euler’s method

    f:= (t,y)-> enter differential equation;
    t[0]:= initial t:
    y[0]:= initial y:
    h:= step size:
    for k from 0 to 10 do<


    how many terms you want
    x[k+1]:= x[k]+h:
    bb := solve(b=y[k]+h*f(t[k+1],b),b);
    y[k+1]:= evalf(min(bb));
    end do;

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.