1 | initial version |
Initial question :
sage: with assuming(a,"noninteger"):(xsn==prod).solve(p_x)
[p_x == c^(1/(a + 1))]
Second question :
sage: with assuming(x>0, a,"noninteger"):
....: fp_x(x)=(x==(1/p_x)^a).solve(p_x)[0].rhs()
....:
sage: fp_x
x |--> 1/(x^(1/a))
A generic solution to this second question raises a lot of questions :
Is f
an expression or a callable expression ?
What is the relevant argument ?
What are the necessary assumptions ?
And there are probably others...
Generic notes :
You should lighten and densify your notations (e. g. var("x, y") ; assume (x, "real") ; assume(x>0) ; assume(y, "real") ; assume (y>0)
can be lightened into var("x,y", domain="positive")
.
You should distinguish what you want to use as expressions and what you deem functions, distinguishing further arguments and parameters in the latter case...
Learn Python ; learn Sage (a sound time investment, in both cases...). But I repeat myself...