Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

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)$$

share|improve this question

3 Answers 3

up vote 4 down vote accepted

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} $$

share|improve this answer
Thanks, this actually makes it easier –  Sean87 May 20 '12 at 17:09
@Sean87 No problem. Consider accepting this as the answer, if it answers your question! –  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)$$

share|improve this answer

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}$.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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