The integrating factor is used to solve first-order linear ODEs of the form:
dxdy+P(x)y=Q(x)First, we find the integrating factor, which is given by:
μ(x)=e∫P(x) dxNext, we multiply both sides of the original ODE by the integrating factor:
μ(x)dxdy+μ(x)P(x)y=μ(x)Q(x)Recognize that the left-hand side is the result of the product rule, so can be rewritten as:
(μ(x)y(x))′=μ(x)Q(x)Now, integrating with respect to x gives:
μ(x)y(x)=∫μ(x)Q(x) dx+CFinally, we can solve for C. If given an initial condition, find C and solve for y(x).
Solve the following ODE:
dxdy+2y=e−xFirst, we identify P(x)=2 and Q(x)=e−x. Next, we find the integrating factor:
μ(x)=e∫2 dx=e2xNow, we multiply both sides of the original ODE by the integrating factor:
e2xdxdy+2e2xy=e2xe−xThis simplifies to:
(e2xy)′=exNow, we integrate both sides with respect to x:
e2xy=∫ex dx+CThis gives us:
e2xy=ex+CFinally, we can solve for y(x):
y(x)=e−x+Ce−2xIf we are given an initial condition, we can find C and write the final solution. For example, if we are given y(0)=1, we can substitute x=0 and y=1 into the solution to find C:
1=e0+Ce0⟹C=0Thus, the final solution to the ODE with the initial condition is:
y(x)=e−x