PDA

View Full Version : How do you find the equation of a Cubic function given 5 points? (no zeros)?


srizen
Jan8-12, 01:00 PM
1. The problem statement, all variables and given/known data

what the questions asks is that i need to find the equation of a polynomial with these given points:
1,1
2,-3
3,5
4,37
5,105


i know that one way to solve is by creating 5 equations then solve for ax^3+bx^2+cx+d using the elimination/substitution method.
however is there another, much easier way of doing this question?

2. Relevant equations

ax^3+bx^2+cx+d

3. The attempt at a solution

1= a+b+c+d
-3=8a+4b+2c+d
5= 27a+9b+3c+d
37=64a+16b+4c+d
108=125a+25b+5c+d

fixed, yes, my mistake

eumyang
Jan8-12, 01:08 PM
1= a+b+c+d
-3=8a+4b+3c+d
5= 64a+16b+5c+d
37=64a+16b+5c+d
108=125a+25b+5c+d
Three of the equations are wrong. They should be
1= a+b+c+d
-3=8a+4b+2c+d
5= 27a+9b+3c+d
37=64a+16b+4c+d
108=125a+25b+5c+d

Also, you don't need the last equation, because there are 4 unknowns.

As for other methods, there's the finite difference method, but I don't think it will help for this particular problem (because you already told us that this is a cubic).

srizen
Jan8-12, 01:11 PM
Three of the equations are wrong. They should be
1= a+b+c+d
-3=8a+4b+2c+d
5= 27a+9b+3c+d
37=64a+16b+4c+d
108=125a+25b+5c+d

fixed, i typed the equations too fast

SammyS
Jan8-12, 05:06 PM
...

As for other methods, there's the finite difference method, but I don't think it will help for this particular problem (because you already told us that this is a cubic).
True, but I got the coefficients fairly quickly using a difference method.

Actually, after playing around a bit with this, I got the result with two different difference methods.

srizen
Jan8-12, 06:29 PM
True, but I got the coefficients fairly quickly using a difference method.

Actually, after playing around a bit with this, I got the result with two different difference methods.

what exactly is the difference method?
i ask because i've tried this question, and i kept getting it wrong.

eumyang
Jan8-12, 10:30 PM
what exactly is the difference method?
i ask because i've tried this question, and i kept getting it wrong.
A couple of results from searching via Google:
http://www.jimloy.com/algebra/finite.htm
http://www.math-mate.com/chapter37.shtml

SammyS
Jan8-12, 11:09 PM
what exactly is the difference method?
i ask because I've tried this question, and i kept getting it wrong.

Make a table of differences

\begin{array}{|c|c|c|c|c|c|c|c|c|} \hline
\quad i \quad & \quad x_i \quad & \quad f(x_i) \quad &\quad (\Delta^1)_i \quad &\quad (\Delta^2)_i \quad & \quad (\Delta^3)_i \quad & \quad (\Delta^4)_i \quad \\
\hline
& & & & & & \\
1 & 1 & 1 & -4 & 12 & 12 & 0 \\
& & & & & & \\
2 & 2 & -3 & 8 & 24 & & -- \\
& & & & & & \\
3 & 3 & 5 & & & -- & -- \\
& & & & & & \\
4 & 4 & 37 & & -- & -- & -- \\
& & & & & & \\
5 &5 & 105 & -- & -- & -- & -- \\
& & & & & & \\
\hline \end{array}

Where: (\Delta^1)_i=f(x_{i+1})-f(x_{i})\,,

(\Delta^2)_i=(\Delta^1)_{i+1}-(\Delta^1)_i

etc.

See if you can fill in the rest.

If f(x) is truly a cubic function then the Δ3 column will all be the same.

Fill out a similar Table for g(x) = x3 . The Δ3 column will all be 6's.

What do you suppose that means about the x3 coefficient of f(x) ?

srizen
Jan9-12, 12:06 PM
Make a table of differences

\begin{array}{|c|c|c|c|c|c|c|c|c|} \hline
\quad i \quad & \quad x_i \quad & \quad f(x_i) \quad &\quad (\Delta^1)_i \quad &\quad (\Delta^2)_i \quad & \quad (\Delta^3)_i \quad & \quad (\Delta^4)_i \quad \\
\hline
& & & & & & \\
1 & 1 & 1 & -4 & 12 & 12 & 0 \\
& & & & & & \\
2 & 2 & -3 & 8 & 24 & & -- \\
& & & & & & \\
3 & 3 & 5 & & & -- & -- \\
& & & & & & \\
4 & 4 & 37 & & -- & -- & -- \\
& & & & & & \\
5 &5 & 105 & -- & -- & -- & -- \\
& & & & & & \\
\hline \end{array}

Where: (\Delta^1)_i=f(x_{i+1})-f(x_{i})\,,

(\Delta^2)_i=(\Delta^1)_{i+1}-(\Delta^1)_i

etc.

See if you can fill in the rest.

If f(x) is truly a cubic function then the Δ3 column will all be the same.

Fill out a similar Table for g(x) = x3 . The Δ3 column will all be 6's.

What do you suppose that means about the x3 coefficient of f(x) ?

OMG! i love you forever, i had no idea this method existed, i already solved through almost an hour of writing matrices, with this i solved it in 3 minutes. thank you!