Solve Equation f for (0,80) (2,64) (4,54) (6,48) (8,44)

  • Thread starter autodidude
  • Start date
The correct equations, in detail, are (courtesy of Maple 9.5):a0=80a1 + a2 + a3 + a4 = -162a1 + 6a2 + 14a3 + 30a4 = 66a1 + 24a2 + 60a3 + 360a4 = -224a1 + 120a2 + 720a3 + 5040a4 = 0.These are the correct equations for the Lagrange interpolation method. But I think that the finite differences/stepped cell equations give the wrong equations.
  • #1
autodidude
333
0

Homework Statement


Find the equation for (0, 80) (2, 64) (4, 54) (6, 48) (8,44)


Homework Equations





The Attempt at a Solution



I used the finite differences method and the stepped cell equations:

a0 = 80
a1 + a2 + a3 = -16
2a2 + 6a3 = 6
6a3 = -2

y = -(1/3)x^3 - 2x^2 - 13(2/3)x + 80


The answer I get from plugging in x into the equation is always off by 10. The finite differences/stepped cell equations is the only method presented in my book (other than using a graphics calculator). Also, how would you find y given x?
 
Physics news on Phys.org
  • #2
autodidude said:

Homework Statement


Find the equation for (0, 80) (2, 64) (4, 54) (6, 48) (8,44)


Homework Equations





The Attempt at a Solution



I used the finite differences method and the stepped cell equations:

a0 = 80
a1 + a2 + a3 = -16
2a2 + 6a3 = 6
6a3 = -2

y = -(1/3)x^3 - 2x^2 - 13(2/3)x + 80


The answer I get from plugging in x into the equation is always off by 10. The finite differences/stepped cell equations is the only method presented in my book (other than using a graphics calculator). Also, how would you find y given x?
Since you have 5 data points your general polynomial fit will be of degree 4; that is, it will be of the form y = a + b*x + c*x^2 + d*x^3 + e*x^4. This has 5 unknown parameters a,b,c,d,e to match with the 5 data items.

RGV
 
  • #3
Ray Vickson said:
Since you have 5 data points your general polynomial fit will be of degree 4; that is, it will be of the form y = a + b*x + c*x^2 + d*x^3 + e*x^4. This has 5 unknown parameters a,b,c,d,e to match with the 5 data items.

But the finite differences method is used to reduce the degree of the polynomial, I thought. Using this method results in a cubic, meaning that you only need to solve a 4x4 system. But since one of the data points is the y-intercept, that reduces the system further into a 3x3. Much easier than a 5x5.

@autodidude: I don't know what you mean by "stepped cell equations," but it looks like to me a variation of the triangular form. Assuming that this is the case, then I'm not getting what you have. This is what I get:

8a3 + 4a2 + 2a1 = -16
48a3 + 8a2 = 6
48a3 = -2
 
Last edited:
  • #4
^ Yeah I looked it up and couldn't find it anywhere else

That's what I got too, but then you use that information to find a0, a1, a2, and a3 where a0 is the constant, a1 is the first degree variable etc.
 
  • #5
eumyang said:
But the finite differences method is used to reduce the degree of the polynomial, I thought. Using this method results in a cubic, meaning that you only need to solve a 4x4 system. But since one of the data points is the y-intercept, that reduces the system further into a 3x3. Much easier than a 5x5.

@autodidude: I don't know what you mean by "stepped cell equations," but it looks like to me a variation of the triangular form. Assuming that this is the case, then I'm not getting what you have. This is what I get:

8a3 + 4a2 + 2a1 = -16
483 + 8a2 = 6
483 = -2

The Lagrange interpolation method (or direct fitting of f(0), f(2),... to the data, by solving the equations for the coefficients) results in a cubic, but ACCIDENTALLY; that is, the coefficient e of x^4 just happens to be zero. If we changed one item of data---for example, to f(8) = 45 instead of f(8) = 44---we would get a true 4th degree polynomial: we would have f = 80-239/24*x+107/96*x^2-7/96*x^3+1/384*x^4 in that case (courtesy of Maple).

RGV
 
  • #6
^ Lagrange interpolation?
 
  • #7
autodidude said:
^ Lagrange interpolation?
Google is your friend.

RGV
 
  • #8
What level math is numerical analysis? High school? First year college?
 
  • #9
autodidude said:
What level math is numerical analysis? High school? First year college?

no no no

Numerical analysis generally isn't introduced until you get into junior/senior year of college (at least that's how it is where I went).
 
  • #10
^ Ah ok...

Are there any other methods for finding the equation (high school level)? I'm still not sure why the finite differences/stepped cell eq. didn't work
 
  • #11
autodidude said:
^ Ah ok...

Are there any other methods for finding the equation (high school level)? I'm still not sure why the finite differences/stepped cell eq. didn't work

The finite differences/stepped cell equations worked for me. You originally wrote that you got these:
a0 = 80
a1 + a2 + a3 = -16
2a2 + 6a3 = 6
6a3 = -2

