Integral Calculus 201-SN3-RE • CEGEP, Montreal

Revision sheet: differential equations (201-SN3-RE)

This sheet does not re-explain what a differential equation is: you know that. It deals with what decides the mark on the last question of the 201-SN3-RE (formerly 201-NYB) final exam, namely how the constant of integration is handled, as it changes form between the logarithm and the exponential, and putting the equation in standard form before any integrating factor.

It is written for CEGEP students in the Science program (Sciences de la nature). Once the sheet is read, the corrected exercise set on the same chapter puts every reflex to the test.

Mark this sheet as read or add it to your favourites: a free account, no password, keeps your read sheets and favourites from one visit to the next, tells you which chapter to tackle next and lets you ask for the method or exercise you are missing. Create your space, an email is enough.

The thread of the chapter

Solving a differential equation means finding a FAMILY of functions; an initial condition selects a single one. Almost every lost mark comes from the constant: lost, added at the wrong moment, or determined before the solving is finished.

This chapter is part of 201-SN3-RE, Integral Calculus

The essentials

General solution, particular solution

  • • The GENERAL solution of a first-order equation contains ONE arbitrary constant: it is a family of curves.
  • • An INITIAL CONDITION y(x0)=y0y(x_{0})=y_{0} selects a single curve of this family.
  • • The constant is determined AFTER writing out the complete general solution, never before.
  • • Verifying a solution is immediate: differentiate it and substitute it into the equation.
  • • A second-order equation has TWO constants, so two conditions are needed.
-2-1.5-1-0.50.511.52-4-22468C = 2C = 1C = 1/2C = −1
Four solutions of y′=yy'=y for C=−1C=-1, 12\frac{1}{2}, 11 and 22: the constant MULTIPLIES the exponential, it is not added to it, and only one curve passes through a given point.

The curves of the family never cross when the equation has the form y′=f(x,y)y'=f(x,y) with ff regular: exactly one solution passes through each point.

Separation of variables, in five moves

  • • Recognize the form dydx=g(x)h(y)\frac{dy}{dx}=g(x)h(y), a PRODUCT of a function of xx and a function of yy.
  • • Separate: dyh(y)=g(x) dx\frac{dy}{h(y)}=g(x)\,dx, noting the values of yy that make hh zero.
  • • Integrate both sides, with ONE single constant, on the xx side.
  • • Isolate yy, transforming the constant when it passes through an exponential.
  • • Check the CONSTANT solutions lost in step 2, those where h(y)=0h(y)=0.

The constant changes nature as it passes through the exponential: ln⁡∣y∣=x+C\ln\left|y\right|=x+C gives y=±eCexy=\pm e^{C}e^{x}, which is rewritten y=Kexy=Ke^{x} with KK of either sign.

Linear equation and integrating factor

  • • STANDARD form is compulsory: y′+P(x)y=Q(x)y'+P(x)y=Q(x), with the coefficient of y′y' equal to 11.
  • • Integrating factor: μ(x)=e∫P(x) dx\mu(x)=e^{\int P(x)\,dx}, with no constant of integration here.
  • • Multiplying the equation by μ\mu makes the left-hand side equal to (μy)′\left(\mu y\right)'.
  • • What remains is μy=∫μQ dx+C\mu y=\int\mu Q\,dx+C, then divide by μ\mu.
  • • Usual models: y′=kyy'=ky gives y=Cekxy=Ce^{kx}; y′=k(y−A)y'=k(y-A) gives y=A+Cekxy=A+Ce^{kx}; the logistic y′=ky(1−yK)y'=ky\left(1-\frac{y}{K}\right) gives an S-shaped curve with ceiling KK.

The mistakes that cost marks

These are the errors I correct most often in session. Each one costs marks on a paper, even when the reasoning behind it is right.

1. Adding the constant instead of multiplying by it

the whole question, since the function obtained is not a solution

What not to write

“ln⁡∣y∣=x+C\ln\left|y\right|=x+C, so y=ex+Cy=e^{x}+C.”

What to write

“y=ex+C=eCex=Kexy=e^{x+C}=e^{C}e^{x}=Ke^{x}: the constant becomes a FACTOR.”

