article

Integrating Factors · Foundational

Integrating Factors Solve Linear First-Order ODEs

Derive, apply, interpret, and verify the integrating-factor method for linear first-order differential equations.

A first-order linear differential equation can be written in standard form y+p(t)y=q(t)y'+p(t)y=q(t). The unknown function is y(t)y(t), the prime means differentiation with respect to tt, and the known functions p(t)p(t) and q(t)q(t) describe the equation’s coefficients and input. The equation is linear because yy and yy' appear only to the first power and are not multiplied together. Its coefficients may vary with time without destroying linearity. The integrating-factor method solves this entire class on intervals where the coefficients behave appropriately.

The method can look like a mysterious instruction to multiply by an exponential. It becomes understandable when designed backward from the product rule. Multiplication by a carefully chosen function turns the two terms containing yy into one exact derivative. Integration then reverses that derivative. The procedure is therefore constructed algebra rather than a memorized trick.

This article derives the factor, explains each symbol, and develops a reliable workflow. It treats constant and variable coefficients, initial conditions, interval restrictions, and physical units. Worked examples include verification in the original equation. Interpretations connect the solution to transient response, accumulated forcing, and linear systems. Common mistakes are repaired by returning to the product-rule identity.

Recognize the linear first-order structure

The general form a(t)y+b(t)y=g(t)a(t)y'+b(t)y=g(t) is linear in the unknown function. The coefficient a(t)a(t) multiplies the derivative, b(t)b(t) multiplies the function, and g(t)g(t) is a prescribed input. Standard form requires the coefficient of yy' to be one. Divide by a(t)a(t) wherever a(t)0a(t)\ne0. This produces p(t)=b(t)a(t)p(t)=\frac{b(t)}{a(t)} and q(t)=g(t)a(t)q(t)=\frac{g(t)}{a(t)}.

Linearity concerns dependence on yy, not whether the independent variable appears nonlinearly. The equation y+t2y=sinty'+t^2y=\sin t is linear because t2t^2 and sint\sin t are known functions of tt. The equation y+y2=ty'+y^2=t is nonlinear because the unknown is squared. The equation yy=tyy'=t is nonlinear because the unknown multiplies its derivative. Classification determines whether this method applies.

The interval of work matters. Dividing by a(t)a(t) may exclude points where it vanishes. A coefficient such as 1t\frac{1}{t} is continuous separately on t>0t>0 and t<0t<0 but not across zero. An initial condition selects the relevant interval. A formula valid on one interval should not be carried through a singular point without new analysis.

Design the method from the product rule

Begin with y+p(t)y=q(t)y'+p(t)y=q(t) and multiply by an unknown nonzero function μ(t)\mu(t). The result is μy+μpy=μq\mu y'+\mu p y=\mu q. We want the left side to equal the derivative of the product μy\mu y. The product rule gives (μy)=μy+μy(\mu y)'=\mu y'+\mu' y. Matching the coefficients of yy requires μ=μp\mu'=\mu p.

The auxiliary equation μ=pμ\mu'=p\mu is separable. Dividing by nonzero μ\mu gives μμ=p(t)\frac{\mu'}{\mu}=p(t). Integrating gives lnμ=p(t)dt+C0\ln|\mu|=\int p(t)\,dt+C_0. Exponentiation gives μ=Cep(t)dt\mu=C e^{\int p(t)\,dt}. Any nonzero constant CC can be omitted because it multiplies every later term and cancels.

Choose the simple representative μ(t)=ep(t)dt\mu(t)=e^{\int p(t)\,dt}. Differentiating it gives μ=pμ\mu'=p\mu by the chain rule. Therefore μy+μpy=μy+μy=(μy)\mu y'+\mu p y=\mu y'+\mu' y=(\mu y)'. The integrating factor works because its logarithmic derivative equals pp. This identity is the core of the method.

A derivation map starts with the product rule, matches coefficients, solves for the integrating factor, and produces one exact derivative.

Execute the general solution

After multiplying by μ\mu, the equation becomes (μy)=μq(\mu y)'=\mu q. Integrate both sides with respect to tt. This gives μ(t)y(t)=μ(t)q(t)dt+C\mu(t)y(t)=\int \mu(t)q(t)\,dt+C. The constant CC represents the one free parameter expected for a first-order equation. Divide by μ(t)\mu(t) to isolate the unknown.

The general formula is y(t)=1μ(t)[μ(t)q(t)dt+C]y(t)=\frac{1}{\mu(t)}\left[\int \mu(t)q(t)\,dt+C\right]. The brackets group the antiderivative and constant before multiplication by the reciprocal factor. An indefinite integral is acceptable when it can be evaluated clearly. A definite-integral form often handles initial conditions more transparently. Both describe the same solution family.

