4.3 Separable Equations

Recognising when the two variables can be pulled apart, separating and integrating both sides, why only one arbitrary constant survives, implicit against explicit solutions, the equilibrium solutions lost by dividing, and applications.

Subject: Calculus II · 68 slides · symbolic lesson

Open the interactive version of this deck

What this lesson covers

The lesson, slide by slide

1. Separable Equations

Title

Calculus II · Section 4.3

Pull the variables apart, integrate, and keep what the division throws away

2. What this lesson gives you

Objectives

Section 4.2 drew solutions from direction fields and approximated them with Euler's method. For one large family of equations you can do better: write the solutions down exactly.

OpenStax Calculus Volume 2, §4.3 Separable Equations §4.3, pp. 381-392 — learning objectives 4.3.1 and 4.3.2

So far in this chapter you have met differential equations as pictures and as numbers. A direction field shows the shape of every solution at once, and Euler's method walks along one of them in small steps. Both are approximate. This lesson gives you the first method that produces exact formulas.

It does not work on every equation. It works when the right-hand side splits into a piece that depends only on x times a piece that depends only on y, and a surprising number of the equations that describe the physical world have exactly that shape: growth and decay, mixing, cooling, draining.

Watch for the second theme as well. The method involves a division, and every division can throw something away. Half of doing this well is noticing what was lost and putting it back, and in applications the lost piece is usually the most important answer.

3. Before anything new: two things you already know

Warm-up

Discussion prompt

First: which constant functions solve the autonomous equation below, and why? Second: find the antiderivative of one over (3y + 2) with respect to y. Both answers are pieces of today's method.

Write both answers before you reveal them. The first question is Section 4.2 in one line: a constant function has derivative zero, so it solves the equation exactly at the heights where the right-hand side is zero. Here those heights are zero and two.

The second question is an ordinary substitution from integration. Let u be 3y plus 2, so du is three dy, and the integral becomes one third of the integral of du over u, which is a third of a logarithm. The absolute value matters, because 3y plus 2 can be negative.

Keep both results in view. The substitution is how you will integrate the y side of today's equations, and the constant solutions are the ones today's method will quietly lose unless you go looking for them first.

4. Recognising separable equations

Section

Part 1

5. A function of x times a function of y

Concept

Separable differential equation (4.3) — A first-order equation that can be written with its right-hand side as a function of x alone multiplied by a function of y alone.

