1550078481-Ordinary_Differential_Equations__Roberts_

(jair2018) #1

516 Ordinary Differential Equations


EXAMPLE Solving the Initial Value Problem:

y' = x - y; y(O) = 2 on the interval [- 1 , 4]

Use SOLVEIVP to calculate and graph the solution of the initial value
problem y' = x - y; y(O) = 2 on the interval [-1, 4].


SOLUTION


We double click the CSODE icon and after the program selection screen
appears, we single click on the SOLVEIVP button. In the highlighted box
after "f(x,y) = " we input x - y and press the Enter key.
[NOTES: The only variables that may appear in the definition of f(x, y)
are x, X, y, and Y. Any constant that contains a decimal point must contain
at least one digit after the decimal point.]
The instruction "Enter the interval of integration [a, b]." appears. The
default interval setting is [-5.0, 5.0]. Since we want the interval of integration
to be [-1, 4], after "a=" we replace -5.0 by -1.0, after "b ="we replace 5.0
by 4.0 and then click the VERIFY a AND b button. The instruction "Enter
the initial condition y(c) = d" appears. The default values are c = 0.0 and
d = 0.0. Since the given initial condition is y(O) = 2, we changed the value
of d from 0.0 to 2.0 and clicked the VERIFY c AND d AND INTEGRATE
button. Boxes displaying the values of Xmin, Xmax, Ymin, and Ymax appear
and an Information for Graphing box appears. After reading the comments in
the Information for Graphing box, we click OK Since SOLVEIVP integrated
over the entire interval [ -1, 4], we made no change to the values of Xmin or
Xmax. We saw that Ymin = l.098613E+00 and Ymax = 6.154845E+00, so
we decided to change the value ofYmin to 0.0 and the value ofYmax to 10 .0.
Then we click the VERIFY Xmin, Xmax, Ymin, Ymax button. This causes
a set of options to appear. By default, the first option, GRAPH the solution,
is selected. We clicked the OK button and the graph shown in Figure A.12
appeared.
After viewing the graph, we click the OPTIONS button above the top right-
hand side of the graph. The set of options appears again. The second option
in the set, GRAPH the solution and direction field, produces a graph similar
to that shown in Figure A.12 with the direction field included. Instead of
selecting the second option, we selected the third option, PRINT the solution
on the monitor, and then clicked the OK button. The resulting output is
displayed in Figure A.13. By sl iding the button on the right-hand side of the
Solution Values box up and down, we can view all 1001 ordered pairs of the
solution in the interval [-1, 4]. Thus, we are able to search the list of ordered
pairs for a specific x value and find the associated y value, or we can search for
a specific y value and find the associated x value or values- in this manner,
we could find the first time the solution obtained a specific value.

Free download pdf