Navigation

Differential Equations · Topic 22 of 23

Introduction to Differential Equations

A differential equation gives the rate and asks for the function: a solution is a function that satisfies the equation on an interval, and an nn-th order equation has a family of them carrying nn constants. Two kinds yield to hand methods — separable y′=g(x)h(y)y'=g(x)h(y) and linear y′+p(x)y=q(x)y'+p(x)y=q(x) — with an initial condition picking one member.

5 min readFrequent on exams7 formulas6 quick checks
01

Key ideas

5 things to remember
  1. 1

    Order is the highest derivative

    The order of (y′)3+y=x(y')^3+y=x is 11, not 33 — the exponent is a degree. First-order linear means it can be written y′+p(x)y=q(x)y'+p(x)y=q(x), with yy and y′y' to the first power only.

  2. 2

    Solutions live on an interval

    Verify a candidate by differentiating and substituting, never by solving. An nn-th order equation has an nn-constant family; impose the initial data only after the constants appear, and name the interval containing x0x_0.

  3. 3

    Equilibria first, then divide

    Every root of h(y)=0h(y)=0 gives a constant solution of y′=g(x)h(y)y'=g(x)h(y). Dividing by h(y)h(y) is illegal exactly there, so list those solutions first and check afterwards which ones the family recovers.

  4. 4

    Standard form before the integrating factor

    Make the coefficient of y′y' equal to 11, then μ=e∫p dx\mu=e^{\int p\,dx} turns the left side into (μy)′(\mu y)'. From xy′+2y=4x2xy'+2y=4x^2 the coefficient is p=2xp=\frac{2}{x}, never 22.

  5. 5

    y′=kyy'=ky forces an exponential

    On an interval, y′=kyy'=ky holds exactly when y=y0ekty=y_0e^{kt} — nothing else works. Growth if k>0k>0, decay if k<0k<0, and Newton cooling is this same equation for the difference T−TsT-T_s.

-2-112-55xyy = 0, the equilibrium (C = 0)y(0) = 1 picks C = 1C = 2C = 1C = −1C = −2
Every solution of y′=12yy'=\frac12 y is y=Cet/2y=Ce^{t/2} — one curve for each constant, none of them crossing. An initial condition such as y(0)=1y(0)=1 selects exactly one member; C=0C=0 is the equilibrium y≡0y\equiv0.
51015202520406080100xyambient T = 20(0, 95)(5, 70)50 °C at t ≈ 11.3 minT(t)
Newton cooling with Ts=20T_s=20: the data T(0)=95T(0)=95 and T(5)=70T(5)=70 give T=20+75(23)t/5T=20+75\left(\frac23\right)^{t/5}. The curve approaches the equilibrium T≡20T\equiv20 asymptotically and never reaches it.
02

Formulas

What to have memorised
  • Separable equation

    dydx=g(x)h(y)⟹∫dyh(y)=∫g(x) dx\frac{dy}{dx}=g(x)h(y)\quad\Longrightarrow\quad \int\frac{dy}{h(y)}=\int g(x)\,dx

    One CC, on the right only — two constants collapse into one.

  • Equilibrium solutions

    h(r)=0⟹y≡r solves y′=g(x)h(y)h(r)=0\quad\Longrightarrow\quad y\equiv r \text{ solves } y'=g(x)h(y)

    Both sides vanish; dividing by h(y)h(y) can never produce these.

  • Linear standard form

    y′+p(x)y=q(x)y'+p(x)y=q(x)

    Divide by the coefficient of y′y' first, and drop its zeros from the interval.

  • Integrating factor

    μ(x)=e∫p(x) dx,(μy)′=μq\mu(x)=e^{\int p(x)\,dx},\qquad \bigl(\mu y\bigr)'=\mu q

    Use any one antiderivative of pp; a +C+C here just cancels.

  • Linear general solution

    y=1μ(x)[∫μ(x)q(x) dx+C]y=\frac{1}{\mu(x)}\left[\int \mu(x)q(x)\,dx+C\right]

    CC stays inside the bracket, or the homogeneous part is lost.

  • Growth and decay

    y′=ky  ⟺  y=y0ekty'=ky\iff y=y_0e^{kt}

    Doubling time ln⁡2k\frac{\ln 2}{k}; half-life TT means k=−ln⁡2Tk=-\frac{\ln 2}{T}.

  • Newton's law of cooling

    dTdt=k(T−Ts)⟹T=Ts+(T0−Ts)ekt\frac{dT}{dt}=k(T-T_s)\quad\Longrightarrow\quad T=T_s+(T_0-T_s)e^{kt}

    With k<0k<0: at t=0t=0 it gives T0T_0, and T→TsT\to T_s as t→∞t\to\infty.

03

Solve a first-order differential equation

The steps, in order
  1. 1

    Classify it: y′=f(x)y'=f(x) integrates directly, y′=g(x)h(y)y'=g(x)h(y) is separable, and anything writable as y′+p(x)y=q(x)y'+p(x)y=q(x) is linear.

  2. 2

    Separable — solve h(y)=0h(y)=0 and record each constant solution y≡ry\equiv r before dividing by h(y)h(y).

  3. 3

    Separable — integrate ∫dyh(y)=∫g(x) dx\int\frac{dy}{h(y)}=\int g(x)\,dx with one +C+C on the right, solve for yy, then see which equilibria the family recovers.

  4. 4

    Linear — divide until the coefficient of y′y' is 11, read off pp, and build μ=e∫p dx\mu=e^{\int p\,dx} from one antiderivative.

  5. 5

    Linear — multiply through, rewrite the left side as (μy)′(\mu y)', integrate, then divide by μ\mu keeping CC inside the bracket.

  6. 6

    Substitute the initial condition into the general solution last, then state the largest interval around x0x_0 on which the answer is defined.

04

Watch out

The mistakes that cost marks
  • ✗ Wrong

    "The order of (y′)3=y(y')^3=y is 33."

    ✓ Right

    The order is 11: the highest derivative present is y′y'. Three is the degree.

  • ✗ Wrong

    From xy′+2y=4x2xy'+2y=4x^2, reading p=2p=2 and μ=e2x\mu=e^{2x}.

    ✓ Right

    Standard form first: y′+2xy=4xy'+\frac{2}{x}y=4x, so p=2xp=\frac{2}{x} and μ=x2\mu=x^2.

    Why: pp is only readable once the coefficient of y′y' is 11.

  • ✗ Wrong

    y=1μ∫μq dx+Cy=\frac{1}{\mu}\int\mu q\,dx+C

    ✓ Right

    y=1μ[∫μq dx+C]y=\frac{1}{\mu}\left[\int\mu q\,dx+C\right] — the constant belongs inside.

    Why: The term C/μC/\mu is the homogeneous solution; outside, it is lost.

  • ✗ Wrong

    Dividing y′=y(1−y)y'=y(1-y) by y(1−y)y(1-y) straight away.

    ✓ Right

    List y≡0y\equiv0 and y≡1y\equiv1 first — the division silently discards both.

    Why: Dividing is illegal exactly where the factor is zero.

  • ✗ Wrong

    Half-life 57305730 years, so k=ln⁡25730k=\frac{\ln 2}{5730}.

    ✓ Right

    k=−ln⁡25730k=-\frac{\ln 2}{5730}; decay needs k<0k<0.

    Why: A positive kk models growth and moves a carbon date by millennia.

  • ✗ Wrong

    Newton cooling as T=TsektT=T_se^{kt}.

    ✓ Right

    T=Ts+(T0−Ts)ektT=T_s+(T_0-T_s)e^{kt}.

    Why: Test it: t=0t=0 must give T0T_0, and T→TsT\to T_s as t→∞t\to\infty.

05

Quick check

Commit to an answer before you reveal one
  1. Q1easy

    (a) State the order of each equation:

    (i) dydx=x2y−sin⁡x\frac{dy}{dx}=x^2y-\sin x (ii) (y′)4+y′′=ex(y')^4+y''=e^x (iii) y′′′+(y′′)2−xy=0y'''+(y'')^2-xy=0

    (b) Verify that y=3e2x−4y=3e^{2x}-4 solves y′=2y+8y'=2y+8 for all real xx, and say which member of the family y=Ce2x−4y=Ce^{2x}-4 it is.

    Hint

    Order counts which derivative is highest, not any exponent. For (b), compute the two sides separately.

    Show answer

    Answer

    (a) 11, 22, 33. (b) Both sides equal 6e2x6e^{2x}; it is the member with C=3C=3.

    Steps

    (a) (i) only dydx\frac{dy}{dx} appears, so order 11. (ii) the highest derivative is y′′y'', so order 22 — the exponent 44 is a degree. (iii) the highest is y′′′y''', so order 33.

    (b) Left side: y′=6e2xy'=6e^{2x}. Right side: 2(3e2x−4)+8=6e2x−8+8=6e2x2(3e^{2x}-4)+8=6e^{2x}-8+8=6e^{2x}.

    The two sides are the same function, so the equation holds for every real xx. Comparing Ce2x−4Ce^{2x}-4 with 3e2x−43e^{2x}-4 gives C=3C=3, the member with y(0)=−1y(0)=-1.

  2. Q2easy

    Solve dydx=xy\frac{dy}{dx}=\frac{x}{y} with y(0)=−3y(0)=-3. State the interval on which the solution is valid and explain how you chose between the two algebraic possibilities.

    Hint

    A solution is continuous and can never touch y=0y=0, where the right side is undefined.

    Show answer

    Answer

    y=−x2+9y=-\sqrt{x^2+9}, valid for all real xx.

    Steps

    Separate and integrate:

    ∫y dy=∫x dx⟹y22=x22+C⟹y2=x2+K\int y\,dy=\int x\,dx \quad\Longrightarrow\quad \frac{y^2}{2}=\frac{x^2}{2}+C \quad\Longrightarrow\quad y^2=x^2+K

    y(0)=−3y(0)=-3 gives K=9K=9, so y=±x2+9y=\pm\sqrt{x^2+9}. A solution is continuous and can never cross y=0y=0, and y(0)=−3<0y(0)=-3<0, so it stays negative: y=−x2+9y=-\sqrt{x^2+9}.

    Check: y′=−xx2+9=xyy'=-\frac{x}{\sqrt{x^2+9}}=\frac{x}{y}. Since x2+9>0x^2+9>0 for every xx, the solution is valid on all of R\mathbb{R}.

  3. Q3medium

    Find every solution of dydx=2x(y−3)\frac{dy}{dx}=2x(y-3), saying what happens to the constant solution during separation. Then solve the initial value problems y(0)=5y(0)=5 and y(0)=3y(0)=3.

    Hint

    Ask what happens when y−3y-3 is identically zero, before you divide by it.

    Show answer

    Answer

    y=3+Aex2y=3+Ae^{x^2} with AA any real. y(0)=5y(0)=5: y=3+2ex2y=3+2e^{x^2}. y(0)=3y(0)=3: y≡3y\equiv3.

    Steps

    h(y)=y−3h(y)=y-3 vanishes at y=3y=3, so y≡3y\equiv3 is a solution (both sides are 00). For y≠3y\neq3:

    ∫dyy−3=∫2x dx⟹ln⁡∣y−3∣=x2+C⟹y−3=Aex2, A≠0\int\frac{dy}{y-3}=\int 2x\,dx \quad\Longrightarrow\quad \ln|y-3|=x^2+C \quad\Longrightarrow\quad y-3=Ae^{x^2},\ A\neq0

    The sign is fixed because y−3y-3 is continuous and never zero. Allowing A=0A=0 puts the equilibrium back, so y=3+Aex2y=3+Ae^{x^2} is every solution.

    y(0)=5y(0)=5 gives A=2A=2; y(0)=3y(0)=3 gives A=0A=0, i.e. the equilibrium the division had discarded.

  4. Q4medium

    Solve xy′−2y=x5xy'-2y=x^5 on x>0x>0. Give the general solution, then the particular solution with y(1)=2y(1)=2.

    Hint

    The coefficient of y′y' must be 11 before you can read off p(x)p(x); expect a negative power of xx.

    Show answer

    Answer

    y=x53+Cx2y=\frac{x^5}{3}+Cx^2; with y(1)=2y(1)=2, y=x5+5x23y=\frac{x^5+5x^2}{3}.

    Steps

    Standard form: y′−2xy=x4y'-\frac{2}{x}y=x^4, so p=−2xp=-\frac{2}{x} and ∫p dx=−2ln⁡x=ln⁡x−2\int p\,dx=-2\ln x=\ln x^{-2} for x>0x>0, giving μ=x−2\mu=x^{-2}.

    (x−2y)′=x−2⋅x4=x2⟹x−2y=x33+C⟹y=x53+Cx2\bigl(x^{-2}y\bigr)'=x^{-2}\cdot x^4=x^2 \quad\Longrightarrow\quad x^{-2}y=\frac{x^3}{3}+C \quad\Longrightarrow\quad y=\frac{x^5}{3}+Cx^2

    y(1)=13+C=2y(1)=\frac13+C=2 gives C=53C=\frac53, so y=x5+5x23y=\frac{x^5+5x^2}{3} on (0,∞)(0,\infty). Check: y′=5x4+10x3y'=\frac{5x^4+10x}{3}, and xy′−2y=5x5+10x2−2x5−10x23=x5xy'-2y=\frac{5x^5+10x^2-2x^5-10x^2}{3}=x^5.

  5. Q5medium

    Coffee at 95∘C95^{\circ}\text{C} is left in a room held at 20∘C20^{\circ}\text{C}; five minutes later it is 70∘C70^{\circ}\text{C}.

    (a) Find T(t)T(t). (b) When does it reach 50∘C50^{\circ}\text{C}? (c) Find lim⁡t→∞T(t)\lim_{t\to\infty}T(t) and name the feature of the equation it corresponds to.

    Hint

    Newton's law uses the difference: put u=T−20u=T-20 and the equation becomes u′=kuu'=ku.

    Show answer

    Answer

    (a) T=20+75(23)t/5T=20+75\left(\frac23\right)^{t/5}, i.e. k=15ln⁡23≈−0.0811k=\frac15\ln\frac23\approx-0.0811 per minute. (b) t=5ln⁡(5/2)ln⁡(3/2)≈11.3t=5\frac{\ln(5/2)}{\ln(3/2)}\approx11.3 minutes. (c) 20∘C20^{\circ}\text{C}, the equilibrium solution.

    Steps

    (a) With u=T−20u=T-20: u′=kuu'=ku, so u=75ektu=75e^{kt} and T=20+75ektT=20+75e^{kt}. Then T(5)=70T(5)=70 gives 75e5k=5075e^{5k}=50, so e5k=23e^{5k}=\frac23 and T=20+75(23)t/5T=20+75\left(\frac23\right)^{t/5}.

    (b) Setting T=50T=50: (23)t/5=3075=25\left(\frac23\right)^{t/5}=\frac{30}{75}=\frac25, so

    t=5⋅ln⁡(2/5)ln⁡(2/3)=5⋅ln⁡(5/2)ln⁡(3/2)≈11.3 minutest=5\cdot\frac{\ln(2/5)}{\ln(2/3)}=5\cdot\frac{\ln(5/2)}{\ln(3/2)}\approx11.3\ \text{minutes}

    (c) (23)t/5→0\left(\frac23\right)^{t/5}\to0, so T→20T\to20 — the equilibrium solution T≡20T\equiv20 of T′=k(T−20)T'=k(T-20).

  6. Q6hard

    Consider dydx=y2−1\frac{dy}{dx}=y^2-1.

    (a) Find all equilibrium solutions. (b) Find the general solution for y≠±1y\neq\pm1 and say which equilibrium the family recovers. (c) Solve the initial value problem y(0)=0y(0)=0 and give the limits as x→±∞x\to\pm\infty.

    Hint

    Use partial fractions: 1(y−1)(y+1)=12(1y−1−1y+1)\frac{1}{(y-1)(y+1)}=\frac12\left(\frac{1}{y-1}-\frac{1}{y+1}\right).

    Show answer

    Answer

    (a) y≡1y\equiv1 and y≡−1y\equiv-1. (b) y=1+Ae2x1−Ae2xy=\frac{1+Ae^{2x}}{1-Ae^{2x}}; A=0A=0 recovers y≡1y\equiv1, while y≡−1y\equiv-1 is singular. (c) y=1−e2x1+e2xy=\frac{1-e^{2x}}{1+e^{2x}}, with y→1y\to1 as x→−∞x\to-\infty and y→−1y\to-1 as x→∞x\to\infty.

    Steps

    (a) y2−1=0y^2-1=0 at y=±1y=\pm1, and both constants make each side 00.

    (b) Partial fractions and integration give

    12ln⁡∣y−1y+1∣=x+C⟹y−1y+1=Ae2x⟹y=1+Ae2x1−Ae2x\frac12\ln\left|\frac{y-1}{y+1}\right|=x+C \quad\Longrightarrow\quad \frac{y-1}{y+1}=Ae^{2x} \quad\Longrightarrow\quad y=\frac{1+Ae^{2x}}{1-Ae^{2x}}

    A=0A=0 gives y≡1y\equiv1; no AA gives y≡−1y\equiv-1, so that one is a singular solution.

    (c) 1+A1−A=0\frac{1+A}{1-A}=0 forces A=−1A=-1, so y=1−e2x1+e2xy=\frac{1-e^{2x}}{1+e^{2x}}. As x→−∞x\to-\infty, e2x→0e^{2x}\to0 and y→1y\to1; dividing by e2xe^{2x} shows y→−1y\to-1 as x→∞x\to\infty.

06

On the exam

How this topic is marked
  • Method earns the marks: for a linear equation show the standard form and μ\mu; for a separable one show the equilibria listed before you divide.

  • Fit the constant to the general solution last, then quote an interval — "for all xx" is false whenever the formula has a denominator that can vanish.

  • A "show that y=…y=\dots is a solution" question needs no solving at all: differentiate, substitute, and show the two sides are identical.

Keep going