next up previous
Next: About this document ...

Numerical Experiments

For the equation y'=x with y(0)=1, here are some explicit suggestions to look at how the dependence of the error at t=1 depends on choices of method, stepsize, and rounding technique.

Euler Method 64 Bit:
Try step sizes of ${\displaystyle \frac{1}{32}}$, ${\displaystyle \frac{1}{128}}$, and ${\displaystyle \frac{1}{1024}}$. Can you see a truncation error approximately proportional to $\Delta t$?
Midpoint Euler Method 64 Bit:
Try step sizes of ${\displaystyle \frac{1}{16}}$ and ${\displaystyle \frac{1}{1024}}$. Can you see a truncation error approximately proportional to $(\Delta t)^2$?
Midpoint Euler Method 16 Bit Trunc round:
Try step sizes of ${\displaystyle \frac{1}{256}}$, ${\displaystyle
\frac{1}{512}}$, and ${\displaystyle \frac{1}{1024}}$. Can you see a roundoff error approximately proportional to ${\displaystyle \frac{1}{\sqrt{\Delta t}}}$?
Midpoint Euler Method 16 Bit Trunc down:
Try step sizes of ${\displaystyle \frac{1}{256}}$, ${\displaystyle
\frac{1}{512}}$, and ${\displaystyle \frac{1}{1024}}$. Can you see a roundoff error approximately proportional to ${\displaystyle \frac{1}{\Delta t}}$?





root
2002-08-23