Since this is an undamped system, the equation of motion is m\ddot{x}+kx=F\left ( t\right )
To simplify notations, let \beta =\left ( 50\times 10^{3}\right ) A. The above now becomes\begin{equation} m\ddot{x}+kx=\beta -\beta e^{-3t} \tag{1} \end{equation}
Therefore \begin{equation} x_{p,2}\left ( t\right ) =\frac{-\beta }{9m+k}e^{-3t} \tag{4B} \end{equation}
Initial conditions are now applied to determine A,B. Since x\left ( 0\right ) =0 the above becomes\begin{align*} 0 & =A+\frac{\beta }{k}-\frac{\beta }{9m+k}\\ A & =\frac{\beta }{9m+k}-\frac{\beta }{k} \end{align*}
The solution (5) becomes\begin{equation} x\left ( t\right ) =\left ( \frac{\beta }{9m+k}-\frac{\beta }{k}\right ) \cos \omega _{n}t+B\sin \omega _{n}t+\frac{\beta }{k}-\frac{\beta }{9m+k}e^{-3t} \tag{6} \end{equation}
Substituting this in (6) gives the final solution\begin{equation} x\left ( t\right ) =\left ( \frac{\beta }{9m+k}-\frac{\beta }{k}\right ) \cos \omega _{n}t-\frac{3\beta }{\left ( 9m+k\right ) \omega _{n}}\sin \omega _{n}t+\frac{\beta }{k}-\frac{\beta }{9m+k}e^{-3t} \tag{7} \end{equation}
Then numerically, the solution (7) is\begin{align*} x\left ( t\right ) & =\left ( \frac{392.70}{90+1000}-\frac{392.70}{1000}\right ) \cos 10t-\frac{3\left ( 392.70\right ) }{\left ( 90+1000\right ) 10}\sin 10t+\frac{392.70}{1000}-\frac{392.70}{90+1000}e^{-3t}\\ & =-0.032\cos 10t-0.108\sin 10t+0.393-0.360e^{-3t} \end{align*}
Below is a plot of the above to illustrate the solution for some arbitrary time t.
The force on the piston is F\left ( t\right ) =Ap\left ( t\right )
\begin{align} x_{conv}\left ( t\right ) & =\int _{0}^{t}F\left ( \tau \right ) g\left ( t-\tau \right ) d\tau \nonumber \\ & =\frac{A}{m\omega _{n}}\int _{0}^{t}p\left ( t\right ) \sin \left ( \omega _{n}\left ( t-\tau \right ) \right ) d\tau \nonumber \\ & =\frac{A}{m\omega _{n}}\int _{0}^{t}50\left ( 1000\right ) \left ( 1-e^{-3\tau }\right ) \sin \left ( \omega _{n}\left ( t-\tau \right ) \right ) d\tau \nonumber \end{align}
Where 50\left ( 1000\right ) is used since the units are in kPa. The above becomes\begin{align} x_{conv}\left ( t\right ) & =\left ( 5\times 10^{4}\right ) \frac{A}{m\omega _{n}}\int _{0}^{t}\left ( 1-e^{-3\tau }\right ) \sin \left ( \omega _{n}\left ( t-\tau \right ) \right ) d\tau \nonumber \\ & =\left ( 5\times 10^{4}\right ) \frac{A}{m\omega _{n}}\left ( \int _{0}^{t}\sin \left ( \omega _{n}\left ( t-\tau \right ) \right ) d\tau -\int _{0}^{t}e^{-3\tau }\sin \left ( \omega _{n}\left ( t-\tau \right ) \right ) d\tau \right ) \tag{1} \end{align}
The first integral in (1) becomes\begin{align} \int _{0}^{t}\sin \left ( \omega _{n}\left ( t-\tau \right ) \right ) d\tau & =-\left ( \frac{\cos \left ( \omega _{n}\left ( t-\tau \right ) \right ) }{-\omega _{n}}\right ) _{0}^{t}\nonumber \\ & =\frac{1}{\omega _{n}}\left ( \cos \left ( \omega _{n}\left ( t-\tau \right ) \right ) \right ) _{0}^{t}\nonumber \\ & =\frac{1}{\omega _{n}}\left ( \cos \left ( \omega _{n}\left ( t-t\right ) \right ) -\cos \left ( \omega _{n}t\right ) \right ) \nonumber \\ & =\frac{1}{\omega _{n}}\left ( 1-\cos \left ( \omega _{n}t\right ) \right ) \tag{2} \end{align}
The second integral in (1) is found using the handout integration tables \int e^{ax}\sin \left ( b+cx\right ) dx=\frac{ae^{ax}\sin \left ( b+cx\right ) }{a^{2}+c^{2}}-\frac{ce^{ax}\cos \left ( b+cx\right ) }{a^{2}+c^{2}}
Substituting (2,3) into (1) gives the final result\begin{equation} x_{conv}\left ( t\right ) =\left ( 5\times 10^{4}\right ) \frac{A}{m\omega _{n}}\left ( \frac{1}{\omega _{n}}\left ( 1-\cos \left ( \omega _{n}t\right ) \right ) -\frac{\omega _{n}e^{-3t}+3\sin \left ( \omega _{n}t\right ) -\omega _{n}\cos \left ( \omega _{n}t\right ) }{9+\omega _{n}^{2}}\right ) \tag{4} \end{equation}
Substituting all the numerical values, and since \omega _{n}=\sqrt{\frac{k}{m}}=\sqrt{\frac{1000}{10}}=10 then (4) becomes\begin{align*} x\left ( t\right ) & =\left ( 5\times 10^{4}\right ) \frac{\pi \left ( \frac{0.1}{2}\right ) ^{2}}{\left ( 10\right ) \left ( 10\right ) }\left ( \frac{1}{10}\left ( 1-\cos \left ( 10t\right ) \right ) -\frac{10e^{-3t}+3\sin \left ( 10t\right ) -10\cos \left ( 10t\right ) }{109}\right ) \\ & =3.927\left ( \frac{1}{10}\left ( 1-\cos \left ( 10t\right ) \right ) -\frac{10e^{-3t}+3\sin \left ( 10t\right ) -10\cos \left ( 10t\right ) }{109}\right ) \\ & =3.927\left ( \frac{1}{10}\left ( 1-\cos \left ( 10t\right ) \right ) +\frac{10}{109}\cos \left ( 10t\right ) -\frac{10}{109}e^{-3t}-\frac{3}{109}\sin \left ( 10t\right ) \right ) \\ & =3.927\left ( \frac{1}{10}-\frac{10}{109}e^{-3t}-\frac{3}{109}\sin \left ( 10t\right ) -\frac{9}{1090}\cos \left ( 10t\right ) \right ) \end{align*}
This is a plot of the above, which agrees with plot from the direct integration method. This verifies the above result
\begin{align} x_{conv}\left ( t\right ) & =\int _{0}^{t}F\left ( t-\tau \right ) g\left ( \tau \right ) d\tau \nonumber \\ & =\frac{A}{m\omega _{n}}\int _{0}^{t}p\left ( t-\tau \right ) \sin \left ( \omega _{n}\tau \right ) d\tau \nonumber \\ & =\frac{A}{m\omega _{n}}\int _{0}^{t}50\left ( 1000\right ) \left ( 1-e^{-3\left ( t-\tau \right ) }\right ) \sin \left ( \omega _{n}\tau \right ) d\tau \nonumber \end{align}
Where 50\left ( 1000\right ) is used, since the units are in kPa. The above becomes\begin{align} x_{conv}\left ( t\right ) & =\left ( 5\times 10^{4}\right ) \frac{A}{m\omega _{n}}\int _{0}^{t}\left ( 1-e^{-3\left ( t-\tau \right ) }\right ) \sin \left ( \omega _{n}\tau \right ) d\tau \nonumber \\ & =\left ( 5\times 10^{4}\right ) \frac{A}{m\omega _{n}}\left ( \int _{0}^{t}\sin \left ( \omega _{n}\tau \right ) d\tau -\int _{0}^{t}e^{-3\left ( t-\tau \right ) }\sin \left ( \omega _{n}\tau \right ) d\tau \right ) \tag{1} \end{align}
The first integral in (1) is now evaluated\begin{align} \int _{0}^{t}\sin \left ( \omega _{n}\tau \right ) d\tau & =-\frac{1}{\omega _{n}}\left ( \cos \left ( \omega _{n}\tau \right ) \right ) _{0}^{t}\nonumber \\ & =\frac{-1}{\omega _{n}}\left ( \cos \left ( \omega _{n}t\right ) -1\right ) \nonumber \\ & =\frac{1}{\omega _{n}}\left ( 1-\cos \left ( \omega _{n}t\right ) \right ) \tag{2} \end{align}
The second integral in (1) is\begin{align} \int _{0}^{t}e^{-3\left ( t-\tau \right ) }\sin \left ( \omega _{n}\tau \right ) d\tau & =\int _{0}^{t}e^{-3t+3\tau }\sin \left ( \omega _{n}\tau \right ) d\tau \nonumber \\ & =\int _{0}^{t}e^{-3t}e^{3\tau }\sin \left ( \omega _{n}\tau \right ) d\tau \nonumber \\ & =e^{-3t}\int _{0}^{t}e^{3\tau }\sin \left ( \omega _{n}\tau \right ) d\tau \tag{3} \end{align}
This integral is found using tables \int e^{ax}\sin \left ( bx\right ) dx=\frac{e^{ax}\left ( a\sin \left ( bx\right ) -b\cos \left ( bx\right ) \right ) }{a^{2}+b^{2}}
Substituting (2,4) into (1) gives the final result\begin{equation} x_{conv}\left ( t\right ) =\left ( 5\times 10^{4}\right ) \frac{A}{m\omega _{n}}\left ( \frac{1}{\omega _{n}}\left ( 1-\cos \left ( \omega _{n}t\right ) \right ) -\frac{3\sin \left ( \omega _{n}t\right ) -\omega _{n}\cos \left ( \omega _{n}t\right ) +\omega _{n}e^{-3t}}{9+\omega _{n}^{2}}\right ) \tag{5} \end{equation}
Comparing (5) above to equation (4) found using option (1) shows they are the same as expected.