Euler's Method

Euler's Method numerically computes the approximate antiderivative, F of a function, f. This script computes and plots the function satisfying

F(x0) = 0.
The way it works: If f is an antiderivate of F then
Created by webMathematica = Created by webMathematica

ExerciseSolve for F(x0 + Δ). That is the formula that is used to approximate F.

  1. Enter the function you want the antiderivative of - there should be only one variable, x.FormBox[Cell[], TraditionalForm]
  2. Enter the formula for the function you believe to be the antiderivative F, if you have any idea what it is. Enter 0 if you have no guess.

  3. Enter starting x value, x0:
  4. Enter the step size, Δ:
  5. Enter the number of steps:

Approximate Antiderivative: Your guess:
Created by webMathematica Created by webMathematica
If you have entered an exact antiderivative in item 2 above, it won't agree with the approximation computed by Euler's method, but the differences should be approximately constant. Created by webMathematica

 
Range::range: Range specification in Range[0, steps] is not a machine-size
>   integer.
Range::range: Range specification in Range[0, -1 + steps] is not a
>   machine-size integer.
Transpose::nmtx: The first two levels of the one-dimensional list {x0 + delta
>   Range[0, steps], 3 delta fe} cannot be transposed.
Table::iterb: Iterator {k, 0, steps} does not have appropriate bounds.
Table::itform: Argument Fg[{k, 0, steps}] at position 2 does not have the
>   correct form for an iterator.
Transpose::nmtx: The first two levels of the one-dimensional list {Table[x0 +
>   k delta, {k, 0, steps}], Table[Fg[x0 + k delta], Fg[{k, 0, steps}]]}
>   cannot be transposed.
ListPlot::list: List expected at position 1 in ListPlot[Transpose[{x0 + delta
>   Range[0, steps], 3 delta fe}]].
Display::type: ListPlot[Transpose[{x0 + delta Range[0, steps], 3 delta fe}]]
>   is not a graphics, notebook, cell, or box expression.
ListPlot::list: List expected at position 1 in ListPlot[Transpose[{Table[x0 +
>   k delta, {k, 0, steps}], Table[Fg[x0 + k delta], Fg[{k, 0, steps}]]}]].
Display::type: ListPlot[Transpose[{Table[x0 + k delta, {k, 0, steps}],
>   Table[Fg[x0 + k delta], Fg[{k, 0, steps}]]}]] is not a graphics, notebook,
>   cell, or box expression.
Transpose::nmtx: The first two levels of the one-dimensional list {Table[x0 +
>   k delta, {k, 0, steps}], Transpose[{x0 + delta Range[0, steps], 3 delta
>   fe}], Table[Fg[x0 + k delta], Fg[{k, 0, steps}]], -Table[Fg[x0 + k delta],
>   Fg[{k, 0, steps}]] + Transpose[{x0 + delta Range[0, steps], 3 delta fe}]}
>   cannot be transposed.
Join::heads: Heads List and Transpose at positions 1 and 2 are expected to be
>   the same.


Ken Levasseur
Mathematical Sciences
UMass Lowell
Kenneth_Levasseur@uml.edu
UML WebMathematica Scripts
Notes on Mathematica