A particle of mass $m$ moving along the $x$-axis, is acted upon by a force: $$F\left(t\right)=\begin{cases}A\mathrm{e}^{-\gamma t}\sin\left(\omega t\right),&t\ge0;\\0,&t<0.\end{cases}$$ Initial conditions are: $x(0)=x_{0},\dot{x}(0)=\dot{x}_{0}.$ Here $\dot{x}$ is $\frac{dx}{dt}$. Find the equation of motion $x(t)$ for the particle.
My attempt:
In both cases we want to solve the differential equation $m\frac{d^2x}{dt^2}=F(t)$. For the second case, the equation becomes trivial $\frac{d^2x}{dt^2}=0$ with the solution $x(t)=\dot{x}_{0}t+x_0$. However, I am having trouble solving the differential equation $$m\frac{d^2x}{dt^2}=Ae^{-\gamma t}\sin(\omega t).$$ My approach was just integrating both sides, but I am stuck in the seemingly never ending integration by parts loop. Could someone show how to solve this for $x(t)$?
We could try Laplace transform of your differential equation: $$\mathcal{L}_t\left[m x''(t)=A \exp (-\gamma t) \sin (\omega t)\right](s)$$
Results in s-domain equation $$m \left(s^2 X(s)-s x(0)-x'(0)\right)=\frac{A \omega }{(s+\gamma )^2+\omega ^2}$$
Then $$X(s)=\frac{A \omega }{m s^2 \left((s+\gamma)^2+\omega ^2\right)}+\frac{x(0)}{s}+\frac{x'(0)}{s^2}$$
Now we go back to time domain with inverse Laplace transform:
With $\mathcal{L}_s^{-1}\left[\frac{x(0)}{s}\right](t)=x(0)=x_0$ and $\mathcal{L}_s^{-1}\left[\frac{x'(0)}{s^2}\right](t)=t x'(0)=t \dot{x}_0$
we finally get
$$x(t)=\frac{A \omega}{m} \left(-\frac{2 \gamma }{\left(\gamma ^2+\omega ^2\right)^2}+\frac{t}{\gamma ^2+\omega ^2}+\frac{e^{-\gamma t} \left(\left(\gamma ^2-\omega ^2\right) \sin (\omega t)+2 \gamma \omega \cos (\omega t)\right)}{\omega \left(\gamma ^2+\omega ^2\right)^2}\right)+x_0+t\dot{x}_0$$