 Welcome back to our lecture series Math 1220 Calculus II for students at Southern Utah University. As usual, I will be your professor today, Dr. Andrew Missildine. This video is the first of three for our lecture 28, for which actually this is a lecture I really like a lot. We're going to talk about linear first-order differential equations. We've been talking about differential equations for the last couple of lectures now, and this one is going to represent our final lecture on differential equations. And we're going to talk about how to solve a linear differential equation. So this is going to be somewhat, you know, by linear what we mean is something analogous to algebraic equations. If you have an algebraic equation which we say is linear, we would say something like y equals mx plus b. And the idea is if you look at your variable x, there's only one x present, and this is the first power. The first power. Sorry about that. Now for a linear differential equation, what we mean is we're looking for differential equations for which we only have the first power, so to speak. That is we're looking for ones which we only involve the derivative. So like this one right here, we have y prime equals my plus b. Where in this situation, m and b are both functions of x right here, functions of x, excuse me. All right, and so a first-order differential equation. I always love first-order differential equations because it always reminds me of Star Wars. We are the first order, you know, things like that. So we can focus on these linear first-order differential equations. They're going to look like the following. We have this equation right here. This is the format we're going to prefer to write them in. So we have y prime is equal, sorry, y prime plus p of x times y equals q of x. So this isn't quite the slope intercept form, so to speak, because we don't have solved for y prime right here. But we're going to like both the y prime and the y on the right-hand side, and we're going to see why we're going to like this in just a moment. So what I'm going to do is illustrate how to solve a first-order linear differential equation. And it's going to seem kind of mysterious at first, but let's see what it looks like. This right now is not in the so-called standard form that we saw on the previous slide, the standard form right here. So we're looking for some y prime plus p of x, y equals q of x. So we're going to have to do some modification of this thing first. So first we're going to move everything that's not a multiple of y or y prime to the right-hand side. So 2x to the fourth, sayonara. We're going to move you over there. And so we're going to get x, y prime, plus 6y equals negative 2x to the fourth, like so. So that's almost there, but then the other thing to notice is that for the standard form, we want the coefficient of the y prime to be a 1. So what we're going to do is we're going to divide the left side by x and the right side as well by x. And this is going to give us y prime plus 6 over x, y is equal to negative 2x cubed. And so what you're going to see here is that this right here is now a first order linear differential equation. And our p of x is equal to 6 over x and our q of x is equal to negative 2x cubed, like so. And so then, so we recognize it is in the standard form, what do we do next? This is what's so cool. We're going to take this equation and we're going to multiply both sides of the equation by x to the sixth. x to the sixth. So we have to do the same thing to both sides. And you might be wondering, why in the world are we doing x sixth? Just trust me, right? It's going to be really cool what happens here. So if we distribute the x to the sixth on the left-hand side, you're going to get x to the sixth times y prime. So in the next term, when you take x to the sixth times 6 over x, there's an x that'll cancel, right? So you left with the fifth power there, in which case you're going to get 6x to the fifth y is equal to negative 2x to the ninth. And so what we're going to do is we're going to focus on this right-hand side, kind of hum and ho a little bit here. We look at the left-hand side and we're like, you know, x to the sixth y prime plus 6x to the fifth y. This on the left-hand side looks like a derivative. I have a sum of two things, a sum of two products. We're in the first one of x to the sixth in the derivative of y. And then the second one I have 6x to the fifth, which is the derivative of x to the sixth times y. When you make that observation, you see the following x to the sixth y prime plus x to the sixth prime y equals negative 2x to the ninth. The left-hand side here looks like we did the product rule, the product rule. And so using that observation, we could rewrite the left-hand side as the derivative with respect to x of x to the sixth y. Equals negative 2x to the ninth. And so now what we can do is we can separate the variables, that is, we move the dx to the other side. We're going to get d of x to the sixth y is equal to negative 2x to the ninth dx. And so now that we have a differential on both sides, we now integrate both sides of this equation. The right-hand side, we're just integrating with respect to x. And so we're going to end up with negative 2x to the tenth over 10 plus a constant. On the right-hand side, well, we're just integrating d of x to the sixth y. And whenever you integrate d of u, that just always equals u plus a constant. It doesn't matter how complicated u is here, you're going to be getting just x to the sixth y on the left-hand side. It's pretty slick. In which case then, to solve for y, divide both sides by x to the sixth, x to the sixth. This will then give you y is equal to, well, 2 goes into 10, of course, five times. We have a 5 on the bottom. The x to the sixth is going to go into the x to the tenth there. You'll be left with four powers left. So you're going to get a negative one-fifth x to the fourth. And then you're going to be left with a c over x to the sixth. You have to be very cautious here because our c is an arbitrary constant. I often refer to as this gelatinous cube that just absorbs everything. The plus c can only absorb constants. It cannot absorb variables because although c is an arbitrary constant, c divided by x to the sixth is no longer an arbitrary constant. It's now a function with an unknown coefficient in front of us. If we stop right here, this actually gives us the solution to our differential equation from above. Remember, our differential equation was x, y prime. Let's sketch this down real quick. We have x, y prime plus 6y plus 2x to the fourth is equal to zero. And if we were to verify this fact right here, y prime, taking the derivative of this thing again, you're going to get negative four over five x cubed minus 6c over x to the seventh. If we times that by x, xy prime, you're going to get negative four x to the fifth, x to the fourth minus 6c over x to the sixth. Let's then, continuing on here, we're going to add 6y to that. Let's sketch it up a little bit. So if we take the whole enchilada x, y prime plus 6y plus 2x to the fourth, what do we get? We get x, y prime from before, which is negative four fifths x to the fourth minus 6c over x to the sixth. We are then going to add to it 6 times y, which is going to give us a negative six fifths x to the fourth plus 6c over x to the sixth. And then we have to also add to it 2x to the fourth. And we're going to see there's some cancellation that happens here. Like we have a negative 6c over x to the sixth that cancels with a positive 6c over x to the fourth. Here, we also are going to get, these are some like terms, we get negative four and negative six. That's going to give us negative 10 over five x to the fourth. So we get negative 10 over five x to the fourth. But we also add to that 2x to the fourth. Well, 10 over five is two. This is going to give us zero. So we see that we did in fact find the correct solution to this differential equation. And how did we find it? How did this work? Why did I multiply it by x to the sixth right here? Well, so let's kind of pull the curtain back and see the man behind the curtain. What we did is we used a technique called integrating factors. It's a really nice technique that we can use for these linear differential equations. So if you have a linear differential equation that's in the standard form, the integrating factor I of x is going to be e raised to an antiderivative of p. So let's look at the example we had from before. We had y prime plus, what was it again? Going back to this picture right here. We had y prime plus six over xy. So we had y prime plus six over xy is equal to something negative 2x cubed. I think it was. But the integrating factor actually doesn't depend on q. It depends only on p right here. So what we want to first do is find an antiderivative of six over x dx. And you can find any antiderivative you want. It doesn't matter which one you take. And so this is going to be six times the natural log of x plus a constant. But again, this is one situation where if you forget the constant, it doesn't matter. It really doesn't matter in this situation. It's kind of beautiful in that regard. So the integrating factor I of x is going to equal e to the six natural log of x. Which in order to simplify that, you can bring the six inside. You get e to the natural log of x to the sixth. In which case e to the natural log cancel out and just get x to the sixth. So what you did, what we did here is we use this integrating factor to find the solution to a first order linear differential equation. All one has to do is multiply the left hand side and the right hand side by this integrating factor. And everything will simplify nicely like we saw in this example. In the next video, I'll show you some more examples and the general process of using the integrating factor. It's going to be pretty fun. And so stay tuned for that video coming up now.