Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

let be the equation $ y-f(x)=0 $ the idea is to get $ s=g(y) $ that is x as a function of 'y'

can this be made by a root finding algorithm ?? i mean you treat $ y $ as a numerical free parameter and find the roots of $ y-f(x)=0 $ in general these roots will depend on 'y' so we can represent every solution of $ y-f(x) $ for different parameters of 'y'

for example in Newton's method

$ x_{n+1} (y)=x_{n} (y)- \frac{y-f(x)}{-f'(x)} $

share|improve this question
    
It's certainly doable, but your problem is to find a good starting point for your iterative method... –  J. M. Jul 28 '12 at 11:01
2  
You are absolutely right, indeed historically right. Newton derives the expansion of $\sin x$ precisely by this method of reversion of series. I read the original paper. Newton uses a numerical root-finding procedure as a mere example to illustrate what he is doing, and actually shows no interest in using the idea for numerical work! That came later, and was not done by Newton. –  André Nicolas Jul 28 '12 at 11:05
    
OK thanks, we could use a bisection method and then a newton method to imporve the convergence :) –  Jose Garcia Jul 28 '12 at 11:29
    
@JoseGarcia : See Brent's method for improved convergence if Newton fails (i.e. if the derivative is too small). –  vanna Aug 27 '12 at 17:16
    
thanks a lot vanna :D –  Jose Garcia Aug 27 '12 at 19:37

2 Answers 2

up vote 2 down vote accepted

The inverse of a single-variable function is a reflection over the line $y = x$. If you want the numerical inverse, just flip the coordinates. For example,

Function:

y = f(x);
plot(x,y);

Inverse

y = f(x);
plot(y,x);
share|improve this answer

If you are interested in getting the values of $x$, given the value of $y$ then your method works fine.

On the other hand if you are interested in obtaining a closed form expression of $x$ in terms of $y$ (treating $x$ and $y$ as symbol parameters) then the problem boils down to computing $f^{-1}$, given $f$ because $y=f(x)\Rightarrow x=f^{-1}(y)$. Now for different $f$, algorithms for computing $f^{-1}$ are different, like if $f$ is linear then the problem boils down to the inversion of a matrix.

share|improve this answer
    
Though, as André notes in his comment, one could use Newton's method to derive a series expansion for the inverse function... –  J. M. Jul 28 '12 at 11:40

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.