0

The function $y=\cos x+x$ passes the horizontal lines test, so it should have an inverse. But a quick Google search tells you that while such a function does exist it cannot be defined in elementary terms.

Is it possible to approximate an inverse function? Is doing so ever practical?

Nick
  • 1,231
  • If you only need an inverse on a particular interval, you could generate a polynomial function describing the inverse. There is no closed form unfortunately – imranfat Jan 09 '20 at 15:07
  • Approximating is always possible. But your question is too vague to admit of an answer. Exactly what kind of approximation are you looking for? – TonyK Jan 09 '20 at 15:08
  • Here's a question about a (rather famous) very similar function: https://math.stackexchange.com/questions/1053472/how-to-solve-keplers-equation-m-e-varepsilon-sin-e-for-e – Hans Lundmark Jan 09 '20 at 15:18

3 Answers3

0

You can use Numerical Analysis to invert by finding the solutions of $y = x + \cos x$ using Bisection or Newton's Method.

Another approach is when you need an approximation locally, fit a polynomial there or something like a spline.

gt6989b
  • 54,422
0

There are several methods like bisection method, secant method, Muller's method, Newton's method, false position method.

as @gt6989b mentioned if you need an approximation locally then you can use some polynomial interpolations like polynomial interpolation in the Lagrange form or in the Newton form.

0

In the case of your example $f(x):=x+\cos x$ you can make use of the periodicity of $\cos$. Note that $$f(x+2\pi)=f(x)+2\pi\qquad(-\infty<x<\infty)\ .\tag{1}$$ Assume that you have worked out a decent approximation $g$ of $f^{-1}$ in the interval $[f(0),2\pi]$: $$g:\quad \bigl[f(0),f(2\pi)]\to[0,2\pi],\quad y\mapsto g(y)\ ,$$ say a polynomial in $y$. This means that $$g: \quad[1,2\pi +1]\to[0, 2\pi]\ ,$$ and $$g\bigl(f(x)\bigr)\approx x\qquad(0\leq x\leq 2\pi)\ .$$ You are satisfied with the precision; in particular $g\bigl(1\bigr)=0$ and $g(2\pi+1)=2\pi$.

For an arbitrary $y\in{\mathbb R}$ let $k_y:=\bigl\lfloor{y\over2\pi}\bigr\rfloor$. As a consequence of $(1)$ you then have the approximation $$f^{-1}(y)\approx g(y-2\pi k_y)+2\pi k_y\qquad(-\infty<y<\infty)\ .$$