- We always take our integrating factor to be I(x)=e∫P(x)dx.
(The method doesn't depend on which constant of integration we choose. Just pick any anti-derivative of P(x).)
- Notice that I′(x)=P(x)I(x),
so (I(x)y)′=I(x)y′+I′(x)y=I(x)(y′+P(x)y).
- Multiplying our ODE by I(x) gives (I(x)y)′=I(x)Q(x).
- Integrate both sides to get I(x)y=∫I(x)Q(x)dx.
This involves a constant of integration, which we'll write explicitly as +C.
- Divide by I(x) to get our general solution: y=1I(x)(∫I(x)Q(x)dx+C).
- Plug in the initial conditions to figure out what C is.
|
In our example, y′+2xy=4x, since P(x)=2x we can take I(x)=ex2. Hence
y=1ex2∫4xex2dx+C=1ex2(2ex2+C)=2+Ce−x2.
|