Trying to find the equation of a cubic

  • Thread starter zebrasauce
  • Start date
  • Tags
    Cubic
In summary, the conversation revolves around finding an equation that best fits a set of data points. The speaker suggests using a cubic equation and mentions using a matrix to solve it, but finding a quartic instead. They ask for help and someone suggests using Finite differences. The speaker then shares their attempt at a regression by least squares, providing the approximate values for a, b, c, and d. They also mention the use of a computer package for the calculations.
  • #1
zebrasauce
2
0
1. Find an equation that best fits the data?
Data
2 16.40
3 15.70
4 15.30
5 15.20
6 15.21
7 15.40
8 15.80
9 16.30
10 16.80
11 17.50
12 18.18
13 18.70
14 19.36
15 19.88
16 20.40
17 20.85
18 21.22
19 21.60
20 21.65

I have narrowed it down that it is most likely a cubic, because it seems to make sense.


I tried to use a matrix to solve this equation but found that it gave me a quartic, that did not match the data at all any help would be appreciated, is there a formula on how to solve cubics?
 
Physics news on Phys.org
  • #2
If you mean "find the least squares best fit cubic", you would want to write, in general, [itex]y= ax^3+ bx^2+ cx+ d[/itex] and then find a, b, c, d to minimize [itex]\sum (y_i- (ax_i^3+ bx_i^2+ cx_i+ d[/itex]
 
  • #3
Have you tried simply using Finite differences?
 
  • #4
not really sure how i would use it, but ill try to
 
Last edited:
  • #5
I did a regression by least squares and it seems to almost perfectly fit a cubic.
a = -0.00407
b= 0.15356
c=-1.2757
d=18.27288
(approximate values)
where it is in the form y = ax^3 + bx^2 + cx + d
normally you would use a computer package like MatLab or a programmable calculator to do these. I don't recommend doing this by hand, it's very long.
 

FAQ: Trying to find the equation of a cubic

1. What is a cubic equation?

A cubic equation is a polynomial equation of degree three, written in the form of ax^3 + bx^2 + cx + d = 0, where a, b, c, and d are coefficients and x is the variable.

2. How do I find the roots of a cubic equation?

To find the roots of a cubic equation, you can use the cubic formula or factor the equation. The cubic formula is x = [(-b ± √(b^2-4ac-27d^2)) / (2a)] - [a/3]. Factoring involves finding common factors and using the quadratic formula to find the remaining roots.

3. Can all cubic equations be solved?

Yes, all cubic equations can be solved. However, some equations may have complex solutions. Additionally, some equations may have three real solutions, while others may have one real solution and two complex solutions.

4. How do I graph a cubic equation?

To graph a cubic equation, you can use the roots of the equation to plot points on a graph. You can also use the leading coefficient and end behavior to determine the general shape of the graph. Additionally, you can use a graphing calculator to quickly graph the equation.

5. What are some real-life applications of cubic equations?

Cubic equations are used in many areas of science and engineering, such as in modeling population growth, studying the trajectory of projectiles, and designing roller coasters. They are also used in economics and finance to analyze supply and demand curves and in chemistry to predict the behavior of certain reactions.

Back
Top