To solve an initial-value problem numerically
y′ + y | = | 0 | |
y(0) | = | 1 |
Solve ODE + Numeric
, Functions defined: y
y′ + y = 0 y(0) = 1
This calculation defines a function y that can be evaluated at given arguments. You can use the function to generate a table of values, and as you will see in the next section, the function can be plotted.
Evaluate
y1
= . 367 88
y10.7
= 2. 254 3×10-5
To generate a table of function values for a function y
This calculation generates a list of function values for y as x varies from 0.1 to 1. As a check, solve the initial-value problem exactly.
Solve ODE + Exact
, (Specify t), Exact solution is: y
y′ + y = 0 y(0) = 1 t
= e-t
Compute the function values for
yt
= e-t for the same
arguments as before. You will find that they agree exactly, at least to the
indicated precision.