Problem defining a function via Step function and Dirac's Delta

90 Views Asked by At

First: I know Dirac's Delta isn't a function and hence shouldn't be treated like one. But this arose in a physics textbook so I'm looking for an answer that oversees that.

Consider the following function: $$f(x) = \begin{cases} \cos x , \quad \textrm{if} \quad -\pi/2 < x < \pi/2 \\ 0, \quad \textrm{otherwise} \end{cases}$$ And I want $f''(x)$. So I can just differentiate two times directly, to obtain: $$f(x) = \begin{cases} -\cos x , \quad \textrm{if} \quad -\pi/2 < x < \pi/2 \\ 0, \quad \textrm{otherwise} \end{cases}$$ However, if I decide to write: $$f(x) = H(-\pi/2)\cos x - H(\pi/2)\cos x$$ ($H(x)$ stands for Heaviside's step function). I can't differentiate twice. Moreover, if I decide to write: $$f'(x) = - H(-\pi/2)\sin x + H(\pi/2)\sin x$$ I'll obtain: $$f''(x) = -\delta(-\pi/2)\cos x + \delta(\pi/2)\cos x$$ However $$\int f''(x) dx = - \cos(-\pi/2) + \cos (\pi/2) = 0$$ Which also doesn't make sense. Now, for another problem (where the discotinuity at the first derivative occured in a point where $f(x) \neq 0$) the author used Dirac's Delta and Heaviside to obtain the derivative. But here he just claims that since $f(x) = f''(x) = 0$ at the end points, we shouldn't worry about the deltas and just differentiate directly (as I did) to obtain the correct expression. My question comes from the fact that I can seemingly define the function and it's first derivative in the three ways I did, and the three ways give me different expressions for the second derivative. Why?

1

There are 1 best solutions below

1
On BEST ANSWER

$H(\frac{\pi}{2})$ does not depend on $x$. It is not a function of $x$. It is a constant. And it should not become $\delta$ when taking the second derivative.

It also mean that your definition of $f$ is incorrect. Likely you intended

$$f(x) = H(x + \frac{\pi}{2}) \cos x - H(x - \frac{\pi}{2}) \cos x$$

Now you need to differentiate it.