I dont understand why the derivative of the squared Heavyside function is just $\delta(t)$ $$\begin{align*}g(t)&=\theta(t)^2 \\ g'(t) &= (\theta^2(t))'=(\theta(t))'=\delta(t)\end{align*}$$ in distributional sense.
I know that $(\theta(t))'=\delta(t)$ but I dont understand why $(\theta^2(t))'=(\theta(t))'$.
I thought that the derivative would be $$(\theta(t)^2)' = 2 \theta(t) \delta(t) =2 \theta(0) \delta(t) $$
Could you please explain that?
The Heavyside function $$ \theta(t) = \begin{cases} 0\quad \text{ if } t\le 0\\ 1\quad \text{ if }t>0. \end{cases} $$
There are a couple of things you should know about distributions.
Distributions are defined as linear functionals on a space of compactly supported and infinitely differentiable functions. When an ordinary function $f$ is treated as a distribution, it is by the mapping $\phi \mapsto \int_{-\infty}^{\infty} f(x)\,\phi(x)\,dx.$
Distributions do not have point-wise values. For example, what value you set $\theta(0)$ to doesn't matter. The integral above (with $f=\theta$) will not change value when $\theta(0)$ is changed.
In general, you cannot multiply distributions. For example, $\theta\delta$ isn't well-defined.