In school I was taught that we use $\frac{du}{dx}$ as a notation for the first derivative of a function $u(x)$. I was also told that we could use the $d$ just like any variable.
After some time we were given the notation for the second derivative and it was explained as follows:
$$ \frac{d(\frac{du}{dx})}{dx} = \frac{d^2 u}{dx^2} $$
What I do not get here is, if we can use the $d$ as any variable, I would get the following result:
$$ \frac{d(\frac{du}{dx})}{dx} =\frac{ddu}{dx\,dx} = \frac{d^2 u}{d^2 x^2} $$
Apparently it is not the same as the notation we were given. A $d$ is missing.
I have done some research on this and found some vague comments about "There are reasons for that, but you do not need to know..." or "That is mainly a notation issue, but you do not need to know further."
So what I am asking for is: Is this really just a notation thing? If so, does this mean we can actually NOT use d like a variable? If not, where does the $d$ go?
I found this related question, but it does not really answer my specific question. So I would not see it as a duplicate, but correct me if my search has not been sufficient and there indeed is a similar question out there already.
dx
is "in parentheses", so to speak. $\endgroup$