The Implicit/Backward Euler Method

Kurt Bryan and SIMIODE

A notebook to experiment with the implicit or backward Euler method.

Defining The Backward Euler Method

The following definition allows us to use the Backward Euler method within Mathematica's NDSolve command.

BackwardEuler = {"FixedStep", Method -> {"ImplicitRungeKutta", 
  "Coefficients" -> "ImplicitRungeKuttaRadauIIACoefficients", 
  "DifferenceOrder" -> 1, "ImplicitSolver" -> {"FixedPoint", 
  AccuracyGoal -> MachinePrecision, PrecisionGoal -> MachinePrecision, 
  "IterationSafetyFactor" -> 1}}};

A Test Case

Here is an ODE on which to experiment

de = u'[t] == -u[t]+t

Let's define the solution as "backeuler"

backeuler = NDSolve[{de,u[0]==1},u,{t,0,5},   StartingStepSize-> 0.1, Method -> BackwardEuler]

Examine the solution value at t = 5.

u[5]/.backeuler

Plot the solution

Plot[Evaluate[u[t]/.backeuler],{t,0,5},PlotRange->All]