Mathematics 162                                 Laboratory 4                           Week of Feb. 15, 1993
	  
Name: _____________________________   Lab Partner: ___________________________
	  
Consulted with:  ____________________________________________________________

Direction Fields

Direction fields provide a simple graphical method for constructing solutions of first order differential equations.  Geometrically, the differential equation y' = f(x, y) says that the slope of the solution curve through the point (x, y) is the value of f(x, y).  We can indicate this on a graph by drawing a short line segment of slope f(x, y) through the point (x, y).  The collection of all such line segments is called the direction field of the differential equation.

Part 1:  Solution Curves

You and your lab partner should work together in lab, using just one computer.  You should also collaborate on writing the laboratory report and hand in just one report for your team.

As you learned in completing Part 0, drawing direction fields can be laborious.  Therefore, in the lab we will let Mathematica do the work for us.  A package of special Mathematica commands we will use is called DEGraphics.m; load it with this command

<<i:/course/root/math162/degraphi.m

The command below will generate a direction field for the equation y' = y – x2.  Execute the command and print out a copy of the output.  On the print-out, try to draw the solution of the differential equation which passes through the point (-1, 1).

DEfield[y - x^2,{x,-3,3},{y,-1,4}]

The command below will draw the solution passing through (–1, 1).  Execute it and compare its results with the curve you drew.  Did you get the right shape?  Does your solution have the same critical point(s) as Mathematica's?  If you made a big mistake, explain what fooled you.

solcurve[y - x^2,{x,-3,3},{y,-1,4},{-1,1}]

Get a colored pencil or pen, and the copy of the direction field above.  On the direction field, draw in the curve where y'(x) = 0.  Explain the significance of this curve.

Using a different color, draw in the curve where y''(x) = 0. (Hint:  You will need to differentiate the original differential equation to find this curve.  It may be helpful to get Mathematica to plot this curve before you draw it in.)  Explain its significance.

Taking into account the two curves you have now drawn, try to sketch in the solution of the differential equation that passes through (–1, 1/2).  After you have drawn your sketch, modify the command above so that it will draw this solution curve.  Compare your plot with Mathematica's as you did above.

Do you think the solution passing through (–1, 1) has more critical points than we can see in our plot?  Extend the the plot (make the x and y intervals larger) and see if you are right.

Part 2: Another Direction Field

Use the DEfield command to plot the direction field of the differential equation y' = xy + 1 over the same region as above (–3 < x < 3, –1 < y < 4).  Draw in the curves where y' = 0 and y'' = 0, and sketch in some representative solution curves.  Do all solution curves have the same number of critical points?

Consider the initial value problem  y' = xy + 1 y(x0) = y0.  Find initial values x0 and y0 that give solutions with the following behavior:

(a) y gets large and positive as x gets large and negative, and y gets large and positive
     as x gets large and positive.

(b) y gets large and negative as x gets large and negative, and y gets large and positive
     as x gets large and positive.

(c) y gets large and negative as x gets large and negative, and y gets large and negative
     as x gets large and positive.

You may want to check your answers by having Mathematica plot the solutions through the points you specified.