Integrating Factor Method for First-Order Linear ODEs

Overview

  • Goal: solve a first-order linear differential equation by using an integrating factor
  • General form for a linear ODE: dydx+p(x)y=f(x)\frac{dy}{dx}+p(x)\,y=f(x)
  • Solving means finding a function (y(x)) that satisfies the equation on its domain
  • When the equation is linear, the integrating factor method is systematic and often the fastest route

Integrating Factor: Concept and Derivation

  • Define the integrating factor (\mu(x)) to satisfy the identity
    μ(x)dydx+μ(x)p(x)y=ddx(μ(x)y)\mu(x)\,\frac{dy}{dx}+\mu(x)\,p(x)\,y=\frac{d}{dx}\big(\mu(x)\,y\big)
  • This requires choosing (\mu) such that
    μ(x)=p(x)μ(x)μ(x)=exp(p(x)dx)\mu'(x)=p(x)\,\mu(x) \quad\Rightarrow\quad \mu(x)=\exp\Big(\int p(x)\,dx\Big)
  • Multiply the original equation by (\mu(x)):
    ddx(μ(x)y)=μ(x)f(x)\frac{d}{dx}\big(\mu(x)\,y\big)=\mu(x)\,f(x)
  • Integrate both sides with respect to (x):
    μ(x)y=μ(x)f(x)dx+C\mu(x)\,y=\int \mu(x)\,f(x)\,dx + C
  • Solve for (y):
      y(x)=μ(x)1(μ(x)f(x)dx+C)  \boxed{\;y(x)=\mu(x)^{-1}\Big(\int \mu(x)\,f(x)\,dx + C\Big)\; }
  • Key idea: choosing the correct integrating factor turns the left-hand side into a single derivative, enabling straightforward integration

Step-by-step Recipe for 1st-Order Linear ODEs

  • Step 1: Write the equation in standard form: dydx+p(x)y=f(x)\frac{dy}{dx}+p(x)\,y=f(x)
  • Step 2: Compute integrating factor: μ(x)=exp(p(x)dx)\mu(x)=\exp\Big(\int p(x)\,dx\Big)
  • Step 3: Multiply the equation by (\mu(x)) to get a derivative on the left: ddx(μ(x)y)=μ(x)f(x)\frac{d}{dx}\big(\mu(x)\,y\big)=\mu(x)\,f(x)
  • Step 4: Integrate: μ(x)y=μ(x)f(x)dx+C\mu(x)\,y=\int \mu(x)\,f(x)\,dx + C
  • Step 5: Solve for (y): \;y(x)=\mu(x)^{-1}\Big(\int \mu(x)\,f(x)\,dx + C\Big)\n

