1

Can I use inverse of the same function when defining the function itself? For example

b[x_]:=1+Integrate[InverseFunction[b][a],{a,0,x}]
b[5]

Typing that in I get an error:

$RecursionLimit::reclim: Recursion depth of 256 exceeded.

A simpler example:

b[x_] := 1 + InverseFunction[b][x]
b[5]

also gives me the same error.

I understand that it has to do with the fact that a function has its own inverse in its definition, which is not easy to solve (maybe not possible?)

Could you please give me some advice on what to do in the case that I want to solve a problem of this type (my actual problem is more complicated, but I wanted to know on the simpler example).

Are there any other ways to get a solution for this type of problem?

duffymo
  • 305,152
  • 44
  • 369
  • 561
olga
  • 99
  • 9

1 Answers1

1

So, you can't refer to the inverse during function definition. One can easily construct cases where such a definition would be ambiguous. What you can do is analyze your function to come up with an equivalent explicit description. In your second example, the function

b[x_] := 1/2 + x

would satisfy the condition. I found that by visualizing the function in a graph, argument on the x axis and result on y. Then taking the inverse corresponds by a reflection in the line x=y. So if some point (x,y) belongs to your function, then so does (y,x+1). Do this repeatedly and you get a good idea of what the function can look like, at least if you assume it to be continuous.

Things will be more difficult for the first example with the integral, but if you need help there, better ask at the Math Stack Exchange because that's not about how to use Mathematica.

Community
  • 1
  • 1
MvG
  • 57,380
  • 22
  • 148
  • 276
  • Can you write a code to solve for the function b[x_] or for finding a solution to a particular number, like b[5]? – olga Jun 16 '14 at 20:36