Suppose we had the following differential equation with zero initial conditions:
 $$\ddot{x}\left(t\right)+2\dot{x}\left(t\right)+x\left(t\right)=0.5u\left(t\right)$$
where $u\left(t\right)$ is given via the following graph:
[![enter image description here](https://i.stack.imgur.com/An21K.png)](https://i.stack.imgur.com/An21K.png)

Analytically $$u\left(t\right)=2t(h(t)-h(t-1))$$
where $h(t)$ is the Heaviside unit step function.
This leaves us with the following ODE which I intend to solve using the superposition principle along with some other tricks:
$$\ddot{x}\left(t\right)+2\dot{x}\left(t\right)+x\left(t\right)=t(h(t)-h(t-1))$$

Firstly, I considered the differential equation:
$$\ddot{x}\left(t\right)+2\dot{x}\left(t\right)+x\left(t\right)=t(h(t))$$ with zero initial conditions.
It has a solution in the form of:
$$ x\_1(t)=(2e^{-t}+te^{-t}+t-2)h(t)$$
The next step is to solve the differential equation$$\ddot{x}\left(t\right)+2\dot{x}\left(t\right)+x\left(t\right)=-t(h(t-1))$$ The initial conditions here ought to be $x(1^-)=x\_1(1^-)=0.1036$ and $\dot{x}(1^-)=\dot{x\_1}(1^-)=0.264$
Since "we are starting at $t=1$", the solution for the homogeneous part should be in the form of:
$$x\_{2h}=Ae^{-(t-1)}+B(t-1)e^{-(t-1)}$$ and we have one more solution in the form of $$x\_{2p}=Ct+D$$
Using the initial conditions for $t=1^-$, I arrive to the solution:
$$x\_2(t)=h(t-1)(-0.8964e^{-(t-1)}+0.3676(t-1)e^{-(t-1)}-t+2)$$
With the final solution being $x(t)=x\_1(t)+x\_2(t)$.
Here it is graphically shown, alongside with the system input as $0.5u(t)$:
[![Response of the system](https://i.stack.imgur.com/QNAHh.png)](https://i.stack.imgur.com/QNAHh.png)
I am sure there shouldn't be a discontinuity at $t=1$, from an engineering standpoint, the input suddenly vanishes, but the system gets an additional kick of energy. Makes no sense. I hope someone can point out where I made a mistake, assuming no numerical errors were made.