Introduction to creating and working with graphs In the introduction discussed in week one, we used EXCEL to create a T chart of values for a function. Today, we are going to begin by recreating the T chart in EXCEL. Once we have created the T chart, we will plot the t chart on a data plot and use the plot to create a graph. Using the graph we will look at average rate of change and instantaneous rate of change from a visual standpoint. Problem 1: (Problem 3: from EXCEL introduction in week one.) In this problem, we are going to a standard T-chart for y = 2*x^2 +3 * x -4. If you have never used spreadsheets before, this process will show some very powerful tools of the spreadsheet. At first, it may be confusing as to everything that is happening all at once. We understand that there will be some confusion and hope over the next two to three weeks we can work through the confusion. Let s use EXCEL to build the following T chart X= Y = 2 * x ^ 2 +3 * x - 4 1 1 2 10 3 23 4 40 5 61 In A1 type in the label x= In A2 type in the label y=2x^2+3x-4 In B1 enter the first value (which is a 1) in the cell. In B2 type = 2 * A2 ^ 2 + 3 * A2 4 The answer will be 1 and is showing up in cell A2 In the box marked, you will find the equation = 2 * A2 ^ 2 + 3 * A2 4
Next right click in cell A2 and keeping the right click depressed drag to cell B2 and release. The enlarged picture magnifies part of cell B2. In the magnification, notice that there is a square in the bottom right hand corner of the cell. Move your mouse pointer to the square (it will change to a thin plus sign when over the square). Click on the square and drag the corner to Cell B6. Before looking at the results of clicking and the little square and dragging the square to cell B6, let s provide a discussion of what will happen when we drag the little square. As you drag the cell or rows of cells, Excel will automatically fill in the cells that are dragged through. The cell next cell will actually be an updated by the value of 1: 1) For cells populated with numbers, each consecutive cell will increase by one. In this case cell A2 has the value of 1, thus cell A3 will have the value of 2, cell A4 will have the value3 and so on. 2) For cells populated with functions, each consecutive cell will increase the function value by one in the direction you are moving. In this case, cell B2 is a function with reference to cell A2. When you drag downward you will increase the value by 1 so that cell B3 will reference cell A3, cell B4 will reference cell A4 and so on. (Note: if you drag a function left or right the column letter will update and the row number will remain the same.) While the cells update in this example, later we will show how to keep the cell from updating, when desired.
Notice, in Column A the numbers do increase by one. In column B the results are the value of the function y = 2 x ^ 2 + 3 x - 4 as calculated from the corresponding x value in column A. Notice that we have cell B6 highlighted. In the function box we have the equation =2*A6^2 +3*A6-4. The entries in B6 references cell A6 and are updated during the process of dragging the cells down. This increase of one only happens because one fo the cells dragged is a function Creating a scatter plot: To create a scatter plot, we highlight the corresponding x and y values in cells A2:B6. When we write A2:B6, we are referring to the rectangle where A2 is the upper left hand corner and B6 is the bottom right hand corner. With A2:B6 highlighted, click on the insert tab at the top and about mid-screen, click on the Icon labeled Scatter. Highlighted cells A2:B6 Clicked on Insert tab Click on Scatter Icon to create scatter plot. Upon clicking on the Scatter Icon, the scatter plot will appear in a pop-up window. The plot will be automatically sized and latter we will look at resizing the scatter plot and labeling the plot. Today, we
just wish to create a graph in which we can evaluate the rates of change. Recall that our starting equation is y=2x 2 +3x-4. Thus, we know that the equation is a quadratic polynomial of degree 2. 70 60 50 40 30 Series1 20 10 0 0 1 2 3 4 5 6 Next we wish for EXCEL to create the best polynomial curve for degree 2 that fits the scatter plot. To do this, right click on one of the points in the scatter plot. All points that are connected in cells A2:B6 will be highlighted with x s. Also a pop up window will appear. NOTE about learning Technology: When we first learn a technology program we are usually very overwhelmed by all the tabs at the top, buttons, left/right clicks and pop-up windows. This creates a lot of frustration during the learning process and questions about how anyone can ever learn all of this. The reality of these software packages, such as EXCEL, is that most people only know how to use 10% and learn more when the needs arise. As a new user to EXCEL, the best tip is: Spend the time to overcome the initial discomfort and to become familiar with those commands that are immediately important. Do not give in to the frustration. As we are working with EXCEL based on the desire of all majors in COBE, the more willing you are to work through your initial frustration, the more successful you will be in your business degree.
Returning to our graph, we want to draw the best fit for the data points given in the graph. As we have already clicked on a point and the po-up box has opened. The command we are interested in is the Trendline command. Definition: The Trendline creates a curve that best fits the set of points based on the choice of the curve. In mathematics, we will call a Trendline a regression curve. Thus in this class both terms may be used interchangeably. Click on the Trendline Button and we will obtain a new pop up window, Left Click on any point A pop-up window will appear Click on Add Trendline In the new pop-up window, all the Trendline options will be available. Since the original equation is y = 2x 2 + 3x 4, we wish to approximate the curve for the points with a polynomial equation of degree 2 (Note: in this case degree and order or considered synonymous.) Click on the button for a polynomial Trendline and make sure that order (degree) is 2. Then click on the box to Display the Equation on the Chart. Finally click on Close.
Click Polynomial Order (degree) is 2 Check display Equation Click close Once close is clicked, all the pop-ups will disappear and the graph will now include a curve through the points and the equation used to represent the Trendline. Because we developed the points by using an equation the Trendline equation is exactly the equation we used to develop the points, y=2x 2 +3x-4.
Before moving on, let s discuss average rate of change and instantaneous rate of change. Last week, we learned if we have a constant rate of change, then the slope of a line is the rate of change. For average rate of change between two points, we just need to find the slope of a line between the two points, Consider we want to find the average rate of change between when x=1 and when x=5, we just need to find the slope. The two points are ( 1, 1) and ( 5, 61). We can let EXCEL compute are slope by entering the equation =(B2 B6)/(A2 A6), which will compute a slope of 15. This does mean a rise of 15 (up 15) and a run of 1 (over 1). Let s draw this line into the graph.
70 60 50 40 30 20 10 0 y = 2x 2 + 3x - 4 0 1 2 3 4 5 6 Notice between x=1 and x=2 the rate of change is slower than the average rate and between x=3 and x=4 the rate of change is faster. Thus, the red line is a good average rate of change. We computed the rate of change to be 15. Series1 But looking at the graph the slope appears to Poly. be about (Series1) 2. So why isn t the rate of change 2? Look at the scales on the x and y-axis s Due to the difference in scales, we cannot determine rate of change by just looking at the graph. We must use the equation Instantaneous rate of change is the rate of change at one moment in time. If I wish to find the rate of change at the moment x=2, I draw a tangent line to the graph at x=2. A tangent line basically is on that sits on the line at the point and only makes contact at the point. We compute the instantaneous rate of change by computing the slope of the tangent line. 70 60 y = 2x 2 + 3x - 4 Green line that is tangent to the curve when x=2. Point A on the line is about ( 5, 44) 50 40 30 Point B on the line is about ( 1, 0) Series1 Poly. (Series1) Instantaneous rate of change is 20 10 0 0 1 2 3 4 5 6 Extra Practice
In this problem, we are going to provide a T-chart of values that are based on an event of degree 4 (order 4). The problem is to graph and find a degree 4 (order 4) polynomial equation. From here, we will look at average rate of change, instantaneous rate of change, maximums and minimums. For the most part, you will need to refer to the first half of this document for instructions. Let s use EXCEL to build the following T chart X= Y = 0 8 1-4 2-1 3 1 4-3 5 4 The graph of the data points and the best fit Trendline is seen as: 10 8 y = 0.6875x 4-7.1991x 3 + 24.743x 2-30.493x + 8.0437 6 4 2 0-2 -4-6 0 1 2 3 4 5 6 Series1 Poly. (Series1) In this graph the points are close to the Trendline but not on the Trendline. Trendlines are best approximations using a mathematical process called a regression. Thus, when measuring data points to graph, the points will almost never fit exactly the Trendline (regression) that best fits the data points. With this graph, let s find the approximate average rate of change between x = 0 and x = 5. Since these two values are listed in the T-chart as ( 0, 8) and ( 5. 4), we can use these two data points to compute the average rate of change:
Next let s look for the approximate instantaneous rate of change at the second zero of the equation (the point where the graph crosses the x-axis for the second time ) To do this find the four zeros. Graph a tangent line at the second zero and approximate the slope of the tangent line. 10 8 6 4 2 0-2 -4-6 y = 0.6875x 4-7.1991x 3 + 24.743x 2-30.493x + 8.0437 0 1 2 3 4 5 6 Four Zeros (circled where the graph crosses the x-axis) Second Zero (circle in red) Tangent line at the second zero. Find two approximate points on the tangent line Series1 to compute the approximate slope Poly. (Series1) (instantaneous rate of change) The upper point is about ( 4, 7.5) The lower point is about ( 1, -4) The instantaneous rate of change is about 3.83 Finally let s examine the local maximums and minimums. There are two local minimums and one local maximum. Find them on the graph. What is the instantaneous rate of change at the local minimums and maximum? Answer the instantaneous rate of change is zero. (For any polynomial the tangent line at a maximum or minimum will be horizontal and therefor the instantaneous rate of change will be zero at any maximum or minimum)