Find the equation of a line?
find the equation of the line for:
x |
y |
1 |
1 |
2 |
3 |
3 |
6 |
4 |
10 |
5 |
15 |
Is it a straight line? Calculate the slope between various points.
m = (3 - 1) / (2 - 1) = 1/1 = 1
m = (6 - 3) / (3 - 2) = 3/1 = 3
m = (10 - 6) / (4 - 3) = 4/1 = 4
m = (15 - 10) / (5 - 4) = 5/1 = 5
This is definitely NOT a straight line. It must be
a parabola. Let's make some computations based on that premise.
y = ax^2 + bx + c
Using that equation, plugging in the given values for x and y,
we can try to determine the values of a, b and c.
3 = a2^2 + b2 + c
3 = 4a + 2b + c
1) 4a + 2b + c = 3
6 = a3^2 + b3 + c
6 = 9a + 3b + c
2) 9a + 3b + c = 6
10 = a4^2 + b4 + c
10 = 16a + 4b + c
3) 16a + 4b + c = 10
Three equations with three unknowns is sufficient for our purposes.
Subtract equation 2 from equation 3.
16a + 4b + c = 10
-(9a + 3b + c = 6)
-------------------
7a + b = 4
4) 7a + b = 4
Subtract equation 1 from equation 2.
9a + 3b + c = 6
-(4a + 2b + c = 3)
------------------
5a + b = 3
5) 5a + b = 3
Subtract equation 5 from equation 4.
7a + b = 4
-(5a + b = 3)
-------------
2a = 1
a = 1/2 <<<<<<<<<<<<<<<<<<<<<
Plug that into equation 5 and solve for b.
5a + b = 3
5(1/2) + b = 3
2 1/2 + b = 3
b = 3 - 2 1/2
b = 1/2 <<<<<<<<<<<<<<<<<<<<<
Plug both a and b into equation 2 and solve for c.
9a + 3b + c = 6
9(1/2) + 3(1/2) + c = 6
4 1/2 + 1 1/2 + c = 6
6 + c = 6
c = 0 <<<<<<<<<<<<<<<<<<<<<
The equation we want is: y = (1/2)x^2 + (1/2)x
Graph this equation and you will see that it passes
through all the given points.