Why is there a $δ(t − 2)$ in this equation for $y''(t)$ involving a step function? \begin{align*}
y(t) &= e^{2t} - e^t + \big(e^{2(t - 2)} - e^{t - 2}\big) u(t - 2), \\
y'(t) &= 2e^{2t} - e^t + \big(2e^{2(t - 2)} - e^{t - 2}\big) u(t - 2), \\
y''(t) &= 4e^{2t} - e^t + \big(4e^{2(t - 2)} - e^{t - 2}\big) u(t - 2) + \delta(t - 2).
\end{align*}
Why is there a $\delta(t − 2)$ in the equation for $y''(t)$? In which $u$ is the unit step function. When $y'(t)$ is calculated there's no $\delta(t − 2)$ added, why do you need to add an $\delta(t − 2)$ for $y''(t)$?
 A: First: my background is physics, so this will be characteristically unrigorous.
Three important facts:


*

*$\delta(u)$ is the derivative of $u(t)$ in the sense that
\begin{align}
u(t) = \int_{-\infty}^t \delta(s) ds.
\end{align}

*The derivative of $\delta(t)$ satisfies $\delta(t) = - t \delta(t)$. (This can be demonstrated with integration by parts.)

*The Dirac delta $\delta(t-a)$ is zero everywhere except at $t=a$, so $f(t)\delta(t-a)=f(a) \delta(t-a)$ ... the $\delta$ pulls out one particular function value.


Step 1: Let's write your $y(t)$ as
\begin{align}
y(t) =  e^{2 t}-e^t + f(t) u(t-2)
\end{align}
Step 2: Then using fact 1:
\begin{align}
y'(t) = 2 e^{2 t} -e^t + \delta (t-2) f(t) + \theta (t-2) f'(t)
\end{align}
(Do not use Fact 3 to simplify $f(t)\delta(t-2)$ term yet.)
Step 3: Differentiating again:
\begin{align}
y''(t) =4 e^{2 t} -e^t + 2 \delta (t-2) f'(t) + \delta'(t-2) f(t) + \theta (t-2) f''(t)
\end{align}
Step 4a: Near $t=2$, $f(t) \approx t-2$ (do a Taylor approx). So it seems safe to replace $\delta' (t-2) f(t)$ by $\delta' (t-2) (t-2)$:
\begin{align}
y''(t) =4 e^{2 t} -e^t + 2 \delta (t-2) f'(t) + \delta'(t-2) (t-2) + \theta (t-2) f''(t)
\end{align}
Step 4b: Now use Fact 2 above to replace $\delta'(t-2) (t-2)$ by $-\delta(t-2)$:
\begin{align}
y''(t) =4 e^{2 t} -e^t + 2 \delta (t-2) f'(t) - \delta(t-2) + \theta (t-2) f''(t)
\end{align}
Step 5: Now that we're done differentiating, let's clean things up with Fact 3. Since $f'(2)=1$, we get:
\begin{align}
y''(t) = & 4 e^{2 t} -e^t + 2 \delta (t-2) - \delta(t-2) + \theta (t-2) f''(t)\\
= & 4 e^{2 t} -e^t +  \delta (t-2) + \theta (t-2) f''(t)
\end{align}
Which is the second derivative that you stated. 

Again, my background is physics, and I do not have a super rigorous knowledge of delta distributions. I suspect all the equalities above really only hold underneath integral signs ... or something.
In particular, I'd be interested if someone could comment on why using Fact 3 to simplify in the second step will eventually give us the wrong answer. 
