# Exact Fit General Cubic

1. May 8, 2012

### ShaunDiel

1. The problem statement, all variables and given/known data

3. The attempt at a solution
For Part A) I did the normal best fit straight line stuff, A^τAX=bA^τ etc, resulting in:
y= 31/26x -8/3

Now part B) is where I need a hand, I started with just cubing, squaring etc the terms given and doing row ops, which is where I'm at now. It just seems like it's getting too ugly and I'm not sure where I'm going with it.

2. May 8, 2012

### Ray Vickson

The problem is that you have only three data points, but need 4 points to fit a general cubic. I have not checked your working above in detail, but you end up with the conditions -10c + 2d = 3, or c = (1/5)d-(3/10) = 0.2d - 0.3. Then -3b + 8c 6d = -124, so you can get b in terms of d, etc. Altogether, you will have one free parameter, d, in your fit, and the question is asking why you cannot have all four coefficients a,b,c,d integer at the same time.

RGV

3. May 8, 2012

### ShaunDiel

I still don't really understand where I'm supposed to go

I have legitimately no idea

4. May 8, 2012

### ShaunDiel

I emailed my prof about the question, asking him if the final cubic:

( (11/8+1019/16)x^3 + x^2 + (8/3+123/3)x+(-5-3/2)=0)

Was as incorrect as it looked.

He replied with this:

"You should get a row of zeros in your equation, giving you a homogeneous solution which is a cubic polynomial and a particular solution which can be either cubic or quadratic. Your homogeneous solution should have a certain factorised form which you should expect."

5. May 8, 2012

### HallsofIvy

Staff Emeritus
Go back and read the problem again! It says "What is the general equation of all cubic polynomials". As Ray Vickson told you, the general cubic involves 4 coefficients- $y= ax^3+ bx^2+ cx+ d$- while you have only three conditions to satisfy. You can use the three equations you get by putting the three values of x and y into that equation in to solve for any three of a, b, c, and d in terms of the fourth. Different values of that fourth coefficient will give different cubic polynomials out of the infinite number that satisfy that.

6. May 8, 2012

### ShaunDiel

Right, I understand that much, I just feel like I'm taking the wrong approach completely to starting this.

I'm completely screwed now since nothing I did was right

7. May 8, 2012

### HallsofIvy

Staff Emeritus
The final row in your next to last matrix in post 1 (I don't believe your final step accomplishes anything) is equivalent to -10c- 2d= 3 which is equivalent to 2d= -3- 10c and gives d= (-3/2)- 5c. The second row is equivalent to -3b+ 8c= -124 which is equivalent to 3b= 8c- 124 and so b= (8/3)c+ 124/3. The first row is equivalent to 24a- 20c+ 3d= -514. Putting the previous values into that, 24a- 20((8/3)c- 124/3)+ 3((-3/2)- 5c)= -514. Solve that for a so you have a, b, and c in terms of d. Finally write $y= ax^3+ bx^2+ cx+ d$ using those so you have the "general" cubic polynomial in terms of the parameter d.

8. May 8, 2012

### ShaunDiel

Okay sweet, I'm working this out now, I think you skimmed over the stuff that I worked out because I did a column swap so basically everywhere you have a c it should be a b.

But where I am right now, I have:

d=(-3/2)-5b
c=(8/3)b+124/3
b=(-3/10)-(1/5)d

So If I plug them into the first row I'll have 24a-20((-3/10)-(1/5)d)) +3((-3/2)-5b)?

What did my prof mean about the row of zeros? That's making me think I messed up my row ops somwhere