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 yy' 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 yy' equal to 11, then μ=epdx\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 TTsT-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 y0y\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 T20T\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)=0yr 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 yy' first, and drop its zeros from the interval.

  • Integrating factor

    μ(x)=ep(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 ln2k\frac{\ln 2}{k}; half-life TT means k=ln2Tk=-\frac{\ln 2}{T}.

  • Newton's law of cooling

    dTdt=k(TTs)T=Ts+(T0Ts)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 TTsT\to T_s as tt\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 yry\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 yy' is 11, read off pp, and build μ=epdx\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 yy'. 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 yy' is 11.

  • ✗ Wrong

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

    ✓ Right

    y=1μ[μqdx+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(1y)y'=y(1-y) by y(1y)y(1-y) straight away.

    ✓ Right

    List y0y\equiv0 and y1y\equiv1 first — the division silently discards both.

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

  • ✗ Wrong

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

    ✓ Right

    k=ln25730k=-\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+(T0Ts)ektT=T_s+(T_0-T_s)e^{kt}.

    Why: Test it: t=0t=0 must give T0T_0, and TTsT\to T_s as tt\to\infty.

05

Quick check

Commit to an answer before you reveal one
  1. Q1easy

    (a) State the order of each equation:

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

    (b) Verify that y=3e2x4y=3e^{2x}-4 solves y=2y+8y'=2y+8 for all real xx, and say which member of the family y=Ce2x4y=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 yy'', so order 22 — the exponent 44 is a degree. (iii) the highest is yy''', so order 33.

    (b) Left side: y=6e2xy'=6e^{2x}. Right side: 2(3e2x4)+8=6e2x8+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 Ce2x4Ce^{2x}-4 with 3e2x43e^{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:

    ydy=xdxy22=x22+Cy2=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(y3)\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 y3y-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: y3y\equiv3.

    Steps

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

    dyy3=2xdxlny3=x2+Cy3=Aex2, A0\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 y3y-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 xy2y=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 yy' 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: y2xy=x4y'-\frac{2}{x}y=x^4, so p=2xp=-\frac{2}{x} and pdx=2lnx=lnx2\int p\,dx=-2\ln x=\ln x^{-2} for x>0x>0, giving μ=x2\mu=x^{-2}.

    (x2y)=x2x4=x2x2y=x33+Cy=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 xy2y=5x5+10x22x510x23=x5xy'-2y=\frac{5x^5+10x^2-2x^5-10x^2}{3}=x^5.

  5. Q5medium

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

    (a) Find T(t)T(t). (b) When does it reach 50C50^{\circ}\text{C}? (c) Find limtT(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=T20u=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=15ln230.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) 20C20^{\circ}\text{C}, the equilibrium solution.

    Steps

    (a) With u=T20u=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=5ln(2/5)ln(2/3)=5ln(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/50\left(\frac23\right)^{t/5}\to0, so T20T\to20 — the equilibrium solution T20T\equiv20 of T=k(T20)T'=k(T-20).

  6. Q6hard

    Consider dydx=y21\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(y1)(y+1)=12(1y11y+1)\frac{1}{(y-1)(y+1)}=\frac12\left(\frac{1}{y-1}-\frac{1}{y+1}\right).

    Show answer

    Answer

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

    Steps

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

    (b) Partial fractions and integration give

    12lny1y+1=x+Cy1y+1=Ae2xy=1+Ae2x1Ae2x\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 y1y\equiv1; no AA gives y1y\equiv-1, so that one is a singular solution.

    (c) 1+A1A=0\frac{1+A}{1-A}=0 forces A=1A=-1, so y=1e2x1+e2xy=\frac{1-e^{2x}}{1+e^{2x}}. As xx\to-\infty, e2x0e^{2x}\to0 and y1y\to1; dividing by e2xe^{2x} shows y1y\to-1 as xx\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