Do not substitute the formula before the equation is in standard form. If the derivative coefficient is not one, the wrong p(t)p(t) produces the wrong factor. After normalization, label pp and qq explicitly. Differentiate μ\mu to check μ=pμ\mu'=p\mu. This one-line test catches many errors.

Use a definite integral for initial-value problems

Suppose y(t0)=y0y(t_0)=y_0. Integrate (μy)=μq(\mu y)'=\mu q from t0t_0 to tt. The Fundamental Theorem of Calculus gives μ(t)y(t)μ(t0)y0=t0tμ(s)q(s)ds\mu(t)y(t)-\mu(t_0)y_0=\int_{t_0}^{t}\mu(s)q(s)\,ds. The variable ss is a dummy integration variable. It prevents confusion between the upper limit tt and the quantity being integrated.

Now isolate y(t)y(t) by dividing the entire equality by μ(t)\mu(t). The factor is nonzero because an exponential never vanishes. Keep the initial term and accumulated-input term grouped in the numerator. Use ss only inside the integral. This arrangement keeps the initial state visibly separate from later forcing. The resulting expression appears below.

y(t)=μ(t0)y0+t0tμ(s)q(s)dsμ(t).y(t)=\frac{\mu(t_0)y_0+\int_{t_0}^{t}\mu(s)q(s)\,ds}{\mu(t)}.

The numerator contains the transported initial contribution and accumulated input. The denominator applies the coefficient-driven scaling. Every symbol has a defined role. The first term preserves information supplied at t0t_0. The integral records forcing received between t0t_0 and tt.

This form satisfies the initial condition automatically. Setting t=t0t=t_0 makes the integral zero and leaves y(t0)=y0y(t_0)=y_0. It also avoids solving separately for CC. For theoretical work, the formula exposes how the solution depends on its initial state and forcing. It is the scalar version of variation-of-constants reasoning.

Worked example with constant coefficients

Solve y+2y=6y'+2y=6 with y(0)=1y(0)=1. Standard form is already present, so p(t)=2p(t)=2 and q(t)=6q(t)=6. The integrating factor is μ=e2dt=e2t\mu=e^{\int2\,dt}=e^{2t}. Multiplication gives e2ty+2e2ty=6e2te^{2t}y'+2e^{2t}y=6e^{2t}. The left side is (e2ty)(e^{2t}y)'.

Integrate to obtain e2ty=3e2t+Ce^{2t}y=3e^{2t}+C. Dividing by e2te^{2t} gives y=3+Ce2ty=3+Ce^{-2t}. Apply the initial condition: 1=3+C1=3+C, so C=2C=-2. The solution is y(t)=32e2ty(t)=3-2e^{-2t}. It begins at one and approaches three.

Verification should use the original differential equation. Differentiate to get y=4e2ty'=4e^{-2t}. Then y+2y=4e2t+2(32e2t)=6y'+2y=4e^{-2t}+2(3-2e^{-2t})=6. The initial value is y(0)=32=1y(0)=3-2=1. Both the equation and condition are satisfied.

A solution graph separates the equilibrium value from an exponentially decaying transient carrying the initial mismatch.

Interpret steady and transient pieces

The constant term three is an equilibrium response. If y=3y=3 and y=0y'=0, then the equation gives 0+2(3)=60+2(3)=6. The exponential term is a transient. It records how the initial value differs from equilibrium. Its magnitude decays because the exponent is negative.

Writing y(t)=yeq+(y0yeq)e2ty(t)=y_{\mathrm{eq}}+(y_0-y_{\mathrm{eq}})e^{-2t} makes the structure explicit. Here yeq=3y_{\mathrm{eq}}=3 and y0yeq=2y_0-y_{\mathrm{eq}}=-2. The coefficient of the exponential is the initial mismatch. The decay rate 22 has units reciprocal to those of tt. A dimensionless exponent requires the product 2t2t to have no unit.

If the coefficient of yy were negative, the homogeneous factor could grow rather than decay. The algebraic method would still work. Stability is a separate interpretation based on the sign and accumulated effect of p(t)p(t). Integrating factors solve equations whether their solutions decay or grow. Physical plausibility must be assessed from the model.

Variable coefficients require interval awareness

Consider ty+2y=t3ty'+2y=t^3 on t>0t>0. Divide by tt to obtain y+2ty=t2y'+\frac{2}{t}y=t^2. Now p(t)=2tp(t)=\frac{2}{t} and q(t)=t2q(t)=t^2. The integrating factor is μ=e2tdt=e2lnt=t2\mu=e^{\int\frac{2}{t}\,dt}=e^{2\ln t}=t^2. The restriction t>0t>0 justifies writing lnt\ln t.

