Find Cubic Equation from Four Points?

In summary, the conversation discusses finding the area of a solid object and using four points to calculate a cubic equation. The methods of least squares and Lagrange polynomials are suggested for determining the equation, with the latter being simpler in this case. The conversation also mentions solving a system of equations to determine the four values of a, b, c, and d for the cubic function.
  • #1
dionwaiters
1
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
  • #2
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
 
  • #3
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.
 

1. How do I find the cubic equation from four points?

To find the cubic equation from four points, you will need to use the method of interpolation. This involves creating a system of equations using the coordinates of the four points and solving for the coefficients of the cubic equation.

2. What are the steps for finding the cubic equation from four points?

The steps for finding the cubic equation from four points are:
1. Write down the coordinates of the four points (x1, y1), (x2, y2), (x3, y3), (x4, y4).
2. Set up a system of equations using the general form of a cubic equation: y = ax^3 + bx^2 + cx + d.
3. Substitute the x and y values of each point into the equation to create four equations.
4. Solve the system of equations to find the values of a, b, c, and d.
5. Substitute the values of a, b, c, and d into the general form of a cubic equation to get the final equation.

3. Can I use any four points to find the cubic equation?

No, the four points must be distinct and cannot be collinear. This means that they cannot all lie on the same straight line. If the points are collinear, there are an infinite number of cubic equations that can pass through them.

4. Is there a calculator or software that can find the cubic equation from four points?

Yes, there are several online calculators and software programs that can find the cubic equation from four points. Some popular options include Wolfram Alpha, Symbolab, and Desmos.

5. What is the practical application of finding the cubic equation from four points?

Finding the cubic equation from four points can be useful in various fields such as engineering, physics, and computer graphics. It can be used to model and predict the behavior of certain phenomena, create smooth curves for computer-aided design, and solve real-world problems that involve four distinct points.

Similar threads

  • General Math
Replies
2
Views
1K
Replies
4
Views
1K
Replies
3
Views
1K
Replies
7
Views
3K
  • Engineering and Comp Sci Homework Help
Replies
2
Views
3K
  • General Math
Replies
1
Views
1K
Replies
2
Views
1K
Replies
2
Views
997
  • General Math
Replies
4
Views
3K
Replies
2
Views
899
Back
Top