Work out first order linear ode instantly with clear inputs, formula shown and shareable results.
Multiplying dy/dx + py = q by the integrating factor e^(px) makes the left side an exact derivative. Integrating gives y = q/p + (y₀ − q/p)e^(−px), a steady part plus a decaying transient.
Integrating factor
multiply by e^(∫p dx), then d/dx(y·e^(px)) = q·e^(px)
Solution
y = q/p + (y₀ − q/p)·e^(−px)
The steady value is 3, so y = 3 − 2e⁻² ≈ 2.7293294.
After 1/p the transient has shrunk to about 37% of its initial size, and after five time constants it is essentially gone.