I have trouble to comprehend what my mistake is in the following calculation:
If we set $\sqrt{-1}$ to be the new number with the property that $(\sqrt{-1})^2 = -1$ then I can write $$\frac{1}{\sqrt{-1}}=\sqrt{\frac{1}{-1}}=\sqrt{-1}.$$
But we also have (and I know this is the correct result) $$ \frac{1}{\sqrt{-1}}\cdot\frac{\sqrt{-1}}{\sqrt{-1}}=\frac{\sqrt{-1}}{-1}=-\sqrt{-1}$$
What am I missing? Thanks.
The problem is due to the use of the same symbol $\sqrt{\cdot}$ with different meanings.
Let's separate the meanings by distinguishing:
$\sqrt[\text{real}]{\cdot}$ is an operator defined on non-negative real numbers, that associates to $x$ the unique non-negative real number $y$ such that $y \cdot y = x$;
$\sqrt[\text{new}]{-1}$ is a symbol used to indicate a new number, that satisfies the property $\sqrt[\text{new}]{-1}\cdot \sqrt[\text{new}]{-1} = -1$.
The first chain of equations you wrote translates to:
$$\displaystyle\frac{1}{\sqrt[\text{new}]{-1}}=\frac{\sqrt[\text{real}]{1}}{\sqrt[\text{new}]{-1}} \overset{!}{=} \frac{\sqrt[\text{real}]{1}}{\sqrt[\text{real}]{-1}} \overset{!}{=} \sqrt[\text{real}]{\frac{1}{-1}} \overset{!}{=} \sqrt[\text{real}]{-1},$$
but the steps marked with $\overset{!}{=}$ are not valid since $\sqrt[\text{real}]{-1}$ is not defined.