0

in order to calculate the inverse function of f(x) I defined following function:

inv(fx):=exp▶list(solve(fx=y,x),x)

which output is:

inv(x^(2))           {piecewise(−√(y),y≥0),piecewise(√(y),y≥0)}


So that part works already, but how can I use this result as a callable function i(y)?

Thanks for your help

Bruno Zell
  • 7,761
  • 5
  • 38
  • 46

1 Answers1

0

Outside of your program, you can turn the result into function i(y) with:

i(y):=piecewise(-√(y),y≥0,√(y),y≥0)

I do not have a CAS, so your results may differ, but, because the function can only return one value, it would only return (and display in the graph) the first value, in this case, -√(y). If you want to display on the graph or get the values of both, you would be better off creating two separate functions (-√(y), and √(y)). Hope this helps you "use the result as a callable function."

Scott Mikutsky
  • 746
  • 7
  • 21