Find Cubic Equation from Four Points?

Click For Summary
To find a cubic equation from four points, the discussion highlights two main methods: the least squares method and Lagrange polynomials. The least squares method is suggested for fitting a curve to more points, while Lagrange polynomials are simpler and suitable for exactly four data points. The cubic polynomial derived from the Lagrange method is provided, along with the necessary calculations for determining the coefficients of the cubic equation. The conversation emphasizes the importance of substituting the points into the cubic form to solve for the coefficients. Understanding these methods can help accurately derive the cubic equation needed for the solid object's area calculation.
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 y= ax^3+ bx^2+ cx+ d 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:
d= 2.7
0.125a+ .25b+ .5c+ d= 2.9
a+ b+ c+ d= 32
6.859a+ 3.61b+ 1.9c+ d= 3.4

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.
 
Here is a little puzzle from the book 100 Geometric Games by Pierre Berloquin. The side of a small square is one meter long and the side of a larger square one and a half meters long. One vertex of the large square is at the center of the small square. The side of the large square cuts two sides of the small square into one- third parts and two-thirds parts. What is the area where the squares overlap?

Similar threads

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