-1-0.50.511.52123456789102eˣeˣ + 1(0, 2)
Both curves start from (0,2)(0, 2), but only 2ex2e^{x} (green) satisfies y′=yy'=y; ex+1e^{x}+1 (red) has derivative exe^{x}, not yy.

Why: The exponential of a sum is a product, not a sum. Immediate check: y=ex+Cy=e^{x}+C gives y′=ex=y−C≠yy'=e^{x}=y-C\neq y, whereas y=Kexy=Ke^{x} gives y′=Kex=yy'=Ke^{x}=y ✓. One second of differentiation eliminates the wrong answer.

2. Using the initial condition too early

1 to 2 marks, and often an expression that cannot be simplified

What not to write

“ln⁡∣y∣=x+C\ln\left|y\right|=x+C, and y(0)=3y(0)=3 gives C=ln⁡3C=\ln 3, so ln⁡∣y∣=x+ln⁡3\ln\left|y\right|=x+\ln 3.”

What to write

“First I isolate y=Kexy=Ke^{x}, THEN y(0)=3y(0)=3 gives K=3K=3, so y=3exy=3e^{x}.”

Why: Determining the constant before isolating yy forces you to drag a logarithm along to the end, and the constant takes a needlessly complicated form there. The order is always the same: complete general solution, then initial condition.

3. Losing the constant solution by dividing

1 to 2 marks, and the equilibrium solution of the model disappears

What not to write

“dydx=y(2−y)\frac{dy}{dx}=y(2-y), I divide by y(2−y)y(2-y) and integrate.”

What to write

“I first note that y=0y=0 and y=2y=2 are CONSTANT solutions, then I divide on the intervals where y≠0y\neq 0 and y≠2y\neq 2.”

0.511.522.533.54-0.50.511.522.53y = 2y = 0
y=0y=0 and y=2y=2 (green) make y(2−y)y(2-y) zero: they are solutions, which dividing by y(2−y)y(2-y) wipes out. The other solutions approach them.

Why: Dividing by an expression that can be zero makes the corresponding solutions disappear. In a logistic model, y=Ky=K is the equilibrium state, that is, the answer to the question “what happens to the population in the long run”. Losing it means losing the interpretation.

4. Applying the integrating factor without the standard form

the whole question

What not to write

“xy′+2y=x3xy'+2y=x^{3}: I take μ=e∫2 dx=e2x\mu=e^{\int 2\,dx}=e^{2x}.”

What to write

“First I divide by xx: y′+2xy=x2y'+\frac{2}{x}y=x^{2}, so P(x)=2xP(x)=\frac{2}{x} and μ=e2ln⁡∣x∣=x2\mu=e^{2\ln\left|x\right|}=x^{2}.”

Why: The integrating factor formula assumes the coefficient of y′y' is 11. Without this rearrangement, PP is wrong and everything else collapses. The check: after multiplying by μ\mu, the left-hand side must be exactly the derivative of μy\mu y.

5. Adding a constant to the integrating factor

wasted time, and sometimes an algebra error

What not to write

μ(x)=e∫P dx+C\mu(x)=e^{\int P\,dx+C}

What to write

μ(x)=e∫P dx\mu(x)=e^{\int P\,dx}, with no constant: any integrating factor will do, so take the simplest.

Why: A multiplicative constant in μ\mu cancels on both sides of the equation: it serves no purpose. The only constant that matters is the one from the FINAL integration, the one that generates the family of solutions.

6. Dropping the absolute value without discussion

1 mark, and half of the solutions disappear

What not to write

“ln⁡∣y∣=x+C\ln\left|y\right|=x+C gives ln⁡y=x+C\ln y=x+C.”

What to write

“∣y∣=eCex\left|y\right|=e^{C}e^{x}, so y=±eCexy=\pm e^{C}e^{x}, written y=Kexy=Ke^{x} with KK any real number, possibly negative.”

Why: Without the ±\pm, you lose all the negative solutions, including those that match a negative initial condition. Going through a KK of either sign settles the matter once and for all, and it must be written, not implied.

7. Confusing exponential growth with logistic growth

the whole interpretation question

What not to write

“The population grows in proportion to its size, so it tends to infinity.”

