Initial-Value Problems

$\blacktriangleright$ To solve an initial-value problem numerically

1.
Start with a column matrix and enter an initial-value problem, such as
y + y = 0  
  y(0) = 1  

 with one equation per row.

2.
From the Solve ODE submenu, choose Numeric.


$\blacktriangleright$ Solve ODE + Numeric

y + y = 0
y(0) = 1
, Functions defined: y

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.


$\blacktriangleright$ Evaluate

y$\left(\vphantom{ 1}\right.$1$\left.\vphantom{ 1}\right)$ = . 367 88

y$\left(\vphantom{ 10.7}\right.$10.7$\left.\vphantom{ 10.7}\right)$ = 2. 254 3×10-5


$\blacktriangleright$ To generate a table of function values for a function y

1.
Define a function g(i) = 0.1i.

2.
From the Matrix submenu, choose Fill Matrix.

3.
In the dialog box, select 10 rows and 1 column.

4.
Select Defined by function and enter the function name g to create a column of numbers between 0 and 1.

5.
Select the column and enclose it with brackets.

6.
Place y at the left edge of the column.

7.
Choose Evaluate.

y$\displaystyle \left[\vphantom{
\begin{array}{c}
.1 \\
.2 \\
.3 \\
.4 \\
.5 \\
.6 \\
.7 \\
.8 \\
.9 \\
1.0
\end{array}
}\right.$$\displaystyle \begin{array}{c}
.1 \\
.2 \\
.3 \\
.4 \\
.5 \\
.6 \\
.7 \\
.8 \\
.9 \\
1.0
\end{array}$$\displaystyle \left.\vphantom{
\begin{array}{c}
.1 \\
.2 \\
.3 \\
.4 \\
.5 \\
.6 \\
.7 \\
.8 \\
.9 \\
1.0
\end{array}
}\right]$ =  $\displaystyle \left[\vphantom{
\begin{array}{c}
.90484 \\
.81873 \\
.7...
...4881 \\
.49659 \\
.44933 \\
.40657 \\
.36788
\end{array}
}\right.$$\displaystyle \begin{array}{c}
.90484 \\
.81873 \\
.74082 \\
.67032 \...
...3 \\
.54881 \\
.49659 \\
.44933 \\
.40657 \\
.36788
\end{array}$$\displaystyle \left.\vphantom{
\begin{array}{c}
.90484 \\
.81873 \\
.7...
...4881 \\
.49659 \\
.44933 \\
.40657 \\
.36788
\end{array}
}\right]$

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.


$\blacktriangleright$ Solve ODE + Exact

y + y = 0
y(0) = 1
, (Specify t), Exact solution is: y$\left(\vphantom{ t}\right.$t$\left.\vphantom{ t}\right)$ = e-t


Compute the function values for y$\left(\vphantom{ t}\right.$t$\left.\vphantom{ t}\right)$ = e-t for the same arguments as before. You will find that they agree exactly, at least to the indicated precision.

y$\displaystyle \left[\vphantom{
\begin{array}{c}
.1 \\
.2 \\
.3 \\
.4 \\
.5
\end{array}
}\right.$$\displaystyle \begin{array}{c}
.1 \\
.2 \\
.3 \\
.4 \\
.5
\end{array}$$\displaystyle \left.\vphantom{
\begin{array}{c}
.1 \\
.2 \\
.3 \\
.4 \\
.5
\end{array}
}\right]$ =  $\displaystyle \left[\vphantom{
\begin{array}{c}
.90484 \\
.81873 \\
.74082 \\
.67032 \\
.60653
\end{array}
}\right.$$\displaystyle \begin{array}{c}
.90484 \\
.81873 \\
.74082 \\
.67032 \\
.60653
\end{array}$$\displaystyle \left.\vphantom{
\begin{array}{c}
.90484 \\
.81873 \\
.74082 \\
.67032 \\
.60653
\end{array}
}\right]$