How can I find the inverse function for a given approximation?

In summary, Theia was trying to find an inverse for a function that is smooth near a -0.086 +/- 0.01, but wasn't sure how to do it. She tried some numerical methods, but found them unconvincing. She then considered other methods, such as writing the inverse in terms of power series, but ultimately decided to try another approach.
  • #1
Theia
122
1
Hello all

I was doing some approximation to solve another problem, but got stuck when trying to figure out a suitable inverse functions for this:

\(\displaystyle a = \frac{\cos x}{3x^2 - \pi^2}\), where \(\displaystyle 0 \le x \le \pi\).

What I need is the two functions \(\displaystyle x(a)\) at least near \(\displaystyle a \approx -0.086 \pm 0.01\) but I'm not quite sure how to do it well.

Thus far I tried some sort of numerical way, meaning that I put \(\displaystyle a = \) something and made a table of the results, then tried to fit some sort of simple polynomial (quadratic and cubic), but the results were not very convincing. So now I'm wondering should I still continue playing with the numerics and try to find some good function shape to fit, or should I try some other way, e.g. write the functions \(\displaystyle x(a)\) in terms of power serie. :confused:

Thank you!
 
Mathematics news on Phys.org
  • #2
Theia said:
Hello all

I was doing some approximation to solve another problem, but got stuck when trying to figure out a suitable inverse functions for this:

\(\displaystyle a = \frac{\cos x}{3x^2 - \pi^2}\), where \(\displaystyle 0 \le x \le \pi\).

What I need is the two functions \(\displaystyle x(a)\) at least near \(\displaystyle a \approx -0.086 \pm 0.01\) but I'm not quite sure how to do it well.

Thus far I tried some sort of numerical way, meaning that I put \(\displaystyle a = \) something and made a table of the results, then tried to fit some sort of simple polynomial (quadratic and cubic), but the results were not very convincing. So now I'm wondering should I still continue playing with the numerics and try to find some good function shape to fit, or should I try some other way, e.g. write the functions \(\displaystyle x(a)\) in terms of power serie. :confused:

Thank you!

Hey Theia! ;)

The first notion that springs to my mind is to apply Newton-Raphson.

What are you thinking btw with "two" functions?
The graph is smooth near \(\displaystyle a \approx -0.086 \pm 0.01\).

To apply Newton-Raphson, we can for instance define:
$$f(x) = a(3x^2-\pi^2) - \cos(x)$$
To find the inverse $x(a)$, we can now apply:
$$x_{k+1} = x_k - \frac{f(x_k)}{f'(x_k)} = x_k - \frac{a(3x_k^2 - \pi^2) - \cos x_k}{6ax_k + \sin x_k}$$
 
  • #3
I like Serena said:
Hey Theia! ;)

The first notion that springs to my mind is to apply Newton-Raphson.

What are you thinking btw with "two" functions?
The graph is smooth near \(\displaystyle a \approx -0.086 \pm 0.01\).

To apply Newton-Raphson, we can for instance define:
$$f(x) = a(3x^2-\pi^2) - \cos(x)$$
To find the inverse $x(a)$, we can now apply:
$$x_{k+1} = x_k - \frac{f(x_k)}{f'(x_k)} = x_k - \frac{a(3x_k^2 - \pi^2) - \cos x_k}{6ax_k + \sin x_k}$$

Thank you for your reply. And thank you for reminding me that method. I think I've even used it in some problem but it seems I simply can't remember all usefull things... *oops*

As for your question why two functions, there are two distinct inverse functions for \(\displaystyle a \approx -0.086 \pm 0.01\) because the original function is not a bijection in that region. Somewhat similar situation as in case of inverting \(\displaystyle y = x^2\), but not as simple as that one.
 
  • #4
Theia said:
Thank you for your reply. And thank you for reminding me that method. I think I've even used it in some problem but it seems I simply can't remember all usefull things... *oops*

That's why we have sites like MHB to remind us of the things we're not thinking of, or even worse, have forgotten. ;)

As for your question why two functions, there are two distinct inverse functions for \(\displaystyle a \approx -0.086 \pm 0.01\) because the original function is not a bijection in that region. Somewhat similar situation as in case of inverting \(\displaystyle y = x^2\), but not as simple as that one.

Ah, of course. (Nod)
If we pick a negative initial value, say $x_0=-1$, for Newton-Raphson, we'll get the one, and with $x_0=+1$ we'll get the other.Oh, oh, and now that we have TikZ pictures, here's how the graph looks - just because we can:
\begin{tikzpicture}
%preamble \usepackage{pgfplots}
\begin{axis}[xmin=-1.5,xmax=1.5,samples=101]
\addplot[blue, ultra thick] (x,{cos(deg(x)) / (3*x*x - 10)});
\end{axis}
\end{tikzpicture}
 

FAQ: How can I find the inverse function for a given approximation?

What is an inverse function?

An inverse function is a mathematical concept where the input and output values of a function are swapped. In other words, if a function takes an input x and produces an output y, its inverse function will take y as an input and produce x as the output.

How do you find the inverse of a function?

To find the inverse of a function, you must first solve for the input variable in terms of the output variable. This can be done by rearranging the original function's equation to isolate the input variable on one side. The resulting equation will be the inverse function.

What is the symbol for an inverse function?

The symbol for an inverse function is f-1, where f is the original function. This notation indicates that the function is the inverse of the original function f.

What is the domain and range of an inverse function?

The domain of an inverse function is the range of the original function, and the range of an inverse function is the domain of the original function. This is because the input and output values are swapped in the inverse function.

Can every function have an inverse?

No, not every function has an inverse. For a function to have an inverse, it must pass the horizontal line test, meaning that each horizontal line only touches the graph of the function once. If a function fails this test, it does not have an inverse.

Similar threads

Back
Top