← Return to lessonClass materials · 7.2
Verifying Solutions for Differential Equations
Lecture transcript
0:00Last time I made you a promise. Someone hands you a function and says it solves a differential equation. Do you believe them? Just like that? Take equations like these: d y d x equals x plus y, and y double prime plus nine y equals zero. You have no method for either one yet. Good news: today you don't need one. So here's today's question. Is the function a solution?
0:30And do you have to solve the equation to find out? We check it for every x, not at one lucky point. Let's go get that five. Start with x times d y d x equals two y. Divide by x, wherever x isn't zero: the equation asks for the slope two y over x. Try y equals x squared. At one, one, the equation asks for two times one over one: two.
1:03The curve's tangent there has slope two. A match. At two, four, it asks for two times four over two: four. The tangent has slope four. Another match. Two matches. So is that proof? Not yet. A stopped clock is right twice a day. Two points can't speak for every point. So check every x at once. For y equals x squared, y prime equals two x.
1:33Put it into the original equation: x times two x is two x squared. That's two y. It matches. Same expression on both sides, so it holds for every x, even at x equals zero, where we couldn't divide. When the equation is true for every x on an interval, the function is called a solution of the differential equation on that interval. Here that's every real x, so y equals x squared is a solution.
2:03Now a function that fails. Same equation, but y equals x cubed. At one, one, the curve's slope is three. But the equation asks for two times one over one: two. They don't match. Now check every x. y equals x cubed has y prime equals three x squared. If it were a solution, that slope would have to equal two y over x, for x not zero. Multiply by x and divide by two: y equals three halves x cubed.
2:38But our y is x cubed, not three halves x cubed. So y equals x cubed is not a solution. Is x squared the only solution? Try a whole family: y equals C x squared, for any constant C. Then y prime is two C x. Put it in: x times two C x is two C x squared. That's two y, for every C. C equals one gives x squared.
3:11C equals two is narrower. C equals one half is wider. C equals negative one is upside down. And C equals zero: y equals zero, flat on the x axis. Check it: y prime is zero, x times zero is zero, and two y is zero. A constant function can be a solution too. Every one of them is a solution: one equation, a whole family of solutions. Now find the one through the point one, three.
3:44Plug in x equals one and y equals three: C times one squared is three. So C is three: the pink one. So the point one, three picks one curve from this family. It's the same move you made in six point eight, finding C from a point, but now y is inside the equation, and we only check. Now an equation with y double prime: y double prime plus nine y equals zero. Move nine y over: it asks for y double prime to be negative nine times y.
4:19Try y equals sine of three x. Where did that come from? Don't worry. Finding functions like this isn't part of AP Calculus. You only check them. For the first derivative, use the chain rule: y prime is three cosine three x. Take the derivative once more, with the chain rule again: cosine turns into negative sine, and another three comes out. Three times three is nine, so y double prime is negative nine sine three x.
4:52That's negative nine times y. In the picture, y is green. y double prime is pink, negative nine times as tall, at every x, not just one point. At pi over six, they're one and negative nine. Put them into the equation: negative nine sine three x, plus nine sine three x, is zero, for every x. So y equals sine three x is a solution. With y double prime, you just take two derivatives.
5:24The check is the same. On the AP exam, a question can ask you to verify that a function is a solution of a differential equation. That means: put it in, and show both sides match. You don't have to solve anything. If there's an initial condition, check it as its own step. Example one. Show that y equals two e to the x, minus x, minus one, is a solution of the differential equation d y d x equals x plus y, with the initial condition y of zero equals one.
6:01The curve is drawn for you. The plan: work out each side by itself, check they're the same, then check the point. The left side is y prime: two e to the x stays two e to the x, the minus x gives minus one, and the constant minus one at the end gives zero. The right side is x plus y. Plug in y: x, plus two e to the x, minus x, minus one. x and negative x cancel, leaving two e to the x, minus one.
6:33The two sides are the same expression, so they match for every x, not just one. Then the point, as its own step: y of zero is two e to the zero, minus zero, minus one, which is two minus one, or one. On the curve, the slope at zero, one is zero plus one, which is one. So both checks pass. y equals two e to the x, minus x, minus one, is a solution, and it meets y of zero equals one.
7:04Alright. When you do these in your workbook: both sides first, then the point, every step on paper. Here's where a check can fool you. A fast answer checks y of zero equals one, and stops. Or it compares the two sides only at x equals zero. Watch. Take the straight line y equals x plus one: the pink line from the example. y of zero is zero plus one, which is one. It passes.
7:36At x equals zero, its slope is one. And x plus y is zero plus one, which is one. It passes there too. Now check every x. The left side, y prime, is one. The right side, x plus y, is x plus x plus one: two x plus one. One equals two x plus one only at x equals zero. So y equals x plus one is not a solution.
8:06Look at x equals one: the line is at two, and the curve is already higher. The line leaves the curve right after zero. It's the stopped clock: right at one point, wrong everywhere else. Show the two sides are the same expression, so they match for every x. One point is never enough. Then check the initial condition as a separate step: two checks, both written down. Example two. For which values of r is y equals x to the r a solution of x squared y double prime, minus two y, equals zero, for x greater than zero?
8:46Choice A: two only. Choice B: negative one only. Choice C: two and negative one. Choice D: negative two and one. The plan: two derivatives, put them in, then solve for r. And x greater than zero is the interval where it has to hold. y prime is r x to the r minus one. y double prime is r times the quantity r minus one, times x to the r minus two.
9:17Multiply by x squared: x squared, times r times r minus one, times x to the r minus two. The powers add: two plus r minus two is r. So x squared y double prime is r times r minus one, times x to the r. Now the whole left side, x squared y double prime minus two y, with y equals x to the r: r times r minus one, times x to the r, minus two x to the r.
9:49Factor out x to the r: the quantity r times r minus one, minus two, times x to the r, is zero. For x greater than zero, x to the r is a positive number, never zero, even when r is negative. So r squared minus r minus two is zero. Factor: r minus two, times r plus one. So r is two, or negative one. Both work. Don't drop the negative one: two only is choice A, the trap.
10:21And D has the signs flipped. So the answer is C: two and negative one. For the ones in your workbook: take two derivatives, put them in, then solve. So, back to today's question. Is it a solution? And did you have to solve the equation? No. You never solved the differential equation. Finding C or r was just algebra. Put the function in: if the equation is true for every x on the interval, it's a solution.
10:55And one point is a stopped clock: y equals x plus one passed at zero, and failed everywhere else. There can be a whole family of solutions, one for each constant. And the point one, three picked one curve from that family: C equals three. With y double prime in it, take two derivatives, then plug in y double prime and y. Try a few in your workbook, and if a step trips you up, write to me in the comments. What if nobody hands you a function?
11:27An equation like d y d x equals x plus y still tells you the slope at every point, and you can draw those slopes. Next up, seven point three: slope fields. See you there.