Why is a secondary derivative denominator wrote as dx^2 instead of (dx)^2 or d^2 x^2

If the secondary derivative is found by (d / dx) (dy / dx) surely in the denominator, since it is dx and dx, you would get (dx)2, not just the x2