\[ y' = f(x)\,g(y) \]

The word refers to that factorisation: once the right-hand side is a product, the x-part and the y-part can be moved to opposite sides of the equation and dealt with one at a time.

\[ y' = (x^2 - 4)(3y + 2), \quad y' = 6x^2 + 4x, \quad y' = \sec y + \tan y \]

OpenStax Calculus Volume 2, §4.3 Separable Equations §4.3, p. 381 — the definition and its first examples

The definition is short, and everything hangs on the word times. The right-hand side must be one function of x multiplied by one function of y. When it is, you can divide the y part over to the left and leave the x part on the right, and each side becomes an integral in a single variable.

Look at the three examples. The first is visibly a product. The second has no y at all, which is fine: the function of y is simply the constant one. The third has no x, so the function of x is the constant one. Equations with no x on the right are called autonomous, and every one of them is separable.

A useful habit is to ask the question before doing any algebra: can I write this as something in x times something in y? If the answer is no, this method will not help, and no amount of manipulation later will rescue it.

6. Reading the definition piece by piece

Notation

Annotate

On: \( \frac{dy}{dx} = f(x)\cdot g(y) \)

  • Everything that depends on x, and nothing that depends on y. It may be the constant 1: then the equation is autonomous, and every autonomous equation is separable.
  • Everything that depends on y, and nothing that depends on x. It may be the constant 1: then the equation is a plain antiderivative problem, y' = f(x).
  • The two factors must be MULTIPLIED. A sum such as x + y does not qualify, however it is rearranged.
  • Wherever the y-factor vanishes, y' is 0 for every x: a horizontal constant solution. Watch these; the method is about to divide by g.

Reveal the notes one at a time. The first two make the same point from opposite sides: either factor is allowed to be the constant one. If the y-factor is one, you are just finding an antiderivative, which is the special case you met in Section 4.1. If the x-factor is one, the equation is autonomous, like the equilibrium examples of Section 4.2.

The third note is the one that decides everything. Multiplied means multiplied. A sum of an x-term and a y-term is a different kind of equation, and later in this part you will see a short proof that no rearrangement can turn x plus y into a product.

The last note is a warning you should carry into every problem. Wherever the y-factor is zero, the constant function at that height is a solution. The method is about to divide by the y-factor, so these solutions are exactly the ones it cannot see.

7. The picture of a product

Concept

Figure (svg): Two direction fields side by side. Left: y prime equals (x minus 2)(y plus 3); the flat segments line up along the horizontal line y equals minus 3 and the vertical line x equals 2. Right: y prime equals x plus y; the flat segments line up along the slanted line y equals minus x.

A product is zero when either factor is, so a separable field is flat along whole horizontal and vertical lines. A sum is flat along a slanted line, the fingerprint of an equation that will not separate.

Where is the field flat? A product is zero exactly when one of its factors is zero, so a separable equation is flat along whole horizontal lines, where g is zero, and whole vertical lines, where f is zero. A sum like x plus y is flat along a slanted line instead.

Look at where the little segments are flat. In the left panel they line up along one horizontal line and one vertical line. That is what a product does: it is zero when either factor is zero, and a factor that depends only on y is zero along a whole horizontal line, while a factor that depends only on x is zero along a whole vertical line.

The horizontal line is a solution curve. The field is flat all along it, so a curve that starts there stays there: that is the constant solution y equal to minus 3. The vertical line is not a solution; it is only where the solutions turn around.

In the right panel the flat segments lie along a slanted line, because x plus y is zero when y equals minus x. A slanted line of zeros cannot come from a product of a function of x and a function of y, so this picture alone tells you that equation will not separate.

8. The book's four examples: finding f and g

Worked example

Write each right-hand side as a function of x times a function of y.

\[ \text{(a) } y' = (x^2-4)(3y+2) \qquad \text{(b) } y' = 6x^2 + 4x \]

\[ \text{(c) } y' = \sec y + \tan y \qquad \text{(d) } y' = xy + 3x - 2y - 6 \]

Read (a) directly

Why: It is already a product.

\[ f(x) = x^2 - 4, \quad g(y) = 3y + 2 \]

Let y be absent in (b)

Why: The y-factor is the constant function one.

\[ f(x) = 6x^2 + 4x, \quad g(y) = 1 \]

Let x be absent in (c)

Why: Now the x-factor is one: this equation is autonomous.

\[ f(x) = 1, \quad g(y) = \sec y + \tan y \]

Group (d) in pairs

Why: Take x out of the first pair and minus 2 out of the second.

\[ xy + 3x - 2y - 6 = x(y+3) - 2(y+3) \]

Factor out the common bracket

Why: Both groups share y plus 3.

\[ x(y+3) - 2(y+3) = (x-2)(y+3) \]

Check (d) by expanding

Why: Multiplying out recovers the original four terms. (The book prints the factors as x plus 3 times y minus 2, which expands to xy minus 2x plus 3y minus 6: a misprint.)

\[ (x-2)(y+3) = xy + 3x - 2y - 6 \;\checkmark \]

OpenStax Calculus Volume 2, §4.3 Separable Equations §4.3, p. 381 — the four examples after equation 4.3

Three of the four are quick reads. The first is already written as a product. The second has no y, so its y-factor is one. The third has no x, so its x-factor is one, and the book points out that this makes it autonomous.

The fourth needs work, and the move is factoring by grouping. Take x out of the first two terms and minus 2 out of the last two, and the same bracket, y plus 3, appears in both. Pull it out and you have x minus 2 times y plus 3.

Always check a factorisation by multiplying it back out, and here the check does real work. The book prints the answer with the numbers swapped, x plus 3 times y minus 2, and expanding that gives minus 2x plus 3y rather than plus 3x minus 2y. Trust the expansion over the printed line.

9. Why a sum cannot be pulled apart

Concept

Suppose, for a contradiction, that x plus y could be written as a product of a function of x and a function of y.

\[ x + y = F(x)\,G(y) \quad \text{for all } x, y \]

\[ y = 0: \quad x = F(x)\,G(0) \quad\Longrightarrow\quad F(x) = \frac{x}{G(0)} \]

\[ x = 0: \quad y = F(0)\,G(y) = 0 \cdot G(y) = 0 \]

The last line says y is zero for every y, which is false. So no such factorisation exists, and y prime equal to x plus y is not separable. It is linear, and Section 4.5 solves it by a different method.

\[ \text{but } e^{x+y} = e^{x}\,e^{y} \quad \text{is a product} \]

This is a proof by contradiction, and it uses nothing more than plugging in zeros. Suppose x plus y really were some function of x times some function of y for every x and y.

Put y equal to zero. The left side becomes x, so x equals the function of x times a fixed number. If that number were zero, x would be zero for every x, which is absurd; so it is not zero, and the function of x must be x divided by it. In particular the function of x is zero at x equal to zero. Now put x equal to zero in the original identity: the left side is y, and the right side is zero times something, which is zero. So y would be zero for every y. That is false, so the factorisation cannot exist.

Contrast the last line. The exponential of x plus y looks like a sum inside, but the exponent law turns it into a product, so it does separate. Always rewrite before you judge.

10. Trap: integrating a sum as if it separated

Trap

The trap

Faced with a sum, a tempting move:

\[ y' = x + y \]

\[ y = \int x\,dx + \int y\,dx \]

\[ y = \tfrac{x^2}{2} + xy + C \]

Wrong. The last integral treated y as a constant.

The fix

y is an unknown function of x, so the integral of y with respect to x cannot be written down before y is known. Separation works only when y can be moved to the side with dy. Check by differentiating: the claimed answer does not satisfy the equation.

\[ \tfrac{d}{dx}\left(\tfrac{x^2}{2} + xy\right) = x + y + xy' \]

This mistake comes from treating the notation mechanically. It feels as if you can integrate each term on the right with respect to x, and the x term is fine. The y term is not, because y is not a constant: it is the unknown function you are trying to find.

The integral of y with respect to x means the area under the solution curve, and you cannot write that down before you know the curve. Writing xy for it pretends y does not change as x changes.

The check exposes it immediately. Differentiate the claimed answer with the product rule and you get an extra term, x times y prime, that the equation does not have. Whenever you are unsure whether a manipulation was legal, differentiating your answer is the fastest judge.

11. Separable or not?

Sorting

Sort into buckets

Sort each equation: can its right-hand side be written as f(x) times g(y)?

Separable
y' = x²y + y; y' = e^(x − y); y' = xy + x + y + 1; y' = y / x
Not separable
y' = x + y; y' = sin(xy); y' = ln x + ln y; y' = x² + y²
sep
x²y + y = (x² + 1)y; e^(x − y) = eˣ · e^(−y); xy + x + y + 1 = (x + 1)(y + 1); y/x = (1/x) · y. Each becomes a product after one rewrite.
not
x + y and x² + y² are sums; ln x + ln y is a sum too (it equals ln(xy), a function of the product, not a product of functions); sin(xy) cannot be split into a function of x times a function of y.

For each item, try to rewrite the right-hand side as something in x times something in y. Do the rewriting before you decide; several of these only reveal their shape after one step.

Four of them factor. The first has a common factor of y. The exponential of x minus y splits by the exponent law into e to the x times e to the minus y. The four-term expression groups into x plus 1 times y plus 1, exactly as in the book's fourth example. And y over x is one over x times y.

The other four are sums or functions of a combination that cannot be split. The one that catches people is ln x plus ln y. It equals the logarithm of x times y, which sounds like a product, but it is a function of a product, and as a sum of an x-term and a y-term it fails for the same reason x plus y does.

12. Separate, then integrate

Section

Part 2

13. Why moving dx across is legal

Concept

Writing dy over g of y equals f of x dx looks like splitting a derivative in two. It is really a substitution. Start from a solution y of x, at points where g of y is not zero.

\[ \frac{y'(x)}{g(y(x))} = f(x) \]

\[ \int \frac{y'(x)}{g(y(x))}\,dx = \int f(x)\,dx \]

\[ u = y(x), \quad du = y'(x)\,dx \]

\[ \int \frac{du}{g(u)} = \int f(x)\,dx \]

That last line is exactly what you get by writing dy over g of y equals f of x dx and integrating each side in its own variable. The shorthand is the chain rule run backwards.

You may have been told that dy over dx is not really a fraction, and then watched people multiply both sides by dx anyway. This slide shows why the manoeuvre gives the right answer: it is a substitution in disguise.

Start from an actual solution, a function y of x. Divide the equation by the y-factor, which is allowed wherever it is not zero, and integrate both sides with respect to x. On the left you have the derivative of y divided by a function of y. Substituting u equal to y of x, so du equals y prime dx, turns that integral into the integral of du over g of u.

The result is exactly what you get from the shorthand: write dy over g of y on one side and f of x dx on the other, and integrate. So the shorthand is safe to use, and the substitution argument also tells you precisely where it can fail, at the heights where g of y is zero.

14. The five-step strategy

Concept

Figure (svg): A flow diagram of five boxes left to right: 1, where is g of y zero, giving constant solutions; 2, separate dy over g of y equals f of x dx; 3, integrate both sides with one constant; 4, solve for y if you can; 5, use the initial value to fix C. A dashed path runs from box 1 underneath the others to box 5, labelled: constant solutions rejoin the answer.

Step 1 is the only step that looks at what division throws away. Its answers travel round the outside and must be added back to the family at the end.

\[ \int \frac{dy}{g(y)} = \int f(x)\,dx + C \]

Step 4 says solve for y if possible. Often it is not, and an equation relating x and y is an acceptable answer: an implicit solution.

OpenStax Calculus Volume 2, §4.3 Separable Equations §4.3, p. 381 — Problem-Solving Strategy: Separation of Variables

Follow the diagram from left to right. The middle three boxes are the method people remember: separate, integrate, solve. The first and last boxes are the ones people forget, and they are what turn a plausible calculation into a complete answer.

Step 1 comes first for a reason. Before you divide by the y-factor, find every height where it is zero, because those constant solutions are about to disappear from view. The dashed path carries them round the outside of the calculation and adds them back at the end.

Notice the phrase if you can in step 4. Sometimes you cannot isolate y, and that is acceptable: an equation connecting x and y that every solution satisfies is a legitimate answer, called an implicit solution. You will meet one shortly.

15. Example 4.10, part 1: separate and integrate

Worked example

Find the general solution of the equation below by separation of variables.

\[ y' = (x^2 - 4)(3y + 2) \]

Find the constant solutions

Why: The y-factor is zero at one height.

\[ 3y + 2 = 0 \;\Longrightarrow\; y = -\tfrac23 \]

Separate

Why: Divide by 3y plus 2, allowed wherever it is not zero, and multiply by dx.

\[ \frac{dy}{3y+2} = (x^2 - 4)\,dx \]

Integrate the left side

Why: Substitute u equal to 3y plus 2, so du is 3 dy.

\[ \int \frac{dy}{3y+2} = \frac13\int\frac{du}{u} = \frac13\ln|3y+2| \]

Integrate the right side

Why: Power rule, and the one constant goes here.

\[ \int (x^2-4)\,dx = \frac{x^3}{3} - 4x + C \]

Set them equal

Why: This is already a correct, implicit general solution.

\[ \frac13\ln|3y+2| = \frac{x^3}{3} - 4x + C \]

Check by differentiating implicitly

Why: Differentiate both sides with respect to x, using the chain rule on the left; multiplying by 3y plus 2 gives back the equation.

\[ \frac13\cdot\frac{3y'}{3y+2} = x^2 - 4 \;\Longrightarrow\; y' = (x^2-4)(3y+2) \]

OpenStax Calculus Volume 2, §4.3 Separable Equations §4.3, p. 382 — Example 4.10, steps 1 to 3

Step 1 first: the y-factor 3y plus 2 is zero at minus two thirds, so that constant function is a solution. Write it down now, before the division hides it.

The left integral is the warm-up integral from the start of the lesson, a substitution giving one third of the log of the absolute value of 3y plus 2. The right side is a polynomial. The single arbitrary constant goes on the right, and the next slide explains why one is enough.

Stop at the line where the two integrals are set equal. It is already a correct general solution, just an implicit one. The check proves it: differentiate both sides with respect to x, remembering the chain rule on the left because y depends on x, and you get y prime over 3y plus 2 on the left, which rearranges to the original equation.

16. Example 4.10, part 2: taming the constant

Worked example

Solve the implicit answer for y, renaming the constant as it absorbs each operation.

\[ \frac13\ln|3y+2| = \frac{x^3}{3} - 4x + C \]

Multiply by 3

Why: Three times an arbitrary constant is just another arbitrary constant.

\[ \ln|3y+2| = x^3 - 12x + C_1, \quad C_1 = 3C \]

Exponentiate both sides

Why: e to a sum is a product of exponentials.

\[ |3y+2| = e^{C_1}\,e^{x^3-12x} = C_2\,e^{x^3-12x}, \quad C_2 > 0 \]

Drop the absolute value

Why: Plus or minus a positive constant is any nonzero constant.

\[ 3y + 2 = C\,e^{x^3-12x}, \quad C \ne 0 \]

Let C equal 0 as well

Why: That gives y equal to minus two thirds, the constant solution from step 1, so one formula now covers every solution.

\[ C = 0: \quad y = -\tfrac23 \]

Solve for y

Why: Subtract 2, divide by 3.

\[ y = \frac{-2 + C\,e^{x^3-12x}}{3} \]

Check by substituting

Why: Differentiate the answer; the factor C times the exponential is exactly 3y plus 2.

\[ y' = \frac{C(3x^2-12)e^{x^3-12x}}{3} = (x^2-4)\cdot C e^{x^3-12x} = (x^2-4)(3y+2) \]

OpenStax Calculus Volume 2, §4.3 Separable Equations §4.3, pp. 382-383 — Example 4.10, steps 4 and 5

Now isolate y, and watch what happens to the constant at each step. Multiplying by 3 turns C into 3C, still any number, so rename it. Exponentiating turns the constant into e to that constant, which is positive, so rename it again and record that it is positive.

Removing the absolute value is the delicate step. The absolute value of 3y plus 2 equals a positive constant times the exponential, so 3y plus 2 itself equals either plus or minus that constant times the exponential. Plus or minus a positive number covers every nonzero number, so one constant C, allowed to be positive or negative, says it all.

Then there is a bonus. Letting C be zero gives y equal to minus two thirds, which is the constant solution from step 1. So in this example one formula captures every solution. The check at the end is the one to copy: differentiate and notice that C times the exponential is exactly 3y plus 2.

17. One constant, a whole family of curves

Picture it

Figure (svg): The direction field of y prime equals (x squared minus 4)(3y plus 2) for x from 0 to 4.2, with solution curves y equals (minus 2 plus C e to the x cubed minus 12x) over 3 for C equal to minus 3, minus 1, 1, 3 and 6. They start spread out at x equals 0, are all squeezed onto the yellow line y equals minus two thirds between about x equals 1 and 3, and fan out again past the dashed line x equals root 12.

Where x cubed minus 12x is very negative, every member of the family is crushed onto the constant solution; where it turns positive they fan out. The constant C sets which side and how far.

\[ y = \frac{-2 + C\,e^{x^3-12x}}{3} \]

Each value of C is one curve. They all follow the direction field, the curve for C equal to zero is the flat constant solution, and no two curves ever cross it.

Each curve in the picture is the formula with a different value of C, drawn on top of the direction field, and each one follows the little segments exactly, which is what being a solution means.

Look at the middle of the picture. For x between about 1 and 3, the exponent x cubed minus 12x is very negative, so the exponential is tiny and every curve is squashed onto the yellow line. Past the dashed line at root 12 the exponent turns positive and the curves fan out violently.

The yellow line is the constant solution, and no curve ever crosses it. Positive C keeps a curve above it and negative C keeps it below. That is the geometric meaning of the sign you allowed the constant to take.

18. Why only one constant survives

Intuition

Integrating both sides seems to produce two constants, one on each side. They merge immediately:

\[ \int \frac{dy}{g(y)} + C_a = \int f(x)\,dx + C_b \]

\[ \int \frac{dy}{g(y)} = \int f(x)\,dx + (C_b - C_a) \]

The difference of two arbitrary constants is one arbitrary constant, so write a single C on the x side. After that, every operation you apply to C, multiplying by 3, exponentiating, attaching a plus or minus sign, produces another arbitrary constant, and renaming it is honest bookkeeping, not sleight of hand.

When you integrate both sides you could write a constant on each side. But you can subtract the left constant from both sides, and the difference of two arbitrary constants is just one arbitrary constant. So writing a single C on the x side loses nothing.

After that, the constant goes through several transformations. Multiplying it by a number, exponentiating it, putting a plus or minus sign in front: each time the result is still a constant that can be chosen freely within some range, so it is honest to rename it.

The one thing to track is the range. After exponentiating, the constant is positive. After removing an absolute value, it may be either sign but not zero. Then check separately whether zero gives a genuine solution. Keeping track of this is what separates a complete answer from an almost-complete one.

19. Find the error: the constant in the wrong place

Error analysis

\[ y' = xy \quad\Longrightarrow\quad \ln|y| = \frac{x^2}{2} + C \]

Annotate

On: \( \ln|y| = \frac{x^2}{2} + C \;\Longrightarrow\; y = e^{x^2/2} + C \)

  • e raised to (x²/2 + C) is e^(x²/2) times e^C. The constant becomes a FACTOR, not an added term.
  • Adding C after exponentiating describes a different family, one that does not solve the equation.
  • Differentiate e^(x²/2) + C: you get x e^(x²/2), but x times y is x e^(x²/2) + Cx. They agree only when C is 0.
  • y = A e^(x²/2) with A any real number, A = 0 being the constant solution y = 0.

Read the argument and find the bad step before revealing the notes. The first line, the logarithm equal to x squared over 2 plus C, is correct. The error is in how that line was exponentiated.

The exponential of a sum is the product of the exponentials, so e to the power x squared over 2 plus C is e to the C times e to the x squared over 2. The constant ends up as a multiplier in front, not as something added on afterwards.

The check in the third note is how to catch this yourself. Differentiate the wrong answer and you get x times the exponential, while x times y is that plus C times x. They agree only when C is zero, so the wrong family contains exactly one genuine solution. The correct family is A times the exponential, with A any real number.

20. Checkpoint 4.10: factor first, then separate

Worked example

Find the general solution.

\[ y' = 2xy + 3y - 4x - 6 \]

Group and factor

Why: Take y out of the first two terms and minus 2 out of the last two.

\[ 2xy + 3y - 4x - 6 = y(2x+3) - 2(2x+3) = (2x+3)(y-2) \]

Find the constant solution

Why: The y-factor vanishes at 2.

\[ y - 2 = 0 \;\Longrightarrow\; y = 2 \]

Separate

Why: Divide by y minus 2 and multiply by dx.

\[ \frac{dy}{y-2} = (2x+3)\,dx \]

Integrate

Why: A logarithm on the left, the power rule on the right.

\[ \ln|y-2| = x^2 + 3x + C \]

Exponentiate and absorb

Why: Plus or minus e to the C, together with zero for the constant solution, is any real C.

\[ y - 2 = C\,e^{x^2+3x} \]

Solve for y

Why: Add 2.

\[ y = 2 + C\,e^{x^2+3x} \]

Check by substituting

Why: The derivative brings down 2x plus 3, and what remains is y minus 2.

\[ y' = C(2x+3)e^{x^2+3x} = (2x+3)(y-2) \]

OpenStax Calculus Volume 2, §4.3 Separable Equations §4.3, p. 383 — Checkpoint 4.10

The equation does not look separable at first glance, which is the point of the checkpoint. Group the terms in pairs, exactly as in the book's fourth example: y comes out of the first pair and minus 2 out of the second, and the common factor 2x plus 3 appears.

From there the method runs as usual. The constant solution is y equal to 2. The logarithm of the absolute value of y minus 2 equals x squared plus 3x plus C, and after exponentiating and removing the absolute value the constant can be any nonzero number. Letting it be zero brings back y equal to 2, so the final formula has C ranging over every real number.

Check by differentiating. The exponential brings down the derivative of its exponent, 2x plus 3, and what is left, C times the exponential, is y minus 2. That is the equation, term for term.

21. What does C = 0 give?

Prediction

\[ y = 2 + C\,e^{x^2+3x} \]

Predict first

Setting C equal to 0 in this general solution gives which function, and what is special about it?

  • y = 2, the constant solution lost when you divided by y − 2
  • y = 0, the trivial solution
  • y = 3, the value at x = 0
  • Nothing: C cannot be 0 because it came from e to a power

Correct: y = 2, the constant solution lost when you divided by y − 2

Why: C = 0 leaves y = 2. Dividing by y − 2 excluded exactly this function, and e to a power is never zero, so the absolute-value form really does need C nonzero. Allowing C = 0 at the end is how the lost solution rejoins the family. It does not always work: the next part shows an equation where no value of C brings it back.

Commit to an answer before revealing. This question is here to make you notice something the algebra did quietly on the previous slide.

Putting C equal to zero leaves y equal to 2, the constant solution. In the absolute-value form of the calculation C could not be zero, because it came from an exponential, which is never zero. So the constant solution was genuinely missing from the family until you allowed C to be zero at the end.

It is tempting to conclude that this always happens, and it does not. Later in this part you will meet an equation whose constant solution cannot be reached by any value of the constant. That is why step 1 of the strategy asks you to find the constant solutions directly rather than hoping they reappear.

22. Put the method in order

Ranking

Put in order

Order the steps of a complete separation-of-variables solution to an initial-value problem.

  1. Find every y where g(y) = 0: the constant solutions
  2. Divide by g(y) and multiply by dx
  3. Integrate both sides, writing one constant C
  4. Solve for y if possible, renaming the constant as it absorbs operations
  5. Substitute the initial value to find C

Why: The constant solutions must be found BEFORE dividing, because the division is what hides them. The initial value goes last, and it is often easiest to substitute it into an intermediate line, before y has been isolated.

Drag the steps into order before you check. Most of the order is natural: you cannot integrate before you separate, or solve before you integrate.

The two steps people misplace are the first and the last. The constant solutions have to be found before dividing, because once you have divided by the y-factor the calculation cannot see where it vanishes. The initial value goes at the end, but it can be substituted into any line after integration, and often an earlier line is easier than the final formula, as Example 4.11 will show.

23. Implicit answers and lost solutions

Section

Part 3

24. An implicit answer is still an answer

Concept

Integrating both sides gives an equation linking x and y. If you can solve it for y, you have an explicit solution; if not, the equation itself defines y as an implicit function of x, and that counts.

\[ \underbrace{x^2 + y^2 = 25}_{\text{implicit}} \qquad \underbrace{y = -\sqrt{25 - x^2}}_{\text{explicit, one branch}} \]

Solving for y can force a choice, such as a sign in front of a square root. The initial condition makes that choice, and it also fixes the interval on which the solution lives.

OpenStax Calculus Volume 2, §4.3 Separable Equations §4.3, p. 381 — the note after the strategy: y as an implicit function of x

After integrating you always have an equation connecting x and y. Sometimes it can be solved for y, and sometimes it cannot, or can only be solved at a price. An implicit solution is a perfectly good answer: every solution curve lies on the graph of that equation.

The price of an explicit answer is a choice. The circle x squared plus y squared equals 25 is not the graph of a single function, so solving for y means choosing the top half or the bottom half. The initial condition makes that choice for you.

Solving also reveals where the solution lives. The half-circle stops at x equal to plus and minus 5, where the curve turns vertical and the slope becomes infinite. A solution of a differential equation is defined on an interval, and the explicit form is often the easiest way to see which one.

25. Circles from y' = −x/y

Worked example

Solve the initial-value problem, first implicitly and then explicitly. (A standard exercise of this section's type.)

\[ y' = -\frac{x}{y}, \qquad y(3) = -4 \]

Separate

Why: Multiply by y and by dx; y is not zero near the initial point.

\[ y\,dy = -x\,dx \]

Integrate

Why: Power rule on both sides, one constant.

\[ \frac{y^2}{2} = -\frac{x^2}{2} + C \]

Multiply by 2 and rearrange

Why: Rename 2C as K.

\[ x^2 + y^2 = K \]

Use the initial point

Why: Substitute x equal to 3 and y equal to minus 4.

\[ K = 3^2 + (-4)^2 = 25 \]

Figure (svg): The direction field of y prime equals minus x over y on a square window from minus 6 to 6, with concentric circles of radius 1 to 5 centred at the origin drawn through it. The lower half of the radius-5 circle is highlighted, and a dot marks the point (3, minus 4) on it.

Every solution curve is a circle, so no single formula for y can describe a whole one. The initial point picks the lower half; that half is the explicit solution.

Choose the branch

Why: The initial y is negative, so take the negative square root.

\[ y = -\sqrt{25 - x^2}, \qquad -5 < x < 5 \]

Check by differentiating

Why: Differentiate the explicit branch and compare with minus x over y.

\[ y' = \frac{x}{\sqrt{25-x^2}} = -\frac{x}{-\sqrt{25-x^2}} = -\frac{x}{y} \]

Separating here takes one move: multiply both sides by y and by dx. Both sides integrate by the power rule, and multiplying by 2 tidies the result into the equation of a circle centred at the origin, with the radius squared as the constant.

The picture shows why this answer is best left implicit at first. The direction field is everywhere perpendicular to the line from the origin, so the solution curves are circles. The initial point, 3 and minus 4, is on the circle of radius 5, which fixes the constant as 25.

Only the lower half of that circle is the solution, because the initial y is negative and the solution curve cannot jump across the x-axis, where the slope is infinite. The check differentiates the explicit branch and confirms that it matches minus x over y, including the sign.

26. Trap: the wrong branch of the square root

Trap

The trap

From the implicit circle, a quick explicit answer:

\[ x^2 + y^2 = 25 \]

\[ y = \sqrt{25 - x^2} \]

Wrong for the initial value y(3) equal to minus 4.

The fix

The positive root gives 4 at x equal to 3, not minus 4. Two branches solve the implicit equation; the initial value picks one. Always substitute the initial point into your explicit formula.

\[ y = -\sqrt{25 - x^2} \]

\[ y(3) = -4 \;\checkmark \]

The square root symbol always means the positive root, so writing y equals the root of 25 minus x squared silently picks the upper half-circle. That function solves the differential equation perfectly well, which is what makes the mistake easy to miss. It just does not pass through the initial point.

The defence is one substitution. Put x equal to 3 into your explicit answer and see whether you get the initial y. Here the positive root gives 4, the problem wants minus 4, and the correct branch is the negative square root.

27. Dividing by g(y) assumes it is not zero

Concept

Suppose the y-factor vanishes at some height. Then the constant function at that height is a solution:

\[ g(y_0) = 0 \]

\[ y(x) = y_0 \;\Longrightarrow\; y' = 0 = f(x)\,g(y_0) \]

But the separation step divided by g of y, which is illegal exactly at that height. So the constant solutions are the ones the method cannot see. They are the equilibria of Section 4.2, found by setting the y-factor to zero, and step 1 of the strategy exists to collect them before the division throws them away.

OpenStax Calculus Volume 2, §4.3 Separable Equations §4.3, p. 381 — step 1 of the strategy

Here is the general reason for step 1. Suppose the y-factor is zero at some height. The constant function at that height has derivative zero, and the right-hand side is the x-factor times zero, which is also zero. So the constant function is a solution, whatever the x-factor is.

Now look at what separation does: it divides by the y-factor. At exactly those heights, the division is by zero, so the calculation after that step says nothing about them. The constant solutions are not wrong; they are invisible to the method.

You have met these functions before under another name. In Section 4.2 they were the equilibrium solutions, the horizontal lines in a direction field. So you already know how to find them: set the y-factor equal to zero and solve.

28. Exercise 125: a solution no constant can reach

Worked example

Find every solution of the equation below.

\[ y' = 2xy^2 \]

Find the constant solutions

Why: The y-factor y squared is zero only at 0.

\[ y^2 = 0 \;\Longrightarrow\; y = 0 \]

Separate

Why: Divide by y squared, for y not zero.

\[ \frac{dy}{y^2} = 2x\,dx \]

Integrate

Why: y to the minus 2 integrates to minus one over y.

\[ -\frac1y = x^2 + C \]

Solve for y

Why: Take reciprocals and change sign.

\[ y = -\frac{1}{x^2 + C} \]

Look for y = 0 in the family

Why: Minus one over anything is never zero, so no C gives the constant solution.

\[ -\frac{1}{x^2+C} \ne 0 \quad\text{for every } C \]

Figure (svg): The direction field of y prime equals 2x y squared for x and y from minus 3 to 3, with solution curves y equals minus 1 over (x squared plus C) for C equal to 1 and 3, which are negative dips, and for C equal to minus 1, which has vertical asymptotes at x equals plus and minus 1. The x-axis, y equals 0, is highlighted in yellow as the solution that no value of C produces.

Every curve of the family misses the x-axis, because minus one over anything is never zero. Yet the axis itself is a solution: it is where division by y squared was illegal.

Check both answers

Why: Differentiate the family; and the zero function trivially works.

\[ \frac{d}{dx}\left(-\frac{1}{x^2+C}\right) = \frac{2x}{(x^2+C)^2} = 2xy^2, \qquad y = 0: \; 0 = 2x\cdot 0 \]

OpenStax Calculus Volume 2, §4.3 Separable Equations §4.3, p. 391 — Exercise 125

The steps are routine: the constant solution is y equal to zero, dividing by y squared separates the equation, and y to the minus 2 integrates to minus one over y. Solving gives minus one over x squared plus C.

Now ask whether any value of C produces the zero function. It cannot: minus one over anything is never zero. So the family found by integration does not contain the constant solution, and if you skipped step 1 your answer would be incomplete.

The picture makes it vivid. Every curve of the family, the negative dips and the curve with two vertical asymptotes, stays off the x-axis, yet the axis itself is a solution, with the field flat all along it. The complete answer is the family together with y equal to zero.

29. Two solutions through one point

Counterexample

\[ y' = 3y^{2/3}, \qquad y(0) = 0 \]

Discussion prompt

Separation gives the family y = (x + C) cubed. Someone claims the initial value y(0) = 0 therefore has exactly one solution. Find a second solution, and say what this shows about ignoring constant solutions.

Work through the separation yourself first. Dividing by y to the two thirds and integrating gives three times the cube root of y equal to 3x plus a constant, so y is x plus C, cubed. The initial value forces C to be zero, giving y equal to x cubed.

But the y-factor, y to the two thirds, is zero at y equal to zero, so the zero function is a constant solution, and it also passes through the origin. Two different solutions share the same initial point.

This is a genuine counterexample to the belief that an initial value always pins down one solution. The lost solution is not a technicality here: it is a second, equally valid answer. It also tells you that the constant solutions deserve attention whenever the initial point lies on one of them.

30. Example 4.11, part 1: partial fractions on the y side

Worked example

Solve the initial-value problem by separation.

\[ y' = (2x+3)(y^2 - 4), \qquad y(0) = -3 \]

Find the constant solutions

Why: The y-factor is zero at two heights.

\[ y^2 - 4 = 0 \;\Longrightarrow\; y = \pm 2 \]

Separate

Why: Divide by y squared minus 4 and multiply by dx.

\[ \frac{dy}{y^2-4} = (2x+3)\,dx \]

Split the left side into partial fractions

Why: The denominator factors as (y minus 2)(y plus 2).

\[ \frac{1}{y^2-4} = \frac14\left(\frac{1}{y-2} - \frac{1}{y+2}\right) \]

Integrate both sides

Why: Two logarithms on the left.

\[ \frac14\left(\ln|y-2| - \ln|y+2|\right) = x^2 + 3x + C \]

Multiply by 4 and combine the logs

Why: Rename 4C as C sub 1.

\[ \ln\left|\frac{y-2}{y+2}\right| = 4x^2 + 12x + C_1 \]

Check the partial fractions

Why: Recombine over the common denominator.

\[ \frac14\cdot\frac{(y+2) - (y-2)}{(y-2)(y+2)} = \frac14\cdot\frac{4}{y^2-4} = \frac{1}{y^2-4} \]

OpenStax Calculus Volume 2, §4.3 Separable Equations §4.3, pp. 383-384 — Example 4.11, steps 1 to 3

The y-factor, y squared minus 4, is zero at plus and minus 2, so there are two constant solutions. Neither passes through the initial point, but note them.

The new ingredient is the integral on the left. One over y squared minus 4 is not a standard form, but the denominator factors, so partial fractions from Section 3.4 split it into a quarter of one over y minus 2 minus one over y plus 2. Each piece integrates to a logarithm.

Multiply by 4, rename the constant, and combine the difference of logarithms into the logarithm of a quotient. The check recombines the two partial fractions over a common denominator; getting back one over y squared minus 4 confirms the split before you build anything on it.

31. Example 4.11, part 2: the constant and then y

Worked example

\[ \ln\left|\frac{y-2}{y+2}\right| = 4x^2 + 12x + C_1, \qquad y(0) = -3 \]

Exponentiate and drop the bars

Why: The constant may now be positive or negative.

\[ \frac{y-2}{y+2} = C\,e^{4x^2+12x} \]

Substitute the initial value now

Why: This intermediate line is the easiest place to find C.

\[ \frac{-3-2}{-3+2} = C\,e^{0} \;\Longrightarrow\; C = 5 \]

Clear the fraction

Why: Multiply both sides by y plus 2.

\[ y - 2 = 5(y+2)\,e^{4x^2+12x} \]

Collect the y terms

Why: Everything with y on the left.

\[ y\left(1 - 5e^{4x^2+12x}\right) = 2 + 10e^{4x^2+12x} \]

Divide

Why: Valid while the bracket is not zero.

\[ y = \frac{2 + 10e^{4x^2+12x}}{1 - 5e^{4x^2+12x}} \]

Check the value and the slope at 0

Why: The formula gives minus 3; its derivative at 0 is 20 times 12 over 16, and the equation gives 3 times 5.

\[ y(0) = \frac{12}{-4} = -3, \quad y'(0) = \frac{20\cdot 12}{(1-5)^2} = 15 = (3)(9-4) \]

OpenStax Calculus Volume 2, §4.3 Separable Equations §4.3, p. 384 — Example 4.11, steps 4 and 5

Exponentiate, and let the constant take either sign so the absolute value can go. You now have the ratio y minus 2 over y plus 2 equal to C times an exponential.

This is the moment to use the initial value, before solving for y, because this line is so easy to evaluate. At x equal to zero the exponential is one, and y is minus 3, so the ratio is minus 5 over minus 1, which is 5. So C is 5.

Then solve for y by clearing the fraction, collecting the y terms and dividing. The check tests two things: the formula gives minus 3 at zero, and its slope there, 15, is what the differential equation demands, 3 times 9 minus 4. A value check alone would not catch an error in the exponent; the slope check would.

32. The stated problem and the book's answer

Picture it

Figure (svg): The direction field of y prime equals (2x plus 3)(y squared minus 4) for x from minus 1.2 to 1, with yellow equilibrium lines y equals 2 and y equals minus 2. A blue curve through (0, minus 3) rises toward minus 2 as x grows and plunges to minus infinity at the dashed line x approximately minus 0.141. An orange curve through (0, minus 1) comes down from just under 2 on the left and levels off just above minus 2 on the right.

Two starting values, two very different solutions of the same equation. The one the problem asks for lives only to the right of x near minus 0.141, where it escapes to minus infinity.

\[ 1 - 5e^{4x^2+12x} = 0 \iff x \approx -0.141 \]

The solution through (0, minus 3) climbs toward the equilibrium y equal to minus 2 as x grows, but going left its denominator reaches zero near x equal to minus 0.141, so it lives on the interval to the right of that point.

The blue curve is the solution you just found. Starting at minus 3, it rises toward the equilibrium at minus 2 as x increases, trapped below that line because solution curves cannot cross an equilibrium.

Going left, something dramatic happens. The denominator, 1 minus 5 times the exponential, reaches zero near x equal to minus 0.141, and the solution plunges to minus infinity there. So the solution of this initial-value problem exists only for x to the right of that point. The formula makes sense to the left as well, but that piece is not connected to the initial point.

The orange curve is a different solution of the same equation, the one through minus 1, which lives between the two equilibria and exists for every x. The next slide explains why it is on this picture.

33. Which initial value did the book use?

Anomaly

\[ \text{book's answer: } y = \frac{2 - 6e^{4x^2+12x}}{1 + 3e^{4x^2+12x}} \]

Predict first

The book's printed answer to Example 4.11 is above. What value does it give at x = 0?

  • −3, as the problem states
  • −1
  • 2
  • −2

Correct: −1

Why: At x = 0 the exponential is 1, so the formula gives (2 − 6)/(1 + 3) = −1. The book's step 5 substitutes y = −1 and finds C = −3, although the problem says y(0) = −3. Its answer correctly solves y(0) = −1; the problem as stated has C = 5. Substituting the initial value back into the final answer catches this in one line.

Evaluate the printed answer at zero before you reveal. At x equal to zero every exponential is one, so the formula is 2 minus 6 over 1 plus 3, which is minus 1.

The problem asks for y of zero equal to minus 3, but step 5 of the book's solution substitutes minus 1. Its answer is a correct solution of the equation, just not of the initial-value problem as stated. The stated problem gives C equal to 5, as you found.

The lesson is not that textbooks have typos; it is that one substitution catches them. Putting the initial point into your final answer takes ten seconds, and it would have caught this error in the original.

34. Checkpoint 4.11: a second partial-fractions problem

Worked example

\[ 6y' = (2x+1)(y^2 - 2y - 8), \qquad y(0) = -3 \]

Factor and find the constant solutions

Why: The quadratic factors, giving two equilibria.

\[ y^2 - 2y - 8 = (y-4)(y+2) \;\Longrightarrow\; y = 4, \; y = -2 \]

Separate

Why: Divide by the quadratic; keep the 6 on the y side.

\[ \frac{6\,dy}{(y-4)(y+2)} = (2x+1)\,dx \]

Partial fractions

Why: The 6 cancels the 6 that the split produces.

\[ \frac{6}{(y-4)(y+2)} = \frac{1}{y-4} - \frac{1}{y+2} \]

Integrate

Why: One constant on the right.

\[ \ln\left|\frac{y-4}{y+2}\right| = x^2 + x + C \]

Exponentiate and use y(0) = −3

Why: At x equal to 0 the ratio is minus 7 over minus 1.

\[ \frac{y-4}{y+2} = C\,e^{x^2+x}, \quad C = \frac{-7}{-1} = 7 \]

Solve for y

Why: Multiply out and collect the y terms as before.

\[ y = \frac{4 + 14e^{x^2+x}}{1 - 7e^{x^2+x}} \]

Check the value, the slope and the domain

Why: At 0 the formula gives minus 3 and slope 7 over 6, matching the equation; and x squared plus x is never below minus a quarter, so the denominator is never zero.

\[ y(0) = \tfrac{18}{-6} = -3, \quad 6y'(0) = 6\cdot\tfrac{42}{36} = 7 = (1)(9+6-8) \]

OpenStax Calculus Volume 2, §4.3 Separable Equations §4.3, p. 385 — Checkpoint 4.11

Start by factoring the quadratic in y: y squared minus 2y minus 8 is y minus 4 times y plus 2, so the constant solutions are 4 and minus 2. Keep the 6 on the left when you divide; it is exactly the number the partial fractions need, because one over y minus 4 minus one over y plus 2 has 6 on top when combined.

Integrating gives the logarithm of the ratio y minus 4 over y plus 2, equal to x squared plus x plus C. As in the example, find C from the ratio line: at zero, minus 7 over minus 1 is 7. Solving for y gives 4 plus 14 times the exponential, over 1 minus 7 times the exponential.

The check covers the value, the slope and the domain. Unlike Example 4.11, this denominator never vanishes: x squared plus x is never less than minus a quarter, so the exponential is never below about 0.78, far above one seventh. This solution exists for every x.

35. Match each equation to its lost solutions

Matching

Match the pairs

  • a. y' = (x² − 4)(3y + 2)
  • b. y' = (2x + 3)(y² − 4)
  • c. y' = 2xy²
  • d. y' = eˣ eʸ
  • w. y = −2/3 only
  • x. y = 2 and y = −2
  • y. y = 0, and no C in the family gives it
  • z. none: the y-factor is never zero

Why: Set the y-factor to zero in each case. The x-factor never matters here: x² − 4 = 0 at x = ±2 gives vertical lines where the field is flat, not solutions. And e to any power is positive, so y' = eˣeʸ loses nothing.

In each case, set the y-factor to zero and nothing else. The x-factor can also be zero, but that happens along vertical lines, and a vertical line is not the graph of a function of x, so it is never a solution.

The first three come straight from the examples. The last one is the interesting case: e to the y is positive for every y, so the y-factor is never zero and there is nothing to lose. The family from integration is the complete answer.

The third pairing is worth remembering as the warning case. Its lost solution, y equal to zero, cannot be recovered by choosing a value of C, so you must list it separately.

36. Where a solution lives

Concept

A formula can make sense for more x than the solution does. The solution of an initial-value problem is the piece of the formula's graph that contains the initial point and runs unbroken through it.

\[ y' = y^2(x+1), \qquad y(0) = 2 \]

The right-hand side here is harmless for every x and y, yet the solution will run off to infinity at a finite x. Nothing in the equation warns you; only the solution formula does.

OpenStax Calculus Volume 2, §4.3 Separable Equations §4.3, p. 391 — Exercise 134

A formula is not the same thing as a solution. The solution of an initial-value problem is a function on an interval containing the initial point, and it must be differentiable, and so continuous, on that whole interval. When a formula breaks, at a zero denominator, a negative square root or an asymptote, the solution stops there.

The equation on this slide looks entirely harmless. Its right-hand side is defined and smooth for every x and y. Nothing about it suggests trouble, and yet its solution will escape to infinity at a finite value of x.

The mechanism is that the rate grows with y squared. The bigger y gets, the faster it grows, and that feedback can outrun any finite interval. Only solving the equation shows you where it happens.

37. Exercise 134: a solution that escapes in finite time

Worked example

\[ y' = y^2(x+1), \qquad y(0) = 2 \]

Separate

Why: The constant solution y equal to 0 does not pass through the initial point.

\[ \frac{dy}{y^2} = (x+1)\,dx \]

Integrate

Why: Minus one over y on the left.

\[ -\frac1y = \frac{x^2}{2} + x + C \]

Use y(0) = 2

Why: At x equal to 0 the right side is just C.

\[ -\frac12 = C \]

Solve for y

Why: Take reciprocals, then multiply top and bottom by minus 2.

\[ y = -\frac{1}{\frac{x^2}{2} + x - \frac12} = \frac{2}{1 - 2x - x^2} \]

Find where the denominator vanishes

Why: Quadratic formula on x squared plus 2x minus 1.

\[ x^2 + 2x - 1 = 0 \;\Longrightarrow\; x = -1 \pm \sqrt2 \]

Figure (svg): The graph of y equals 2 over (1 minus 2x minus x squared) between the dashed vertical asymptotes x equals minus 1 minus root 2 and x equals minus 1 plus root 2: a U-shaped curve with lowest point (minus 1, 1), passing through (0, 2) and shooting up at both asymptotes. Outside the asymptotes the same formula, drawn faintly, is negative.

The solution through (0, 2) exists only between the two asymptotes. The faint pieces outside come from the same formula but are not connected to the initial point, so they are not part of this solution.

Check and state the interval

Why: The initial value and the equation both hold, and the solution lives between the two roots.

\[ y(0) = 2, \quad y' = \frac{4(x+1)}{(1-2x-x^2)^2} = y^2(x+1), \quad -1-\sqrt2 < x < -1+\sqrt2 \]

The separation is quick: divide by y squared, integrate to get minus one over y on the left, and use the initial value to find that C is minus one half. Solving for y and tidying gives 2 over 1 minus 2x minus x squared.

The denominator is zero where x squared plus 2x minus 1 is zero, at minus 1 plus or minus root 2. The initial point, x equal to zero, lies between these, so the solution lives on the interval from about minus 2.41 to about 0.41, and it runs off to infinity at both ends.

In the picture, the faint pieces outside the asymptotes come from the same formula, and they even satisfy the differential equation. But they are not attached to the initial point, so they are not part of this solution. The check confirms the value, the equation, and states the interval, which is part of the answer.

38. Mixing tanks

Section

Part 4

39. Rate in minus rate out

Concept

Figure (svg): A tank holding 100 litres of brine with dots for dissolved salt. A pipe at the top left brings in 2 litres per minute at 0.5 kilograms per litre; a pipe at the bottom right lets out 2 litres per minute at the tank's own concentration, u over 100 kilograms per litre.

Litres flow in and out at the same rate, so the volume stays 100. Salt comes in at a fixed rate but leaves at a rate proportional to how much is already there.

\[ \frac{du}{dt} = \text{(salt in per minute)} - \text{(salt out per minute)} \]

\[ \frac{du}{dt} = 2(0.5) - 2\cdot\frac{u}{100} = 1 - \frac{u}{50} \]

OpenStax Calculus Volume 2, §4.3 Separable Equations §4.3, pp. 385-386 — Example 4.12 and Figure 4.16

Every mixing problem starts from one principle: the rate at which the amount of salt changes is the rate salt comes in minus the rate it goes out. Each of those rates is a flow of liquid times a concentration, litres per minute times kilograms per litre, which gives kilograms per minute.

The inflow is easy, because the incoming brine has a fixed concentration: 2 litres a minute times half a kilogram per litre is one kilogram a minute. The outflow is the interesting part. What leaves is the mixture in the tank, whose concentration is the current amount of salt over the volume, u over 100.

The tank diagram shows why the volume stays at 100 litres: liquid enters and leaves at the same rate. That is what keeps the concentration simple. If the rates differed, the volume would change with time and the equation would be harder.

40. Reading the tank equation

Notation

Annotate

On: \( \frac{du}{dt} = \underbrace{2\cdot 0.5}_{\text{in}} - \underbrace{2\cdot\frac{u}{100}}_{\text{out}}, \quad u(0) = 4 \)

  • The AMOUNT of salt in kilograms, not the concentration. Amounts add and subtract; concentrations do not.
  • Flow rate times incoming concentration: 2 L/min times 0.5 kg/L is 1 kg of salt per minute, a constant.
  • Flow rate times the TANK's concentration, u/100 kg/L, because the mixture that leaves is whatever is in the tank.
  • The initial condition: 4 kg dissolved at the start.

OpenStax Calculus Volume 2, §4.3 Separable Equations §4.3, p. 386 — equation 4.5

Step through the notes. The first one prevents the most common error in these problems: u is an amount of salt, in kilograms, not a concentration. Rates of amounts can be added and subtracted; you convert to a concentration only when the question asks for one.

The in term is a constant, because the incoming brine never changes. The out term depends on u, and that dependence is what makes this a differential equation rather than a simple rate problem. The more salt is in the tank, the faster salt leaves.

Notice that the equation is separable. It has no t on the right at all, so it is autonomous, and the x-factor, here a t-factor, is just one.

41. Example 4.12: salt in the tank over time

Worked example

\[ \frac{du}{dt} = 1 - \frac{u}{50}, \qquad u(0) = 4 \]

Find the constant solution

Why: Salt in balances salt out at one amount.

\[ 1 - \frac{u}{50} = 0 \;\Longrightarrow\; u = 50 \]

Rewrite and separate

Why: Put the right side over 50, then divide by 50 minus u.

\[ \frac{du}{dt} = \frac{50-u}{50} \;\Longrightarrow\; \frac{du}{50-u} = \frac{dt}{50} \]

Integrate

Why: The derivative of 50 minus u is minus 1, hence the minus sign.

\[ -\ln|50-u| = \frac{t}{50} + C \]

Solve for u

Why: Negate, exponentiate, let the constant take either sign.

\[ 50 - u = C_1\,e^{-t/50} \;\Longrightarrow\; u = 50 - C_1\,e^{-t/50} \]

Use u(0) = 4

Why: At t equal to 0 the exponential is 1.

\[ 4 = 50 - C_1 \;\Longrightarrow\; C_1 = 46 \]

Find the long-run amount

Why: The exponential dies away.

\[ u(t) = 50 - 46e^{-t/50} \;\to\; 50 \quad (t \to \infty) \]

Check by substituting

Why: Both sides equal 46 over 50 times the exponential, and u(0) is 50 minus 46.

\[ u' = \tfrac{46}{50}e^{-t/50}, \quad 1 - \tfrac{u}{50} = \tfrac{46}{50}e^{-t/50}, \quad u(0) = 4 \]

OpenStax Calculus Volume 2, §4.3 Separable Equations §4.3, pp. 386-387 — Example 4.12

Step 1 gives the constant solution 50 kilograms, where salt in balances salt out. The tank does not start there, so it is not the answer, but keep it in mind; it will turn out to be the long-run amount.

Rewriting the right side as 50 minus u over 50 makes the separation clean. The integral of du over 50 minus u is minus the logarithm of 50 minus u, and the minus sign is easy to drop, so watch for it. Solving gives u equal to 50 minus a constant times e to the minus t over 50.

The initial amount of 4 kilograms fixes the constant as 46, and letting t grow kills the exponential, leaving 50. The check substitutes back into both the equation and the initial condition. Both sides of the equation come out as 46 over 50 times the exponential.

42. Every tank heads for 50 kilograms

Picture it

Figure (svg): The direction field of u prime equals 1 minus u over 50 for t from 0 to 200 minutes, with the yellow equilibrium line u equals 50. The highlighted solution u equals 50 minus 46 e to the minus t over 50 starts at 4 and rises toward 50; an orange solution starting at 80 falls toward 50; a purple one starting at 20 rises toward 50.

Whatever the tank starts with, the salt heads for 50 kilograms, the amount at which salt leaves exactly as fast as it arrives.

\[ u = 50 - 46e^{-t/50} \]

The amount rises quickly at first, while the tank is dilute and little salt leaves, then more slowly as the outflow catches up with the inflow.

The highlighted curve is the tank of Example 4.12, starting at 4 kilograms. It rises quickly at first, because the tank is dilute and very little salt is leaving, and then more slowly as the outflow catches up with the inflow.

The other two curves are the same tank with different starting amounts. A tank that starts saltier than 50 kilograms loses salt, because the outflow beats the inflow. Every curve approaches the same yellow line, the constant solution.

The direction field shows why. Above 50 every segment points down, below 50 every segment points up, and the closer you are to 50 the flatter they are. This is a stable equilibrium in exactly the sense of Section 4.2.

43. The long run is the equilibrium

Intuition

The limiting amount, 50 kilograms, is the constant solution from step 1. That is no coincidence. At 50 kilograms the concentration is half a kilogram per litre, the same as the incoming brine, so the tank is already what the inflow is trying to make it.

\[ \frac{50 \text{ kg}}{100 \text{ L}} = 0.5 \text{ kg/L} \]

So the constant solutions are not a technicality to be listed and forgotten. In an application they are usually the most important answer: the state the system settles into.

It is worth asking why the limit is 50 in plain terms. At 50 kilograms in 100 litres, the tank's concentration is half a kilogram per litre, which is exactly the concentration flowing in. At that point replacing tank liquid with incoming liquid changes nothing.

This connects the two halves of the lesson. The constant solutions that step 1 collects are not just loose ends in the algebra. In a physical model they are the balance points, and when they are stable, as here, they are where every solution ends up.

So in an application, if you only have time to find one thing, find the constant solutions. They tell you the long-run behaviour before you solve anything.

44. When does the tank hold 25 kg?

Estimation

\[ u(t) = 50 - 46e^{-t/50} \]

Predict first

Guess before you compute: roughly when does the salt reach 25 kg, halfway to the limit?

  • About 10 minutes
  • About 30 minutes
  • About 50 minutes
  • About 100 minutes

Correct: About 30 minutes

Why: Set 50 − 46e^(−t/50) = 25, so e^(−t/50) = 25/46 and t = 50 ln(46/25) ≈ 30.5 minutes. After 50 minutes the tank holds 50 − 46/e ≈ 33.1 kg, already two thirds of the way.

\[ e^{-t/50} = \frac{25}{46} \;\Longrightarrow\; t = 50\ln\frac{46}{25} \approx 30.5 \text{ min} \]

Make a guess before you compute. The time constant in the exponent is 50 minutes, which is a good hint about the scale of the answer.

Setting the amount to 25 leaves e to the minus t over 50 equal to 25 over 46. Taking logarithms gives t equal to 50 times the log of 46 over 25, about 30.5 minutes. So halfway to the limit takes about thirty minutes, and after fifty minutes the tank is already about two thirds of the way there.

The exponent's denominator, 50 minutes, is the natural time scale of this tank: the volume divided by the flow rate. It is how long it would take to replace the tank's entire contents once.

45. Checkpoint 4.12: concentration, not amount

Worked example

A 75-litre tank holds 3 kg of salt. Brine at 0.4 kg/L enters at 6 L/min, and the mixture drains at 6 L/min. Find the concentration at time t.

Set up the equation for the amount

Why: In: 6 times 0.4. Out: 6 times u over 75.

\[ \frac{du}{dt} = 2.4 - 0.08u, \qquad u(0) = 3 \]

Factor and separate

Why: 0.08 times 30 is 2.4.

\[ \frac{du}{dt} = 0.08(30 - u) \;\Longrightarrow\; \frac{du}{30-u} = 0.08\,dt \]

Integrate and solve

Why: As in Example 4.12.

\[ -\ln|30-u| = 0.08t + C \;\Longrightarrow\; u = 30 - C_1e^{-0.08t} \]

Use u(0) = 3

Why: 30 minus C sub 1 equals 3.

\[ C_1 = 27, \quad u(t) = 30 - 27e^{-0.08t} \]

Divide by the volume

Why: The question asks for kilograms per litre.

\[ c(t) = \frac{u(t)}{75} = 0.4 - 0.36e^{-0.08t} \]

Figure (svg): The concentration c equals 0.4 minus 0.36 e to the minus 0.08 t, in kilograms per litre, for t from 0 to 60 minutes: it starts at 0.04 and rises toward the dashed line 0.4, the concentration of the incoming brine.

The tank's brine becomes the incoming brine. With 6 litres of a 75-litre tank replaced each minute, it is most of the way there in half an hour.

Check the start and the limit

Why: At 0 the concentration is 3 over 75; in the long run it matches the incoming brine.

\[ c(0) = 0.4 - 0.36 = 0.04 = \tfrac{3}{75}, \qquad c(t) \to 0.4 \]

OpenStax Calculus Volume 2, §4.3 Separable Equations §4.3, p. 387 — Checkpoint 4.12

Set the equation up for the amount of salt first, even though the question asks for a concentration. Salt comes in at 6 litres a minute times 0.4 kilograms per litre, which is 2.4 kilograms a minute. It leaves at 6 litres a minute times u over 75, which is 0.08 u.

Factoring out 0.08 exposes the equilibrium, 30 kilograms, and the solution follows the pattern of Example 4.12: u equals 30 minus 27 times e to the minus 0.08 t. The initial 3 kilograms fixes the 27.

Only at the end divide by the volume, 75 litres, to get the concentration. The check has a pleasing interpretation: the concentration starts at 3 over 75, which is 0.04, and heads for 0.4, the concentration of the incoming brine. The graph shows it most of the way there in half an hour.

46. Two inflows, one drain

Step zero

Exercise 152: a 1000-litre tank holds 10 kg of salt. Brine at 0.2 kg/L enters at 20 L/min, brine at 0.05 kg/L enters at 5 L/min, and the tank drains at 25 L/min.

Discussion prompt

Before solving anything: write the differential equation and initial condition for the amount of salt u(t). What is the equilibrium amount?

OpenStax Calculus Volume 2, §4.3 Separable Equations §4.3, p. 392 — Exercises 152 and 153

Write the equation before revealing. The only new feature is that there are two inflows, and they simply add: each contributes its flow rate times its concentration.

Twenty litres at 0.2 kilograms per litre is 4 kilograms a minute, and 5 litres at 0.05 is a quarter of a kilogram, so 4.25 kilograms of salt enter each minute. The volume is steady, because 25 litres come in and 25 go out, so salt leaves at 25 times u over 1000, which is u over 40.

The equilibrium is where 4.25 equals u over 40, at 170 kilograms. Solving exactly as in Example 4.12 gives 170 minus 160 times e to the minus t over 40, and after one hour that is about 134.3 kilograms.

47. Cooling and draining

Section

Part 5

48. Newton's law of cooling

Concept

The rate at which an object's temperature changes is proportional to the gap between its temperature and the surroundings.

\[ \frac{dT}{dt} = k(T - T_s), \qquad T(0) = T_0 \]

Figure (svg): The direction field of T prime equals minus 0.05 times (T minus 75) for t from 0 to 60, with the yellow line T equals 75. Two curves starting at 350 and 220 fall toward 75; a third starting at 20 rises toward 75.

Every temperature is pulled toward the surroundings, faster when the gap is large and more slowly as it closes. The line itself is the constant solution.

\[ \frac{dT}{T - T_s} = k\,dt \;\Longrightarrow\; \ln|T - T_s| = kt + C \]

\[ T(t) = T_s + (T_0 - T_s)\,e^{kt} \]

OpenStax Calculus Volume 2, §4.3 Separable Equations §4.3, pp. 387-388 — equations 4.6 and 4.7

Newton's law says that a hot object cools faster when it is much hotter than the room, and more slowly as it approaches room temperature. The rate is proportional to the gap, and the constant of proportionality is k.

The picture shows the consequence. Every curve is pulled toward the yellow line at the surrounding temperature, steeply when far away and gently when close. Objects colder than the room warm up by the same law. The line itself is the constant solution: an object already at room temperature stays there.

The equation is separable, and the last two lines solve it once in general. Divide by the gap, integrate to get a logarithm, exponentiate, and use the initial temperature to fix the constant. The result, the surrounding temperature plus the initial gap times e to the kt, is worth recognising on sight.

49. Reading Newton's law piece by piece

Notation

Annotate

On: \( \frac{dT}{dt} = k\,(T - T_s), \qquad T(0) = T_0 \)

  • The gap between the object and its surroundings. Big gap, fast change; no gap, no change.
  • The proportionality constant, negative for real cooling or warming: when T is above Tₛ the temperature must fall. It is usually found from a second reading.
  • The ambient temperature, assumed constant. T = Tₛ is the constant solution: an object already at room temperature stays there.
  • The initial temperature, which fixes the constant in front of the exponential: T₀ − Tₛ.

OpenStax Calculus Volume 2, §4.3 Separable Equations §4.3, p. 388 — equation 4.7

The gap is the heart of the law. Reveal the notes in order and connect each to the picture on the previous slide.

The sign of k is the part that confuses people. For an object hotter than its surroundings, the gap is positive and the temperature must fall, so the rate must be negative. That forces k to be negative. You will usually not be given k; you will find it from a second temperature reading, and if it comes out positive, something has gone wrong.

The initial temperature fixes the multiplier in front of the exponential, which is always the initial gap. So once you know the surroundings, the start and k, the whole temperature history is determined.

50. Example 4.13, part 1: the pizza's temperature formula

Worked example

A pizza comes out of a 350-degree oven into a 75-degree kitchen. Find its temperature as a function of time, in terms of k.

\[ \frac{dT}{dt} = k(T - 75), \qquad T(0) = 350 \]

Find the constant solution

Why: The right side is zero at kitchen temperature, which is not where the pizza starts.

\[ T = 75 \]

Separate

Why: Divide by T minus 75 and multiply by dt.

\[ \frac{dT}{T - 75} = k\,dt \]

Integrate

Why: A logarithm on the left.

\[ \ln|T - 75| = kt + C \]

Exponentiate and solve for T

Why: Absorb e to the C and its sign into C sub 1.

\[ T(t) = 75 + C_1\,e^{kt} \]

Use T(0) = 350

Why: At t equal to 0 the exponential is 1.

\[ 350 = 75 + C_1 \;\Longrightarrow\; C_1 = 275 \]

Check by substituting

Why: The derivative is k times 275 e to the kt, which is k times T minus 75; and T(0) is 350.

\[ T' = 275k\,e^{kt} = k(T - 75), \quad T(0) = 75 + 275 = 350 \]

OpenStax Calculus Volume 2, §4.3 Separable Equations §4.3, pp. 388-389 — Example 4.13, steps 1 to 5

This is Newton's law with numbers: the kitchen is at 75 degrees and the pizza starts at 350. The book solves it with the five-step method rather than quoting the general formula, which is good practice.

The constant solution is 75 degrees, and it is not the pizza's starting temperature, so it is not the answer here. Separating, integrating and exponentiating gives 75 plus a constant times e to the kt, and the starting temperature makes the constant 275, the initial gap.

At this stage k is still unknown, and that is fine. The check confirms that the formula satisfies the equation for every k and the initial condition. The next slide uses the second reading to find k.

51. Example 4.13, part 2: how much longer to wait?

Worked example

After 5 minutes the pizza is at 340 degrees. When does it reach 300?

\[ T(t) = 75 + 275e^{kt}, \qquad T(5) = 340 \]

Use the second reading

Why: Subtract 75 from both sides.

\[ 340 = 75 + 275e^{5k} \;\Longrightarrow\; e^{5k} = \frac{265}{275} = \frac{53}{55} \]

Solve for k

Why: Take logarithms and divide by 5.

\[ k = \frac15\ln\frac{53}{55} \approx -0.007408 \]

Set the temperature to 300

Why: Subtract 75 and divide by 275.

\[ 300 = 75 + 275e^{kt} \;\Longrightarrow\; e^{kt} = \frac{225}{275} = \frac{9}{11} \]

Solve for t

Why: Divide the logarithm by k.

\[ t = \frac{\ln(9/11)}{k} = \frac{-0.20067}{-0.007408} \approx 27.09 \text{ min} \]

Figure (svg): The pizza's temperature T equals 75 plus 275 e to the kt with k equal to minus 0.007408, for t from 0 to 150 minutes. Dots mark (0, 350), (5, 340) and (27.1, 300); a dashed line at 300 and the kitchen temperature 75 are marked.

Two readings, five minutes apart, fix the whole curve. It crosses 300 at about 27.1 minutes and would take hours more to approach the kitchen's 75.

Check, and correct the book

Why: At 27.09 minutes the formula gives 75 plus 275 times 9 over 11, which is 300, so the wait after the 5-minute reading is about 22.1 minutes. The book copies k as minus 0.007048 and gets 28.5 and 23.5; with its own correct k the answer is 27.1.

\[ T(27.09) = 75 + 275\cdot\tfrac{9}{11} = 300, \qquad 27.09 - 5 \approx 22.1 \text{ min} \]

OpenStax Calculus Volume 2, §4.3 Separable Equations §4.3, pp. 389-390 — Example 4.13

The second reading, 340 degrees at 5 minutes, turns into an equation for k. Subtract 75, divide by 275, and you get e to the 5k equal to 53 over 55, so k is a fifth of the log of 53 over 55, about minus 0.007408. It is negative, as it should be.

Then set the temperature to 300 and solve the same way: e to the kt is 9 over 11, and t is the log of 9 over 11 divided by k, about 27.09 minutes. Since 5 minutes have already passed at the second reading, the extra wait is about 22.1 minutes.

The book gets 28.5 and 23.5 minutes. It computes k correctly and then copies it with two digits swapped, as minus 0.007048. The check catches this: at 27.09 minutes the formula gives exactly 300. Whenever a computed constant is reused, re-derive it rather than re-typing it.

52. Will the pizza ever reach 75 degrees?

Prediction

\[ T(t) = 75 + 275e^{-0.007408t} \]

Predict first

According to this model, when does the pizza reach the kitchen's 75 degrees?

  • After about 135 minutes
  • After about 10 hours
  • Never: it only gets closer
  • It cools below 75 and comes back

Correct: Never: it only gets closer

Why: T − 75 = 275e^(kt), and an exponential is never zero, so the gap shrinks forever without closing. That is why real questions ask for 'within 5 degrees', as the next checkpoint does. It also cannot overshoot: a solution curve can never cross the constant solution T = 75.

Pick an answer before revealing. The graph on the previous slide was still well above 75 after two and a half hours, which is a hint.

The gap between the pizza and the kitchen is 275 times an exponential, and an exponential is never zero. So in the model the pizza gets closer and closer to 75 degrees without ever reaching it. It cannot overshoot either, because a solution curve cannot cross the constant solution.

Real pizzas do reach room temperature, of course, because the model is an idealisation. But this is why well-posed cooling questions ask for a temperature near the ambient one, such as within 5 degrees, as the next checkpoint does.

53. Checkpoint 4.13: the cake that takes all night

Worked example

A cake leaves a 450-degree oven for a 70-degree kitchen and is at 430 degrees after 10 minutes. (a) Write the initial-value problem. (b) Solve it. (c) When is it within 5 degrees of room temperature?

(a) Write the model

Why: Ambient 70, initial 450.

\[ \frac{dT}{dt} = k(T - 70), \qquad T(0) = 450 \]

(b) Use the solved form

Why: The same steps as the pizza, with 450 minus 70 equal to 380.

\[ T(t) = 70 + 380\,e^{kt} \]

Find k from T(10) = 430

Why: Subtract 70, divide by 380, take logs.

\[ e^{10k} = \frac{360}{380} = \frac{18}{19}, \quad k = \frac{1}{10}\ln\frac{18}{19} \approx -0.005407 \]

(c) Set T to 75

Why: Within 5 degrees of 70.

\[ 380\,e^{kt} = 5 \;\Longrightarrow\; e^{kt} = \frac{1}{76} \]

Solve for t

Why: Both logarithms are negative.

\[ t = \frac{\ln(1/76)}{k} = \frac{-4.3307}{-0.005407} \approx 801 \text{ min} \approx 13.3 \text{ h} \]

Figure (svg): The cake's temperature T equals 70 plus 380 e to the kt with k equal to minus 0.005407, for t from 0 to 1000 minutes: it falls from 450, passes 430 at t equals 10, and reaches 75, marked by a dashed line, at about t equals 801.

The last few degrees take almost all the time: the gap shrinks by the same fraction every minute, so closing it to 5 degrees takes over thirteen hours.

Check both readings

Why: The formula must reproduce 430 at 10 minutes and 75 at 801.

\[ T(10) = 70 + 380\cdot\tfrac{18}{19} = 430, \quad T(801) = 70 + 380\cdot\tfrac{1}{76} = 75 \]

OpenStax Calculus Volume 2, §4.3 Separable Equations §4.3, p. 390 — Checkpoint 4.13

Part (a) is just a matter of reading off the numbers: the kitchen is at 70 degrees and the cake starts at 450. Part (b) follows the pizza exactly, with an initial gap of 380, and the reading at 10 minutes gives e to the 10k equal to 18 over 19.

Part (c) needs a careful reading of the question. Within 5 degrees of room temperature means 75 degrees. The gap must shrink from 380 to 5, a factor of 76, so e to the kt equals one seventy-sixth, and t is the log of one seventy-sixth divided by k.

The answer, about 801 minutes, is over thirteen hours, and the graph shows why. The gap shrinks by the same fraction every minute, so the last few degrees take almost all the time. The check reproduces both readings from the formula.

54. Slide k and the room temperature

Tweak it

Parameter explorer

The curve is an object starting at 350 degrees. Slide k and the surroundings Tₛ. What does k change, and what does Tₛ change?

\[ T(t) = {Ts} + (350 - {Ts})\,e^{{k}t} \]

  • k — from -0.1 to -0.005: cooling constant k
  • Ts — from 0 to 200: surroundings Tₛ

Start with the default values and move one slider at a time. Make k more negative and watch the curve drop faster; make it closer to zero and the object cools slowly.

Now move the surroundings. The curve always levels off at the surrounding temperature, wherever you put it, because that is the constant solution. Changing k changes how quickly the curve gets there, but never where it ends up.

Try to separate these two roles in words: the ambient temperature sets the destination, and k sets the speed. The same split applies to the salt tanks, where the equilibrium amount is the destination and the flow rate over the volume is the speed.

55. Tanks and cooling are one equation

Concept

Both models have the rate equal to a constant plus a constant multiple of the amount. Exercise 163 solves that shape once and for all.

\[ y' = ay + b, \qquad y(0) = c, \qquad a \ne 0 \]

\[ y' = a\left(y + \frac{b}{a}\right) \;\Longrightarrow\; \frac{dy}{y + b/a} = a\,dt \]

\[ \ln\left|y + \frac{b}{a}\right| = at + K \;\Longrightarrow\; y + \frac{b}{a} = A\,e^{at} \]

\[ y(t) = \left(c + \frac{b}{a}\right)e^{at} - \frac{b}{a} \]

The constant solution is minus b over a. When a is negative every solution heads there; when a is positive every solution runs away from it.

OpenStax Calculus Volume 2, §4.3 Separable Equations §4.3, p. 392 — Exercise 163

Look at the two models side by side. The salt equation is 1 minus u over 50; the cooling equation is k times T minus 75. Both say the rate equals a constant plus a constant multiple of the amount. Exercise 163 asks you to solve that shape in general, and doing it once saves you from redoing it every time.

Factor out a to write the right side as a times y plus b over a. That is separable, with the constant solution minus b over a. Integrating gives a logarithm, exponentiating gives an exponential, and the initial value c fixes the multiplier as c plus b over a.

The sign of a decides everything. When a is negative the exponential dies away and every solution approaches the equilibrium, which is the tank and cooling situation. When a is positive the exponential grows, and solutions run away from the equilibrium.

56. Complete the table of y' = ay + b models

Comparison

Comparison matrix

modelequationaequilibrium −b/a
salt, Example 4.12u' = 1 − u/50−1/5050
pizza, Example 4.13T' = k(T − 75)k75
salt, Checkpoint 4.12u' = 2.4 − 0.08u−0.0830
leaf litter, Exercise 166L' = 2 − 0.9L−0.920/9

Fill in each blank before checking. For each model, read off a as the coefficient of the unknown, then find the equilibrium by setting the right side to zero, which is the same as computing minus b over a.

The salt tanks give minus one fiftieth and minus 0.08 for a, with equilibria 50 and 30 kilograms. The cooling model has a equal to k and equilibrium 75, the kitchen temperature. The leaf litter model, which you will solve in the exit ticket, has equilibrium 2 over 0.9, which is 20 over 9.

In every row a is negative, so every one of these systems settles down to its equilibrium. That is the common behaviour of physical systems with a balance between a steady input and a loss proportional to the amount.

57. A drug's half-life

Real world

Exercise 148: most drugs leave the bloodstream at a rate proportional to their concentration, so the concentration obeys the simplest separable equation of all.

Discussion prompt

A drug has a half-life of 2 hours. Solve y' = cy by separation and find what fraction of the initial dose remains after 6 hours.

OpenStax Calculus Volume 2, §4.3 Separable Equations §4.3, p. 391 — Exercises 148 and 149

Write your solution before revealing. The equation y prime equals cy is the simplest separable equation of all: dividing by y and integrating gives exponential decay.

The half-life fixes c: after 2 hours the concentration is half its starting value, so e to the 2c is one half. You do not actually need c as a decimal. Six hours is three half-lives, so the fraction remaining is one half cubed, one eighth.

If the drug is also infused at a steady rate, as in Exercise 149, the equation gains a constant term and becomes the a y plus b shape from a few slides ago. The equilibrium then gives the steady level of drug the body settles at.

58. Draining a tank: Torricelli's law

Concept

Water leaving through a hole in the bottom of a tank flows faster when the water is deeper, in proportion to the square root of the depth. For a cylindrical tank the height obeys a separable equation.

\[ \frac{dh}{dt} = -k\sqrt{h}, \qquad k > 0 \]

The y-factor, the square root of h, is zero at h equal to 0, so the empty tank is a constant solution. That lost solution turns out to be exactly what happens after the tank runs dry.

OpenStax Calculus Volume 2, §4.3 Separable Equations §4.3, p. 392 — Exercises 154 and 155, Torricelli's law

Torricelli's law describes water escaping through a hole in the bottom of a tank. Deeper water pushes harder, so it flows out faster, and the speed turns out to be proportional to the square root of the depth. For a tank with vertical sides, the height then changes at a rate proportional to the square root of the height.

The book's version, Exercise 154, includes the hole's area and gravity in the constant. The simplified equation here keeps the shape and hides those in k, which makes the separation easier to follow.

Notice the y-factor, the square root of h. It is zero when h is zero, so the empty tank is a constant solution. Remember that; the next two slides show it is not a curiosity but exactly what the water does once it runs out.

59. Emptying a tank from 100 feet

Worked example

Take k equal to one half, with h in feet and t in minutes, and a starting depth of 100 feet.

\[ h' = -\tfrac12\sqrt{h}, \qquad h(0) = 100 \]

Separate

Why: Divide by the square root of h, allowed while h is positive.

\[ h^{-1/2}\,dh = -\tfrac12\,dt \]

Integrate

Why: h to the minus one half integrates to twice the square root.

\[ 2\sqrt{h} = -\tfrac12 t + C \]

Use h(0) = 100

Why: Twice the root of 100 is 20.

\[ C = 20 \;\Longrightarrow\; \sqrt{h} = 10 - \tfrac{t}{4} \]

Square

Why: Valid only while the right side is not negative.

\[ h(t) = \left(10 - \tfrac{t}{4}\right)^2, \qquad 0 \le t \le 40 \]

Find the emptying time

Why: The height is zero when the bracket is.

\[ 10 - \tfrac{t}{4} = 0 \;\Longrightarrow\; t = 40 \text{ min} \]

Figure (svg): The water height h equals (10 minus t over 4) squared for t from 0 to 40, falling from 100 to 0. Past t equals 40 a red dashed curve shows the same formula rising again, and a green segment along h equals 0 shows what really happens: the tank stays empty.

The square of a negative number is positive, so the formula keeps producing heights after the tank is empty. The model stopped applying at t equal to 40.

Check by substituting

Why: On the valid interval the bracket is the square root of h.

\[ h' = 2\left(10 - \tfrac t4\right)\left(-\tfrac14\right) = -\tfrac12\left(10 - \tfrac t4\right) = -\tfrac12\sqrt h \]

Separate by dividing by the square root of h, which is allowed while there is water in the tank. The integral of h to the minus one half is twice the square root of h, and the initial height of 100 feet makes the constant 20.

So the square root of h is 10 minus t over 4, which falls linearly and reaches zero at 40 minutes. Squaring gives the height, but only for t up to 40, because the step assumed the square root equals 10 minus t over 4, and a square root cannot be negative.

The picture shows what goes wrong if you ignore that restriction. The dashed red continuation climbs again, as if the tank refilled. The green segment is what really happens: the height stays at zero, which is the constant solution taking over.

60. Trap: a formula used past its domain

Trap

The trap

With the draining formula in hand:

\[ h(60) = \left(10 - 15\right)^2 \]

\[ h(60) = 25 \text{ ft} \]

Wrong. The tank does not refill itself.

The fix

The step that squared both sides needed the square root of h to equal 10 minus t over 4, which fails once t passes 40. From then on the solution is the constant solution h equal to 0.

\[ h(t) = 0 \quad (t \ge 40) \]

The formula is perfectly good up to 40 minutes, so it is natural to keep using it. But at 60 minutes the bracket 10 minus 15 is negative, and squaring hides the sign, producing a height of 25 feet in a tank that emptied twenty minutes earlier.

The fix is to remember where each step was valid. The square root of h equals 10 minus t over 4 only while the right side is positive. After that the solution is the constant solution h equal to zero. Whenever you square both sides of an equation, ask what happens when the thing you squared changes sign.

61. Putting it together

Section

Part 6

62. Pattern: solving a separable equation

Pattern

  1. Factor first. Write the right-hand side as f(x) times g(y); if it will not factor, this method does not apply.
  2. Collect the constant solutions by setting g(y) = 0, before dividing by it.
  3. Separate and integrate: dy over g(y) on one side, f(x) dx on the other, one constant C.
  4. Tidy the constant through every operation; let it take any sign, and try C = 0 to see whether a lost solution returns.
  5. Use the initial value, often most easily before solving for y, then state the interval the solution lives on.
  6. Check by substituting the answer back into the equation and the initial condition.

\[ \int\frac{dy}{g(y)} = \int f(x)\,dx + C \quad \cup \quad \{y = y_0 : g(y_0) = 0\} \]

This is the whole method as a checklist. The first two items happen before any integration: confirm that the equation separates, and collect the constant solutions while you can still see them.

The middle items are the calculation. Keep one constant, and each time it absorbs an operation, rename it and note its allowed range. At the end try C equal to zero to see whether a constant solution rejoins the family, and list it separately if it does not.

The last two items make the answer complete. Use the initial value, often most easily before isolating y, state the interval on which the solution lives, and substitute back. The formula at the bottom is the summary: the integrated family together with the constant solutions.

63. Check: which equation separates?

Check

Check your understanding

Which equation is separable?

  • A. y' = x + y²
  • B. y' = e^(2x − y) (correct)
  • C. y' = sin(x + y)
  • D. y' = x² + xy + y

Answer: B

Why: e^(2x − y) = e^(2x) · e^(−y), a function of x times a function of y, so it separates. The other three are sums, or functions of a sum, that cannot be factored into f(x)g(y).

Why A tempts people
x + y² is a sum of an x-term and a y-term; the argument used for x + y shows it cannot be a product.
Why C tempts people
sin(x + y) expands to sin x cos y + cos x sin y, a sum of two products, not a single product.
Why D tempts people
Grouping gives x² + y(x + 1), and the x² term has no factor of anything in y, so no product form exists.

Try to factor each right-hand side into something in x times something in y. Only one succeeds, and it succeeds by the exponent law: e to the 2x minus y is e to the 2x times e to the minus y.

The distractors are all sums in disguise. The sine of a sum expands into a sum of two products, not one product. The last option can be grouped as x squared plus y times x plus 1, but the x squared term carries no factor involving y, so no single product form exists.

64. Check: the complete general solution

Check

Check your understanding

Separating y' = y cos x gives ln|y| = sin x + C. Which is the complete set of solutions?

  • A. y = A e^(sin x), A any real number (correct)
  • B. y = e^(sin x) + C
  • C. y = A e^(sin x), A > 0 only
  • D. y = e^(sin x + C), C any real number

Answer: A

Why: Exponentiating gives |y| = e^C e^(sin x). Removing the bars allows either sign, and A = 0 restores the constant solution y = 0 that dividing by y removed. So A can be any real number.

Why B tempts people
The constant was added after exponentiating; e^(sin x + C) is e^C times e^(sin x), a multiple, not a shift.
Why C tempts people
This forgets the absolute value: negative solutions such as −e^(sin x) are lost, and so is y = 0.
Why D tempts people
e^(sin x + C) is always positive, so every negative solution and y = 0 are missing.

Exponentiate carefully. The absolute value of y equals e to the C times e to the sine of x. Removing the absolute value allows either sign, and the constant solution y equal to zero, lost when you divided by y, returns when the multiplier is zero. So the multiplier can be any real number.

Each wrong option makes one specific slip. Adding C after exponentiating is the error-analysis mistake from earlier. Restricting the multiplier to positive values forgets the absolute value. And writing the constant inside the exponent produces only positive solutions, losing every negative one and the zero solution.

65. Check: finding k in a cooling problem

Check

Check your understanding

Tea at 90 degrees sits in a 20-degree room and is at 60 degrees after 10 minutes. With T = 20 + 70e^(kt), what is k?

  • A. (1/10) ln(4/7) (correct)
  • B. (1/10) ln(2/3)
  • C. 10 ln(4/7)
  • D. (1/10) ln(7/4)

Answer: A

Why: At t = 10: 60 = 20 + 70e^(10k), so e^(10k) = 40/70 = 4/7 and k = (1/10) ln(4/7) ≈ −0.056. It is negative, as a cooling constant must be.

Why B tempts people
2/3 is 60/90, the ratio of temperatures; the model needs the ratio of GAPS from the room, 40/70.
Why C tempts people
Solving e^(10k) = 4/7 means dividing the logarithm by 10, not multiplying.
Why D tempts people
ln(7/4) is positive, which would make the tea warm up; the ratio is upside down.

Newton's law works with the gap between the object and the room, not with the temperatures themselves. The initial gap is 90 minus 20, which is 70; after 10 minutes the gap is 60 minus 20, which is 40. The gap has shrunk by the factor 4 over 7.

So e to the 10k is 4 over 7, and k is a tenth of the log of 4 over 7, about minus 0.056. The most tempting wrong answer uses the ratio of temperatures, 60 over 90, instead of the ratio of gaps. A quick sign check also rules out the answer with the fraction upside down, which would make the tea warm up.

66. Explain the lost solutions

Explain it to yourself

Discussion prompt

In two or three sentences: why does separation of variables miss the constant solutions, how do you find them, and why do they often matter most in an application?

Write your two or three sentences before revealing. This is the idea that most distinguishes a careful solution from a careless one, and being able to explain it means you will not forget it under pressure.

A good answer has three parts. The cause: separation divides by the y-factor, which is illegal where that factor is zero. The cure: find those heights first by setting the y-factor to zero. The meaning: in an application they are the equilibria, the salt level where inflow and outflow balance or the temperature of the room, which is where every other solution ends up.

67. Exit ticket

Exit ticket

Exercise 166: leaves fall on a forest floor at 2 grams per square centimetre per year and decompose at 90 percent per year. There is no litter at the start.

Discussion prompt

Write and solve the differential equation for the litter L(t), and find the steady amount.

OpenStax Calculus Volume 2, §4.3 Separable Equations §4.3, p. 392 — Exercise 166

This problem uses everything in the lesson. Set up the rate as input minus loss: leaves arrive at 2 grams per square centimetre per year, and 90 percent of what is there decomposes each year, a loss of 0.9 L.

Separating and integrating gives a logarithm of 2 minus 0.9 L, with the factor minus one over 0.9 from the chain rule. The initial value of zero fixes the constant, and solving gives 20 over 9 times 1 minus e to the minus 0.9 t.

The steady amount, about 2.22 grams per square centimetre, is the constant solution, where falling leaves exactly balance decomposition. You could have found it in one line by setting the rate to zero, which is the point the whole lesson has been making about constant solutions.

68. Recap

Recap

ideawhat to writewhat to remember
separabley' = f(x) g(y)a product; sums do not separate
separate and integrate∫ dy / g(y) = ∫ f(x) dx + Cthe chain rule backwards; one constant
lost solutionsg(y₀) = 0 gives y = y₀find them before dividing; C = 0 may or may not return them
implicit vs explicitan equation in x and ythe initial value picks the branch and the interval
y' = ay + by = (c + b/a)e^(at) − b/atanks, cooling, drugs, litter; the limit is the equilibrium

\[ \frac{dT}{dt} = k(T - T_s) \;\Longrightarrow\; T = T_s + (T_0 - T_s)e^{kt} \]

Next, Section 4.4 applies separation to the logistic equation, where the equilibria are the carrying capacity and zero.

Stewart, Calculus: Early Transcendentals 8e, §9.3 Separable Equations §9.3, pp. 599-609 — the same material in Stewart

Separable equations are the ones whose right-hand side is a function of x times a function of y. Separating the variables and integrating both sides is the chain rule run backwards, and only one arbitrary constant is needed. Sums do not separate, and no rearrangement will make them.

The division in the method loses the constant solutions, the heights where the y-factor is zero. Find them first, check whether setting the constant to zero brings them back, and remember that in applications they are the equilibria that every solution approaches.

Answers may be implicit, and when you solve for y the initial value chooses the branch and the interval. The shape y prime equals a y plus b covers tanks, cooling, drugs and litter. Section 4.4 turns next to the logistic equation, which is separable too, and whose two constant solutions are zero and the carrying capacity.

Sources

  1. OpenStax Calculus Volume 2, §4.3 Separable Equations — Strang & Herman, OpenStax / Rice University, CC BY-NC-SA 4.0, pp. 381-392
  2. Stewart, Calculus: Early Transcendentals 8e, §9.3 Separable Equations — James Stewart, Cengage Learning, 2016, pp. 599-609

Want this taught 1-on-1? Alexander tutors Calculus II — $55/session, free consultation.

Book on Wyzant · Text (657) 465-8108