1550078481-Ordinary_Differential_Equations__Roberts_

(jair2018) #1
CSODE User's Guide 511

graphed and the interval [Xmin, Xmax] on which the function is to be evalu-
ated. It is usually a good idea to select Xmin and Xmax so that Xmax - Xmin
is not too large and, perhaps, such that the difference is "nicely divisible" by
10, since in the graph to appear on the monitor the interval [Xmin, Xmax] is

subdivided into 10 subintervals of equal length, f, = (Xmax - Xmin)/10. So

if Xmin = -5 and Xmax = 5, each subinterval is of length e = 1. Whereas,


if Xmin = -3 and Xmax = 4, each subinterval is of length e =. 7. GRAPH


evaluates the function at 1001 equally spaced points Xi (i = 0, 1, .. ., 1000)

in the interval including the two endpoints. If the function f(x) is not de-
fined for any Xi in [Xmin, Xmax], then the computer indicates this and stops.
You may then change the function to be graphed or select a new interval on
which to graph the function. If f(xi) is defined for at least one Xi in the
specified interval, then the program determines the minimum value and the
maximum value of Yi = f(xi) for all i = 0, 1 , ... , 1000 for which f(xi) is de-
fined. These values are denoted by Ymin and Ymax respectively. You may
choose to graph the function over the region R bounded by the lines x = Xmin,
x = Xmax, y = Ymin, and y = Ymax or you may choose to use a different
value for Ymin or Ymax. After the computer displays the values it has deter-
mined for Ymin and Ymax, you will usually want to select different values to
be used for Ymin and Ymax. These values should be chosen so that Ymax -
Ymin is not too large and, perhaps, so that the difference is "nicely divisible"
by 10, since the vertical lines bounding Rare also divided into 10 subintervals
of equal length. If the difference between Ymax and Ymin is "reasonably
small,'' then select a new value for Ymin which is less than or equal to the
computer's value, select a new value for Ymax which is greater than or equal
to the computer's value, and, if you so choose, such that the difference is
"nicely divisible" by 10. However, if Ymin is negative and very large in mag-
nitude, then choose Ymin to be negative but smaller in magnitude than the
computer's value. Likewise, if Ymax is positive and large, then select Ymax
to be positive but smaller than the computer's value.


Let us use GRAPH to graph the function y = f(x) = x^2 - x + e-x/^2 sin 5x.
We double click the CSODE icon and when the selection screen appears, we
single click the GRAPH button. In the highlighted box after "f(x) =" we
input x'2 - x + exp(-x/2) sin(5 x) and press the Enter key.


[NOTES: The only variable that can appear in the definition of f(x) is
x or X. When entering built-in functions you may use lower or upper case
letters or a mixture-such as Exp or Sin. If the compiler does not accept what
you input, an error message will appear indicating the error you made and
the approximate location of the error. The location will not be exact because
of proportional font spacing. You will then be able to change the input in the
box after f(x) =.]


Since we want to graph the function on the interval [-5, 5), which is the
default interval, we simply click the VERIFY XMIN, XMAX AND CALCU-
LATE button. This causes the values ofYmin and Ymax on [-5, 5] to appear

Free download pdf