Inverting a function? f(y) instead of f(x)

  • Context: Undergrad 
  • Thread starter Thread starter iLIKEstuff
  • Start date Start date
  • Tags Tags
    Function
Click For Summary
SUMMARY

The discussion revolves around inverting a 7th-order polynomial function to calculate the difference in X for a given Y. The polynomial is expressed as y = f(x) = ax^7 + bx^6 + cx^5 + dx^4 + ex^3 + fx^2 + gx + h, with varying coefficients for two curves. The user successfully utilized eigenvalues to find the roots of the polynomial, allowing for the calculation of X values corresponding to given Y values. This approach leverages the inverse function theorem and the properties of polynomials to achieve the desired results.

PREREQUISITES
  • Understanding of polynomial functions and their properties
  • Familiarity with eigenvalues and eigenvectors
  • Knowledge of the inverse function theorem
  • Basic proficiency in MATLAB for numerical computations
NEXT STEPS
  • Explore MATLAB's symbolic toolbox for solving polynomial equations
  • Research the inverse function theorem in detail
  • Learn about numerical methods for root-finding, such as Newton's method
  • Investigate polynomial regression techniques for curve fitting
USEFUL FOR

Mathematicians, data scientists, and engineers working with polynomial functions and curve fitting, particularly those needing to analyze the relationship between X and Y values in complex datasets.

iLIKEstuff
Messages
24
Reaction score
0
I'm trying to compare two fitted curves by looking at the difference in x. Standard regression analysis tools always give you a delta Y (residual) and this is how the fit is done in the first place.

So I have the coefficients of each of the terms for my 7th-order polynomial. it's in the form

y = f(x) = ax^7 + bx^6 + cx^5 + dx^4 + ex^3 + fx^2 + gx + h

The two curves have slightly different coefficients. Now how do I invert this function to get an f(y) so that I can calculate the difference in X for a given Y?

This problem is easy for a simple function like y = f(x) = ax^2 then inverting it you get x = f(y) = \sqrt{y}/a for positive y-values.

Since I have the actual X and Y sets of values, I tried rotating the values 90 degrees (http://en.wikipedia.org/wiki/Rotation_matrix) and then looking at the delta Y, but the problem is the X values aren't the same anymore. Yes, a somewhat pointless attempt, but potentially serendipitous nonetheless.

I have the X and Y data and also have access to a basic PC with MATLAB for number crunching if needed.
Are there any clever tricks I can play to get the difference in X for a given Y? I'm sure I'm missing something here...
 
Last edited:
Physics news on Phys.org
Since polynomials are infinitely-differentiable, you can use the inverse function theorem to determine where/if a local or global inverse exists. For one, your function must be 1-1 and onto ℝ (which I assume is your codomain) for a global inverse to exist.

You may want to try 'solving for x' in your equation, see what you get.
 
Thanks for the help. I managed to figure it out using eigenvalues to find the roots and also the fact that I know roughly what the root should be (since my function is completely arbitrary). Basically I fed in the Y values for both equations, then solved each one for X by finding the eigenvalues. Since I know the X for one set isn't too far off from the X in the other set, I can reject all complex roots and roots that are way off.
 

Similar threads

  • · Replies 12 ·
Replies
12
Views
1K
  • · Replies 17 ·
Replies
17
Views
3K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 5 ·
Replies
5
Views
1K
  • · Replies 26 ·
Replies
26
Views
1K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 8 ·
Replies
8
Views
944
  • · Replies 13 ·
Replies
13
Views
1K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 15 ·
Replies
15
Views
2K