I have the following equation:


For solving, I find the homogenous part as: $$f(h)=C*e^{-t}$$

Then finding $f(a)$ and $df(a)$: $$f(a)=4A\sin(t)+4B\cos(t)$$ $$df(a)=4A\cos(t)-4B\sin(t)$$

Substituting in orginal equation:


I have to find numerical values of $A$ and $B$ but I absoloutly have no idea how can I solve this, I am also not sure if the steps I did are correct or not. Would somone please help with this equation?

The final answer should be substituted in: $$x=f(h)+f(a)$$


Another approach would be to consider the given equation as one of the form

$$ \frac{dx}{dt}+Px=Q $$

where $P$ and $Q$ are functions of $t$. Such equation can be solved by multiplying both sides by the integrating factor $e^{\int P\,dt}$.

Applying this to your equation, we get $$ \begin{align} e^{t}\frac{dx}{dt}+e^t x=e^t 4 \sin{t}\\ \frac{d}{dt}\left(xe^t\right)=4\,e^t \sin{t}\\ xe^t=4\int e^t \sin{t}\ dx\\ \end{align} $$

Solving the above by integration by parts we get

$$ \begin{align} xe^t&=\frac{4e^t(\sin t -\cos t)}{2} + c\\ x&=2\sin t -2\cos t+ce^{-t} \end{align} $$

  • $\begingroup$ Thanks, this actually makes it easier $\endgroup$ – Sean87 May 20 '12 at 17:09
  • $\begingroup$ @Sean87 No problem. Consider accepting this as the answer, if it answers your question! $\endgroup$ – Milosz Wielondek May 20 '12 at 18:15

multiples of $\cos(t)$ can't add to make $\sin(t)$, and vice versa. So this can be split into two equations: $$4A\cos(t)+4B\cos(t)=0$$ $$4A\sin(t)-4B\sin(t)=4\sin(t)$$ simplifying we get $$A+B=0$$ $$A-B=1$$ and so $$A=\frac{1}{2}, B=-\frac{1}{2}$$

So your final solution is $$x=f(h)+f(a)=Ce^{-t}+2\sin(t)-2\cos(t)$$


At the stage


you are done. Collecting common factors you will get


but this must be independent and so you have a system of equations



giving $A=-B=\frac{1}{2}$.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.