Main content

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

Lesson 6: 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 differential equations

Separation of variables is a common method for solving differential equations. Learn how it's done and why it's called this way.

**Separation of variables**is a common method for solving differential equations. Let's see how it's done by solving the differential equation

#### Let's review this solution.

In rows $(1)$ to $(3)$ we manipulated the equation so it was in the form $f(y){\textstyle \phantom{\rule{0.167em}{0ex}}}dy=g(x){\textstyle \phantom{\rule{0.167em}{0ex}}}dx$ . In other words, we separated $x$ and $y$ so each variable had its own side, including the $dx$ and the $dy$ that formed the derivative expression $\frac{dy}{dx}$ . This is why the method is called "separation of variables."

In row $(4)$ we took the indefinite integral of each side of the equation. The underlying principle, as always with equations, is that if $f(y){\textstyle \phantom{\rule{0.167em}{0ex}}}dy$ is equal to $g(x){\textstyle \phantom{\rule{0.167em}{0ex}}}dx$ , then their indefinite integrals must also be equal.

In rows $(5)$ and $(6)$ we performed the integration with respect to $y$ (on the left-hand side) and with respect to $x$ (on the right-hand side) and then isolated $y$ .

We only added a constant $C$ on the right-hand side. Adding a constant to both sides would be unnecessary, because we can then move one of the constants to the other side and end up with a single constant.

In conclusion, the general solution of $\frac{dy}{dx}}={\displaystyle \frac{2x}{3{y}^{2}}$ is $y=\sqrt[3]{\phantom{A}{x}^{2}+C}$ . You can differentiate $y$ to verify this solution.

Looking back at the equation's solution, notice how the separation of variables that we performed in rows $(1)$ to $(3)$ allowed us to integrate each side and obtain an equation without a derivative.

## Want to join the conversation?

- How can we say that we're "integrating" both sides, if we're really just adding two long s, then pretending that the dy and dx we're part of the integration operator notation in the first place? How is this valid?

Also, you're integrating with respects to two different variables. How does this keep the equality?(13 votes)- It's easier to see if we work our way backwards.

Let 𝑔(𝑦) = 𝑓(𝑥) + 𝐶

Since these two functions are equal, that implicitly states that 𝑦 is a function of 𝑥, and we can write

𝑔(ℎ(𝑥)) = 𝑓(𝑥) + 𝐶

Also, since the functions are equal, the slopes of their tangent lines at any point must also be equal.

In other words, their derivatives are equal:

𝑔'(ℎ(𝑥)) ∙ ℎ'(𝑥) = 𝑓 '(𝑥)

𝑦 = ℎ(𝑥) ⇒ 𝑑𝑦∕𝑑𝑥 = ℎ'(𝑥), and we can write

𝑔'(𝑦) ∙ 𝑑𝑦∕𝑑𝑥 = 𝑓 '(𝑥)

Dividing both sides by 𝑔'(𝑦) we get the separable differential equation

𝑑𝑦∕𝑑𝑥 = 𝑓 '(𝑥)∕𝑔'(𝑦)

To conclude, a separable equation is basically nothing but the result of implicit differentiation, and to solve it we just reverse that process, namely take the antiderivative of both sides.(28 votes)

- How do we know what method to choose to solve a differential equations (whether that be by u-substitution, by parts, or by separating the variables)?(6 votes)
- Separable equations have dy/dx (or dy/dt) equal to some expression. U-substitution is when you see an expression within another (think of the chain rule) and also see the derivative. For example, 2x/(x^2+1), you can see x^2+1 as an expression within another (1/x) and its derivative(2x). Solving by parts is when you see something you can simplify when deriving or integrating by itself. Usually it is deriving something simple like x, or something you can't integrate easily like ln(x).(16 votes)

- Why when you take the integral of "y" in the left side there is no C?(4 votes)
- Whenever we have two constants C1 and C2, we can combine them to form one single constant C.

At first this may seem like cheating but really all we are saying is C1 and C2 are two mysterious unknown quantities, but we can think of C1 + C2 as 1 mysterious unknown as quantity, and we still haven't changed the value of the equation.

So given x + C1 = y + C2 we can simplify by writing y = x + C.

Happy learning! :-)(6 votes)

