PDF
CURVE FITTING AND QUADRATIC INEQUALITIES
Unit Overview
In this unit you will find a quadratic function that exactly fits three data points. You will also investigate how quadratic regression can be used to process real-world data, and then used to make predictions. You will also write, solve and graph a quadratic inequality in one and two variables.
Curve Fitting
It is possible to find a quadratic function that fits a set of data points. To find a, b, and c in the function f (x) = ax2 + bx + c:
1.) write a system of three linear equations using the given points
2.) set up a matrix equation and solve
Example #1: Given the three points (–3, 16), (2, 6), and (1, –4), we are going to set up a system of equations and then transfer the equations into a matrix equation.
|
Multiply both sides of the equation by the inverse of the coefficient matrix. |
To find the inverse of a 3 × 3 matrix using a graphing calculator:
1.) Enter the coefficient matrix into matrix A.
, , scroll over to Edit, . Change the dimensions to 3 × 3 and enter the numbers, pressing after each number. Press , when finished. |
|
2.) Find the inverse of matrix A.
, , . You should have [A] on your screen. Now press and . If you see very large decimals, change everything to a fraction. , Frac, , . |
|
3.) Enter your constant matrix into matrix C.
, , scroll over to Edit, and go down to 3: [C], . Change the dimensions to 3 × 1 and enter the numbers. Press , when finished.
|
|
4.) To solve the equation you have created, you must multiply both sides by the inverse of the coefficient matrix that you entered into A. In a previous unit, we found that when multiplying a matrix by its inverse, the result is the identity matrix, so we are only interested in multiplying the inverse of the coefficient matrix [A] and the constant matrix [C].
|
The solution is a = 3, b = 1 and c = –8. Write the quadratic function.
f (x) = ax2 + bx + c |
|
f (x) = 3x2 + bx − 8 |
is the function of a quadratic that contains the points
(–3, 16), (2, 6), (1, –4). |
|
|
See the three graphing calculator windows below to verify.
Introduction: Cave-Diving, Bacteria, and Curve-Fitting (02:03)
Stop! Go to Questions #1-3 about this section, then return to continue on to the next section.
Quadratic Regression
Quadratic regression is a process by which the equation of a parabola is found that “best fits” real-world data. A graphing calculator can be used to perform a quadratic regression and make predictions. The following examples illustrates the technique for a TI‑83, a TI83Plus, or a TI84 Plus.
If a graphing calculator is not available, click here for a link to a Quadratic Regression Applet.
Example #1: The table below shows the price of a first class stamp over the years. Use a graphing calculator to find the quadratic regression equation for this data.
|
Enter the data for two lists, L1 representing the year and L2 representing the price. (L1, L2) Then examine the data points to see what kind of graph the data is suggesting.
Step 1: Clear any data from the Lists.
Step 2: Enter the given data.
Type in the x-values (Year) in L1 from the data in the table in the order listed. Press ENTER after each number is typed. Then move to L2 (use the right arrow key) and enter the y-values (Price) in the same way. Again be sure to enter the values in the order listed and make sure the data pairs match as they do in the chart.
Step 3: View the data points.
First turn on Plot 1 to view the data points plotted in a grid.
, then left arrow to select On, then press . Select the scatter plot for type of graph if it is not already selected.
Press to graph the data points.
*Note: By using the Window settings automatically adjust. The minimum values are slightly below the minimum values in the chart and the maximum values are slightly above the maximum values in the chart.
The points could be part of a parabola opened upward and wide, so we'll use quadratic regression to find the equation of that parabola.
Step 4: Apply Quadratic Regression (QuadReg) to determine the quadratic equation.
.
These values represent the a, b and c-values in the standard form of a quadratic equation ( f (x) = ax2 + bx + c). Thus, the quadratic equation that best fits the data is y = .0010160949x2 −
3.243735436x + 2457.892273.
The coefficient of determination (R2) shows how well a quadratic function model fits the data.
To turn on this function if it is not displayed on the window, press .
Now, calculate the quadratic regression again..
The closer R2 is to 1, the better the fit. In this model, R2 is approximately 0.989, which is very close to 1, therefore the quadratic model is a good fit for the data.
Step 5: Transfer the function to Y1 and graph.
.
The values for a, b and c are shown on the screen again. Press the key to see that the regression equation has been transferred to Y1. To see the graph of the equation, press .
By zooming out a few times, , the parabolic shape of the graph becomes more evident.
Putting the points and graph together, the correlation can be viewed and compared.
*Note: The numbers in this quadratic regression vary slightly from the numbers in the graphing calculator; but, are still reasonably close. This regression was completed at http://keyah.asu.edu/applets/QuadraticRegression.html |
|
World Population Prediction (10:07)
Now that the regression equation is determined, it can be used to predict the price of first class postage in other years.
Example #2: Predict the cost of a first class postage stamp in the year 2025 using the data stored in the graphing calculator.
From the home screen, press . Y1
appears on the screen. Type is the year 2025 in parentheses Press .
|
The same method can be used to see how the outcomes match the already known cost of stamps.
Example #3: Calculate the cost of a first class postage stamp in the year 1975 using the data stored in the graphing calculator and compare that value to the actual cost of the stamp.
From the home screen, press . Y1 appears on the screen. Type is the year 1975 in parentheses. Press .
The regression equation gives a price of 15 cents. The actual price of a first class postage stamp in 1975 was 13 cents ... pretty close! |
This method can also be used to find the best fit for linear, exponential and polynomial functions. By comparing the correlation coefficients it can be determined what type of function best fits the data.
To prepare the calculator for future use, clear all lists.
Stop! Go to Questions #4-7 about this section, then return to continue on to the next section.
Quadratic Inequalities
To solve a quadratic inequality:
1.) factor the quadratic
2.) the solutions represent the critical points on the x-axis and divide the axis into sections that must be tested.
3.) test each section to determine what area to shade. |
If the inequality is < or ≤, then the solution will be connected with the word “and”.
If the inequality is > or ≥, then the solution will be connected with the word “or”.
Example #2: x2 − 2x − 15 ≥ 0
|
x2 − 2x − 15 ≥ 0 |
this means that we are looking for the intersection “or” and each critical point will have a closed circle.
|
(x – 5)(x + 3) ≥ 0 |
set each of these equal to zero to find the critical points
|
x = 5 and x = –3 |
critical points that are graphed |
x2 − 2x − 15 ≥ 0
|
|
Choose points from each section to test for validity.
Test for −4 |
Test for 0 |
Test for 7 |
(−4)2 − 2(−4) − 15 ≥ 0
16 + 8 − 15 ≥ 0
9 ≥ 0 |
(0)2 − 2(0) − 15 ≥ 0
0 − 0 − 15 ≥ 0
−15 ≥ 0 |
(7)2 − 2(7) − 15 ≥ 0
49 −14− 15 ≥ 0
20 ≥ 0 |
True |
False |
True |
The testing shows true statements for x-values less than –3 or x-values greater than 5. Therefore the solution to this quadratic inequality is x ≤ –3 or x ≥ 5. |
Stop! Go to Questions #8-11 about this section, then return to continue on to the next section.
Graphing Quadratic Inequalities
1.) the quadratic must be in the form of y = a(x − h)2 + k where the vertex is located at (h, k)
2.)
graph the vertex and set up a table to find other points on the curve, choose two x‑values greater and two x-values less than the x-value of the vertex
3.)
replace the chosen points into the inequality to find y-values
4.)
graph each point and connect them
5.)
shade the appropriate region |
Example #1: y ≤ (x − 1)2 − 5
|
y ≤ (x − 1)2 − 5 |
Solid curve and shading occurs below the curve because the inequality is ≤.
|
the vertex is located at (1, –5)
|
|
|
Example #2: y > 2(x + 3)2 − 5
|
y > 2(x + 3)2 − 5 |
Dashed curve and the shading occurs above the curve because of the > sign.
|
the vertex is located at (–3, –5)
|
|
|
Let’s take a look at the graphs above using the graphing calculator.
To graph y ≤ (x − 1)2 − 5, enter (x–1)^2–5.
Use the left arrow key and scroll to the left of Y1. Once there, press repeatedly until you see a blinking triangle that indicates shading below the line ( ). Then select .
|
To graph y > 2(x + 3)2 − 5, enter 2(x+3)^2–5.
Use the left arrow key and scroll to the left of Y1. Once there, press repeatedly until you see a blinking triangle that indicates shading above the line ( ). Then select .
|
*You will still need to determine if the line is solid or dotted by your knowledge of inequalities.
|
If the quadratic function is not in vertex form, there are two methods that can be used to find the vertex.
1.) Complete the square to put the equation in vertex form
or
2.) Use the equation to find the x-coordinate of the vertex, then substitute this value into the quadratic function to determine the corresponding y-coordinate. |
Example #3: Graph y ≥ −2x2 − 4x + 3
Method 1 Using Vertex form
y ≥ −2x2 − 4x + 3
|
Factor the −2 out of the quadratic and linear term. |
|
|
y ≥ −2(x2 + 2x) + 3 |
Complete the square of the terms within the parenthesis. Take of 2 = 1, then square it, 12 = 1. |
|
|
y ≥ −2(x2 + 2x + 1) + 3 + 2 |
Since everything inside the parenthesis is multiplied by −2, a −2 is really added to the expression. Thus, to balance the expression a +2 must be added. |
|
|
y ≥ −2(x + 1)2 + 5 |
Factor the perfect square trinomial inside parenthesis into a perfect square. x2 + 2x + 1 = (x + 1)2 |
|
|
y ≥ −2(x − −1)2 + 5 |
Write the quadratic in vertex form, y = a(x − h)2 + k
Note that +1 can be expressed as − −1.
|
|
|
The vertex is (−1, 5). |
The vertex is (h, k). y ≥ −2(x − −1)2 + 5 |
Method 2: Find the x-coordinate of the vertex first, then substitute to find the y‑coordinate.
y ≥ −2x2 − 4x + 3 a = −2 b = −4 c = 3
|
|
The x-coordinate is –1. |
Now, find the y-coordinate of the vertex by substituting –1 into the quadratic function.
|
y ≥ −2x2 − 4x + 3
|
−2(−1)2 − 4(−1) + 3
−2(−1) + 4 + 3 = 5
|
The y-coordinate is 5. |
The vertex is (–1, 5).
To graph the quadratic inequality, choose x-coordinates near the x-coordinate of the vertex, and substitute them into the quadratic equation to find the corresponding y‑coordinates.
The graph is a solid line because the inequality symbol is greater than or equal (≥). The graph is shaded above the curve because a greater than sign is in the inequality symbol (≥) and the quadratic equation is in standard form.
|
Now let's practice graphing inequalities. Click here to view the activity.
Stop! Go to Questions #12-25 to complete this unit.
|