# Am I solving this differential equation correctly?

I have been tasked with solving the following differential equation:

$$y'(t)+7\sin(t)y(t)=(te^{\cos(t)})^7$$

I recognize (I think?) that this is an equation of the type:

$$y'(t)+p(t)y(t)=q(t)$$

which has the solution:

$$y(t)=e^{-P(t)}\int e^{P(t)}q(t)dt$$

However, I just can't figure out which function goes where in the solutioon formula. Can anyone help me?

• Can you see why $p(t) = 7\sin(t)$ and why $q(t) = (te^{\cos(t)})^{7}$? – Tom Himler Oct 30 '18 at 12:14
• Yes, you are doing it right. Now proceed. – Anik Bhowmick Oct 30 '18 at 12:15
• So the correct solution is $y(t)=e^{7cos(t)}\int e^{-7cos(t)}(te^{cos(t)})^{7}dt$ ? – Boris Grunwald Oct 30 '18 at 12:22
• Isn't it $y(t)=e^{-7cos(t)}\int e^{7cos(t)}(te^{cos(t)})^{7}dt?$ You seem to have changed the sign of $p$. By the way, if you differentiate the formula, you'll see why it gives the solution. – saulspatz Oct 30 '18 at 12:38
• Start by writing down $p$ and $q$. – Yves Daoust Oct 30 '18 at 12:51

$$z(t):=(e^{-cos(t)})^7y(t)$$
and you can observe that $$z(t)$$ verify the equality
$$z’(t)=t^7$$