Getting Started: Interpreting and Using Slope Fields
The key to using numerical methods for exploring differential equations lies in an example that we have seen before in a previous CSC - using slope fields to visualize solutions of differential equations. Let us consider again the differential equation
given in Example 1 above. Using the methods introduced earlier we write the following Maple commands:
with(plots):
with(DEtools):
slopeplot:=dfieldplot(diff(y(x),x)=24*x^3,y(x),x=-1..1,y=-2..2):
fcnplot:=plot(6*x^4-1,x=-1..1,y=-2..2,color=black):
display({slopeplot,fcnplot},title=`Slope Field of y'=24 x^3`);
The plot shows a distribution of slopes for the differential equation
. At each point (
,
) a short line segment is drawn, with slope
given by the differential equation. The particular solution found in Example 1 is seen to be the curve that passes through the initial point (0, -1) that "follows" the slope field. This suggests a simple way to approximate the desired particular solution numerically. Since the differential equation determines the slope at each point (
,
) of the curve we can approximate a nearby point (
,
) on the curve by following its tangent line. Denoting by
the increment in
we then have
(
)
Taking
Compare these values with the graph shown above. The simplicity of the idea is deceiving. The method (called
Euler's Method
) and its numerical cousins, turns out to be one of the most useful and powerful techniques for exploring solutions of differential equations when exact solutions are too difficult or impossible to obtain. The fact that it was tedious to generate the points is irrelevant. All we need to do is to call in our CAS reinforcements.
= 0.1, for example, and starting at the initial point (0, -1), we can generate the sequence of approximations
x y ----- ---------
0 -1
0.1 -1
0.2 -0.9976
0.3 -0.9784
0.4 -0.9136
0.5 -0.76
0.6 -0.46
0.7 0.0584
0.8 0.8816
0.9 2.1104
1.0 3.86