Solve the IVP $\ddot{x}+\dot{x}+x=f(t)$ The entire question reads:
Consider the mass spring system subject to an external force $f(t)$:
$$\ddot{x}+\dot{x}+x=f(t)$$
Assume $x(0) = 0$ and $\dot{x}(0) = 0$. Assume also that $f(t)$ is the force describing the striking effect on the mass of the mass spring system in a short time period $0<T<\frac{1}{2}$, given as $f(t) = \frac{\pi}{4T}\sin{\frac{\pi t}{2T}}$ when $0 \leq t<2T$ and $f(t) = 0$ when $t \geq 2T$. 
(a) Solve the given IVP first for all $t \geq 0$. (b) Compute the limits $\lim_{t \to \infty} x(t)$ and $\lim_{t \to \infty} \dot{x}(t)$. (c) Compute the limits $\lim_{T \to 0}x(T)$ and $\lim_{T \to 0} \dot{x}(T)$, and discuss their physical meanings.
I've been running into trouble on part (a). If I understand correctly, the solution for when $f(t) = 0$ is just simply $x(t) = 0$, but I haven't been able to come up with a solution for when $f(t) = f(t) = \frac{\pi}{4T}\sin{\frac{\pi t}{2T}}$. If someone could walk me through the process of finding these solutions, I know I could do parts (b) and (c). Thanks!
 A: Another approach: convert to a first order ODE by setting
$$
z=\begin{bmatrix}x\\\dot x\end{bmatrix}
$$
to get
$$
\dot z=\begin{bmatrix}0 & 1\\-1 & -1\end{bmatrix}z+\begin{bmatrix}0\\1\end{bmatrix}f=Az+Bf,\qquad z(0)=\begin{bmatrix}0\\0\end{bmatrix}.
$$
The solution is given by
$$
z(t)=\int_0^te^{A(t-s)}Bf(s)\,ds.
$$
The parts b) and c) can be done now without explicit calculation of the integral. Actually to answer b) you do not need any calculations at all: the system is stable (second order with constant positive coefficients) and $f$ has a finite duration, hence the limits are zero. To answer c): 
\begin{align}
z(T)&=\frac{\pi}{4T}\int_0^Te^{A(T-s)}B\sin\frac{\pi s}{2T}\,ds\\
e^{-AT}z(T)&=\frac{\pi}{4T}\int_0^Te^{-As}B\sin\frac{\pi s}{2T}\,ds=\qquad[\text{change }x=\frac{\pi s}{2T}]\\
&=\frac12\int_0^{\pi/2}e^{-\frac{2ATx}{\pi}}B\sin x\,dx.
\end{align}
The limit of the LHS is $\lim_{T\to 0}z(T)$, the one that has to be estimated. The limit of the RHS is (by uniform convergence of the exponential to $I$)
$$
\frac12\int_0^{\pi/2}I\cdot B\sin x\,dx=\frac12B\int_0^{\pi/2}\sin x\,dx=
\frac12B=\begin{bmatrix}0\\\frac12\end{bmatrix}.
$$
A: Solving with the Laplace Transform we have
$$
(s^2+s+1)X(s) - s \dot x(0) - x(0)= \int_0^{2T}\frac{\pi}{4T}\sin\left(\frac{\pi}{2T}t\right)e^{-s t}dt = \frac{\pi ^2 \left(e^{-2 s T}+1\right)}{2 \left(4 s^2 T^2+\pi ^2\right)}
$$
and then using the initial conditions
$$
X(s) = \frac{\pi ^2 \left(e^{-2 s T}+1\right)}{2 \left(4 s^2 T^2+\pi ^2\right)}\frac{1}{s^2+s+1}
$$
now anti-transforming with the help of suitable tables
$$
x(t) = \frac{\pi  e^{-t/2}}{3 \left(16 T^4-4 \pi ^2 T^2+\pi ^4\right)} \left(\pi  \left(e^T \theta (t-2 T) \left(\sqrt{3} \left(\pi ^2-2 T^2\right) \sin \left(\frac{1}{2} \sqrt{3} (t-2 T)\right)+6
   T^2 \cos \left(\frac{1}{2} \sqrt{3} (t-2 T)\right)\right)+\sqrt{3} \left(\pi ^2-2 T^2\right) \sin \left(\frac{\sqrt{3} t}{2}\right)+6 T^2 \cos
   \left(\frac{\sqrt{3} t}{2}\right)\right)+3 e^{t/2} T (\theta (t-2 T)-1) \left(\left(\pi ^2-4 T^2\right) \sin \left(\frac{\pi  t}{2 T}\right)+2
   \pi  T \cos \left(\frac{\pi  t}{2 T}\right)\right)\right)
$$
Here $\theta(t)$ is the heaviside unit step function.
Attached the input-output (red-blue) plot  for $T = 0.1$ out of scale.

