In Wikipedia the following generalisation of the Möbius inversion formula is given (and proved):
Suppose $F(x)$ and $G(x)$ are complex-valued functions defined on the interval $[1, ∞)$ such that $$G(x)=\sum_{1\le n\le x} F\left(\frac xn\right)$$ then $$F(x)=\sum_{1\le n\le x} \mu(n)G\left(\frac xn\right)$$
Let us consider $F(x) = \frac{2}{x} - 1$ and $G(x) = 1$, which (to my understanding) fulfil the requirements for the Möbius inversion formula application. It is easy to check that $$\sum_{1\le n\le x} F\left(\frac xn\right) =\sum_{1\le n\le x} \left(\frac{2n}{x} - 1\right) = \frac{2}{x}\sum_{1\le n\le x} n - \sum_{1\le n\le x} 1 = \frac{x^2+x}{x} - x = 1 = G(x)$$ and so, using the Möbius inversion formula, we have that $$\sum_{1\le n\le x} \mu(n) = \frac{2}{x} - 1$$ However, this last expression is clearly false. Where is the error?
Your statement that $$\sum_{1\leq n\leq x}n=\frac{x^2+x}2$$ is only true when $x$ is an integer.
But you need the equality for all real $x\geq1.$