A first-order linear differential equation has the form y′+p(t)y=q(t).
To solve it, rewrite it in the differential form: dtdy+p(t)y=q(t), or (p(t)y−q(t))dt+dy=0.
Now, using the facts about exact equations, we see that this equation is not exact. However, since M(t,y)=p(t)y−q(t) and N(t,y)=1, we have that ∂y∂M=p(t) and ∂x∂N=0. So, N1(∂y∂M−∂x∂N)=11(p(t)−0)=p(t). Thus, the integrating factor is I(t,y)=e∫p(t)dt.
Now, return to the initial equation and multiply it by the integrating factor:
y′e∫p(t)dt+p(t)e∫p(t)dty=q(t)e∫p(t)dt.
Closely looking at the left side, we note that it equals d(ye∫p(t)dt).
So, the equation can be rewritten as d(ye∫p(t)dt)=q(t)e∫p(t)dt.
Integrating both sides gives ye∫p(t)dt=∫(q(t)e∫p(t)dt)dt+C.
Finally, y=e−∫p(t)dt∫(q(t)e∫p(t)dt)dt+Ce−∫p(t)dt.
This formula allows to find the solution directly.
Example 1. Solve y′−7y=et.
Here, p(t)=−7, and q(t)=et.
So, the solution is
y=e−∫−7dt∫(et⋅e∫−7dt)dt+Ce−∫−7dt=e7t∫(e−6t)dt+Ce7t=e7t⋅(−61)e−6t+Ce7t=Ce7t−61et
Thus, y=Ce7t−61et.
Let's work another quick example.
Example 2. Solve t2y′−3y−1=0, y(3)=0.
First, rewrite the equation: y′−t23y=t21.
Here, p(t)=−t23, and q(t)=t21.
So,
y=e−∫−t23dt∫(t21e∫−t23dt)dt+Ce−∫−t23dt=e−t3∫(t21et3)dt+Ce−t3=e−t3⋅(−31)et3+Ce−t3=Ce−t3−31
y=Ce−t3−31.
To find the particular solution, plug in the initial condition:
0=Ce−33−31 or C=3e
Finally, y=3ee−t3−31=31(e1−t3−1).