What is the Cubic Function that Passes Through Given Points?

  • Thread starter Thread starter Kstan333
  • Start date Start date
  • Tags Tags
    Cubic Functions
AI Thread Summary
To find the cubic function that passes through the points (-10,4), (-2,3), (-1,2), (0,1), and (7,0), it's important to note that a cubic function has four coefficients and requires only four points for a unique solution. With five points, a unique cubic may not exist, leading to the possibility of a fourth-degree polynomial instead. One suggested approach is to use the general form of a polynomial and generate equations based on the given points to solve for the coefficients. Another method discussed is the Lagrange polynomial, which constructs a polynomial that fits all points but typically results in a fourth-degree polynomial due to the number of points. The resulting polynomial can be graphed to visualize its fit to the original points.
Kstan333
Messages
3
Reaction score
0

Homework Statement



I have a line of a cubic function that passes through (-10,4), (-2,3), (-1,2), (0,1), (7,0). I must find the function of this line.

Homework Equations





The Attempt at a Solution


I know you can't see this but the line has a "S" curve to it. Making me assume that it is a cubic funtion.
 
Physics news on Phys.org
I need to find the function, using those points, that's all that is given.
 
I don't have an idea of how to solve it but if you look at just the y values what do you see?

Are you sure you aren't simply to find the line that best fits the points?
 
try starting with an equation of the form ax^4 + bx^3 + c^x2 + dx +e = y and generate a set of 5 equations in five unknowns using the the five points one by one.

So start with (0,1) and you get simply e=1 now proceed to find the other constants.
 
Notice that jedishrfu has a fourth degree polynomial, not a cubic. That is because a cubic, y= ax^3+ bx^2+ cx+ d has four coefficients which take four equations to determine. So there exist a unique cubic through any four given points. You give five points so there may not be such as cubic. Of course, if those points do lie on a cubic, you will find that the coefficient of x^4 is 0.

Another way to find the polynomial (though I really prefer jedishrfu's method) is the "Lagrange polynomial":
y(x)= 4\frac{(x+2)(x+1)(x)(x- 7)}{(-10+ 2)(-10+ 1)(-10)(-10- 7)}+ 3\frac{(x- 4)(x+ 1)(x)(x- 7)}{(-2+ 10)(-2+ 1)(-2)(-2- 7)}
+ 2\frac{(x+ 10)(x+ 2)(x)(x- 7)}{(-1+ 10)(-1+2)(-1)(-1-7)}+ 1\frac{(x+10)(x+2)(x+1)(x- 7)}{(0+10)(0+2)(0+1)(0-7)}+ 0\frac{(x+10)(x+2)(x+1)(x)}{(7+10)(7+2)(7+1)(7- 0)}

Do you see the idea? Each fraction has factors in the numerator of "x- " each x value except one. And the denominator has factors with that missing x value minus each of the other x values. If x is anyone of the given x values, every fraction except one will be 0 and then the fraction will be 1 so that we just have y value that was in front. And, of course, because there were five points, each fraction has 4 factors involving x and so this will, in general, be a fourth degree polynomial.
 
Last edited by a moderator:
Ignoring the point, (0,1), the 4 x 5 matrix can be made:
[-1000, 100, -10, 1, 4]
[-8, 4, -2, 1, 3]
[-1, 1, -1, 1, 2]
[343, 49, 7, 1, 0]

Using the online software www.math.purdue.edu/~dvb/matrix.html, the reduced row form is:
1, 0, 0, 0, 0.0106
0, 1, 0, 0, 0.0408
0, 0, 1, 0, -.9518
0, 0, 0, 1, 1.018

The apparent coefficients give an equation that can be run through google and graphed. The result is interesting. Just type in, "graph 0.0106x^3+0.0408x^2-0.9518x+1.018" and see the resulting graph. As you inspect the points, you see a near, not perfect, fit to the five original given points and there are three roots. They are nearly x=-12, x=1, and x=7. My efforts this way may have a mistake somewhere since those roots as binomial factors do not give the same or similar coefficient for the cubic term. Maybe this is off only by a constant value factor?
 
Back
Top