Example 1: Solve \frac{dy}{dx} - \frac{4}{x}\,y = x^{4} e^{x} </h4><ul><li>Identify:(p(x)=4x),(f(x)=x4ex)</li><li>Integratingfactor:</h4> <ul> <li>Identify: (p(x)=-\frac{4}{x}), (f(x)=x^{4} e^{x})</li> <li>Integrating factor: \mu(x)=\exp\Big(\int -\frac{4}{x}\,dx\Big)=\exp(-4\ln x)=x^{-4} </li><li>Multiplythrough:leftbecomes</li> <li>Multiply through: left becomes \frac{d}{dx}\big(x^{-4} y\big) = x^{-4}\,f(x) = x^{-4}\,x^{4} e^{x} = e^{x} </li><li>Integratebothsides:</li> <li>Integrate both sides: x^{-4}\,y = \int e^{x}\,dx = e^{x} + C </li><li>Solvefor(y):</li> <li>Solve for (y): \boxed{\;y(x)=x^{4}\left(e^{x}+C\right) = x^{4} e^{x} + C x^{4}\; }</li><li>Ifaninitialvalue<br/>(y(x<em>0)=y</em>0)isgiven,substitutetofind(C):(C=y<em>0/x</em>04ex0)</li></ul><h4id="example2atimedependentodeandthetransientterm">Example2:ATimeDependentODEandtheTransientTerm</h4><ul><li>ConsidertheIVP:</li> <li>If an initial value <br /> (y(x<em>0)=y</em>0) is given, substitute to find (C): (C=y<em>0/x</em>0^{4} - e^{x_0})</li> </ul> <h4 id="example2atimedependentodeandthetransientterm">Example 2: A Time-Dependent ODE and the Transient Term</h4> <ul> <li>Consider the IVP: \frac{d a}{d t} + \frac{1}{100}\,a = 6, \quad a(0)=50 </li><li>Integratingfactor:</li> <li>Integrating factor: \mu(t)=\exp\Big(\int \frac{1}{100}\,dt\Big)=e^{t/100} </li><li>Multiplythroughandintegrate:</li> <li>Multiply through and integrate: \frac{d}{dt}\big(e^{t/100} a\big)=6\,e^{t/100} \Rightarrow e^{t/100} a = 600\,e^{t/100} + C </li><li>Solvefor(a(t)):</li> <li>Solve for (a(t)): \boxed{a(t)=600 + C\,e^{-t/100}}</li><li>Apply(a(0)=50):(50=600+CC=550)so<br/></li> <li>Apply (a(0)=50): (50=600+C \Rightarrow C=-550) so<br /> \boxed{a(t)=600 - 550\,e^{-t/100}} </li><li>Transientterm:thepartthatdecayswithtime,here(550et/100)<ul><li>As(t),thesolutiontendstothesteadystatevalue(600)</li></ul></li><li>Takeaway:transienttermscapturetheeffectofinitialconditionsandtypicallyvanishforlarge(t)</li></ul><h4id="practicalexamplemixingproblemconstantvolumetank">PracticalExample:MixingProblem(ConstantVolumeTank)</h4><ul><li>Setup:tankwithvolume(V=300)gallons,inflowsaltwaterat(3)gal/minwithconcentration(2)lb/gal,outflowat(3)gal/min;initialsaltmass(A(0)=50)lb</li><li>Let(A(t))bepoundsofsaltintankattime(t)(minutes)</li><li>Inflowsaltrate:(3 gal/min×2 lb/gal=6)lb/min</li><li>Outflowsaltrate:concentrationintankis(A(t)/V=A(t)/300)lb/gal,outflowrateis3gal/min,sooutflowsaltrateis</li> <li>Transient term: the part that decays with time, here ( -550\,e^{-t/100} )<ul> <li>As (t\to\infty), the solution tends to the steady-state value (600)</li></ul></li> <li>Takeaway: transient terms capture the effect of initial conditions and typically vanish for large (t)</li> </ul> <h4 id="practicalexamplemixingproblemconstantvolumetank">Practical Example: Mixing Problem (Constant Volume Tank)</h4> <ul> <li>Setup: tank with volume (V=300) gallons, inflow salt water at (3) gal/min with concentration (2) lb/gal, outflow at (3) gal/min; initial salt mass (A(0)=50) lb</li> <li>Let (A(t)) be pounds of salt in tank at time (t) (minutes)</li> <li>Inflow salt rate: (3\text{ gal/min} \times 2\text{ lb/gal} = 6) lb/min</li> <li>Outflow salt rate: concentration in tank is (A(t)/V = A(t)/300) lb/gal, outflow rate is 3 gal/min, so outflow salt rate is 3\times\frac{A(t)}{300}=\frac{A(t)}{100} lb/min</li><li>Massbalance(dA/dt):<br/>lb/min</li> <li>Mass balance (dA/dt):<br /> \frac{dA}{dt} = 6 - \frac{A}{100} <br/>whichisequivalentto<br/><br /> which is equivalent to<br /> \boxed{\frac{dA}{dt} + \frac{1}{100}\,A = 6} </li><li>Integratingfactor:(μ(t)=et/100)</li><li>Lefthandsidebecomesthederivativeof(μA):<br/></li> <li>Integrating factor: (\mu(t)=e^{t/100})</li> <li>Left-hand side becomes the derivative of (\mu A):<br /> \frac{d}{dt}\big(e^{t/100} A\big)=6\,e^{t/100} </li><li>Integrate:</li> <li>Integrate: e^{t/100} A = 600\,e^{t/100} + C \Rightarrow A(t)=600 + C e^{-t/100} </li><li>Applyinitialcondition(A(0)=50):(50=600+CC=550)so<br/></li> <li>Apply initial condition (A(0)=50): (50=600+C \Rightarrow C=-550) so<br /> \boxed{A(t)=600 - 550\,e^{-t/100}} </li><li>Interpretation<ul><li>Steadystateamountofsaltintank:600lb</li><li>Transientterm:(550et/100)decaysto0as(t)</li></ul></li></ul><h4id="extensionsvariablevolumeoverflowconsideration">Extensions:VariableVolume(OverflowConsideration)</h4><ul><li>Modifiedsetup:inflowstill(3)gal/minatconcentration(2)lb/gal;volumenowgrowsas(V(t)=300+t)(duetohigherinflowthanoutflow)</li><li>Outflowrateremains(3)gal/min;however,concentrationintankisnow(A(t)/V(t)=A(t)/(300+t))</li><li>Massbalancebecomes<br/></li> <li>Interpretation<ul> <li>Steady-state amount of salt in tank: 600 lb</li> <li>Transient term: (-550\,e^{-t/100}) decays to 0 as (t\to\infty)</li></ul></li> </ul> <h4 id="extensionsvariablevolumeoverflowconsideration">Extensions: Variable Volume (Overflow Consideration)</h4> <ul> <li>Modified setup: inflow still (3) gal/min at concentration (2) lb/gal; volume now grows as (V(t)=300+t) (due to higher inflow than outflow)</li> <li>Outflow rate remains (3) gal/min; however, concentration in tank is now (A(t)/V(t) = A(t)/(300+t))</li> <li>Mass balance becomes<br /> \frac{dA}{dt} = 6 - 3\cdot\frac{A}{300+t} \quad\Rightarrow\quad \frac{dA}{dt} + \frac{3}{300+t}\,A = 6 </li><li>Integratingfactor:<br/></li> <li>Integrating factor:<br /> \mu(t) = \exp\Big(\int \frac{3}{300+t}\,dt\Big) = (300+t)^3 </li><li>Multiplythroughanduseproductrule:<br/></li> <li>Multiply through and use product rule:<br /> \frac{d}{dt}\big((300+t)^3 A\big) = 6(300+t)^3 </li><li>Integrate:<br/></li> <li>Integrate:<br /> (300+t)^3 A = \int 6(300+t)^3 dt = \frac{3}{2}(300+t)^4 + C </li><li>Solvefor(A(t)):<br/></li> <li>Solve for (A(t)):<br /> \boxed{A(t)=\frac{3}{2}(300+t) + \frac{C}{(300+t)^3}} </li><li>Applyinitialcondition(A(0)=50)tofind(C):<ul><li>(50=32300+C3003=450+C3003)</li><li>Thisyields(C=(50450)3003=4003003)(alargenegativeconstant)</li><li>Thustheexplicitsolutionis<br/></li> <li>Apply initial condition (A(0)=50) to find (C):<ul> <li>(50 = \frac{3}{2}\cdot 300 + \frac{C}{300^3} = 450 + \frac{C}{300^3})</li> <li>This yields (C = (50-450)\cdot 300^3 = -400\cdot 300^3) (a large negative constant)</li> <li>Thus the explicit solution is<br /> \boxed{A(t)=\frac{3}{2}(300+t) - \frac{400\cdot 300^3}{(300+t)^3}} </li></ul></li><li>Importantpracticalnote:<ul><li>Ifthetankvolumegrowswithoutbound(oruntilcapacityisreached),themodelchanges(overflow,capacitylimits,etc.)andtheformulamustbeadjustedaccordingly</li><li>Insuchacase,thesolutionshowsalineargrowthinthemainterm(duetoincreasingvolume)plusadecayingtransientterm</li></ul></li></ul><h4id="keytakeawaysandterminology">KeyTakeawaysandTerminology</h4><ul><li>IntegratingfactoristhecentraltoolforlinearfirstorderODEs;itischosenas<br/></li></ul></li> <li>Important practical note:<ul> <li>If the tank volume grows without bound (or until capacity is reached), the model changes (overflow, capacity limits, etc.) and the formula must be adjusted accordingly</li> <li>In such a case, the solution shows a linear growth in the main term (due to increasing volume) plus a decaying transient term</li></ul></li> </ul> <h4 id="keytakeawaysandterminology">Key Takeaways and Terminology</h4> <ul> <li>Integrating factor is the central tool for linear first-order ODEs; it is chosen as<br /> \mu(x)=\exp\Big(\int p(x)\,dx\Big) </li><li>Thelefthandsidebecomesthederivativeofaproduct:</li> <li>The left-hand side becomes the derivative of a product: \frac{d}{dx}\big(\mu(x)\,y\big) </li><li>Afterintegrating,theconstantofintegration(C)encodestheinitialcondition</li><li>Transientterm:theportionofthesolutionthatdecaystozeroastheindependentvariablegrows(e.g.,anexponentialtermlike(eλt));itcapturestheinfluenceofinitialconditionsanddiesoutovertime</li><li>Practicalmodelingtip:alwayscheckunits(dimensionanalysis)toensureconsistency,especiallyinmixingproblemswhererates,concentrations,andvolumesinteract</li><li>Inproblemswithtimevaryingvolume,theoutflowtermoftenbecomes(outflow rate×concentration=(flow rate)×(A(t)V(t))),leadingtoavariablecoefficientdifferentialequation</li></ul><h4id="quickreferencestoformulasforeasyrecall">QuickReferencestoFormulas(foreasyrecall)</h4><ul><li>Integratingfactor:</li> <li>After integrating, the constant of integration (C) encodes the initial condition</li> <li>Transient term: the portion of the solution that decays to zero as the independent variable grows (e.g., an exponential term like (e^{-\lambda t})); it captures the influence of initial conditions and dies out over time</li> <li>Practical modeling tip: always check units (dimension analysis) to ensure consistency, especially in mixing problems where rates, concentrations, and volumes interact</li> <li>In problems with time-varying volume, the outflow term often becomes (\text{outflow rate} \times \text{concentration} = \text{(flow rate)} \times \left( \frac{A(t)}{V(t)}\right)), leading to a variable-coefficient differential equation</li> </ul> <h4 id="quickreferencestoformulasforeasyrecall">Quick References to Formulas (for easy recall)</h4> <ul> <li>Integrating factor: \mu(x)=\exp\Big(\int p(x)\,dx\Big) </li><li>Solutionform:</li> <li>Solution form: \boxed{ y(x)=\mu(x)^{-1}\Big(\int \mu(x)\,f(x)\,dx + C\Big) } </li><li>Examplesolution(constantvolume):for</li> <li>Example solution (constant volume): for \frac{dA}{dt}+\frac{1}{100}A=6 ,with(A(0)=50):, with (A(0)=50): A(t)=600-550e^{-t/100} </li><li>Variablevolumeform(volume(V(t))):</li> <li>Variable volume form (volume (V(t))): \frac{dA}{dt}+\frac{3}{V(t)}A=6, \quad V(t)=300+t \quad\Rightarrow\quad A(t)=\frac{3}{2}\,V(t) + \frac{C}{V(t)^3} $$

Notes on the Instructor's Emphasis

  • The recipe is a powerful tool: when you recognize a linear first-order ODE, apply the integrating factor to transform the problem into a direct integration
  • Always verify the left-hand side becomes a derivative of a product by using the product rule as a quick check
  • For IVPs, determine the constant C from the given initial condition; this yields a unique solution on the interval of validity
  • The “transient term” concept helps interpret how solutions settle to a steady state in real-world processes (e.g., mixing tanks, chemical reactors), and it highlights the impact (and eventual fading) of initial conditions in dynamic systems