MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

Inverse of arbitrary functions

  • To: mathgroup at smc.vnet.net
  • Subject: [mg74497] Inverse of arbitrary functions
  • From: Dave Rudolf <dave.rudolf at usask.ca>
  • Date: Fri, 23 Mar 2007 19:06:35 -0500 (EST)
  • Organization: University of Saskatchewan

Hey all,

Is there some way to get Mathematica to find the symbolic inverse of a 
user-defined function? I know that I can use InverseFunction to find the 
inverse of simple functions, like so:

	InverseFunction[Log] -> Exp

However, I would like to do something like

	f[ x_ ] = x + sin[ x + cos[ x ] ]

	InverseFunction[ f ]

I did run across a similar newsgroup post that said to use the Solve 
function, like so:

	inverse[f_, x_] /; PolynomialQ[f, x] && Not[FreeQ[f, x]] :=
		 Module[{y}, Solve[f == y, x][[1, 1, 2]] /. y -> x]

However, it doesn't seem to work as is, and I don't understand the 
syntax of some of the stuff. Like, what's with the -> symbol? And \; for 
that matter?

Anyway, let me know if there is some other way to pull this off.

Thanks.

Dave


  • Prev by Date: Re: Advice for writing small Scheme interpreter
  • Next by Date: Re: Advice for writing small Scheme interpreter
  • Previous by thread: Re: Applying a list of functions to a single number
  • Next by thread: Re: Inverse of arbitrary functions