Multiplication gives t2y+2ty=t4t^2y'+2ty=t^4. The left side is (t2y)(t^2y)'. Integrating gives t2y=t55+Ct^2y=\frac{t^5}{5}+C. Therefore y=t35+Ct2y=\frac{t^3}{5}+\frac{C}{t^2}. The solution is valid on an interval not crossing zero.

On t<0t<0, 2tdt=2lnt\int\frac{2}{t}\,dt=2\ln|t|, and exponentiation again produces a constant multiple of t2t^2. The same algebraic expression can hold on each side. The constants need not be the same because the intervals are disconnected. No initial value can propagate uniquely through the singular point by this theorem. Domain statements are part of the solution.

Worked example with a nonconstant factor

Solve y1ty=t2y'-\frac{1}{t}y=t^2 for t>0t>0. Here p(t)=1tp(t)=-\frac{1}{t} and q(t)=t2q(t)=t^2. The integrating factor is μ=elnt=1t\mu=e^{-\ln t}=\frac{1}{t}. Multiplying produces 1ty1t2y=t\frac{1}{t}y'-\frac{1}{t^2}y=t. The left side is (yt)\left(\frac{y}{t}\right)'.

Integrate to get yt=t22+C\frac{y}{t}=\frac{t^2}{2}+C. Multiplying by tt gives y=t32+Cty=\frac{t^3}{2}+Ct. Notice that the homogeneous term is CtCt. Substituting it into y1ty=0y'-\frac{1}{t}y=0 confirms the homogeneous behavior. The particular term responds to the input t2t^2.

Differentiate the full solution to obtain y=3t22+Cy'=\frac{3t^2}{2}+C. Substitute both yy and yy' into the normalized equation. Keep the factor 1t\frac{1}{t} outside parentheses until every term is visible. The constant terms should cancel because they form the homogeneous solution. This cancellation is a diagnostic expectation rather than an accidental simplification. The substitution is shown below.

y1ty=3t22+C1t(t32+Ct)=t2.y'-\frac{1}{t}y =\frac{3t^2}{2}+C-\frac{1}{t}\left(\frac{t^3}{2}+Ct\right) =t^2.

The constant cancels as required. The remaining terms combine to t2t^2. That equals the original right side. Verification therefore confirms the differential equation. It also confirms that the interval-dependent algebra is coherent.

Units constrain coefficient and factor

Suppose tt has unit seconds and yy has unit concentration molL\mathrm{\frac{mol}{L}}. Then yy' has unit molLs\mathrm{\frac{mol}{L\,s}}. In y+p(t)y=q(t)y'+p(t)y=q(t), the product pypy must have the same unit. Therefore pp must have unit 1s\mathrm{\frac{1}{s}}. The input qq must have concentration per time.

The exponent p(t)dt\int p(t)\,dt must be dimensionless. Multiplying 1s\mathrm{\frac{1}{s}} by s\mathrm s cancels units. The integrating factor μ\mu is then dimensionless under the common formulation. If a derived exponent retains a physical unit, the setup is inconsistent. Dimensional reasoning checks the factor before integration continues.

The constant CC inherits the unit of μy\mu y. When μ\mu is dimensionless, CC has the same unit as yy. In a definite-integral formula, μqdt\mu q\,dt also has the unit of yy. Terms added in the numerator therefore agree. Unit consistency mirrors algebraic consistency.

Mixing models produce linear equations

Let A(t)A(t) be solute amount in a well-mixed tank. A standard balance is dAdt=rate inrate out\frac{dA}{dt}=\text{rate in}-\text{rate out}. If volume is constant and outflow concentration is AV\frac{A}{V}, the equation can become A+rVA=rcinA'+\frac{r}{V}A=r c_{\mathrm{in}}. The flow rate is rr, tank volume is VV, and incoming concentration is cinc_{\mathrm{in}}. The coefficient rV\frac{r}{V} has unit reciprocal time.

The integrating factor is μ=e(r/V)t\mu=e^{(r/V)t} for constant parameters. The solution separates into an equilibrium amount and a decaying initial mismatch. The equilibrium is Aeq=VcinA_{\mathrm{eq}}=Vc_{\mathrm{in}}. This makes physical sense because equilibrium tank concentration matches incoming concentration. Algebra and material balance agree.

The model assumes instantaneous uniform mixing, constant volume, fixed flow, and fixed incoming concentration. Real tanks can have dead zones, delays, or time-varying volume. Changing assumptions changes the equation and perhaps its linearity. A polished solution states the model boundary. Mathematical exactness cannot repair an inappropriate physical model.

RC circuits use the same structure

For a resistor–capacitor circuit, a common voltage equation is RCdVCdt+VC=Vin(t)RC\frac{dV_C}{dt}+V_C=V_{\mathrm{in}}(t). Divide by RCRC to reach standard form. This gives VC+1RCVC=1RCVin(t)V_C'+\frac{1}{RC}V_C=\frac{1}{RC}V_{\mathrm{in}}(t). The product RCRC has units seconds. Its reciprocal is a rate.