What to write

“The LOGISTIC model y′=ky(1−yK)y'=ky\left(1-\frac{y}{K}\right) slows down as it approaches KK: the population tends to KK, not to infinity.”

0.511.522.533.544.5524681012exponentiallogisticK = 10
The two curves start together, then the logistic bends and hugs its ceiling K=10K=10 while the exponential keeps climbing: only the long term tells them apart.

Why: The two models coincide at the start, when yy is small compared with KK, which makes them indistinguishable on the first data. It is the long-term behaviour that separates them, and that is precisely what the question asks you to interpret.

8. Not checking the solution found

variable, but it is the cheapest check of the whole semester

What not to write

“I have isolated yy, I am done.”

What to write

“I differentiate my solution and substitute it into the original equation, then I check the initial condition.”

Why: Unlike most chapters, a differential equation can be checked completely in thirty seconds: differentiate, substitute, compare. A paper that skips this hands in sign errors that the computation never reveals.

Which method to choose

Which method, depending on the form of the equation

Put the equation in a recognizable form before any computation. Two methods, separation and the integrating factor, handle most CEGEP questions.

  • If the equation can be written dydx=g(x)h(y)\frac{dy}{dx}=g(x)h(y), a product → SEPARATION of variables, without forgetting the constant solutions

    Example: dydx=xy\frac{dy}{dx}=xy gives dyy=x dx\frac{dy}{y}=x\,dx

  • If the equation can be written y′+P(x)y=Q(x)y'+P(x)y=Q(x) after dividing → INTEGRATING FACTOR μ=e∫P\mu=e^{\int P}

    Example: y′+2xy=x2y'+\frac{2}{x}y=x^{2} gives μ=x2\mu=x^{2}

  • If the equation is y′=kyy'=ky → EXPONENTIAL growth or decay: y=Cekxy=Ce^{kx}, directly

    Example: radioactive decay, continuously compounded interest

  • If the equation is y′=k(y−A)y'=k(y-A) with AA constant → y=A+Cekxy=A+Ce^{kx}: this is Newton's law of cooling, AA being the room temperature

    Example: a coffee cooling in a room at 2020 degrees

  • If the equation is y′=ky(1−yK)y'=ky\left(1-\frac{y}{K}\right) → LOGISTIC model: separation then partial fractions, ceiling KK

    Example: a population limited by its resources

An equation that fits none of these forms after rearranging calls for a substitution: v=yxv=\frac{y}{x} for a homogeneous equation, u=y1−nu=y^{1-n} for a Bernoulli equation, or xx viewed as a function of yy (exercises 1 and 7 of the set). If none of them applies either, an algebraic step is missing.

What to do with the constant, step by step

The constant changes form three times during a solution, and each transformation is a trap.

  • If you have just integrated both sides → ONE single constant, on the xx side

    Example: ln⁡∣y∣=x22+C\ln\left|y\right|=\frac{x^{2}}{2}+C

  • If you apply the exponential → the constant becomes a FACTOR: eCe^{C}, renamed KK

    Example: ∣y∣=eCex2/2\left|y\right|=e^{C}e^{x^{2}/2}

  • If you remove the absolute value → KK can take EITHER SIGN, and K=0K=0 gives back the zero constant solution

    Example: y=Kex2/2y=Ke^{x^{2}/2} for every real KK

  • If you have an initial condition → substitute and solve for KK, only at that moment

    Example: y(0)=3y(0)=3 gives K=3K=3

The value K=0K=0 often recovers the constant solution lost in the division: it is the check that closes the question cleanly.

How the answer is expected to be written

A marker ticks steps. Here they are in order, with the concluding sentence expected word for word.

A separation of variables, written up for the marker

When to use it: Any equation of the form dydx=g(x)h(y)\frac{dy}{dx}=g(x)h(y).

  1. 1 Spot and STATE the constant solutions: “h(y)=0h(y)=0 for y=0y=0, which is a solution.”
  2. 2 Separate the variables, writing the differentials on both sides.
  3. 3 Integrate, with a single constant, and keep the absolute value inside the logarithm.
  4. 4 Isolate yy, transforming the constant at each pass through the exponential.
  5. 5 Apply the initial condition, then CHECK by differentiating.

