Inital value problem, differential equations I'm asked to solve the problem: $7\frac{dy}{dt}+y= 28t$ with $y(0)=2$
When I integrated I ended up getting $y= (14t^2+C)/(7+t)$, then I plugged in 0 for $t$ and 2 for $y$ to find that $C$ is 14. Leaving my final answer at $y(t)=(14t^2+14)/(7+t)$
But for whatever reason my homework isn't taking it. My assumption would be that I didn't integrate it correctly but I think I did. I subtracted y to the other side then multiplied dt to the other side and integrated both sides leaving me with:
$7y=14t^2-ty+C$
Then I added ty to the other side and factored out $y$ and divided $(7+t)$. Kinda stuck, not sure where I went wrong. Also I apologize for my notation, not too good at using this site.
 A: $7y'+y=28t$ This is a first-order non-homogeneous differential equation.
Fist step is to find the general solution $y_c(t)$
$$7y'+y=0\\7r+1=0\\r=-\frac17$$Therefore $y_c(t)=c_1e^{-\frac17t}$
Now find the particular solution $y_p(t)$: Set $y_p(t)=At+B$
Then,$$y'_p(t)=A\\7A+At+B=28t$$
We get$$7A+B=0,A=28,B=-196$$
Thus $y_p(t)=28t-196$
Finally,$$y(t)=y_c(t)+y_p(t)=c_1e^{\frac17t}+28t-196$$
Plug in the initial value:$$y(0)=c_1-196=2\\c_1=198$$
So$$y(t)=198e^{\frac17t}+28t-196$$
A: You should use the integrating factor. In general if you have a differential equation of the form:
\begin{equation}
\frac{dy}{dt} + p(t)y = q(t)
\end{equation}
Where $p(t)$ and $q(t)$ are functions of $t$ only, you can multiply both side by a factor, called integrating factor, which brings the equation to a special form. You'll have an exact derivative on the RHS and then $q(t)I$ on the LHS, where $I$ is the integrating factor.
The integrating factor for linear odes of this type is $I(t) = e^{\int^t{p(\mu)\, d\mu}}$, where $\mu$ is a dummy variable, i.e. is just a place-holder variable, a variable that we use just to be able do to the calculation without confusion.
Once you multiply by this integrating factor, you'll need to integrate both sides, the RHS will be easy by F$\theta$C, the rest will be easy enough with some calculus background.
In your case DON'T FORGET to divide by 7 before applying this concept. The equation must be exactly in the form written above.
So you'll have:
\begin{equation}
\frac{dy}{dt} + \frac{1}{7}y = 4t
\end{equation}
Where your integrating factor will be $I(t) = e^{\int^t{\frac{1}{7}\,d\mu}} =e^{\frac{t}{7}} $, where again $\mu$ is a dummy variable.
By distributivity you'll have then the following
\begin{equation}
e^{\frac{t}{7}}\frac{dy}{dt} + e^{\frac{t}{7}}\frac{1}{7}y = e^{\frac{t}{7}}4t
\end{equation}
Now the interesting thing is that on the RHS you have the above-mentioned exact derivative. Indeed using the standard rule for the derivative of a product you have that
RHS $ = \frac{d}{dt}\left(ye^{\frac{t}{7}}\right)$
I leave the rest to you. Once you'll integrate the LHS, you'll get a constant. You can find the value of this constant by applying the initial condition given.
