Skip to content

Differential Equations | AP - Wyatt's Notes

Introduction to Differential Equations (CED Unit 7)

Section titled “Introduction to Differential Equations (CED Unit 7)”

A differential equation (DE) is an equation that relates a function to one or more of its Derivatives. The order of a DE is the highest derivative that appears. A first-order DE involves Only dydx\frac{dy}{dx}; a second-order DE involves d2ydx2\frac{d^2y}{dx^2}.

A solution to a DE is a function that satisfies the equation. A general solution contains Arbitrary constants ( equal to the order of the DE), while a particular solution Satisfies additional initial conditions. Together, the DE and its initial conditions form an initial value problem (IVP).

Why differential equations matter. Nearly every physical system whose state evolves continuously In time is modelled by a DE: orbital mechanics, circuit analysis, fluid dynamics, population Biology, heat transfer, and pharmacokinetics all reduce to DEs at their core. The reason is simple: If a quantity yy changes at a rate that depends on the current state, then by definition dydt=f(t,y)\frac{dy}{dt} = f(t, y) And that is a differential equation.

A first-order DE is separable if it can be written in the form:

dydx=g(x)h(y)\frac{dy}{dx} = g(x) \cdot h(y)

The strategy is mechanical: move all terms involving yy (including dydy) to one side and all terms Involving xx (including dxdx) to the other, then integrate both sides.

1h(y)dy=g(x)dx\int \frac{1}{h(y)}\, dy = \int g(x)\, dx

This works because dydy and dxdx are related through the chain rule: dydx=g(x)h(y)\frac{dy}{dx} = g(x)h(y) Rewrites as 1h(y)dydx=g(x)\frac{1}{h(y)}\frac{dy}{dx} = g(x) And integrating both sides with respect to xx Gives 1h(y)dydxdx=g(x)dx\int \frac{1}{h(y)}\frac{dy}{dx}\,dx = \int g(x)\,dxWhich is exactly the separated form Above.

