How to sketch direction fields

 
 
sketching direction fields.jpeg
 
 
 

What is a direction field?

A direction field is a graph made up of lots of tiny little lines, each of which approximates the slope of the function in that area. You can create a direction field for any differential equation in the form

y=ay+bxy'=ay+bx

where yy' is the derivative of the function yy, and aa and bb are numerical coefficients of yy and xx.

Krista King Math.jpg

Hi! I'm krista.

I create online courses to help you rock your math class. Read more.

 
 

How to create a direction field for the differential equation

What you want to do is create a field of equally spaced coordinate points, and then evaluate the derivative at each of those coordinate points. Since the derivative is the same thing as the slope of the tangent line, finding the derivative at a particular point is like finding the slope of the tangent line there, which of course is an approximation of the slope of the actual function.

Once you find the value of the derivative at each coordinate point, you sketch a tiny line segment at the coordinate point, whose slope is the same as the value of the derivative.

Repeating this process across many coordinate points will create the direction field. From there, you can use the direction field to sketch solution curves through specific points in the field.

 
 
 

This is a step-by-step video walkthrough of how to sketch a direction field for a differential equation


 
Krista King Math Signup.png
 
Differential Equations course.png

Take the course

Want to learn more about Differential Equations? I have a step-by-step course for that. :)

 
 

 
 

An example of how to sketch the direction field

Example

Sketch a direction field for the equation and then sketch a solution curve that passes through (1,1)(1,1).

y=yxy'=y-x

 

For a differential equation in this form, we’ll sketch the direction field by using a set of coordinate pairs (x,y)(x,y) to find corresponding values for yy. For example, if we take the coordinate pair (x,y)=(2,2)(x,y)=(-2,-2), we can plug it into the differential equation and get

y=yxy'=y-x

y=2(2)y'=-2-(-2)

y=2+2y'=-2+2

y=0y'=0

Since yy' is the derivative (which is also the slope of the tangent line), we can say that the slope of the tangent line at (2,2)(-2,-2) is 00. To sketch this information into the direction field, we’d draw a very small horizontal line (because horizontal lines have a slope of 00), at the point (2,2)(-2,-2).

The trick with these kinds of problems is keeping all this information organized. We’ll start by picking values for xx, like x={2,1,0,1,2}x=\{-2,-1,0,1,2\}. Then we’ll choose the same values for yy, and we’ll pair each of them with each of the values we chose for xx. Since we have five values for xx, x={2,1,0,1,2}x=\{-2,-1,0,1,2\}, and the same five values for yy, y={2,1,0,1,2}y=\{-2,-1,0,1,2\}, we’ll get 5×5=255\times5=25 coordinate points. We’ll plug each of these 2525 points into the differential equation to find an associated value for yy'.

For x=2x=-2,

 
direction field.png
 

For x=1x=-1,

 
direction fields.png
 

For x=0x=0,

 
direction fields.png
 

For x=1x=1,

 
direction fields.png
 

For x=2x=2,

 
direction fields.png
 
 
 
sketching direction fields

A direction field is a graph made up of lots of tiny little lines, each of which approximates the slope of the function in that area.

To sketch this information into the direction field, we navigate to the coordinate point (x,y)(x,y), and then sketch a tiny line that has slope equal to the corresponding value yy'. Remember, if y=0y'=0, the small line will be horizontal. If yy' is positive, the line will be tilting to the right, and if yy' is negative, the line will be tilting to the left. The larger the value of yy', either positive or negative, the steeper the line will be.

This is a good start, but we should really calculate more values in order to get a clearer picture of the direction field. If we take values for xx and yy that are halfway between those we’ve already evaluated, and we plot the associated values of yy', and we starting plotting as much as we can, we get a direction field that looks like this:

 
graph of a direction field.png
 

To address the second part of the question, we’ll sketch the solution curve that passes through (1,1)(1,1).

 
solution curve in the direction field.png
 

The solution curve is never exact. Instead, it’s an approximation we create as we follow the small lines in our direction field that indicate the slope of the curve near each line.

 
Krista King.png
 

Get access to the complete Differential Equations course