Separable differential equations
Separable equations introduction
- [voiceover] So now that we've spent some time thinking about what a differential equation is and even visualizing solutions to a differential equations using things like slope field, let's start seeing if we can actually solve differential equations. As we'll see, different types of differential equations might require different techniques and some of them we might not be able to solve at all using analytic techniques. We'd have to resort to numeric techniques to estimate the solutions. But let's go to what I would argue as the simplest form of differential equation to solve and that's what's called a Separable. Separable differential equation. And we will see in a second why it is called a separable differential equation. So let's say that we have the derivative of Y with respect to X is equal to negative X over Y E to the X squared. So we have this differential equation and we want to find the particular solution that goes through the point 0,1. I encourage you to pause this and I'll give you a hint. If you can on one side of this equation through algebra separate out the Ys and the DYs and on the other side have all the Xs and DXs, and then integrate. Perhaps you can find the particular solution to this differential equation that contains this point. Now if you can't do it don't worry because we're about to work through it. So like I said, let's use a little bit of algebra to get all the Ys and DYs on one side and all the Xs and DXs on the other side. So one way, let's say I want to get all the Ys and DYs on the left hand side, and all the Xs and DXs on the right hand side. Well, I can multiply both sides times Y. So I can multiply both sides times Y that has the effect of putting the Ys on the left hand side and then I can multiple both sides times DX. I can multiple both sides times DX and we kind of treat, you can treat these differentials as you would treat a variable when you're manipulating it to essentially separate out the variables. And so, this will cancel with that. And so, we are left with Y, DY. Y, DY is equal to negative X. And actually let me write it this way. Let me write it as negative X, E. Actually, I might need a little more space. So negative X E to the negative X squared DX. DX. Now why is this interesting? Because we could integrate both sides. And now this also highlights why we call it the separable. You won't be able to do this with every differential equation. You won't be able to algebraically separate the Ys and DYs on one side and the Xs and DXs on the other side. But this one we were able to. And so that's why this is called a separable differential equation. Differential equation. And it's usually the first technique that you should try. Hey, can I separate the Ys and the Xs and as I said, this is not going to be true of many, if not most differential equations. But now that we did this we can integrate both sides. So let's do that. So, I'll find a nice color to integrate with. So, I'm going to integrate both sides. Now if you integrate the left hand side what do you get? You get and remember, we're integrating with respect to Y here. So this is going to be Y squared over two and we could put some constant there. I could call that plus C one. And if you're integrating that that's going to be equal to. Now the right hand side we're integrating with respect to X. And let's see, you could do U substitution or you could recognize that look, the derivative of negative X squared is going to be negative two X. So if that was a two there and if you don't want to change the value of the integral you put the 1/2 right over there. And so now you could either do U substitution explicitly or you could do it in your head where you said U is equal to negative X squared and then DU will be negative to X, DX or you can kind of do this in your head at this point. So I have something and it's derivative so I really could just integrate with respect to that something too with respect to that U. So this is going to be 1/2. This 1/2 right over here. The anti-derivative. This is E to the negative X squared and then of course, I might have some other constant. I'll just call that C two. And once again, if this part over here what I just did seemed strange, the U substitution, you might want to review that piece. Now, what can I do here? We'll have a constant on the left hand side. It's an arbitrary constant. We don't know what it is. I haven't used this initial condition yet we could call it. So, let me just subtract C one from both sides. So if I just subtract C one from both sides I have an arbitrary so this is gonna cancel, and I have C two, sorry. Let me. So, this is C one. So these are going to cancel and C two minus C one. These are both constants, arbitrary constants and we don't know what they are yet. And so, we could just rewrite this as on the left hand side we have Y squared over two is equal to on the right hand side. I'll write 1/2 E. Let me write that in blue just because I wrote it in blue before. 1/2 E to the negative X squared and I'll just say C two minus C one. Let's just call that C. So if you take the sum of those two things let's just call that C. And so now, this is kind of a general solution. We don't know what this constant is and we haven't explicitly solved for Y yet but even in this form we can now find a particular solution using this initial condition. Let me separate it out. This was a part of this original expression right over here but using this initial condition. So, it tells us when X is zero, Y needs to be equal to one. So we would have one squared which is just one over two is equal to 1/2. E to the negative zero squared. Well, that's just going to be e to the zero is just one. This is gonna be 1/2 plus C and just like that we're able to figure out if you subtract 1/2 from both sides C is equal to zero. So the relationship between Y and X that goes through this point, we could just set C is equal to zero. So that's equal to zero. That's zero right over there. And so we are left with Y squared over two is equal to E to the negative X squared over two. Now we can multiply both sides by two and we're going to get Y squared. Y squared. Let me do that. So we're gonna get Y squared is equal to E to the negative X squared. Now, we can take the square root of both sides and you can say, well look, you know, Y squared is equal to this so Y could be equal to the plus or minus square root of E to the negative X squared. Of E to the negative X squared. But they gave us an initial condition where Y is actually positive. So we're finding the particular solution that goes through this point. That means Y is gonna be the positive square root. If this was a point zero negative one then we would say Y is the negative square root but we know that Y is the positive square root, it's the principal root right over there. So let me do that a little bit neater so we can get rid of, whoops. I thought I was writing in black. So we can get rid of this right over here. We're only going to be dealing with the positive square root so we could write Y is equal to E to the negative X squared to the 1/2 power and that of course is equal to E to the negative X squared over two. So this right over here is or Y equals E to the negative X squared over two is a particular solution that satisfies the initial conditions to this original differential equation. So just like that. Because we were able to just as a review, because this differential equation was setup in a way or because we could algebraically separate the Y, DYs from the Xs, DXs, we're able to just separate them out algebraically, integrate both sides and use the information given in the initial condition to find the particular solution.