Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

This cas is especially simple:

sage: f(x)=2*x-1
sage: var("y")
sage: solve(f(x)==y,x)
[x == 1/2*y + 1/2]
sage: f_1(y)=solve(f(x)==y,x)[0]; f_1
y |--> x == 1/2*y + 1/2

Other cases may be more problematic (the equation may have more than one solution, or no solution at all, or sotutions that solve isn't able to find). But this is a start.