Main content

### Course: AP®︎/College Calculus AB > Unit 7

Lesson 5: Finding general solutions using separation of variables- Separable equations introduction
- Addressing treating differentials algebraically
- Separable differential equations
- Separable differential equations: find the error
- Worked example: separable differential equations
- Separable differential equations
- Worked example: identifying separable equations
- Identifying separable equations
- Identify separable equations

© 2024 Khan AcademyTerms of usePrivacy PolicyCookie Notice

# Separable equations introduction

"Separation of variables" allows us to rewrite differential equations so we obtain an equality between two integrals we can evaluate. Separable equations are the class of differential equations that can be solved using this method.

## Want to join the conversation?

- Is a further explanation of3:54+ possible, please? (I can't quite understand what's happening there with the -2 before the x and the 1/2 etc ..and the subtitles ain't helping) Thanks in advance(47 votes)
- You are integrating:
`⌠ -x²`

⎮ -x e dx

⌡

To integrate it you use the substitution`u = -x²`

, and it's differential`du = -2x dx`

, which reduces the integral to`1/2∫e^u du = 1/2 e^u`

Replacing the u substitution you get`1/2 e^(-x²)`

(92 votes)

- dy/dx is just a notation not a fraction,so how does multiplying by dx and canceling it make sense?(38 votes)
- This is just a mnemonic device, although it does simply only a tiniest bit, here's a way without separating variables:

first you move all y's on one side, then all x's on the other side

then you move dy/dx to the side where you have all y terms:`y_terms * dy/dx = x_terms`

now integrate both sides, with respect to x:`∫ (y_terms * dy/dx) dx = ∫ x_terms dx`

`∫ dy/dx dx = y`

; but`∫ 1 dy = y`

as well, therefore:`∫ (dy/dx) dx = ∫ (1) dy = y`

So you end up with turning`∫ (y_terms dy/dx) dx = ∫ x_terms dx`

into`∫ y_terms dy = ∫ x_terms dx`

Also take a look at this: https://proofwiki.org/wiki/Separation_of_Variables

In general, you are**always**able to solve the same problem in calculus without separating dy's and dx's, that includes differential equations as well. Although that might require more time, thinking and space on your paper..

Hope that helps.(46 votes)

- At8:22why does it become e^[(-x^2)/2]? Shouldn't it be e^[-x] because i cancel the 2? Properties of powers, isn't it?(16 votes)
- This is a common mistake that I have seen. The correct answer is indeed e^[-x^2/2].

sqrt (e^[-x^2] ) = (e^[-x^2] )^(1/2) <-- in this instance, you multiply the exponents

e^[-x^2 * 1/2] = e^[-x^2/2]

From EEweb.com

a^[n/m] = (a^[1/m] ) ^n = (a^n)^[1/m]

--------------------------------------------------------------------------------------------------------------------------------------------(24 votes)

- around8:09, Sal sets y equal to the principle root of the left side, because the initial condition only gives a positive y value. But why is this necessary? Wouldn't it be just as correct to say plus or minus?(11 votes)
- I agree with Raviv; I'm fairly certain that the y^2=e^-x2 would also work. The question didn't specify that we had to find a function - since we can differentiate a conic section and end up with an expression for dy/dx, then if working backwards yields a curve that is not a function, that curve should still satisfy the conditions set forth in the problem.(7 votes)

- How can you tell if differential equations are separable?(5 votes)
- If we can write our DE in the form dy/dx = f(x) * g(y), it is called
**separable**.(4 votes)

- isn't -x2 always x2? So it could be simplified more.(1 vote)
- Be careful with your order of operations. Note that -x^2 is equivalent to -1*x^2, but not equal to (-x)^2. If we take a number like 3 for x, we get -1*(3)^2=-1*9=-9, however, for (-x)^2, we get (-3)^2=+9.(9 votes)

- Is there a reason that there is no video on solving a first order DE with the "Linear" method?

I'm referring particularly to this:

http://tutorial.math.lamar.edu/Classes/DE/Linear.aspx

Is it that this method isn't as useful or is it possible to do that type of problem with another method?

Or maybe it just hasn't been added yet.

I'm just trying to organize the various methods for solving a DE.

Thanks.(5 votes)- That method is very useful. I guess it just hadn't been added yet.(1 vote)

- At @3:34how can he integrate both sides with different "d's "? (one is dx and other is Dy ) . u have to integrate both sides with same dx right ?(6 votes)
- you can do that, here's a good way to think of it:

y dy/dx= -x/(e^(x^2))

integrate both sides with respect to x :

∫ y (dy/dx) dx = ∫ -x/(e^(x^2)) dx

∫ y dy = ∫ -x/(e^(x^2)) dx

and that's the same in the video but he multiplied both sides by dx first then put the integral sign.(1 vote)

- I'm a little bit confused on what our goal is and what we did here. I understand differential equations conceptually as an equation that's solutions are functions, but here what happened? Is the equation that we came up with at the end one of many equations?

Is this question, in word form, asking for a function whose derivative is equal to any of its points (x,y) where the x-value is multiplied by negative one and then divided by the y-coordinate multiplied by e to the power of the x-coordinate squared?

Was it the integration that turned the question from a differential equation to a solution of that differential equation?

Sorry for a lot of questions.(1 vote)- Let's take this one at a time:
**Q**:**Is the equation that we came up with at the end one of many equations**?

A: Not quite. What we got at the end (y = e^((-x^2)/2)) is the (specific) solution to the differential equation we started off with (dy/dx = -x/y(e^(x^2)). If we didn't have the initial condition of the equation passing through (0,1), the constant of integration would be in our solution. Then, it would represent a family of equations, and not any specific one**Q**:**Is this question, in word form, asking for a function whose derivative is equal to any of its points (x,y) where the x-value is multiplied by negative one and then divided by the y-coordinate multiplied by e to the power of the x-coordinate squared**?

A: You're close there. Given dy/dx = -x/y(e^(x^2)), it simply means that there is some function (y) whose derivative is -x/y(e^(x^2)). Our final answer's derivative is exactly this...but you might see these two and go, "Wait! dy/dx is -x/y(e^(x^2)), but the derivative of the final answer doesn't have y in it!" That's a reasonable observation. Now, in the equation for dy/dx, if you substitute y = e^((-x^2)/2) and compare it with the derivative of the y you get, you'll see that the answers will match.**Q**:**Was it the integration that turned the question from a differential equation to a solution of that differential equation**?

A: Yep! The integration did indeed turn a differential equation into the solution to the differential equation. Why? It's because of the nature of the derivative and integral. When you had dy/dx = -x/y(e^(x^2)), it was essentially the derivative of y given. To reverse this derivative, we integrate, as we know that doing so gives us back our original function y.

Also, no need to apologize for asking a lot of questions. The more you ask, the better understanding you gain!(7 votes)

- At3:35Sal first moves around the derivative operators and then adds the integral operators, which as far as I'm concerned, is an abuse of notation. I understand it "works", but given that it hasn't been formally defined I find it rather arcane. Isn't there some resource where this kind of notation is rigorously defined?, or is it used like that as a convention untill it breaks? I would like to learn some way of making it more rigorous, and more importantly, consistent, because I fear I might get confused later on when trying to use these still respectable methods. So even if it is obscure and impopular, if someone knows about some altern and more meaningful notation, I would like to know.(1 vote)
- It is definitely abuse of notation, as dy/dx isn't a fraction. But, treating it like one is extremely helpful (and at the level you're at, there really isn't a good example where treating it as a fraction fails. However, there are some caveats to this idea when you get to partial derivatives, where treating ∂y/∂x as a fraction could be pretty problematic). So, what Sal did isn't wrong from a non-rigorous point of view.

You'll need much more advanced Mathematics to be able to define differentials rigorously. So, just for now, thinking of it as a fraction will work (though yes, it really isn't, as dy and dx are infinitesimals, and they behave pretty differently as compared to finite numbers)(5 votes)

## Video transcript

- [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.