# Derivative form of a Step Function

I'm having some trouble understanding a equation in my Quantum Mechanics book.

I have a step function defined as $$\Psi(x) = \left\{ \begin{array}{ll} 0 & x< -a \\ N & -a\leq x< 0 \\ -N & 0\leq x < a \\ 0 & x \geq a \\ \end{array} \right.$$

The equation I'm struggling with is this:

$$\frac{d\Psi}{dx} = N \delta(x+a) -2N\delta(x) + N\delta(x-a)$$

I know that the derivative of the unit step function $$U(x)$$ is $$\delta(x)$$ but I don't see how to use this in the case of my step function (sorry for the dumb question)

$$\Psi(x)$$ can be written as $$N\,U(x+a) - 2N\,U(x) + N\,U(x-a).$$ The given derivative follows directly from this.