Lab 6- Math 2355 (7pts) The purpose of lab 6 is to use Excel to: 1. Investigate equations of lines and their graph; 2. Solve for the intersection of 2 lines (a) algebraically and (b) graphically. 3. Reinforce the difference between absolute and relative referencing. Suppose $5000 is invested in 2 securities: school bonds and public bonds. School bonds pay 6% and public bonds pay 8% interest. If an interest of $370 is required, how much should be invested in each security? If you let x = number of dollars invested in school bonds (in thousands of dollars), and y = number of dollars invested in public bonds (in thousands of dollars), then x + y = 5 and 0.06x + 0.08y = 0.370 or y = - x + 5 and y = - 0.75x + 4.625 (by algebraic manipulation of the above equations, solving each one for y in terms of x). First, you will create a chart of the latter system of equations using Excel to approximate the solution (at least investigate if a solution exists). Start Excel, open up your 2355 Excel file and add a new sheet to the end of your book. Rename the new sheet “L6 Ex1”. Create the following data spreadsheet in Excel in A1 through C6 by taking the steps shown after the table: 1 2 3 4 5 6 A 0 1 2 3 4 5 B 5 4 3 2 1 0 C 4.625 3.875 3.125 2.375 1.625 0.875 - Enter 0 in A1 and fill through A6 using the Series… command button. To fill, first highlight A1 through A6. Then on the Home tab, in the Editing group, select the drop down menu for the command button with a blue arrow pointing down (The Fill button). From that drop down menu select Series…. The Series box should show the series in columns, linear, with a step value of one – then click on OK. You should now see the series 0 through 5 in A1 through A6. - In B1, enter: = - A1+5 (the - A1+5 is - x+5 from the first equation y = - x+5) - With B1 highlighted, copy the formula into B2 through B6 - In C1, enter: = - 0.75*A1+4.625 (this is the second equation y = - 0.75x+4.625) - Copy the formula into C2 through C6 You will now create the chart shown on the following page. The purpose of creating the chart is both for practice (it’s nice to observe your data and include pictures in reports), and to see if a solution exists. Follow the instructions below the chart. 2 The chart is created by taking the following steps: - Highlight the data (B1 through C6) - Go to the Recommended Charts group on the Insert tab and click on the menu button in the bottom right corner. From the Insert Chart menu choose All Charts and then Line. We will use the line chart in the top row on the left. Click OK. -Edit the chart title and use the formatting button to add axis titles, and to hide the legend. You can also change font and size of font. I used Arial Black, size 16 for the title and Arial Narrow, bold, size 10 for the axis titles. - Many other adjustments can be made to any chart. You just need to be willing to either do some reading about charts in Excel or be adventurous and give things a try. Note that a solution does exist and may be approximated by observing the chart. The chart indicated that approximately $3,500 should be invested in Public Bonds (the indicated value of y). Now, you will use Excel to find an exact solution, since you know that one exists. You will actually program Excel to do this, and the program may be used in the future on other problems. Insert a new sheet at the end of your book and name it “L6 Ex2”. The original equations are: x + y = 5 .06x + .08y = 0.370 Removing the x’s, y’s, +’s, and =‘s, would leave you with: 1 1 5 .06 .08 0.370 - Enter these coefficients in A1 through C2: A 1 1 2 .06 3 In A3, enter the following formula: =(-$A$2/$A$1)*A1+A2 B 1 .08 C 5 .37 3 Don't forget the difference between “absolute referencing” ($A$2) and “relative referencing” (A2). With absolute referencing, when you copy or move a formula from one cell to another, the part of the formula with absolute referencing DOES NOT CHANGE; with relative referencing, when you copy or move a formula from one cell to another, the part of the formula with relative referencing changes relative to the number of moves from the old cell to the new cell. For example, when you copy the formula, =(-$A$2/$A$1)*A1+A2, from A3 to B3, the formula in B3 will appear as =(-$A$2/$A$1)*B1+B2; and when you copy the formula, =(-$A$2/$A$1)*A1+A2, from A3 to C3, the formula in C3 will appear as =(-$A$2/$A$1)*C1+C2. In essence A3 through C3 represent a new equality formed from algebraic manipulations of the first 2 equations so that the coefficient of the x-term is 0. - Copy the formula in A3 into B3 and C3. The values in the spreadsheet become: 1 2 3 A 1 0.06 0 B 1 0.08 0.02 C 5 0.37 0.07 - Row 3 (A1 through C3) now represents the equality 0.02y=0.07. You solve for y by entering the following formula in an appropriate cell such as C4: =C3/B3 - You solve for x by entering the following formula in an appropriate cell such as C5 (Note: the value of y calculated in the previous step is assumed to be located in C4): =(C1-B1*C4)/A1 1 2 3 4 5 A 1 0.06 0 B 1 0.08 0.02 C 5 0.37 0.07 3.5 1.5 Therefore, from the contents of C4 given in the worksheet, y = 3.5, thus, $3,500 should be invested in public bonds. From the contents of C5, x = 1.5, thus, $1,500 should be invested in school bonds. - As stated previously, the program you just entered can be used to solve future problems of 2-variable systems of linear equations. “Fancy-up” the program a bit by entering: - In D1: These are coeffs. of the 1st eq. ax+by=c - In D2: These are coeffs. of the 2nd eq. dx+ey=f - In B4: y = - In B5: x = The final worksheet will appear as: A B C 1 1 1 1 2 0.06 0.08 0.37 3 0 0.02 0.07 4 y= 3.5 5 x= 1.5 D These are coeffs. of 1st eq. ax+by=c These are coeffs. of 2nd eq. dx+ey=f 4 In the future use this setup to solve any 2-variable system of linear equations (providing a solution exists) by first stating the equations in the form ax + by = c dx + ey = f and then placing the coefficients For example, solve: a d b e 1.2x - 3.5y = 23 8.5x + 7y = 1.5 Note: be sure to enter -3.5 in cell B1 You should get: y = -5.07733 x = 4.357798 c f into cells A1 A2 B1 B2 C1 C2 using the program that you entered. as detailed above. 5 Math 2355 - Lab 6 – Spring 2016 (7pts) Name: ______________________________________ Discussion Section: ____________ Due Date: March 11th by 8:30am Add a new sheet to the end of your book, or copy a previous sheet you created, and rename it “L6 #1”. This new sheet should contain the work for the following problem: The grocery store we use does not mark prices on its goods. My husband went to this store, bought three 1pound packages of bacon and two cartons of eggs, and paid a total of $7.45. Not knowing that he went to the store, I also went to the same store, purchased two 1-pound packages of bacon and three cartons of eggs, and paid a total of $6.45. Now we want to return two 1-pound packages of bacon and two cartons of eggs. How much will be refunded? Let x = the price of a 1-pound package of bacon y = the price of a carton of eggs Formulate the system of linear equations: _____ x + _____ y = _____ _____ x + _____ y = _____ Rewrite the equations in terms of “y =“ so you will be able to construct a chart y = ___________________________ y = ___________________________ Using the latter set of equations, produce a formatted chart using the methods described in the lab. Plot 24 points. Format the y-values to 3 decimal places. Your x-values need to be a series, starting with 0.1, with step value 0.1. This means that column A will look like 0.1, 0.2, 0.3,…,2.4. Format the horizontal axis so the interval between labels is 2 and the axis is positioned on the tick marks. Font size for both axes should be 10. Label the axes and chart. Scale each to an appropriate font size. You should have noticed that even though your series for the x-values was in tenths, the axis is labeled ten times any particular x-value. Because of this, you should label the x-axis “Price for a Pound of Bacon (times ten)”. Type your name in cell E1, your W- number in cell E2. Select a print area that includes the 24 points you plotted, and the graph. Print the worksheet with its graph (fit to 1 page high by 1 wide, landscape). Be sure to attach it to this page as it is worth points. From the chart, approximate the cost of a pound of bacon and the cost of a dozen eggs. I don’t necessarily expect the exact answer. x = ___________________ y = ___________________ Make a copy of the sheet L6 Ex2 and move it to the end of your book. Rename it L6 #1Solve. Use this sheet to find the exact solution to the bacon/egg problem, by inputting the appropriate coefficients in the appropriate cells A1 through C2. x = ___________________ Write a sentence answering the question posed in the problem. y = ___________________