My goal it to get inverse of x^2 for positive x. But the result shows always minus -Sqrt[y]. How to correct
u[x_] := x ^2
$Assumptions = x > 0;
Refine[InverseFunction[u][y], y \[Element] Reals]
I have tried this code also but is also shows -Sqrt[y].
Refine[x /. Solve[y == u[x], x][[1]], y \[Element] Reals]
Clear["Global*`"]; u[x_] := x^2; Assuming[y > 0, x /. Solve[{u[x] == y, x > 0}, x][[1]]]
$\endgroup$