MathGroup Archive 2000

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

Search the Archive

Re: Finding the inverse of a function?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg24210] Re: [mg24193] Finding the inverse of a function?
  • From: BobHanlon at aol.com
  • Date: Fri, 30 Jun 2000 01:57:38 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

In a message dated 6/28/2000 11:00:33 PM, heathw at in-tch.com writes:

>Is there some way to make Mathematica find the inverse of a user defined
>function? I read the Mathematica Book and found InverseFunction[ ] but
>it will only show the inverse of a Mathematica function. I would like to
>be able to find the inverse of polynomials.
>

f[x_] := Evaluate[Expand[
      (x - 3)(2x + 4)(7x - 2)(x - 12)x(17x + 33)]]

The inverse of f is

g[y_] := (x /. NSolve[f[x] == y, x])

f /@ g[0] // Chop

{0, 0, 0, 0, 0, 0}

f /@ g[5]

{5.000000000003638, 5.000000000007276, 5., 
  5.000000000000307, 4.999999999941792, 5.}

For some functions, FindRoot might work better.


Bob Hanlon


  • Prev by Date: mathlink problems
  • Next by Date: Re: Finding the inverse of a function?
  • Previous by thread: Re: Finding the inverse of a function?
  • Next by thread: Re: Finding the inverse of a function?