Write a formula for a piecewise function that contains a single separate point using Heaviside function

dirac deltadistribution-theorypiecewise-continuitystep function

Here and here I saw how to rewrite a piecewise function using the Heaviside function. Thus, if I a have a function that looks like this:

enter image description here

I can write it down as:
$$y(t) = 1 \cdot [H(t) – H(t-1)] + 2 \cdot [H(t-1)]$$

QUESTION: if I have a piecewise function that look like this:

enter image description here

then how do I write it down using the Heaviside function?


My discussion looks like the following.

I don't see a way to use the Heaviside function to represent a single point. Therefore, I checked if there are functions out there that can represent a single point. The closest I could find was Kronecker delta. I decided that Kronecker delta wasn't a good fit because, first, it can take only two arguments, second, we normally use it with natural numbers only. Therefore, I decided that I had to introduce a function similar to the Heaviside function but that looks like this:

enter image description here

where $\epsilon \rightarrow 0$.

Then I write down my piecewise function as:

$$y(t) = 1 \cdot [H(t) – H(t-1)] + 2 \cdot [H(t-1)] + 3 \cdot [S(t-1)]$$

Then I want to take a derivative of that expression. I know that distributional derivative of the Heaviside function is the Dirac delta function. I have to find out the distributional derivative of my $S(t)$ function. To do that, I make use of the procedure of proving that the Dirac delta function is the distributional derivative of the Heaviside function. That procedure makes use of the fact that the Heaviside function $H(t)$ is constant on the interval $[0, \infty )$ and one can take it out from the integral. But my function $S(t)$ is also constant on the interval $(-\epsilon, \epsilon )$ and I can also take it out from the integral. Therefore, I conclude that the distributional derivative of my $S(t)$ function is the Dirac delta function as well and I'm good to go. That works, of course, for test functions only.

Is that correct?

Disclaimer: honestly speaking, it feels to me like I'm doing some inappropriate things to mathematics here …


ANSWER

Thank you very much to Thomas Andrews and Paul Garrett for the solutions they provided!

Briefly: one can use either multiplication or addition/subtraction to manipulate the Heaviside function in order to get it nonzero only at one point.
Let's says we use Paul Garrett's solution: $H(x) \cdot H(-x)$. We can pick any non-zero $x$ and get zero. For instance, if $x=5$, then $H(5) \cdot H(-5) = 1 \cdot 0 = 0$. But if I pick $x=0$ and if I assign $H(0) = 1$, then $H(x) \cdot H(-x) = H(0) \cdot H(0) = 1 \cdot 1 = 1$.
The same holds true for Thomas Andrews' solution. For $x=0$ we have: $H(x) + H(-x) – 1 = H(0) + H(0) – 1 = 1 + 1 – 1 = 1$. And for any non-zero $x$, say $x=5$, we have: $H(x) + H(-x) – 1 = H(5) + H(-5) – 1 = 1 + 0 – 1 = 0$.

Also, definitely check Steven Clark's solution in the comment below. That is the solution for the entire function, not just for $y=3$.

Best Answer

Assuming $H(0)=1,$ then you can use $$P(x)=H(x)+H(-x)-1=\begin{cases}1&x=0\\0&x\neq0\end{cases}$$ to adjust individual points.

So adding $g(x)=f(x)+aP(x-b)$ will give $g(x)=f(x)$ when $x\neq b,$ and $g(b)=f(b)+a.$

What you can’t get is a constant function with linear combinations of Heavyside functions. The functions $c(x)=1$ and $f_a(x)=H(x-a),g_{a}(x)=H(a-x),$ $a\in \mathbb R,$ are linearly independent.

Related Question