I needed help with this Differential Equation, below:
$dy/dt = t + y, \text{ with } y(0) = -1$
I tried $dy/(t+y) = dt$ and integrated both sides, but it looks like the $u$-substitution does not work out.
I needed help with this Differential Equation, below:
$dy/dt = t + y, \text{ with } y(0) = -1$
I tried $dy/(t+y) = dt$ and integrated both sides, but it looks like the $u$-substitution does not work out.
This equation is not separable. In other words, you can't write it as $f(y)\;dy=g(t)\;dt$. A differential equation like this can be solved by integrating factors. First, rewrite the equation as:
$\frac{dy}{dt}-y=t$
Now we multiply the equation by an integrating factor so we can use the product rule, $d(uv)=udv+vdu.$ For this problem, that integrating factor would be $e^{-t}$.
$e^{-t}\frac{dy}{dt}-e^{-t}y=\frac d{dt}(e^{-t}y)=te^{-t}$
$e^{-t}y=\int te^{-t}dt=-te^{-t}+\int e^{-t}dt=-te^{-t}-e^{-t}+C$
$y=Ce^t-t-1$
For this specific problem, we could also follow Iasafro's suggestion.
$z=y+t,\frac{dz}{dt}=\frac{dy}{dt}+1,\frac{dy}{dt}=\frac{dz}{dt}-1$
$\frac{dz}{dt}-1=z,\frac{dz}{dt}=z+1,\frac{dz}{z+1}=dt$
As you can see, this substitution resulted in a separable equation, allowing you to integrate both sides.
This is a first order linear differential equation so general solution is given by :
$y=\frac{\int u(t)\cdot t \,dt +C}{u(t)} ~\text{where}~ u(t)=e^{-\int dt}$