We now know the basics of differential equations and their solutions, and here we're gonna dive a bit deeper as we talk about slope fields. Now remember that a derivative shows us the slope of a function at a given point, and slope fields use this idea to help visualize solutions to a differential equation, even if we don't actually know what those solutions are. This can be especially helpful for more tricky differential equations that we may not even know how to solve. Now the idea of slope fields can seem a bit tricky at first, but I'm going to break it all down for you here. So let's go ahead and get started.
Now slope fields, which you may also hear called direction fields, show us the shape of all possible solutions to a first-order differential equation of the form y′=f(x,y). In order to actually draw a slope field, we're just going to sketch short line segments at every single point on our coordinate system. The way that we determine the slopes of these line segments is by simply plugging each point into our derivative y′. How is this actually going to show us the shape of solutions to a differential equation? Remember earlier, we were reminded that a derivative shows us the slope of a function.
So if we know what those slopes are at every single point on our graph, we'll see some patterns start to emerge, which will show us the shape of solutions to a differential equation. Now this can feel really abstract when we're just talking about it, so let's actually come down to our example and sketch a slope field. Here we're asked to sketch a slope field for the differential equation y′=x-y. We need to draw short line segments at every single point on our coordinate system, but let's start small. We're gonna start by focusing in on just one point, the point (1, 0).
So that point is right here on my graph, and I need to sketch a line segment here. The way that I determine the slope of this line segment, again, is by plugging my point into my derivative. Here my derivative is given to me as y′=x-y. So taking x-y here for the point (1, 0) gives me 1-0=1. So this is the slope of my line segment, and I can go ahead and draw that line segment here on my graph.
Now moving on to my next point, (1, 1). Doing the same thing here, plugging these points into my derivative x-y. So here that's 1-1=0. So at the point (1, 1), I can draw a line segment that has a zero slope, so it's just a horizontal line. Moving on to my next point here, (1, 2), x-y, so 1-2=-1.
So this line will have a slope of -1 at the point (1, 2). Then for (2, 0), my next point here, x-y: 2-0=2. So this is going to be a positively sloped line that's a little bit steeper than what we've seen so far. Then my next point, (2, 1), plugging x-y, gives 2-1=1, the same exact slope that we saw at our first point. Finally, the last point we focus on: 2-2=0.
So I have another zero-sloped line segment, just a flat horizontal line. Now only having drawn the line segments for these six points, I can already see some patterns start to emerge. I can see that every time x and y are the same value, I’m going to get a zero slope. That’s going to happen all along that diagonal. We can see a similar pattern start to emerge along this diagonal as well, where all of these will have a slope of 1.
So with these patterns in mind, I’m gonna fill out the rest of my slope field. Now that we have our completed slope field, this shows us the shape of all possible solutions to our differential equation, which here was y′=x-y. Now let’s actually get a better idea for what this means by focusing in on a particular solution. In part (b) of our example, we’re asked to use the slope field to sketch the particular solution that passes through the point (-1, 2). But how do we actually do this?
Well, in order to sketch a particular solution curve, we’re going to go right through that initial condition, and then we’re going to follow along the slopes on our slope field. So here we’re given the initial condition (-1, 2). I’m going to go ahead and plot that point on my graph here, (-1, 2). Then, in order to actually draw my curve, I’m just going to follow along these slopes. As we go up here, we can see that our slopes get really steep.
So I’m going to draw my curve with a steep slope. Then in the other direction, we curve down and then end up going back up along what looks like a slant asymptote. Now you’ll notice here that I didn’t intentionally go on top of any other points on my slope field, and that’s because the only point that we know our solution goes through is that initial condition given to us in the problem, (-1, 2). So now we know what our particular solution looks like that passes through this point, and we can do this for any other point on our graph. Now we’re asked to do this again for the point (1, -2), sketching that particular solution as well.
So I’m going to go ahead and plot that point at (1, -2), and again, we want this to go through that initial condition and follow along the slopes on our slope field. I’m going to go ahead and follow along my slopes going in this direction. I can see that again, we get really steep here. And then in the other direction, we end up following along that slant asymptote again. So now we can see how a slope field helps us to visualize the solutions of a differential equation, even if we don’t actually know what those solutions are.
Now we’re going to continue getting practice with slope fields coming up in the next couple of videos. I’ll see you there.