Concluding sentence

The general solution is y=Kex2/2y=Ke^{x^{2}/2} for any real KK, and the condition y(0)=3y(0)=3 gives y=3ex2/2y=3e^{x^{2}/2}.

The trap: Writing a constant on each side. One is enough: C1C_{1} and C2C_{2} combine at once into C=C2−C1C=C_{2}-C_{1}, and keeping two suggests you have not understood what a family of solutions is.

Marking: Typically 1 mark for the constant solutions, 1 mark for the separation, 2 marks for the integration and isolating yy, 1 mark for the initial condition.

Check before you hand in

Five minutes of checking recover more marks than one more problem started in a hurry.

The typical problem, taken apart

Newton's law of cooling, from the model to the prediction

A coffee at 9090 degrees is placed in a room at 2020 degrees. After 1010 minutes, it is at 7070 degrees.

What will its temperature be after 3030 minutes?

102030405060102030405060708090100(0, 90)(10, 70)room at 20 degrees
The curve starts at 9090 degrees, passes through the measurement (10,70)(10, 70) and approaches the line y=20y=20 without crossing it: it is the GAP to the room temperature that decays exponentially.

Step 1

Model: the rate of cooling is proportional to the gap with the room temperature, so dTdt=−k(T−20)\frac{dT}{dt}=-k\left(T-20\right) with k>0k>0.

Why

It is the GAP that drives the cooling, not the absolute temperature: a coffee at 2121 degrees in a room at 2020 hardly cools any more. Writing dTdt=−kT\frac{dT}{dt}=-kT would model a coffee heading for 0 degrees whatever the room.

Step 2

Separation: T=20T=20 is a constant solution; elsewhere, dTT−20=−k dt\frac{dT}{T-20}=-k\,dt, so ln⁡∣T−20∣=−kt+C\ln\left|T-20\right|=-kt+C.

Why

The constant solution T=20T=20 is noted before dividing: it is the equilibrium temperature, and it will be recovered by K=0K=0 at the end. The absolute value is kept; it will disappear cleanly at the next step.

Step 3

Exponential: ∣T−20∣=eCe−kt\left|T-20\right|=e^{C}e^{-kt}, so T−20=Ke−ktT-20=Ke^{-kt} with KK of either sign, and T(t)=20+Ke−ktT(t)=20+Ke^{-kt}.

Why

The constant becomes a factor, then takes either sign: both transformations in one line. The form obtained is the one the tree announced for y′=k(y−A)y'=k(y-A), which confirms the consistency.

Step 4

Conditions: T(0)=90T(0)=90 gives 20+K=9020+K=90, that is K=70K=70. Then T(10)=70T(10)=70 gives 20+70e−10k=7020+70e^{-10k}=70, that is e−10k=57e^{-10k}=\frac{5}{7} and k=ln⁡7510≈0.0336k=\frac{\ln\frac{7}{5}}{10}\approx 0.0336 per minute.

Why

Two conditions for two unknowns, KK and kk, applied in order: the simpler one first. Keep 57\frac{5}{7} as an exact fraction, which will make the final computation immediate.

Step 5

T(30)=20+70e−30k=20+70(e−10k)3=20+70(57)3=20+70⋅125343=20+8750343≈45.5T(30)=20+70e^{-30k}=20+70\left(e^{-10k}\right)^{3}=20+70\left(\frac{5}{7}\right)^{3}=20+70\cdot\frac{125}{343}=20+\frac{8750}{343}\approx 45.5 degrees.

Why

3030 minutes are three times 1010 minutes, so the exponential is the CUBE of the one already known. This shortcut avoids handling the decimal value of kk and gives an exact answer as a fraction.

Step 6

Checks: TT decreases ✓, stays above 2020 ✓, and tends to 2020 as t→+∞t\to+\infty ✓. The sequence 9090, 7070, 55.755.7, 45.545.5 at times 00, 1010, 2020, 3030 shows gaps 7070, 5050, 35.735.7, 25.525.5 whose ratio is constant and equals 57\frac{5}{7} ✓.

Why

