Main content

### Course: Differential equations > Unit 1

Lesson 2: Slope fields- Slope fields introduction
- Worked example: equation from slope field
- Worked example: slope field from equation
- Worked example: forming a slope field
- Slope fields & equations
- Approximating solution curves in slope fields
- Worked example: range of solution curve from slope field
- Reasoning using slope fields

© 2024 Khan AcademyTerms of usePrivacy PolicyCookie Notice

# Worked example: forming a slope field

Given a differential equation in x and y, we can draw a segment with dy/dx as slope at any point (x,y). That's the slope field of the equation. See how we determine the slopes of a few segments in the slope field of an equation.

## Want to join the conversation?

- What computer software would create a slope field for us?(19 votes)
- This does it in a web browser:

https://www.desmos.com/calculator/p7vd3cdmei(31 votes)

- What are slope fields actually used for - i.e. what are some applications of slope fields?

Also, what exactly is a slope field telling us or describing?(4 votes)- Slope fields are used in environmental engineering to monitor (or remediate) an aquifer, in biology to understand predator/prey populations over a geographical area, in oceanography to measure currents, salinity, temp., etc.(13 votes)

- so in this case we have a set of solutions not one?am i right?(4 votes)
- Yes, If you solve it, you would get
`y(x) = c_1 e^x + 2 x + 2`

where c_1 is a constant, so in fact we have infinitely many solutions.Also, if you use a computer to graph the slope field you would find a family of curves.

*Hope this helps*(5 votes)

- Hi, can we use the Slope Fields for Higher Order Differential Eqns? Also how are Slope Fields helping us to solve Differential Eqns? :D(2 votes)
- A first-order differential equation is basically an equation in three variables: x, y, and y'. Because we have three pieces of information to compare, we essentially have three "dimensions" of information to graph: two dimensions as axes of the plane, and one represented by the slope lines.

If we try to use slope fields with higher-order differential equations, we need to pack more dimensions into our graph, for instance by creating 3D graphs or including colors. This makes the graph much harder to create and read, so we only use slope fields for first-order differential equations in practice.

Also, slope fields don't help us solve differential equations so much as they help us visualize the solutions. At best, if the slope field suggests a very simple-looking function, we may be able to guess a simple solution to the equation. But in most cases, we still have to do the hard work of solving the equation algebraically.(6 votes)

- how accurate do the little lines need to be? Is it enough to estimate the slopes?(3 votes)
- As long as you roughly sketch each slope, they will eventually look like a graph similar to that of the actual graph(3 votes)

- How do you know when to draw a vertical tangent line instead of just drawing no line segment at a point at all?(3 votes)
- Is testing points the best method to quickly answer these questions, or are there other techniques that could help on tests?(3 votes)
- I wonder if we could write out linear equations where the slopes would be the same. For instance if f'(x) = f(x) - 2x, when f(x) - 2x = 3, f'(x) would be 3. So in the line of f(x) = 2x + 3, We would have f'(x) be 3. So on and so forth. Is this a valid way of looking at it?(1 vote)

## Video transcript

- [Instructor] In drawing
the slope field for the differential equation, the
derivative of y with respect to x is equal to y minus 2x, I would place short line segments at select points on the xy-plane. Complete the sentences. At the point (-1,1) I would draw a short segment of slope blank, and like always pause this
video and see if you can fill out these three blanks. The short segments that
you're trying to draw to construct this slope field, you figure out their slope based on the differential equation
so you're saying when x is equal to -1 and y is equal to 1, what is the derivative
of y with respect to x, and that's what this
differential equation tells us. So for this first case, the
derivative of y with respect to x is going to be equal to
y, which is 1 - 2 times x, x is negative 1, so this is going to be -2
but you're subtracting it so it's gonna be +2, so the derivative of y with
respect to x at this point is going to be 3, so I would
draw a short line segment or a short segment of slope 3, and we keep going, at the point (0,2). Well let's see, when x is 0 and y is 2 the derivative of y with
respect to x is going to be equal to y which is 2 - 2 times 0, well that's just going to be 2. And then last but not
least, for this third point the derivative of y with
respect to x is going to be equal to y which is 3
- 2 times x, x here is 2, 2 times 2, 3 - 4 is equal to -1, and that's all that problem asks us to do, now if we actually had
to do it, it would look something like, I'll try
to draw it real fast, so let's see, let me make sure I have space for all of these points here, so that's my coordinate axis and I want to get the point (0,2), actually I want to go all the way to (2,3) so let me get some space here, so 1, 2, 3, and then 1, 2, 3, and then we have to go
-1 and once we might go right over here, and
so for this first one, this exercise isn't asking
us to do it but I'm just making it very clear how we
would construct the slope field, so the point (-1,1), a
short segment of slope 3, so slope 3 would look something like that, then at the point (0,2) a slope of 2, (0,2), the slope is going to
be 2 which looks something like that, and then at the point (2,3), at (2,3), a short segment of slope -1, so (2,3) a slope segment of slope -1, it would look something like that, and you would keep doing
this at more and more points, if you had a computer to do
it that's what the computer would do, and you would draw
these short line segments to indicate what the
derivative is at those points and you get a sense of,
I guess you would say the solution space for
that differential equation.