Back to the class
Quiz 4 solution
Solve the IVP $ty'+2y=t^2-t+1, \quad y(1)=\dfrac{1}{2}$.
Solution: First put the differential equation into standard form by dividing by $t$: $$(*) \hspace{35pt} y'+\dfrac{2}{t}y=t-1+\dfrac{1}{t}.$$ Now that it in standard form, we see that the integrating factor is $$\mu = e^{\int \frac{2}{t} \mathrm{d}t}=e^{2\ln(t)} = e^{\ln(t^2)}=t^2.$$ Multiply our equation $(*)$ by $\mu$ to get $$t^2y'+2ty = t^3-t^2+t.$$ But the left-hand side can be rewritten (the whole point of integrating factors!) to obtain $$(t^2y)'=t^3-t^2+t.$$ Now we integate to get $$t^2y = \displaystyle\int t^3-t^2+t \mathrm{d}t = \dfrac{t^4}{4} - \dfrac{t^3}{3} + \dfrac{t^2}{2} + C.$$ Finally divide by $t^2$ to get the general solution $$y(t)=\dfrac{t^2}{4} -\dfrac{t}{3} +\dfrac{1}{2} + \dfrac{C}{t^2}.$$ Now we apply the initial condition $y(1)=\dfrac{1}{2}$ to get $$ \dfrac{1}{2} \stackrel{\text{given}}{=} y(1) \stackrel{\text{computed}}{=} \dfrac{1}{4} - \dfrac{1}{3} + \dfrac{1}{2} + C,$$ and solving for $C$ gives $$C = \dfrac{1}{2} - \dfrac{1}{4} + \dfrac{1}{3} - \dfrac{1}{2} = \dfrac{1}{12}.$$ Therefore the solution to the IVP is $$y(t) = \dfrac{t^2}{4} - \dfrac{t}{3} + \dfrac{1}{2} + \dfrac{12}{t^2}.$$