How to use this calculator
Enter the constants p and q and the starting value y(0). This form models RC circuits, Newton’s law of cooling, mixing tanks and terminal velocity with linear drag.
Method
Standard formy′ + py = q
Integrating factorμ = ept (μy)′ = qμ
Solutiony = qp + (y0 − qp) e−pt
Worked example
y′ + 0.5y = 10, y(0) = 2 (the default)
- μ = e0.5t, so (e0.5ty)′ = 10e0.5t.
- Integrate: e0.5ty = 20e0.5t + C, so y = 20 + Ce−0.5t.
- y(0) = 2 gives C = −18: y = 20 − 18e−0.5t.
- y(3) = 20 − 18e−1.5 = 15.98.
Frequently asked questions
What if p or q depends on t?
The integrating factor becomes e∫p dt and the integral may need to be done by hand or numerically. Try the Euler’s method calculator for a numerical answer.
What is the time constant?
τ = 1/p. The solution covers 63% of the gap to its steady value q/p every τ.