The following code works perfectly :
var('W1, W2, Ub, p')
a, x, y = SR.var('a,x,y')
W2=W
U(x)=x^a
assume(a, 'real')
assume(a, 'noninteger') # or alternatively 'integer'
assume(x, 'real')
assume(y, 'real')
assume(x > 0)
assume(y > 0)
U(x).substitute(x==y)
show(U(x))
V=solve(x == U(y), [y])[0].rhs().function(x)
show(V)
VV=((Ub-p*U(W2))/(1-p))^(1/a)
show(VV)
But now I want to be also able to attribute some values to the parameters and the variable to achieve an evaluation. I need the function and it's inverse. I have seen the methode lambda x
in the documentation but it's end with an error.