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}

  • Identify: (p(x)=-\frac{4}{x}), (f(x)=x^{4} e^{x})
  • Integrating factor: \mu(x)=\exp\Big(\int -\frac{4}{x}\,dx\Big)=\exp(-4\ln x)=x^{-4}
  • Multiply through: left becomes \frac{d}{dx}\big(x^{-4} y\big) = x^{-4}\,f(x) = x^{-4}\,x^{4} e^{x} = e^{x}
  • Integrate both sides: x^{-4}\,y = \int e^{x}\,dx = e^{x} + C
  • Solve for (y): \boxed{\;y(x)=x^{4}\left(e^{x}+C\right) = x^{4} e^{x} + C x^{4}\; }
  • If an initial value
    (y(x0)=y0) is given, substitute to find (C): (C=y0/x0^{4} - e^{x_0})

Example 2: A Time-Dependent ODE and the Transient Term

  • Consider the IVP: \frac{d a}{d t} + \frac{1}{100}\,a = 6, \quad a(0)=50
  • Integrating factor: \mu(t)=\exp\Big(\int \frac{1}{100}\,dt\Big)=e^{t/100}
  • 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
  • Solve for (a(t)): \boxed{a(t)=600 + C\,e^{-t/100}}
  • Apply (a(0)=50): (50=600+C \Rightarrow C=-550) so
    \boxed{a(t)=600 - 550\,e^{-t/100}}
  • Transient term: the part that decays with time, here ( -550\,e^{-t/100} )
    • As (t\to\infty), the solution tends to the steady-state value (600)
  • Takeaway: transient terms capture the effect of initial conditions and typically vanish for large (t)

Practical Example: Mixing Problem (Constant Volume Tank)

  • 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
  • Let (A(t)) be pounds of salt in tank at time (t) (minutes)
  • Inflow salt rate: (3\text{ gal/min} \times 2\text{ lb/gal} = 6) lb/min
  • 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
  • Mass balance (dA/dt):
    \frac{dA}{dt} = 6 - \frac{A}{100}
    which is equivalent to
    \boxed{\frac{dA}{dt} + \frac{1}{100}\,A = 6}
  • Integrating factor: (\mu(t)=e^{t/100})
  • Left-hand side becomes the derivative of (\mu A):
    \frac{d}{dt}\big(e^{t/100} A\big)=6\,e^{t/100}
  • Integrate: e^{t/100} A = 600\,e^{t/100} + C \Rightarrow A(t)=600 + C e^{-t/100}
  • Apply initial condition (A(0)=50): (50=600+C \Rightarrow C=-550) so
    \boxed{A(t)=600 - 550\,e^{-t/100}}
  • Interpretation
    • Steady-state amount of salt in tank: 600 lb
    • Transient term: (-550\,e^{-t/100}) decays to 0 as (t\to\infty)

Extensions: Variable Volume (Overflow Consideration)

  • 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)
  • Outflow rate remains (3) gal/min; however, concentration in tank is now (A(t)/V(t) = A(t)/(300+t))
  • Mass balance becomes
    \frac{dA}{dt} = 6 - 3\cdot\frac{A}{300+t} \quad\Rightarrow\quad \frac{dA}{dt} + \frac{3}{300+t}\,A = 6
  • Integrating factor:
    \mu(t) = \exp\Big(\int \frac{3}{300+t}\,dt\Big) = (300+t)^3
  • Multiply through and use product rule:
    \frac{d}{dt}\big((300+t)^3 A\big) = 6(300+t)^3
  • Integrate:
    (300+t)^3 A = \int 6(300+t)^3 dt = \frac{3}{2}(300+t)^4 + C
  • Solve for (A(t)):
    \boxed{A(t)=\frac{3}{2}(300+t) + \frac{C}{(300+t)^3}}
  • Apply initial condition (A(0)=50) to find (C):
    • (50 = \frac{3}{2}\cdot 300 + \frac{C}{300^3} = 450 + \frac{C}{300^3})
    • This yields (C = (50-450)\cdot 300^3 = -400\cdot 300^3) (a large negative constant)
    • Thus the explicit solution is
      \boxed{A(t)=\frac{3}{2}(300+t) - \frac{400\cdot 300^3}{(300+t)^3}}
  • Important practical note:
    • 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
    • In such a case, the solution shows a linear growth in the main term (due to increasing volume) plus a decaying transient term

Key Takeaways and Terminology

  • Integrating factor is the central tool for linear first-order ODEs; it is chosen as
    \mu(x)=\exp\Big(\int p(x)\,dx\Big)
  • The left-hand side becomes the derivative of a product: \frac{d}{dx}\big(\mu(x)\,y\big)
  • After integrating, the constant of integration (C) encodes the initial condition
  • 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
  • Practical modeling tip: always check units (dimension analysis) to ensure consistency, especially in mixing problems where rates, concentrations, and volumes interact
  • 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

Quick References to Formulas (for easy recall)

  • Integrating factor: \mu(x)=\exp\Big(\int p(x)\,dx\Big)
  • Solution form: \boxed{ y(x)=\mu(x)^{-1}\Big(\int \mu(x)\,f(x)\,dx + C\Big) }
  • 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}
  • 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