The integrating factor is μ=et/(RC)\mu=e^{t/(RC)} for constant resistance and capacitance. The quantity τ=RC\tau=RC is the time constant. With constant input, the transient decays as et/τe^{-t/\tau}. After one time constant, its magnitude is multiplied by e1e^{-1}. The same mathematics described the earlier approach to equilibrium.

Circuit interpretation must retain sign convention and initial capacitor voltage. A discontinuous input can still be handled piecewise. Capacitor voltage remains continuous in the ideal finite-current model, while its derivative can change at a switching time. Each time interval receives its own forcing expression. Continuity connects the interval solutions.

Relation to homogeneous and particular solutions

The associated homogeneous equation is y+py=0y'+py=0. Its solution is yh=Cepdt=Cμy_h=C e^{-\int p\,dt}=\frac{C}{\mu}. This is the free response that carries initial information. The nonhomogeneous equation adds forcing qq. A particular solution accounts for that input.

The integrating-factor formula displays both pieces. The constant term produces the free response. The integral term produces a response to the input. Their sum uses the superposition property of a linear equation. This separation supports both calculation and interpretation. In symbols, the decomposition is shown below.

y=Cμ+1μμqdt.y=\frac{C}{\mu}+\frac{1}{\mu}\int\mu q\,dt.

The first term is homogeneous, and the second is one particular response. Their sum works because the differential operator is linear. Superposition applies to the response. If the input is zero, only the homogeneous contribution remains. If the initial mismatch is zero, the forced contribution can still be nonzero.

Different choices of antiderivative can shift a constant between the two pieces. The complete family remains unchanged. A particular solution is not unique because adding a homogeneous solution creates another one. Initial conditions remove the ambiguity. Decomposition is interpretive even when the total solution is fixed.

Common mistakes and repairs

The most common mistake is reading p(t)p(t) before normalizing the derivative coefficient. Divide first. Then rewrite the equation with the yy' term, the yy term, and the input clearly separated. Circle p(t)p(t). Test μ=pμ\mu'=p\mu before using the factor.

Another mistake is multiplying only some terms by μ\mu. Every term on both sides must be multiplied. Write the expanded equation before compressing the left side. Compare it directly with (μy)=μy+μy(\mu y)'=\mu y'+\mu' y. This prevents a missing factor on qq.

A third mistake is integrating μy\mu y' and μpy\mu p y separately without recognizing the product derivative. Their individual antiderivatives may be difficult or unavailable. The method exists precisely to package them. Once (μy)(\mu y)' is identified, integrate the whole derivative. Return to the designed identity whenever manipulation becomes unclear.

A reliable solution workflow

First identify an interval and put the equation in standard form. Confirm that p(t)p(t) and q(t)q(t) are defined and continuous where the initial value lies. Record units when the equation models a physical system. Distinguish the unknown from prescribed inputs. Classify the equation before choosing the method.

Second compute μ=epdt\mu=e^{\int p\,dt} and verify μ=pμ\mu'=p\mu. Multiply every term by μ\mu. Rewrite the left side as (μy)(\mu y)'. Integrate and isolate yy. Use a definite integral when an initial value is available.

Third apply conditions and verify the result in the original equation. Check the initial value separately. State the interval of validity. Interpret homogeneous and forced pieces. Examine units, limiting behavior, and equilibrium when applicable.

A workflow diagram moves from standard form through factor verification, product compression, integration, conditions, and substitution check.

Retrieval practice and synthesis

Without looking back, derive μ=epdt\mu=e^{\int p\,dt} from the product rule. Begin with an unknown multiplier. Match the coefficient of yy rather than quoting the final formula. Explain why a nonzero multiplicative constant in μ\mu is irrelevant. Then state the interval assumptions required.

Solve y+3y=2ety'+3y=2e^t with an unspecified constant. Identify the homogeneous term before evaluating the particular integral. Differentiate the final expression and substitute it into the original equation. Explain which part remembers initial data. State the units that coefficient three must have if tt is measured in seconds.

Compare integrating factors with separation of variables. Some equations belong to both classes, but neither class contains the other. Separation rearranges functions of yy and tt onto opposite sides. Integrating factors exploit linearity and the product rule. Choosing a method begins with structural recognition rather than surface resemblance.

Continue exploring

Connections

Related articles

Equilibrium SolutionsEquilibria Organize Autonomous ODEsFirst-Order ODEsFirst-Order ODEs Model Growth, Decay, and BalanceSeparable EquationsSeparable ODEs Put Each Variable on Its Own SideOrdinary Differential EquationsFirst-Order Differential Equations

Applications

  • mixing models
  • RC circuits
  • forced decay