MATH 132 -- Calculus for Physical and Life Sciences 2

Slope fields for differential equations

April 20, 2005

Here is a picture of the slope field for the differential

equation   dy/dx = cos(x)*y+2 .  This picture shows a

collection of arrows plotted at equally spaced points

in the plane.  In each case, the slope of the arrow

indicates the values of f(x,y) = cos(x)*y+2  --

the ``slope function''.  Here's a portion of the slope field

>    with(DEtools):

>    DEplot(diff(y(x),x)=cos(x)*y(x)+2,[y(x)],x=-2..2,y=-8..8);

[Maple Plot]

One reason for introducing slope fields is that they help us visualize qualitative

behavior of solutions of the differential equation.  The equation

dy/dx = f(x,y)   says  that if the function   y = y (x)   is a solution, or in other

words:

                                    y '(x) = f( x, y(x) ),  

then at each point on the graph  y = f(x),  the slope of the tangent line

``matches'' the slope of the slope field at that point.    Among other things,

this information lets us visualize what the graphs of solutions must look

like.  Maple also has numerical methods built in that ``follow the slope

field'' to draw approximate solution graphs.  In the next plot we see two

of these,  one solutions with y(0) = 0  and a second with   y(0) = -2.

>    DEplot(diff(y(x),x)=cos(x)*y(x)+2,[y(x)],x=-2..2,[[y(0)=1],[y(0)=-2]],linecolor=black);

[Maple Plot]

>