# Integrating with dirac delta

I am curious about the dirac delta functions that represent the jumps in the following function.

$$f(x) = \left\{ \begin{array}{lr} \frac{3}{2} & : x \in (-\infty,-2]\\ 0 & : x \in (-2,-1)\\ \frac{3}{2} & : x \in [-1,0)\\ -\frac{3}{2} & : x \in [0,1]\\ 0 & : x\in(1,\infty) \end{array} \right.$$

Would the jump at $-2$ be represented by $\frac{3}{2}\delta(x+2)$? Would it be positive or negative? In other words, do we see the jump as going down from $\frac{3}{2}$ to $0$ or up from $0$ to $\frac{3}{2}$?

How would we view the jump from $\frac{3}{2}$ to $-\frac{3}{2}$ at $0$?

-

What you're really after is the step function, $$H(x) = \begin{cases} 0 & x<0 \\\\ 1 & x\geq0. \end{cases}$$ In which case you could write $g(x)=\frac32H(-2-x)-\frac32H(x-1)$ for $$g(x) = \begin{cases} \frac32 & x\leq-2 \\\\ 0 & 2<x<1 \\\\ -\frac32 & 1\leq x, \end{cases}$$ for example. Here are two ways of thinking about the step function $H$.
As hinted in your original question, the distributional derivative of the Heaviside step function is the delta function. That is, $H'(x)=\delta(x)$. This is a way to formalize the geometric "jumping" intuition you observed. So while your original function $f$ is not a linear combination of delta functions, it's distributional derivative is.
A much more widely-used concept is that of an indicator or characteristic function. Considering $A=[0,\infty)$ be a subset of $\mathbb{R}$, then we can write $\chi_A(x)=H(x)$. In general, we can let $A$ be a subset of any set $X$ and define, $$\chi_A(x) = \begin{cases} 1 & x \in A \\\\ 0 & x \notin A. \end{cases}$$ Basically, this function answers the question, "is $x$ an element of the subset $A$ of $X$?" So we could write the function $g$ as $\frac32\chi_A-\frac32\chi_B$ where $A=(-\infty,-2]$ and $B=[1,\infty)$ are subsets of $\mathbb{R}$.
Hopefully this discussion gives you a few ways of thinking about your original function $f$.