I'm having trouble with the syntax to define an inverse function. I want to run the same routine but over different functional forms, so it is easier to define the function initially and not have to change it everywhere within the routine. Parts of the routine use the inverse function.
I define v[x_]:=x^.5
and v returns 3, and v[x] returns x^.5
I want to define h[•] to be the inverse function so that h returns 9 and h[v] returns v^2
But, h[x_]:=InverseFunction[v[x]] yields h returns InverseFunction
If I use h[x_]:=InverseFunction[v][x], then h returns v^(-1) and h[p] returns v^(-1)[p]. These should be 3^2 and p^2.
Ultimately, I need that in the routine, for NMinimize to work.
If I define h[x_] as above, then the output is the list of the objective function and constraints that include v^(-1)
If instead I use the inelegant, direct h[x_]:=x^2, then the routine returns the numerical solutions. This is what I want.
How do I get Mathematica to treat h[x_]:=InverseFunction[v] the same as if I had defined h[x_]:=x^2?