Not every first-order DE is separable. The key diagnostic: can you algebraically factor the RHS into A product of a function of xx alone and a function of yy alone? For example, dydx=x+y\frac{dy}{dx} = x + y is not separable, because x+yx + y cannot be factored into g(x)h(y)g(x)h(y).

  1. Forgetting the constant of integration. Always include +C+C and use the initial condition to find it. Every separable DE integration produces an arbitrary constant; dropping it means you have a family of curves, not the particular solution.

  2. Incorrectly separating variables. All yy terms (including dydy) must be on one side, and all xx terms (including dxdx) on the other. If you cannot algebraically factor f(x,y)f(x, y) into g(x)h(y)g(x)h(y)The equation is not separable and you need a different technique.

  3. Not checking the domain of the solution. Some solutions may only be valid on a restricted interval. For example, the solution to dydx=xy\frac{dy}{dx} = \frac{x}{y} is y2=x2+Cy^2 = x^2 + C But if C<0C \lt 0 Then yy is undefined for x<C|x| \lt \sqrt{-C}.

  4. Confusing the logistic growth equation with exponential growth. The logistic equation has the additional factor (1yL)\left(1 - \frac{y}{L}\right) that caps growth at the carrying capacity.

  5. Sign errors in Euler’s method. Remember: yn+1=yn+f(xn,yn)Δxy_{n+1} = y_n + f(x_n, y_n) \cdot \Delta xNot minus. The slope at the current point tells you which direction to step.

  6. Identifying the wrong carrying capacity. In dydt=ky(1y/L)\frac{dy}{dt} = ky(1 - y/L)The carrying capacity is LLNot 1L\frac{1}{L} or kLkL. Check: setting dydt=0\frac{dy}{dt} = 0 gives y=0y = 0 or y=Ly = L.

  7. Forgetting that equilibrium solutions cannot be found by separation of variables (since you would divide by zero). Always check f(y)=0f(y) = 0 separately before separating.

  8. Applying Euler’s method with too large a step size. The approximation can diverge significantly from the true solution. When in doubt, halve the step size and check convergence.

  1. Solve dydx=x2+1y\displaystyle\frac{dy}{dx} = \frac{x^2 + 1}{y} with y(0)=1y(0) = 1.

  2. A population grows according to dPdt=0.02P ⁣(1P50000)\displaystyle\frac{dP}{dt} = 0.02P\!\left(1 - \frac{P}{50000}\right) with P(0)=1000P(0) = 1000. Find the population after 50 years.

  3. Use Euler’s method with Δx=0.25\Delta x = 0.25 and two steps to approximate y(0.5)y(0.5) for dydx=x2+y\frac{dy}{dx} = x^2 + y, y(0)=1y(0) = 1.

  4. A body at 80^\circ\mathrm{C is placed in a room at 25^\circ\mathrm{C. After 30 minutes, the body is at 50^\circ\mathrm{C. When will it reach 30^\circ\mathrm{C?

  5. For dydx=y(y2)(y5)\displaystyle\frac{dy}{dx} = y(y - 2)(y - 5)Find all equilibrium solutions and classify their stability. Draw the phase line.

  6. Sketch the slope field for dydx=xy\displaystyle\frac{dy}{dx} = \frac{x}{y} and identify the equilibrium solutions (if any).

  7. A tank initially contains 200 L of water with 10 kg of salt. Pure water flows in at 3 L/min and the mixture flows out at 3 L/min. How much salt remains after 60 minutes?

  8. Show that the solution to the logistic equation dydt=ky(1y/L)\displaystyle\frac{dy}{dt} = ky(1 - y/L) with y(0)=y0y(0) = y_0 is y=L1+Ly0y0ekt\displaystyle y = \frac{L}{1 + \frac{L - y_0}{y_0} e^{-kt}}.

  9. Use Euler’s method with Δx=0.2\Delta x = 0.2 and four steps to approximate y(0.8)y(0.8) for dydx=xy\frac{dy}{dx} = xy, y(0)=1y(0) = 1. Compare your result with the exact solution.

  10. A tank contains 100 L of brine with 20 kg of salt. Fresh water flows in at 5 L/min and the mixture flows out at 5 L/min. How long does it take for the salt content to drop to 5 kg?

  11. Analyse the bifurcation diagram for dydt=y22y+c\frac{dy}{dt} = y^2 - 2y + c. Find the bifurcation point and describe the equilibrium structure on either side.

  12. Use the improved Euler method (Heun’s method) with h=0.5h = 0.5 and two steps to approximate y(1)y(1) for dydx=xy\frac{dy}{dx} = x - y, y(0)=0y(0) = 0. Compare with the exact solution.

Question 1: Separable differential equation

Solve the differential equation dydx=xyx2+1\frac{dy}{dx} = \frac{xy}{x^2 + 1} with the initial condition y(0)=2y(0) = 2.

Answer

Separate variables: dyy=xx2+1dx\frac{dy}{y} = \frac{x}{x^2 + 1} \, dx.

Integrate: lny=12ln(x2+1)+C\ln|y| = \frac{1}{2}\ln(x^2 + 1) + C.

y=eCx2+1=Ax2+1y = e^C \sqrt{x^2 + 1} = A\sqrt{x^2 + 1} where A=eCA = e^C.

Using y(0)=2y(0) = 2: 2=A1=A2 = A\sqrt{1} = A So A=2A = 2.

y=2x2+1y = 2\sqrt{x^2 + 1}.

Question 2: Logistic growth model

A population grows according to the logistic equation dPdt=0.05P ⁣(1P1000)\frac{dP}{dt} = 0.05P\!\left(1 - \frac{P}{1000}\right) with P(0)=100P(0) = 100. Find (a) the population at t=50t = 50 And (b) the time when the population reaches half the carrying capacity.

Answer

Carrying capacity K=1000K = 1000Growth rate r=0.05r = 0.05.

Logistic solution: P(t)=K1+AertP(t) = \frac{K}{1 + Ae^{-rt}} where A=KP0P0=1000100100=9A = \frac{K - P_0}{P_0} = \frac{1000 - 100}{100} = 9.

P(t)=10001+9e0.05tP(t) = \frac{1000}{1 + 9e^{-0.05t}}.

(a) P(50)=10001+9e2.5=10001+9(0.0821)=10001+0.739=10001.739=575P(50) = \frac{1000}{1 + 9e^{-2.5}} = \frac{1000}{1 + 9(0.0821)} = \frac{1000}{1 + 0.739} = \frac{1000}{1.739} = 575.

(b) Half carrying capacity: P=500=10001+9e0.05tP = 500 = \frac{1000}{1 + 9e^{-0.05t}}.

1 + 9e^{-0.05t} = 2$$9e^{-0.05t} = 1$$e^{-0.05t} = 1/9.

t=ln90.05=2.1970.05=43.9t = \frac{\ln 9}{0.05} = \frac{2.197}{0.05} = 43.9 time units.

Question 3: Second-order linear DE

Solve y5y+6y=0y'' - 5y' + 6y = 0 with y(0)=1y(0) = 1 and y(0)=0y'(0) = 0.

Answer

Characteristic equation: r^2 - 5r + 6 = 0$$(r-2)(r-3) = 0. r=2,3r = 2, 3.

General solution: y=C1e2x+C2e3xy = C_1 e^{2x} + C_2 e^{3x}.

y(0)=C1+C2=1y(0) = C_1 + C_2 = 1. y(0)=2C1+3C2=0y'(0) = 2C_1 + 3C_2 = 0.

From the second equation: C1=3C2/2C_1 = -3C_2/2. Substituting: -3C_2/2 + C_2 = 1$$-C_2/2 = 1$$C_2 = -2$$C_1 = 3.

y=3e2x2e3xy = 3e^{2x} - 2e^{3x}.

Question 4: Slope field interpretation

The differential equation dydx=xy\frac{dy}{dx} = x - y has a slope field. Identify the isocline (line where slopes are zero) and describe the long-term behaviour of solutions.

Answer

Zero slopes: xy=0x - y = 0 So y=xy = x. This is the isocline where all slopes are zero (horizontal).

For y>xy \gt x (above the line y=xy = x): dy/dx=xy<0dy/dx = x - y \lt 0 So solutions decrease.

For y<xy \lt x (below the line y=xy = x): dy/dx=xy>0dy/dx = x - y \gt 0 So solutions increase.

All solutions approach the line y=x1y = x - 1 as xx \to \infty (this can be verified by solving the DE: the general solution is y=x1+Cexy = x - 1 + Ce^{-x}Which approaches x1x - 1).

The line y=x1y = x - 1 is a stable equilibrium solution.

Question 5: Euler's method

Use Euler’s method with step size h=0.5h = 0.5 to approximate y(2)y(2) for \frac{dy}{dx} = x + y$$y(1) = 0.

Answer

x_0 = 1$$y_0 = 0$$h = 0.5. Need 2 steps.

Step 1: y1=y0+hf(x0,y0)=0+0.5(1+0)=0.5y_1 = y_0 + h \cdot f(x_0, y_0) = 0 + 0.5(1 + 0) = 0.5 at x1=1.5x_1 = 1.5.

Step 2: y2=y1+hf(x1,y1)=0.5+0.5(1.5+0.5)=0.5+1.0=1.5y_2 = y_1 + h \cdot f(x_1, y_1) = 0.5 + 0.5(1.5 + 0.5) = 0.5 + 1.0 = 1.5 at x2=2.0x_2 = 2.0.

Euler’s method approximation: y(2)1.5y(2) \approx 1.5.


flowchart TD
A[4_Differential Equations] --> B[Key Concepts]
A --> C[Core Principles]
A --> D[Practical Applications]
B --> E[Fundamental definitions]
C --> F[Design patterns]
D --> G[Real-world usage]

This topic covers the mathematical techniques and concepts related to differential equations, including key theorems, methods, and problem-solving approaches.

Key concepts include:

  • sine, cosine, and tangent functions
  • trigonometric identities
  • solving trigonometric equations
  • the sine and cosine rules
  • radian measure and arc length

Regular practice with a variety of question types is essential to build fluency and confidence in applying these mathematical techniques.

Worked examples demonstrating the application of key concepts are covered in the detailed sub-pages linked above.

The recipe analogy: A differential equation is like a recipe that tells you how a quantity changes based on its current state. You follow the recipe (solve the equation) to predict the future behaviour of the system.

Why it matters: Differential equations are the language of change. They model everything from population growth and radioactive decay to electrical circuits and climate change.

The key insight: A differential equation describes a relationship between a quantity and its rate of change, allowing us to predict future states from current conditions.

  • Derivatives — Solving differential equations requires mastery of differentiation techniques including chain rule and implicit differentiation.
  • Integrals — Separable differential equations are solved by integrating both sides, making integration essential to the topic.
  • Sequences and Series — Power series solutions to differential equations connect the two topics through Taylor and Maclaurin series.
  • AP Physics — Newton’s Laws: Newton’s second law F = ma is a second-order differential equation — solving for position from force requires differential equations.
  • AP Physics — Circuits: RC and LR circuits are governed by first-order differential equations describing charge and current over time.