While I said that those were wrong. Show us how you got the equations above, because I got these:
a0 = 80
8a3 + 4a2 + 2a1 = -16
48a3 + 8a2 = 6
48a3 = -2
 
  • #12
a0 = 80
a1 + a2 + a3 = -16
2a2 + 6a3
6a3 = -2

a3/6 = -2/6
a3 = -1/3

2a2 + - 2 = 6
2a2 = 8
a2 = 4

a1 + 4 + -1/3 = -16
a1 = -20 + 1/3
a1 = 19.66666667

-1/3x^3 + 4x^2 - 19.66666667x + 80

I just realized the equation in the original post is wrong, it's ^. But that's the one that's off by 10
 
  • #13
No, no, I'm asking how you got these equations:
a0 = 80
a1 + a2 + a3 = -16
2a2 + 6a3
6a3 = -2

... not the work to find a0, a1, a2 & a3. Because I think the equations above are wrong from the start.
 
  • #14
eumyang said:
No, no, I'm asking how you got these equations:
a0 = 80
a1 + a2 + a3 = -16
2a2 + 6a3
6a3 = -2

... not the work to find a0, a1, a2 & a3. Because I think the equations above are wrong from the start.
The correct equations, in detail, are (courtesy of Maple 9.5):
a0=80
a1 + a2 + a3 + a4 = -16
2a2 + 6a3 + 14a4 = 6
6a3 + 36a4 = -2
24a4 = 0.

So, putting a4 = 0 gives the equations that you say are incorrect.

RGV
 
  • #15
Ray Vickson said:
The correct equations, in detail, are (courtesy of Maple 9.5):
a0=80
a1 + a2 + a3 + a4 = -16
2a2 + 6a3 + 14a4 = 6
6a3 + 36a4 = -2
24a4 = 0.

So, putting a4 = 0 gives the equations that you say are incorrect.

I have to admit, I'm still not sure what "stepped cell equations" mean. I took a guess and thought that it is similar to the triangular form. If you use the equations I came up with:
a0 = 80
8a3 + 4a2 + 2a1 = -16
48a3 + 8a2 = 6
48a3 = -2

... you'll come up with a cubic:
[tex]y = -\frac{1}{24}x^3 + x^2 - \frac{59}{6}x + 80[/tex]
... the curve of which fits the original data points. This cubic also matches the "CubicReg" function I used on the TI-84.
 
  • #16
eumyang said:
No, no, I'm asking how you got these equations:
a0 = 80
a1 + a2 + a3 = -16
2a2 + 6a3
6a3 = -2

... not the work to find a0, a1, a2 & a3. Because I think the equations above are wrong from the start.

Oh my bad. They were given in the example in the book

EDIT: How did you come up with those equations?
 
Last edited:
  • #17
I used the first 4 points of (0, 80) (2, 64) (4, 54) (6, 48) (8,44) at the start:

Eq1: a3(0)^3 + a2(0)^2 + a1(0) + a0 = 80
Eq2: a3(2)^3 + a2(2)^2 + a1(2) + a0 = 64
Eq3: a3(4)^3 + a2(4)^2 + a1(4) + a0 = 54
Eq4: a3(6)^3 + a2(6)^2 + a1(6) + a0 = 48

... OR:
Eq1: a0 = 80
Eq2: 8a3 + 4a2 + 2a1 + a0 = 64
Eq3: 64a3 + 16a2 + 4a1 + a0 = 54
Eq4: 216a3 + 36a2 + 6a1 + a0 = 48

Then I used linear combinations to eliminate the a0 variable in Eq2, a0 & a1 in Eq3, and a0, a1 & a2 in Eq4. To start, if you perform this operation:
-1*Eq1 + Eq2 -> Eq2
(Multiply Eq1 by negative 1, add it to Eq2 to make the new Eq 2), then you get
Eq1: a0 = 80
Eq2: 8a3 + 4a2 + 2a1 = -16
Eq3: 64a3 + 16a2 + 4a1 + a0 = 54
Eq4: 216a3 + 36a2 + 6a1 + a0 = 48

I'll leave it for you to figure out the rest, but eventually, you'll get
Eq1: a0 = 80
Eq2: 8a3 + 4a2 + 2a1 = -16
Eq3: 48a3 + 8a2 = 6
Eq4: 48a3 = -2
 
  • #18
You also use rref on a graphing calculator to solve the system of equations:smile:
 
  • #19
eumyang said:
I used the first 4 points of (0, 80) (2, 64) (4, 54) (6, 48) (8,44) at the start:

Eq1: a3(0)^3 + a2(0)^2 + a1(0) + a0 = 80
Eq2: a3(2)^3 + a2(2)^2 + a1(2) + a0 = 64
Eq3: a3(4)^3 + a2(4)^2 + a1(4) + a0 = 54
Eq4: a3(6)^3 + a2(6)^2 + a1(6) + a0 = 48

