If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content

Worked example: slope field from equation

AP.CALC:
FUN‑7 (EU)
,
FUN‑7.C (LO)
,
FUN‑7.C.1 (EK)
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 match an equation to its slope field by considering the various slopes in the diagram.

Want to join the conversation?

  • leaf green style avatar for user George Jones
    what are some applications of slope fields and how is this math used in them ?
    (2 votes)
    Default Khan Academy avatar avatar for user
    • duskpin ultimate style avatar for user Davide Ghazal
      Slopes fields are commonly used in physics and engineering....they can also be used in biology and other life-science disciplines....For instance, they are adopted to describe predator-prey interactions! They predict how the growth rate of prey changes based on varying levels of predator population......
      (19 votes)
  • piceratops ultimate style avatar for user Joshua Ogunmefun
    So a slope is basically a cartesian plane or a graph which shows what the derivative of a graph would look like at every point on that plane? If that is true then what is the point of a slope field if you can just use the separation of variables technique to solve any differential equation?
    (2 votes)
    Default Khan Academy avatar avatar for user
  • duskpin ultimate style avatar for user Nathan Richardson
    In the case that there are multiple choices where your selected point works, shouldn't there be an easier (more efficient) way?
    If dy/dx=x-y, you could just find where the slope is 0 by saying 0=x-y, which implies that y=x. Therefore, along with the line y=x, there should be horizontal lines. This gives you an infinite number of points to work with, and D is the only solution.
    Was I just lucky for this problem, or would something like this work for all other problems?
    (2 votes)
    Default Khan Academy avatar avatar for user
  • blobby green style avatar for user multiribz
    let me put up,say (2,0),I should be getting some finite slope but I see that doesn't matches with any of the options?
    (1 vote)
    Default Khan Academy avatar avatar for user

Video transcript

- [Instructor] Which slope field is generated by the differential equation the derivative of y with respect to x is equal to x minus y? And like always pause this video and see if you can figure it out on your own. Well the easiest way to think about a slope field, if I was, if i needed to plot this slope field by hand, I would sample a bunch of x and y points. And then I would figure out what the derivative would have to be at that point. And so what we can do here, since we've already drawn some candidate slope fields for us, is figure out what we think the slope field should be at some points and see which of these diagrams, these graphs, or these slope fields actually show that. So let's, let me make a little table here, so I'm gonna have, x, y and then the derivative of y with respect to x. And we can do it at a bunch of values, so let's think about it. Let's think about when, we're at this point right over here. When x is two and y is two. When x is two and y is two, the derivative of y with respect to x is going to be two minus two. It's going to be equal to zero. And just with that, let's see, here this slope on this slope field does not look like it's zero. This looks like it's negative one. So already I can rule this one out. This slope right over looks like it's positive one. So I'll rule that out, it's definitely not zero. This slope also looks like positive one. So I can rule that one out. This slope at two comma two actually does look like zero. So I'm liking this one right over here. This slope at two comma two looks larger than one so I can rule that out. So it was that straight forward to deduce that this choice right over here is, if any of these are going to be the accurate slope field, it's this one. But just for kicks we could keep going to verify that this is indeed the slope field. So let's think about what happens when x is equal to a one, whenever x is equal to y, you're gonna get the derivative equaling zero. And you see that here, when you're at four, four, derivative equals zero. When it's six, six, derivative equals zero. At negative two, negative two, derivative equals zero. So that feels good, that this is the right slope field. And then we could pick other arbitrary points. Let's say when x is four, y is two, then the derivative here should be four minus two, which is going to be two. So when x is four, y is two, we do indeed see that the slope field is indicating a slope that looks like two right over here. And if it was the other way around, when x is let's say, x is negative four and y is negative two. The negative four, negative two. Well negative four minus negative two is going to be negative two. And you can see that right over here. Negative four, negative two, you can see the slope right over here. It's a little harder to see, looks like negative two. So once again using even just this first two comma two coordinates we were able to deduce this was the choice. But it just continues to confirm our original answer.