- What if the differential equation isn’t separable? How would we find the general/particular solution, y=f(x).

Also, is implicit integration possible?(4 votes)- Differential equations is an entire subfield of mathematics in it's own right. If an equation isn't separable, there are dozens of other techniques you might throw at it.

Also, yes, if you have an equation, you can integrate both sides, so long as you include a constant of integration on one side.(3 votes)

- How do we describe a natural phenomenon through a differential equation? Is there any video about that?(2 votes)
- The introductory ones in this unit deal with that. Even watering your plants can be written in differential equation! I can not attest it myself but I have heard that university-level physics is all about calculus and physics is basically the part of science that is trying to describe all natural phenomenons.Doing the problems in writing differential equations in this unit will give you a primary idea.(6 votes)

- In some cases i have been taught that an derivative dy/dx can't be treated as an ratio of the variables dy and dx. But in other cases like this one they are treated just like a ratio. In this example above you can multiply and divide dy and dx. Why is that? I asked my teachers and they say that its not included in the course but im curious.

kind regards,

Viktor(2 votes)- Khan made a video on it. https://www.khanacademy.org/math/ap-calculus-ab/ab-differential-equations-new/ab-7-6/v/addressing-treating-differentials-algebraically

He treats the dx's and dy's as super small changes in x and y, which makes them values that can be multiplied and divided. Keep in mind though that he does say it's a rather hand-wavy method, not too rigorous.(3 votes)

- Why do we need to take C into account when solving the equation if it can be any arbitrary constant. Like if the answer should be y=10/(e^x+c), why can't the answer be y=10/(e^x)+c?

Thank you.(2 votes)- Even though it is arbitrary, it needs to be associated with the correct term. c is added to e^(x), irrespective of what it is, not to the whole fraction. So, we add it it e^x and don't pull it out(3 votes)

- If I had a step something like: (-y = -x + C), why does it become (y = x + C) and not (y = x - C)?(1 vote)
- If you had a step like:
*(-y = -x + C)*,

let's rewrite this as:*(-y) = (-x) + (C)*

Now, let's multiply both the sides by (-1):*(-1)*(-y) = (-1)*[(-x) + (C)]*

Distributing the (-1) on the R.H.S. gives:*(-1)*(-y) = [(-1)*(-x)] + [(-1)*(C)]*

Here, the constant (C), when multiplied by (-1) will give another constant; which can be denoted by (C) again.

In the expression,*(-y = -x + C)*

We don't know the value of the constant (C). It can can be either positive or negative. So, multiplying with (-1) can give respective result. It's safe to keep the '+' sign in the original expression intact and the constant (C) in parenthesis.

Thus,*y = x + C*(3 votes)

- dy/dx=-xy

Solve separation of variables(1 vote)- 𝑑𝑦∕𝑑𝑥 = −𝑥𝑦

Multiplying both sides by (1∕𝑦)𝑑𝑥, we get

(1∕𝑦)𝑑𝑦 = −𝑥𝑑𝑥

Integrating both sides, we get

ln |𝑦| = −𝑥²∕2 + 𝐶, where 𝐶 is an arbitrary constant.

Solving for 𝑦, we get

𝑦 = ±𝑒^(−𝑥²∕2 + 𝐶) = ±𝑒^(−𝑥²∕2)⋅𝑒^𝐶

However, because 𝐶 is an arbitrary constant, then ±𝑒^𝐶 is also an arbitrary constant.

Thus, we can write 𝑦 = 𝐶𝑒^(−𝑥²∕2)(3 votes)

- what is the porpise of C?(1 vote)
- The derivative of "2x + 3" is 2. When we try to reverse this by finding the integral of 2, we initially get "2x". Notice how the "+ 3" is missing? So we need to add C, which is a variable that represents a constant value, giving us the result "2x + C".(2 votes)