Transcript for:
Understanding Slope Fields in Differential Equations

in this video we're going to talk about how to draw a slope field and how to match it with the appropriate equation so let's talk about slopes if we have a slope of 0 what does that mean a slope of zero represents a horizontal line which looks like this now if we have a slope of one we have a line that's going up at a 45 degree angle and if the slope is two it's going to go up at a higher angle now if the slope is negative one it's going to go down at an angle of 45 degrees and if it's negative two even more so now what about if the slope is very large if it's a high number then you're going to have a vertical line or if it's undefined you still will have a vertical line so these are some things that you want to keep in mind when drawing a slope field so let's start with a practice problem let's say we have the differential equation y prime is equal to x go ahead and draw the slope field that corresponds to this equation so let's make a table we're gonna have x y and y prime now y prime does it depend on y it only depends on x so there's nothing that we could put in this column when x is 0 y prime is 0. when x is 1 that's going to be 1 and so forth so how can we plot this what does it mean so when x is zero the slope is zero y prime gives us the slope values so x is zero at the origin so we're going to draw okay i'm not sure what just happened there but we're going to draw a horizontal line at zero now y could be anything y could be one two three four five so since y prime doesn't depend on y anywhere where x is zero we're gonna have a slope of zero so at this point x is zero as well that's the point zero comma one and at zero comma two x is still zero so the slope is zero so whether we go up or down the slope will be the same now when x is one which is anywhere in this region the slope is one so now we need to draw a line with a slope of one and then when x is 2 the slope is going to be 2. now on the left side when x is negative 1 the slope is negative 1. and when x is negative two the slope will be negative two and so this is the slope field that we have for this example now if we draw a line we can get one of the solution curves and so we can see that the general solution has a parabolic shape now let's solve the differential equation y prime is basically d y over dx and let's separate the variables so let's multiply both sides by dx so we have d y is equal to x dx now let's find the anti-derivative of both sides the anti-derivative of d y is y and the anti-derivative of x is x squared over two and then plus some constant c so we can see that one half x squared has a parabolic shape it opens upward which is in harmony with this graph so the slope field can give you a good idea of what the shape of the solution to the equation should be now let's work on another simple example so let's say y prime is equal to y go ahead and plot the slope field that corresponds to that equation so let's make a table so notice that y prime does not depend on x so we don't need to put anything in that column so when y is zero y prime is zero so y is 0 anywhere along the x axis so at every point we're going to have a horizontal line now when y is 1 which is anywhere in this region the slope will be 1. and when y is 2 the slope will be 2. then when y is negative one the slope is negative one and then it's going to be negative two so to plot the solution of the differential equation it should look something like this it appears to be going in that direction and that looks like an exponential function now let's go ahead and solve this equation so let's replace y prime with d y over dx and just like before we're going to multiply both sides by dx so we're going to have d y is equal to y times dx and then divide both sides by y so on the left side we have one over y and d y is equal to dx on the right side so now we can find the antiderivative of both sides the integral of one over y is ln y and the antiderivative of dx or one dx is x plus c so now we're going to put both sides of the equation on the exponent of e so we're going to have e raised to the l and y is equal to e raised to the x plus c now e to the ln y the base is e and so this simplifies to just y and e to the x plus c let's say if you have x to the seven you can write that as x to the three plus four because seven is three plus four and then you can separate into two parts that's x cubed times x to the fourth so e to the x plus c can be written as e to the x times e to the c and e to the c is a constant so we can replace that whole thing with a constant so the solution is going to be y is equal to c e to the x and exponential functions have the general shape that looks something like that which is what we have in this example so once again the slope field it gives you a good shape of the solution to the differential equation now let's move on to our next example where y prime is x minus y so this time y prime depends on two variables as opposed to one in the last two examples so this is going to be a little bit harder to graph but we're going to follow the same process so let's start with zero when x is zero and y is zero the slope is going to be zero now notice that when x is 1 and y is 1 the slope will also be 0. when x is 2 and y is 2 the slope is 0. 2 minus 2 will be 0. so notice the pattern that's forming here so continuing the pattern anytime x and y have the same value the slope will be 0 and you want to look for patterns because it helps you to quickly plot the slope field now what is the next pattern that we can identify so what about when x is one and y is zero when x is one unit higher than y one minus zero will be one so we're gonna have a slope of one at this point now what about when x is two and y is one two minus one is still one and so the point two comma one is here and then the next point three comma two three minus two is one now if we go backwards this will take us to the point zero negative one and zero minus negative one is still positive one so then this point where x is negative one and y is negative two that's still going to give us a slope of one and so the pattern will continue now let's try the next point let's try two comma zero so two minus zero is two so the slope here will be two and then if we try the next point let's say three one three minus one is still two so we can see the same thing that's happening now what about this point let's make a new table so when x is zero and y is one zero minus one is negative one so this is going to look like this so this point here should be the same thing if it follows the pattern so when x is one and y is two one minus two is still negative one so now that a pattern has merged we can just continue the pattern let's focus on this point when x is zero and y is two so zero minus two is negative two and so this is going to look like that and then i imagine at this point should be the same that's when x is one and y is three one minus three is still negative two and then after that we can see that the slope is becoming more negative so the next one should look something like this it's going to be almost vertical we could just fill it in at this point and it's not going to change now continue in this trend if we plug in this point where x is 3 and y 0 the slope is going to be 3. so it's going to be almost vertical at that point and then after that we could just draw vertical lines because that's going to be the trend in this region so now we have a good estimate of the slope field that corresponds to this differential equation and it turns out that the solution or at least one solution that we can draw is this straight line here so notice that one of the solutions to this equation is a linear equation now if you want to know how to solve this differential equation how to integrate it there's another video i have on youtube entitled first order linear differential equations so if you watch that video you'll be able to see how you can solve that differential equation and so we need to do is put it in the appropriate form which is going to be y prime plus y is equal to x now once it's in standard form the video will show you what to do from this point so i'm going to give you the solution to the differential equation and you can verify it that it is indeed a solution so the solution is y is equal to x minus one and you can see it here this graph you can see the y-intercept is negative one so that point is zero negative one and if you plug in zero for x you're going to get negative one for y zero minus one is negative one so the solution passes through this point now we can verify that this is indeed the solution to this differential equation if we calculate y prime by taking the first derivative of this function the derivative of x minus 1 is going to be one and the derivative of negative one is zero so this is y prime y prime is one so let's plug in y prime and y into the differential equation so y prime is one and then we have x minus y where y is x minus one so this is going to be x minus x and then negative times negative one is plus one these two will cancel and so we can see one is equal to one so therefore this line in red represents the solution to the differential equation which is y is equal to x minus one now here's a multiple choice problem and we're given the graph of the slope field and we need to match it to the appropriate equation now what you need to do is pick a point and see if that point works for each equation so let's focus on this point at that point x is zero y is one and the slope notice that we have a horizontal blue line so y prime the slope has to be zero now let's look at answer choice a if we plug in these values will y prime be zero so y plus x that's gonna be one plus zero one plus zero is one it doesn't equal zero so we could eliminate answer choice a now you wanna eliminate every answer until you get the right answer now let's move on to answer choice b so x is zero y is one negative zero divided by one is zero so far b is okay it works for that point so we won't eliminate that answer now let's move on to part c y is one x is zero so this is two over zero so it's undefined which means we should have a vertical tangent not a horizontal line so we can eliminate answer choice c now moving on to answer choice d let's plug in the same points so y is one x is zero and so this is going to be one plus zero which is one so we need a slope of zero not one so that would correlate to a blue line that looks like that so d can be eliminated so the right answer is b that is the differential equation that corresponds to this slope field and so you just gotta plug in points and then you can match it with the right equation now looking at the slope field what type of graph do we have notice that we have the shape of a circle now you can have a big circle or you could have a small circle but the general shape is a circle now let's solve the differential equation so let's replace y prime of d y over dx and so that's equal to negative x over y and let's cross multiply so we're going to have y times d y and that's equal to negative x times dx so now let's integrate both sides the antiderivative of y is y squared over two and the anti-derivative of negative x is negative x squared over two plus c now i'm going to take this term move it to that side so i have x squared over two plus y squared over two that's equal to c let's multiply both sides of the equation by two so the twos will cancel and so we'll be left with x squared plus y squared which is equal to two c now 2c is a constant so we could just replace that with c so this is the general solution of the differential equation now x squared plus y squared equals c what equation does that look like so to speak so notice that this equation is identical to the equation of a circle which is x squared plus y squared and that's equal to r squared and r represents the radius of the circle which is a constant for a specific circle and so for this circle we can see that r is equal to two so for that red line that i drew if r is 2 the solution of that particular equation will be x squared plus y squared is equal to 4. now let's say if i drew the circle here so notice that the radius is one so this will correlate to this particular equation x squared plus y squared is equal to one so the constant c can change depending on if you're dealing with a small circle or with a large circle but nevertheless the general shape is still a circle and so that's it for this video hopefully it gave you a good introduction into slope fields how to graph it and how to match it to the appropriate equation thanks for watching you