Find Cubic Equation from Four Points?

Click For Summary
SUMMARY

This discussion focuses on deriving a cubic equation from four given points: (0,2.7), (0.5, 2.9), (1,3.2), and (1.9, 3.4). The user successfully calculated the cubic polynomial using Excel's least squares method, resulting in the equation: -0.24728x^3 + 0.57093x^2 + 0.17636x + 2.7. Additionally, the Lagrange polynomial method was discussed as a straightforward alternative, yielding a polynomial expression based on the four data points. The discussion emphasizes solving a system of equations to determine the coefficients of the cubic function.

PREREQUISITES
  • Understanding of cubic equations and polynomial functions
  • Familiarity with the least squares method for curve fitting
  • Knowledge of Lagrange polynomials for interpolation
  • Basic algebra for solving systems of equations
NEXT STEPS
  • Learn about the least squares method in Excel for curve fitting
  • Study Lagrange interpolation and its applications in polynomial fitting
  • Explore systems of equations and methods for solving them
  • Investigate cubic spline interpolation for more complex data sets
USEFUL FOR

Mathematicians, data analysts, engineers, and anyone involved in curve fitting or polynomial interpolation tasks.

dionwaiters
Messages
1
Reaction score
0
I am working on finding the area of a solid object. I have 4 points that I need to calculate a cubic equation from. I have tried relentlessly but to no avail I always get the wrong answer.

The four points are;(0,2.7) (0.5, 2.9) (1,3.2) (1.9, 3.4)

Using excel, the formula should be; -0.24728x^3 + 0.57093x^2 + 0.17636x + 2.7

If anyone can provide working out on how you got the equation it would be much obliged! No matrices please just substitution.
 
Mathematics news on Phys.org
Excel does that by the least squares method:

http://en.wikipedia.org/wiki/Least_squares

It reduces to the solution of a linear system.

Another way to proceed for your specific problem is based on the Lagrange polynomials:

http://en.wikipedia.org/wiki/Lagrange_polynomial

This is a very simple method. It is applicable only because you have 4 data and 4 unknowns.
In your case, this gives the following polynomial:

P(x) =
2.7 ((x-0.5)(x-1)(x-1.9)) / ((0-0.5)(0-1)(0-1.9)) +
2.9 ((x-0)(x-1)(x-1.9)) / ((0.5-0)(0.5-1)(0.5-1.9)) +
3.2 ((x-0)(x-0.5)(x-1.9)) / ((1-0)(1-0.5)(1-1.9)) +
3.4 ((x-0)(x-0.5)(x-1)) / ((1.9-0)(1.9-0.5)(1.9-1))

=
(32319 + 2111 x + 6834 x^2 - 2960 x^3)/11970
 
Here's another way to do that: a cubic function can be written in the form [itex]y= ax^3+ bx^2+ cx+ d[/itex] and determining the function means determining the four values of a, b, c, and d. Setting x and y equal to their values in those four points gives four equations:
[itex]d= 2.7[/itex]
[itex]0.125a+ .25b+ .5c+ d= 2.9[/itex]
[itex]a+ b+ c+ d= 32[/itex]
[itex]6.859a+ 3.61b+ 1.9c+ d= 3.4[/itex]

Solve those equations for a, b, c, and d.

maajdl's "Lagrange polynomial" is simpler. But "least squares" is a method for fitting a curve closest to a larger number of points that you cannot get a single curve pass through. It would be appropriate if we had more than four points we wanted to fit a cubic to.
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
Replies
2
Views
3K
  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 8 ·
Replies
8
Views
1K
  • · Replies 5 ·
Replies
5
Views
4K
  • · Replies 1 ·
Replies
1
Views
2K