MathClario
โ† Back to College prep
College prepโˆซCalculusโ—โ—โ—โ—‹โ—‹ยท 5 min
๐ŸŒ€

Linear ODE y' = ay + b: the one-formula solution

Any first-order linear ODE with constant coefficients solves in 30 seconds with this formula. Bonus: initial condition.

The theorem

For the ODE yโ€ฒ=ay+by' = ay + b (aโ‰ 0a \neq 0, constants), solutions are:

y(x)=Ceaxโˆ’bay(x) = C e^{ax} - \dfrac{b}{a}

with CโˆˆRC \in \mathbb{R} a constant.

Break it into 2 pieces

General solution = homogeneous solution + constant particular solution.

  • Homogeneous yโ€ฒ=ayy' = ay โ‡’ yh=Ceaxy_h = Ce^{ax}
  • Particular (constant ypy_p): solve 0=ayp+b0 = a y_p + b, so yp=โˆ’b/ay_p = -b/a
  • Total: y=Ceaxโˆ’b/ay = Ce^{ax} - b/a

Special case: b=0b = 0

If b=0b = 0, equation becomes yโ€ฒ=ayy' = ay and y=Ceaxy = Ce^{ax}. Exponential growth/decay.

Finding CC with an initial condition

A condition like "y(0)=y0y(0) = y_0" or "y(x0)=y0y(x_0) = y_0" pins down CC.

Example: solve yโ€ฒ=3yโˆ’6y' = 3y - 6 with y(0)=4y(0) = 4.

  • General: y(x)=Ce3x+2y(x) = C e^{3x} + 2.
  • Condition: 4=C+24 = C + 2, so C=2C = 2.
  • Unique: y(x)=2e3x+2y(x) = 2 e^{3x} + 2.

Verification

Always plug back in: yโ€ฒ=6e3xy' = 6 e^{3x}, and 3yโˆ’6=6e3x+6โˆ’6=6e3x3y - 6 = 6e^{3x} + 6 - 6 = 6e^{3x}. โœ“

Real applications

  • Capacitor charging: uโ€ฒ=โˆ’u/(RC)+E/(RC)u' = -u/(RC) + E/(RC)
  • Newtonโ€™s cooling: Tโ€ฒ=โˆ’k(Tโˆ’Tenv)T' = -k(T - T_\text{env})
  • Malthusian growth (b=0b = 0): Nโ€ฒ=kNN' = kN

Common mistakes

  1. Confusing yโ€ฒ=ay+by' = ay + b and yโ€ฒ=ayโˆ’by' = ay - b.
  2. Forgetting the particular solution: CeaxCe^{ax} alone works only if b=0b = 0.
  3. Sign error on โˆ’b/a-b/a.
?ร€ toi de jouer

Solve y' = 2y โˆ’ 10 with y(0) = 3.

Mini-quiz

Question 1 / 3

General solution of y' = 4y?

#ODE#differential equation#linear#grade 12

You might also like