odes_euler
odes_euler,
considers the approximate solution of an ordinary differential equation (ODE)
using Euler's method.
The notes:
Scripts and functions:
-
euler.m,
accepts values of yprime, n, a, b, y0,
and uses Euler's method to approximate the solution from
a to b, using n steps, initial condition y0, and the
derivative function yprime(t,y).
-
expo_euler.m,
calls euler() with specific values of n, a, b, y0,
and plots the result.
-
expo_exact.m,
the exact solution to the exponential test problem
for given values of t and y0.
-
expo_prime.m,
the right hand side of the exponential test problem.
-
negexp_euler.m,
calls euler() with specific values of n, a, b, y0,
and plots the result.
-
negexp_exact.m,
the exact solution to the negative exponential test problem.
-
negexp_prime.m,
the right hand side of the negative exponential test problem.
-
pendulum_euler.m,
calls euler() with specific values of n, a, b, y0,
and plots the result.
-
pendulum_exact.m,
the exact solution to the pendulum test problem.
-
pendulum_prime.m,
the right hand side of the pendulum test problem.
-
pendulum_nonlinear_euler.m,
calls euler() with specific values of n, a, b, y0,
and plots the result.
-
pendulum_nonlinear_prime.m,
the right hand side of the nonlinear pendulum test problem.
-
quadratic_euler.m,
calls euler() with specific values of n, a, b, y0,
and plots the result.
-
quadratic_exact.m,
returns the exact solution to the quadratic test problem
for given values of t and y0.
-
quadratic_euler_error.m,
looks at the error in Euler's method to the quadratic test problem.
-
quadratic_prime.m,
the right hand side of the quadratic test problem.
Images:
-
expo.png,
a plot of an approximate solution of the exponential test problem.
-
negexp.png,
a plot of an approximate solution of the negative exponential test problem.
-
pendulum.png,
a plot of an approximate solution of the pendulum test problem.
-
pendulum_nonlinear.png,
a plot of an approximate solution of the nonlinear pendulum test problem.
-
quadratic.png,
a plot comparing exact and approximate solutions of the quadratic test problem.
-
steps.png,
illustrates how a continuous ODE is approximated by a sequence of steps.
Last revised on 28 October 2019.