... OR:
Eq1: a0 = 80
Eq2: 8a3 + 4a2 + 2a1 + a0 = 64
Eq3: 64a3 + 16a2 + 4a1 + a0 = 54
Eq4: 216a3 + 36a2 + 6a1 + a0 = 48

Then I used linear combinations to eliminate the a0 variable in Eq2, a0 & a1 in Eq3, and a0, a1 & a2 in Eq4. To start, if you perform this operation:
-1*Eq1 + Eq2 -> Eq2
(Multiply Eq1 by negative 1, add it to Eq2 to make the new Eq 2), then you get
Eq1: a0 = 80
Eq2: 8a3 + 4a2 + 2a1 = -16
Eq3: 64a3 + 16a2 + 4a1 + a0 = 54
Eq4: 216a3 + 36a2 + 6a1 + a0 = 48

I'll leave it for you to figure out the rest, but eventually, you'll get
Eq1: a0 = 80
Eq2: 8a3 + 4a2 + 2a1 = -16
Eq3: 48a3 + 8a2 = 6
Eq4: 48a3 = -2

Thanks, I'm going to save this page and try to make sense of it when I get home. Again, what level math is this (? Should be able to solve solving this without a graphics calculator be expected at a high school level? (Yr 11)
 
  • #20
autodidude said:
Thanks, I'm going to save this page and try to make sense of it when I get home. Again, what level math is this (? Should be able to solve solving this without a graphics calculator be expected at a high school level? (Yr 11)

In Precalculus, I've taught the concept of putting a system of equations into what I call triangular form (it looks like triangular form = stepped cell equations?). In my school (this is high school in the US) Precalculus students are mostly in gr. 11-12 (though this school I have 3 students in gr. 10).
 
  • #21
eumyang said:
In Precalculus, I've taught the concept of putting a system of equations into what I call triangular form (it looks like triangular form = stepped cell equations?). In my school (this is high school in the US) Precalculus students are mostly in gr. 11-12 (though this school I have 3 students in gr. 10).

:bugeye: At our school, we learn/teach Precalculus at 10 grade (for accelerated, not especially smart). Anyways, triangular form/stepped cell equations are Gaussian Elimination? Is it not?
 
  • #22
Yes, that is Gaussian elimination.

The year that students take "pre-calculus" varies. (To me, pre-calculus = college algebra + trigonometry + analytic geometry + ...) I teach at a private high school, and in our school, in other private schools in the area, and in the local county public school system, the "normal," "college prep" math sequence is
Gr. 9: Algebra 1
Gr. 10: Geometry
Gr. 11: Algebra 2
Gr. 12: Precalculus

Students in honors/accelerated tracks can, of course, take Algebra 1 earlier, allowing them to reach Calculus.
 
  • #23
eumyang said:
Yes, that is Gaussian elimination.

The year that students take "pre-calculus" varies. (To me, pre-calculus = college algebra + trigonometry + analytic geometry + ...) I teach at a private high school, and in our school, in other private schools in the area, and in the local county public school system, the "normal," "college prep" math sequence is
Gr. 9: Algebra 1
Gr. 10: Geometry
Gr. 11: Algebra 2
Gr. 12: Precalculus

Students in honors/accelerated tracks can, of course, take Algebra 1 earlier, allowing them to reach Calculus.

Same with our school, but this is the most basic math path. For our accelrated math students:

Gr. 9 Geometry
Gr. 10 Precalculus
Gr. 11 AP Calc AB
Gr. 12 AP Calc BC
 

FAQ: Solve Equation f for (0,80) (2,64) (4,54) (6,48) (8,44)

1. How do I solve for the equation f given the points (0,80), (2,64), (4,54), (6,48), and (8,44)?

To solve for the equation f, you can use the slope-intercept form y = mx + b, where m is the slope and b is the y-intercept. First, choose any two points from the given points (x1, y1) and (x2, y2) and calculate the slope using the formula m = (y2 - y1) / (x2 - x1). Then, substitute the slope value and one of the points into the slope-intercept form and solve for b. Once you have the values of m and b, you can write the equation f as y = mx + b.

2. Can I use a different method to solve for the equation f given the points (0,80), (2,64), (4,54), (6,48), and (8,44)?

Yes, there are other methods to solve for the equation f, such as the point-slope form or the general form. However, the slope-intercept form is commonly used when the y-intercept is given or can be easily determined from the given points.

3. What is the significance of the given points (0,80), (2,64), (4,54), (6,48), and (8,44)?

The given points represent the coordinates of specific points on the graph of the equation f. They can be used to plot the graph and visualize the relationship between the x and y values.

4. Can I solve for the equation f if there are more or less than 5 given points?

Yes, the equation f can still be solved as long as there are at least two given points. However, the more points given, the more accurate the graph of the equation f will be.

5. How can I check if my solution for the equation f is correct?

You can check your solution by substituting the x values of the given points into the equation f and verifying that they correspond to the given y values. Additionally, you can graph the equation f and see if it passes through all the given points.

Back
Top