Finding the derivative of a piecewise constant function

24 Views Asked by At

After reading this post, I realized that an earlier post on this problem may be wrongly answered and replied to.

So we need to find the derivative of the given function:

\begin{equation} f(x)= \begin{cases}1 \ \ \ \ \ x\in[0,1] \\ 0 \ \ \ \ \ \ x\not\in[0,1] \end{cases} \end{equation}

We use the formula from this post:

$$(f',\phi) = -(f,\phi') = -\int_\mathbb{R} f\phi' dx = -\int_{-\infty}^{x_1}f\phi' dx - \int_{x_1}^{x_2}f\phi' dx - \cdots -\int_{x_m}^{\infty}f\phi' dx $$

where $x_1=0$ and $x_2=1$, hence we obtain

$$(f',\phi) = -(f,\phi') = -\int_\mathbb{R} f\phi' dx = -\int_{-\infty}^{0}f\phi' dx - \int_{0}^{1}f\phi' dx - \int_{1}^{\infty}f\phi' dx $$

Now using integration by parts for each term, we get:

$$(f',\phi)=\int_{-\infty}^{\infty} \frac{df}{dx}\phi(x) dx + \sum_{j=1}^m [f(x_{j^+})-f(x{_j^-})]\phi(x_j)=$$

We have that $m=2$ so we obtain $$=\int_{-\infty}^{\infty}\frac{df}{dx}\phi(x) dx + [f(x{_1^+})-f(x{_1^-})]\phi(x_1)+ [f(x{_2^+})-f(x{_2^-})]\phi(x_2)$$ which is $$=\int_{-\infty}^{\infty}\frac{df}{dx}\phi(x) dx + [f(0^+)-f(0^-)]\phi(0)+ [f(1^+)-f(1^-)]\phi(1)$$

which gives $$(f',\phi)=\int_{-\infty}^{\infty}\frac{df}{dx}\phi(x) dx + \delta(x)+ \delta(1)$$

However, the results is strange. The LHS term is the same as the first term on the RHS side. So this did not end well, I think. Any ideas appreciated!

Thanks!

Related Questions in DERIVATIVES-OF-PIECEWISE-FUNCTIONS