Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
1 Math 181: Linear systems and quadratic curves There are lots of occasions when we need to solve several equations simultaneously. Example. Solve 5x+y = 2 4x-y=7 Solution by Substitution: Use one equation to solve for one variable in terms of the other. Then substitute the resulting expression into the other equation. First equation: y = 2-5x Substitute: 4x-(2-5x) = 7 9x - 2 = 7 9x = 9 x=1 y = 2-5(1) y = -3. The answer is: x = 1, y = -3. Either equation can often be used 4x-7 = y Substitute: 5x + (4x-7) = 2 9x = 9, x = 1, y = -3. The answer is x = 1, y = -3. Example. Solve -3x + 2y = 4 8x - 3y = 1 Method 1. (Substitution) 2y = 4+3x y = (4+3x)/2 8x - 3(4+3x)/2 = 1 16x - 3(4+3x) = 2 16x - 12 - 9x = 2 7 x = 14 x=2 y = (4+3(2))/2 = 5 The answer is x = 2, y = 5. Method 2. (Elimination) Rule: Any equation can be multiplied by a nonzero number and added to another equation, replacing that equation. Multiply the first equation by 8 and the second equation by 3, so that the equations have the same coefficients (or their negatives): -24x + 16y = 32 24x - 9y = 3 Add: Solve 7y = 35 y=5 Now -3x+2(5) = 4 2 -3x + 10 = 4 -3x = -6 x=2 The answer is: x = 2, y = 5. Similar methods can be used for three equations with three unknowns. Example. Solve x+y+z = 0 4x + 2y + z = 3 9x+3y+z = 10 Solution by Substitution: Solve the first equation for one variable: z = -x - y Plug these into the other equations: 4x+2y-x-y=3 9x+3y-x-y=10 3x+y = 3 8x+2y=10 Solve one of the equations for a variable: eg, solve the first for y: y = 3-3x 8x + 2(3-3x) = 10 8x+6-6x=10 2x=4 x=2 Substitute back; y = 3-3(2) = -3 z = -x-y = -2-(-3) = 1 The answer is x = 2, y = -3, z = 1. Solution by Elimination: Rule: Any equation can be multiplied by a nonzero number and added to another equation, replacing that equation. Goal: Use the rule to arrange the equations into a triangular form: a x + by + cz = d ey + fz = g hz = i To do this, multiply the first equation by a constants so that the first coefficient will be the same as the negative of the first coefficient of the second equation; then add the two equations, replacing the second equation: x+y+z = 0 4x + 2y + z = 3 9x+3y+z = 10 To find the new second equation, multiply the first by -4 and add to the second, replacing the second equation: 3 add (-4)[x+y+z = 0] 4x + 2y + z = 3 add -4x-4y-4z = 0 4x + 2y + z = 3 new second equation: -2y-3z=3 Similarly to find the new third equation: Multiply first by (-9) and add to the third equation, replacing the third equation: add (-9) [x+y+z=0] 9x+3y+z = 10 add -9x -9y -9z = 0 9x +3y + z = 10 new third equation: -6y-8z=10 Now the system is x+y+z = 0 -2y-3z=3 -6y-8z=10 Multiply the second equation by (-3) and add to the third, replacing the third. Now x+y+z = 0 -2y-3z=3 z=1 Since z = 1, we get from the second equation -2y-3=3, -2y=6, y = -3. From the first equation x -3 +1 = 0 so x -2 = 0, so x = 2. The solution is x = 2, y = -3, z = 1. Example. Solve 2a+b+c = 11 3a-2b-3c = 1 5a+4b-c = 7 Solution by substitution: Solve the third for c = 5a+4b-7 Now the first and second are 2a+b+5a+4b-7=11 3a-2b-3(5a+4b-7) = 1 7a+5b = 18 3a-2b-15a-12b+21 = 1 7a+5b=18 -12a-14b=-20 Multiply first by 12, second by 7 84a+60b = 216 -84a-98b = -140 4 Add: -38b = 76 b = -2 But 7a+b5 = 18 7a +5(-2) = 18 7a=28 a=4 c = 5a+4b-7=5(4)+4(-2)-7 = 20-8-7 = 5 The answer is a = 4, b = -2, c = 5. Quadratic functions Function notation: A function f is a rule that assigns to every number x in a certain set another number f(x). Example. f(x) = 2x-5 means f(1) = -3 f(2) = -1 If y = f(x), then when x = 3, y = 1. Ex. If g(x) = 3 x2, then g(2) = 12 and g(-3)= 27. Suppose y and x are related by an equation of the form y = a x2 + bx + c where a, b, and c are specific numbers. Then we say that y is a quadratic function of x. Example. Suppose y = x2 + 1. Then y is a quadratic function of x. (a) Find y if x = 2 Solution: y = (2)2 +1 = 5 (b) Find y if x = 3 Solution: y = 10 (c) Find y if x = 1 Solution: y = 2 (c) Graph the function. Solution. By hand, we plot some of these points. On the calculator, we must choose the window well using the RANGE button. Example. Suppose y = 2 x2 + 3x - 5. Then y is a quadratic function of x. (a) Find y if x = 2 Solution: y = 2 (2)2 + 3(2) - 5 = 8 +6 - 5 = 9 (b) Find y if x = 3 Solution: y = 2(3)2 + 3(3) - 5 = 18+9-5 = 22 (c) Find y if x = 1 Solution: y = 0 (d) Graph the function. Solution. By hand, we plot some of these points. On the calculator, we must choose the window well. (e) Find the range to include the points for x between -4 and 5. (f) Use the trace facility to locate approximately the low point of the graph. Answer: It is (-.75, -6.125) This kind of curved shape is called a parabola. 5 Figure. The graph of y = 2 x2 + 3 x - 5. Finding a quadratic equation from data These methods can be used to find a formula for a function once some data are known: Example. Suppose that y = a x2 + bx. Suppose that we know x 2 4 y -2 12 (i) Find a and b. (ii) Find the formula for y. (iii) Find y when x = 5. Solution. When x = 2, y = -2, but also y = a(2)2+b(2) = 4a + 2b. Hence 4a+2b = -2. When x = 4, y = 12, but also y = a(4)2+b(4) = 16a+4b, so 16a+4b = 12. We must now solve the equations 4a+2b = -2 16a+4 b = 12 2a+b = -1 4a+b = 3 b = 3-4a, so 2a+3-4a = -1, -2a = -4, a = 2, b = 3-4(2) = -5. (i) a = 2, b = -5 (ii) y = 2 x2 - 5 x (iii) When x = 5, y = 2(5)2 - 5(5) = 25. Example. Suppose that y = a x2 + bx + c. Suppose that we know x 1 2 3 y 9 19 33 (i) Find a formula for y. (ii) Find y when x = 4. Solution. We have three points (1,9), (2,19), (3,33) on the graph. This leads to three equations a+b+c = 9 4a+2b+c = 19 6 9a+3b+c = 33 I'll use elimination: The goal is to replace the system by another system in a triangular form. Multiply the first equation by -4 and add to the second, replacing the second equation. thus the second equation is found by Add 4a + 2b + c = 19 (-4) [ a + b + c = 9] Add 4a + 2b + c = 19 -4a - 4b -4c = -36 New second equation: -2b -3c = 19 -36 = -17 Simultaneously multiply the first equation by -9 and add to the third, replacing the third equation. Add 9a + 3b + c = 33 (-9) [a + b + c = 9] Add 9a +3b + c = 33 -9a -9b -9c = -81 New third equation: -6b -8c = 33-81 = -48 Thus the new system is: a+b+c=9 -2b -3c = -17 -6b-8c = -48 Replace the third equation by the result of multiplying the second equation by -3 and adding: Add -6b-8c = -48 -3[-2b-3c = -17] Add -6b-8c=-48 6b +9c = 51 New third equation: c = 3 Thus the new system is: a+b+c=9 -2b -3c = -17 c=3 We use the second equation to get b: -2b-3(3) = -17 -2b-9 = -17 -2b = -8 b=4 We use the first equation to get a: a+4+3 = 9 7 a=2 The formula is y = 2 x2+4x + 3. (ii) When x = 4, y = 2(4)2 + 4(4) + 3 = 32+16+3=51 Solving quadratic equations: Often we have to solve an equation of the form y = a x2 + bx + c , where we know a, b, c, and y but not x. Example. Solve x2 - 6x + 8 = 0 Method 1: Factoring: (x - 4)(x-2) = 0 If a product is 0, then one factor is 0. Either x-4 = 0 or x-2 = 0 Either x = 4 or x = 2. Answer: X = 4 or x = 2. Note that typically there are two solutions. Example. Solve x2 - 2x -1 = 2 Solution: Write in the form a x2 + bx + c = 0 x2 - 2x -3 = 0 (x-3)(x+1) = 0 x -3 = 0 or x+1 = 0 x = 3 or x = -1 A second method is called the quadratic formula: It always works, and it is especially good if the numbers are awkward. Theorem (Quadratic formula). The solutions to the equation a x2 + b x + c = 0 are x= -b ± √(b2 -4 a c) 2a Example. Use the quadratic formula to solve x2 - 6x + 4 = 0 Solution. Here a = 1, b = -6, c = 4 x= -(-6) ± √(36 -4 (1) (4)) 2(1) x = (6 ± √20) / 2 x = (6 ± √(4*5)) / 2 x = (6 ± 2 √5) / 2 x = 3 ± √5 The solutions are x = 3 + √5 = 5.23607 and x = 3 - √5 = 0.763932. In this case, the expression x2-6x+4 could not be factored, so factoring could not be used. 8 Example. Solve 2.1 x2 +4.6 x - 7.9 = 1.2 Give your answers to 7 significant figures. Solution. Rewrite into the form a x2 + bx + c = 0 2.1 x2 + 4.6 x - 9.1 = 0 x = (-4.6 ±√(4.62 - 4 (2.1) (-9.1)) ) / (2 (2.1)) first solution x = 1.256969 second solution x = -3.447445531 = -3.447446 Note that to get the best answers, you don't write down intermediate results, but enter all the numbers. Thus the first solution is entered into the calculator via (-4.6 +√(4.62 - 4 (2.1) (-9.1)) ) / (2 (2.1)). The second solution can then quickly be found by <ENTRY> button, then change the + to -. Example. Solve x2 + 4x + 5 = 0. Solution. By the quadratic formula, x = (-4 ±√(16-4(1)(5)))/2 = ((-4±√(-4))/2 = (-4 ±2i)/2 = -2 ± i, where i = √ (-1). If this were the apparent final answer in a word problem, it probably makes no sense. But there are situations related to some we will meet in this course where this would be a useful middle step. A biological example: mold growth. Mold grows in circular colonies on an agar gel containing nutriment. Suppose that the area A of the colony is measured in mm2 and the time t since the colony began to grow is measued in days. An experiment leads to the following scatterplot: Note that there is not a linear trend. Instead, it looks as though the graph is better described as a parabola. In fact there is a parabola that fits the data fairly well: 9 Mold growth 400 350 300 A 250 200 150 100 50 0 0 2 4 6 8 10 t 400 350 300 A 250 200 150 100 50 0 0 2 4 6 t 8 10 10 From many experiments like this, we suspect that a reasonable formula relating A and t should be quadratic: We suspect there should be constants a, b, and c such that A = a t2 + b t + c. Later we will see other arguments leading to this same formula. Suppose that a specific experiment is conducted carefully, in which at the same time on day 0, day 1, and day 3 the area of the mold colony is measured. It yields the following data: t A 0 4 1 10.5 3 41.5 (i) Find the formula for A in terms of t. (ii) Make a prediction of the area of a mold colony after 2 days. (iii) Sketch the graph of A. (iv) Find t so A = 60 mm2. Solution: (i) From the three data points we obtain three equations: when t = 0, c = 4 when t = 1, a(1)2 +b (1) + c = 10.5 when t = 3, a(3)2 + b(3) +c = 41.5 c=4 a+b+c = 10.5 9a+3b+c=41.5 a + b = 6.5 9a + 3b = 37.5 b = 6.5 - a so 9a + 3(6.5-a) = 37.5 9a + 19.5 - 3a = 37.5 6a = 18 a=3 b = 6.5-3 = 3.5 Answer: A = 3 t2 +3.5 t + 4 mm2 (ii) We predict A = 3 (2)2 +3.5 (2) + 4 = 23 mm2 11 (iii) (iv) Solve 3 t2 +3.5 t + 4 = 60 3 t2 +3.5 t - 56 = 0 Since the numbers are messy, use the quadratic formula t = (-3.5 ± √(3.5^2 - 4(3)(-56)) / 6 = (-3.5 ± 26.158)/6 t = -4.943 days or t = 3.78 days A negative value for t makes no sense in the problem, so the only answer is t = 3.78 days. A physical example: bodies moving under gravity When bodies move near the surface of the earth under the influence of gravity, then when we ignore air resistance, the height H above the ground (in feet) after t seconds follows a formula of the form H = a t2 + b t + c until the body hits the ground or some other object. Note that the graph is a parabola. Example. A bird tries to break a whelk by flying with it, tossing it up, and dropping it to the ground. At time t = 0, the bird releases the whelk by tossing it up. Here are data, where H is the height in feet above the ground level. Time t (sec) 0 1 2 Height H (feet) 51 75 67 (i) Find the formula for the height of the whelk at time t. (ii) Find the height of the whelk at time 3. (iii) What does the formula predict for the height of the whelk at time 4? What really happens? (iv) How long does it take before the whelk hits the ground? Give your answer to 3 decimal places. 12 (v) It turns out that in fact there is a big mining pit in the ground and the whelk actually falls to the bottom of the mine pit, which is 50 feet below the surface. Find t when the whelk hits the bottom of the pit. Give your answer to 3 decimal places. Solution: Since H = a t2 + b t + c, writing the three equations at the three times, we obtain a (0)2 + b (0) + c = 51 a (1)2 + b (1) + c = 75 a (2)2 + b (2)+ c = 67 c = 51 a+b+c = 75 4a+2b+c = 67 a+b+51 = 75 4a+2b+51 = 67 a+b = 24 4a+2b = 16 b = 24 - a 4a +2(24-a) = 16 4a+48-2a = 16 2a = 16-48 = -32 a = -16 b = 24-(-16) = 40 Answer: H = -16 t2 + 40 t + 51 feet (ii) When t = 3, H = -16 (9) + 40(3) + 51 = 27 feet (iii) When t = 4, H = -16(16)+40(4)+51 = -45 feet above the ground. A negative number for the height above the ground is not possible. What really happens is that the whelk hit the ground between time t=3 and time t = 4. (iv) H = -16 t2 + 40 t + 51 feet The height of the ground is 0, so the whelk hits the ground when -16 t2 + 40 t + 51 =0 by the quadratic formula, t = (-40 ±√(40)^2 - 4 (-16) (51)) / (-32) t = (-40 ± 69.74)/(-32) t = -.92945 or t = 3.429 Only the positive answer makes sense. The whelk hits the ground after 3.429 seconds. (v) The bottom of the pit is 50 feet below the ground level, hence H = -50. Solve -16 t2 + 40 t + 51 = -50 -16 t2 + 40 t + 101 = 0 t = (-40 ±√(402 - 4(-16)(101)))/(-32) t = (-40 +√8064)/(-32) = -1.556 or t = (-40 -√8064)/(-32) = 4.056 The whelk hits the bottom of the pit when t = 4.056 sec 13 Quadratic regression In actual experiments, one would not just use 3 data points to find a quadratic curve. Following is a table of values found by students in this class a few years ago: A (mm 2) t (days) 0 1 2 3 4 5 6 7 8 9 4 8 22 38 80 107 144 191 266 354 The data are plotted below: Mold growth 400 350 300 A 250 200 150 100 50 0 0 2 4 6 8 10 t In fact, no parabola A = a t2 + bt + c passes exactly through all these points. The situation is just like that when we had approximately a linear relationship from data. In that situation, we found the regression line. 14 In this situation we can also use the calculator to find a quadratic regression. Given a number of data points (x,y), the quadratic regression is the formula of the form y = a x2 + b x + c that best fits the data. It can be found exactly like the regression line, except that instead of pushing the button for linear regression, one uses a button for quadratic regression. On the TI85 the button is marked P2REG. Example. We enter the data above in the lists L1 and L2. Then go to the STAT menu, CALC. After pushing the P2REG button we find (giving the coefficients to 3 significant figures) A = 4.50 t2 - 3.29 t +7.83 Does this work? Example. Find the predicted area when t = 5 days. Solution. A = 4.50 (5)2 - 3.29 (5) +7.83 = 104 mm 2, which is not exactly the data but is close. Example. Predict t when A = 150 mm2. Give your answer to 3 significant figures. Solution. Solve 4.50 t2 - 3.29 t +7.83 = 150 From the quadratic formula we obtain t = 5.99822 or t = -5.26711 A negative answer is meaningless. To 3 significant figures, t = 6.00 days.