A constant ratio of the GAPS over equal intervals is the signature of exponential decay: it is the most telling check of the chapter, and it needs no extra computation.

The conclusion, written out

The temperature follows T(t)=20+70e−ktT(t)=20+70e^{-kt} with k=ln⁡7510≈0.0336k=\frac{\ln\frac{7}{5}}{10}\approx 0.0336 per minute; after 3030 minutes, the coffee is at 20+70(57)3≈45.520+70\left(\frac{5}{7}\right)^{3}\approx 45.5 degrees.

The classic mistake on this problem: Setting dTdt=−kT\frac{dT}{dt}=-kT and forgetting the room temperature. The solution would be T=90e−ktT=90e^{-kt}, which tends to 00 degrees: the coffee would freeze, which no room at 2020 degrees allows.

Learn by heart

  • • The general solution contains ONE constant per order of the equation: it is a family.
  • • Initial condition AFTER isolating yy, never before.
  • • ln⁡∣y∣=x+C\ln\left|y\right|=x+C gives y=Kexy=Ke^{x}: the constant becomes a FACTOR of either sign.
  • • Separation: note the constant solutions BEFORE dividing, and recover them with K=0K=0.
  • • Integrating factor: first put the equation in the form y′+Py=Qy'+Py=Q, then μ=e∫P\mu=e^{\int P}, with no constant.
  • • y′=kyy'=ky gives CekxCe^{kx}; y′=k(y−A)y'=k(y-A) gives A+CekxA+Ce^{kx}; the logistic levels off at KK.
  • • Cooling: it is the GAP to the room temperature that decays exponentially.
  • • Thirty-second check: differentiate, substitute, check the initial condition.

Frequently asked questions

Why does the solution of a differential equation contain a constant?

Because the equation only constrains the derivative, and infinitely many functions share the same derivative up to a constant. The general solution is therefore a family of curves. An initial condition, which sets the value at one point, selects exactly one of them.

Why does the constant become a factor after taking the exponential?

Because the exponential of a sum is a product of exponentials. So if the logarithm of the absolute value of y equals x plus C, then the absolute value of y equals e to the power C times e to the power x. This factor is renamed K, of either sign once the absolute value is removed.

When should I use separation of variables and when the integrating factor?

Separation applies when the equation can be written as a product of a function of x and a function of y. The integrating factor applies to first-order linear equations, of the form y prime plus P of x times y equals Q of x, after dividing so that the coefficient of y prime is one.

Why should I note the constant solutions before separating?

Because separating requires dividing by an expression in y, and this division wipes out the values that make it zero. These values are exactly the constant solutions, often the equilibrium states of the model, and therefore the answer to the question about long-term behaviour.

What is the difference between exponential and logistic growth?

The exponential grows without limit, while the logistic curve slows down as it approaches a ceiling called the carrying capacity. The two curves are almost identical at first, when the population is small compared with that ceiling, and only differ in the long run. That distinction is what interpretation questions look for.

Practise it

Corrected exercises: Differential equations, 201-SN3-RE

A method is proved on a paper, not on a sheet. The set for the same chapter takes each of these traps into a problem, with the solution written out step by step.

  • 17 corrected exercises
  • 170 points
  • 255 minutes
Do the exercises
Something missing from this sheet? A method, a trap, an exercise to practise it, a mistake you spotted: tell me, I read every request.

Sending goes through your free space: that is how I can answer you and tell you when the exercise is added. An email is enough, no password. Create your space. Rather not create an account? Write to me directly.

What is it about?
I read every request myself, nobody else sees it. No need to write your name or your school.
When your request is dealt with, you hear about it by email and in your space.

By sending, you agree that I read your request to answer it. It is kept with your account, erased with it, and never published: privacy policy.

Previous sheet Power series and Taylor series

© Ahmed Squalli Houssaini. Revision sheet published at www.letuteurscientifique.ca/en/fiches/cegep-calc2-differential-equations. Free for personal and classroom use; republishing it elsewhere requires written permission (legal notice).

See also

Looking for a 201-SN3-RE tutor in Montreal?

Get in touch for a first session. We go back over the moves that cost marks on the integral calculus exam, then we test them on exercises at the level of real CEGEP tests.

Site by Studio Squalli