MSCI 300 SPRING 2016 Calculus 1 Charles Rubenstein
MSCI 300 – SPRING 2016 Calculus 1 Charles Rubenstein, Ph. D. Professor of Engineering and Information Science Week 8: Session 7: Monday 03/07/16 Mondays 6: 30 pm-8: 50 pm PMC 705 A
Instructor Contact Information Dr. Charles Rubenstein <crubenst@pratt. edu> Professor of Engineering & Information Science Office hours (by appointment *) • Mondays: 5: 00 pm-6: 00 pm Pratt Manhattan Campus Office: PMC 604 -C • Tuesdays: 12: 00 pm - 2: 00 pm Pratt Brooklyn Campus Office: ARC G-45 (or E-08 Lab) (*Please email me at least a day in advance if you plan on coming to office hours…) Send me an email … crubenst@pratt. edu Subject line: 300 Calc Copyright © 2015 C. P. Rubenstein 2
MSCI 300 – Fall 2015 - Class Schedule & Due Dates Monday (Week) NOTES 18 January (1) NO CLASS – Martin Luther King Day 25 January (2) Introduction; Review of Syllabus, Algebra & Trigonometry 1 February (3) Functions and Slopes (Quiz 1) 8 February (4) Approximating Slopes, Limits, The Derivative (Quiz 2) 15 February (5) Rules of Differentiation (Q 3) 22 February (6) Max/Min Prob, 2 nd + Derivatives (Q 4) 29 February (7) Trig, Trig Derivatives, Limit of sin(x)/x (Q 5) 7 March (8) Derivatives of Exponentials, Constant "e"; Take Home Exam (Q 6) 14 March (9) NO CLASSES – Pratt Spring Break – 14 -20 March 2016 21 March (10) Linear Approximation, Newton's Method; Midterm Due (Q 7) 28 March (11) l'Hôpital's Rule, Kinematics: Position, Velocity, Acceleration ; Midterm Review (Q 8) 4 April (12) CMFM Seminar Review Logs (Q 9) 11 April (13) NO CLASS – Instructor out of town 18 April (14) Inverse Function Derivatives, Implicit Differentiation (Q 10) 25 April (15) Areas, Intro to Integrals, Fundamental Theorem of Calculus 2 May (16) Using Integrals to find Volumes and Lengths, Review 9 May (17) In-class Final Examination (* Quizzes on Homework due; Reviewed in same session) Copyright © 2016 C. P. Rubenstein 3
* Class Session Archives * http: //www. Charles. Rubenstein. com/300/ 16 sp 07. pdf (Class Power. Point slides) * 16 sp 07 h. pdf (slides in handout format) * *Archive materials normally online by Thursday evenings Copyright © 2015 C. P. Rubenstein 4
Spring 2016 Math/Science TUTORING WHO: Professor Joe Guadagni BY APPOINTMENT ONLY: WHEN and WHERE: Mondays 4: 30 -6: 00 pm PMC 403 Email: jguadagni@pratt. edu Fridays 3: 00 -5: 00 pm WTC North Hall Call: 718 -636 -3459 Copyright © 2016 C. P. Rubenstein 5
For Class Session #07: • • • DUE: Homework Set #06 Reading: Strang - Chapter 5: Integrals 2 Do: In Class Quiz and Review Homework Sets #5 & 6 Take Home Midterm Distributed Lecture: Linear Approximations, Newton’s Method NO CLASS NEXT WEEK PRATT SPRING BREAK 14 -20 March 2016 For class Session #08: • DUE: Midterm; Homework Set #07 • Reading: Strang - Chapter 5 : Integrals • 2 Do: In Class Quiz and Review Homework Set #07 • Lecture and Problem Review l'Hôpital's Rule, Kinematics: Position, Velocity, Acceleration Copyright © 2015 C. P. Rubenstein 6
Midterm Examination (10 problems; 1 Bonus Problem) Hand in all scrap paper, notes When you DO NOT show work, I have to guess. When you DO show work, I can try to see what you are doing and give an “O. K. ” Copyright © 2015 C. P. Rubenstein 7
Questions? Copyright © 2015 C. P. Rubenstein 8
Homework #05 & #06 Quiz Calculating Derivatives When you DO NOT show work, I have to guess. When you DO show work, I can try to see what you are doing and give an “O. K. ” Copyright © 2016 C. P. Rubenstein 9
Homework QUIZ #05 & #06 #1 a. Given the function y(x) = 1 - x 3 find y'(x), the derivative function. #6. If y = (1+x)1/2 find dy/dx. You have TEN minutes to solve! Copyright © 2016 C. P. Rubenstein 10
Homework QUIZ #05 #1 a. Given the function y(x) = 1 - x 3, find y'(x), the derivative function. Ans: y(x) = 1 - x 3 y' = 0 - 3 x 2 y' = -3 x 2 . Copyright © 2016 C. P. Rubenstein 11
Homework QUIZ #06 #6. If y = (1+x)1/2, find dy/dx. Ans: Using the “inverse method” as we did for y = x 1/2 : Express x as a function of y. Then calculate dx/dy and take its reciprocal, i. e. , dy/dx = (dx/dy)-1. y 2 = 1 + x reciprocal: x = y 2 - 1 and dx/dy = 2 (1+x)1/2 Taking the reciprocal again: dy/dx = (dx/dy)-1 dy/dx = ½ (1+x)-1/2 OR. . . Using the Chain Rule on y = (1+x)1/2 dy/dx = [1/2 (1+x)(1/2 -1) ] [d(1+x)/dx] = [1/2 (1+x)(1/2 -1) ] [1] And thus dy/dx = ½ (1+x)-1/2 Copyright © 2015 C. P. Rubenstein 12
Homework #05 REVIEW Calculating Derivatives (8 problems; 18 parts) Copyright © 2016 C. P. Rubenstein 13
Homework #05 Review #1 a. Ans: Given the function y(x) = 1 - x 3, find y '(x), the derivative function. y(x) = 1 - x 3 y' = 0 - 3 x 2 y' = -3 x 2 # 1 b. Calculate y'(0. 8) the numerical value of the slope of y(x) at the point (0. 8, 1 -0. 83) y' = -3 x 2 m = -3 • (0. 8)2 m = -1. 920 . Copyright © 2016 C. P. Rubenstein 14
Homework #05 Review #1 c. Check your answer by calculating the numerical approximation to the derivative, substituting 0. 8 for x and. 001 for dx. Compare the results of 1 b. and 1 c. 1 b: m = -1. 920 Ans: 1 c: m ≈ -1. 922 good agreement Copyright © 2016 C. P. Rubenstein 15
Homework #05 Review #2. Use the product rule to find the derivative of y(x) = [( 3 x 5 + x 2 ) • (2 x - 1)] Ans: Product Rule: f(x) = ( 3 x 5 + x 2 ); f '(x) = (15 x 4 + 2 x); g(x) = (2 x - 1); g' (x) = 2 y'(x) = (15 x 4 + 2 x)(2 x -1) + 2( 3 x 5 + x 2 ) y'(x) =[15 x 4(-1) + (2 x) + 15 x 4(2 x) ]+ 2(3 x 5) + 2(x 2) y'(x) = [ -15 x 4 + 4 x 2 + 30 x 5 ] + 6 x 5 + 2 x 2 y'(x) = -15 x 4 + 4 x 2 + 36 x 5 + 2 x 2 y'(x) = 36 x 5 - 15 x 4 + 6 x 2 Copyright © 2016 C. P. Rubenstein 16
Homework #05 Review For the following problems, use d/dx sin(x) = cos(x) and d/dx cos(x) = -sin(x) #3 a. If y(x) = [sin(x) • cos(x)], use the product rule to find y '(x) Ans: Product Rule: f(x) = sin(x); f '(x) = cos(x); g' (x) = - sin(x) y '(x) = cos(x) • cos(x) - sin(x) • sin(x) y '(x) = cos 2(x) - sin 2(x) NOTE: sin 2(x)+cos 2(x) =1 thus [-sin 2 (x)]= cos 2 (x) + 1 and y '(x) = cos 2(x) + cos 2 (x) + 1 = 2 cos 2 (x) + 1 then y '(x) = 2 cos 2 (x) + 1 3 b. For the function in 3 a, calculate the value of y'(2) (2 radians, not 2 degrees) y'(2) = cos 2(2) - sin 2(2) = m = - 0. 6536 3 c. Calculate the numerical approximation to y'(2) using dx =. 001 Using dx = 0. 001, m = - 0. 6529 and comparing the result with 3 b: good agreement with 3 b: m= -0. 6536 Copyright © 2016 C. P. Rubenstein 17
Homework #05 Review # 4. Use the sum rule and the product rule to find d/dx [sin(x) • sin(x) + cos(x) • cos(x)] Inspect your answer carefully to see if you can simplify it by combining terms. Ans: y'(x) = d/dx [ sin(x) • sin(x) + cos(x) • cos(x) ] y'(x) = 2 sin (x) cos(x) - 2 cos(x) sin(x) = 0 This result could be seen immediately since the derivative of a constant is zero and [sin(x) • sin(x) + cos(x) • cos(x)] = sin 2(x)+cos 2(x) =1, which is a constant Copyright © 2016 C. P. Rubenstein 18
Homework #05 Review #5 a. Use the reciprocal rule to find the derivative of y(x) = [ 1/sin(x) ] Ans: y(x) = [ 1/sin(x) ] y'(x) = [-1/sin 2(x)] • d/dx(sin x) y'(x) = -cos(x)/ sin 2(x) 5 b. Calculate y'(1. 5) = -cos(1. 5)/sin 2(1. 5) = m = - 0. 07109 5 c. Calculate the numerical approximation to the derivative at x =1. 5 using dx =. 001 and compare the result with your answer to 5 b. Using dx =. 001, m = - 0. 07059 y'(1. 5) = - 0. 07109 = good agreement Copyright © 2016 C. P. Rubenstein 19
Homework #05 Review #6 a. Use the quotient rule to find the derivative of the function y(x) = [( sin x) / x ] ; y(x) = f(x)/g(x) Ans: The quotient rule is y'(x) = [f '(x) g(x) - g'(x) f(x)] / g 2(x) so Here f(x) = sin(x), f '(x) = cos(x), g(x) = x, and g'(x) = 1 y '(x) = [cos(x) • x - 1 • sin(x) ] / x 2 6 b. Compute the numerical value of the derivative found in 6 a when x = 0. 5 [cos(0. 5) • 0. 5 - sin(0. 5) ] / 0. 52 ; m = - 0. 1625 6 c. Calculate the numerical approximation to the derivative at x= 0. 5 using dx=. 01 and compare the result with your answer to 6 b. Part 6 c: For dx = 0. 01, m = - 0. 164 Part 6 b: m = - 0. 1625 good agreement Copyright © 2016 C. P. Rubenstein 20
Homework #05 Review #7. Use the product rule to find the function d/dx [ sin(x) • ( 1/x )] Compare your result with that of Problem 6 a. Ans: Product Rule: f(x) = sin(x); f '(x) = cos(x); g(x) = (1/x); g' (x) = - (1 / x 2) y'(x) = cos(x)(1/x) + - (1 / x 2)(sin(x)) y'(x) = cos(x)/x - (sin(x)/ x 2) y'(x) = [cos(x)/x] • [x/x] - (sin(x)/ x 2) y '(x) = [cos(x) • x - sin(x)] / x 2 (same as the result of 6 a) Copyright © 2016 C. P. Rubenstein 21
Homework #05 Review #8 a. Use the chain rule to find y '(x) for the function y(x) = sin( x 2 + 3 x) Ans: y(x) = f (g) where f(x) = sin(x) and g(x) = x 2 +3 x Chain rule is so y'(x) = df/dg • dg/dx y'(x) = cos(g) dg/dx = (cos [ x 2+ 3 x]) • (2 x +3) 8 b. Calculate the numerical value of the derivative found in 8 a when x = 1 y'(1) = (cos [ 12+ 3 • 1]) • (2 • 1+3) = cos(4) • 5 = m = -3. 268 8 c. Calculate the numerical approximation to the derivative at x=1 with dx =. 001 and compare the result with your answer to 8 b Part 8 b: m = -3. 268 Part 8 b: dx = 0. 001 and x =1, m = -3. 259 good agreement Copyright © 2016 C. P. Rubenstein 22
Questions? Copyright © 2016 C. P. Rubenstein 23
Homework #06 REVIEW More Calculating Derivatives (10 problems) When you DO NOT show work, I have to guess. When you DO show work, I can try to see what you are doing and give an “O. K. ” Copyright © 2015 C. P. Rubenstein 24
Homework #06 Review #1. If y(x) = sec(x), find y'(x). Hints: Recall sec(x) = 1/cos(x). Use the reciprocal rule. Ans: Reciprocal Rule: d/dx [1/f(x)] = - f '/ f 2 = - f ' • [1/ f 2] where f ' = d/dx cos x; f 2 = [cos(x)]2 d/dx [1/cos(x)] = - [d/dx cos(x)] • [1/(cos(x))2] d/dx [1/cos(x)] = - [-sin(x)] • [1/cos 2(x)] d/dx [1/cos(x)] = sin(x)/cos 2(x) As tan(x) = sin(x)/cos(x) we could also solve as; d/dx [1/cos(x)] = [sin(x)/cos(x)] • [1/cos(x)] d/dx [1/cos(x)] = tan(x)[1/cos(x)] y'(x) = sin(x)/cos 2(x) = tan(x) • [1/cos(x)] = tan(x)sec(x) Copyright © 2015 C. P. Rubenstein 25
Homework #06 Review #2. If y(x) = tan(x), find y'(x). Hints: Recall tan(x) = sin(x)/cos(x) Use the quotient rule or the product and reciprocal rules Ans: We calculated d/dx [1/cos(x)] using Reciprocal Rule; where f(x) = sin(x); f ' = cos(x); g(x) = [1/cos(x)]; g’ = [sin(x)/cos 2(x)] Using the Product Rule: d/dx[f(x) • g(x)] = f ' g(x) + g' f(x) y'(x) = ( d/dx [sin(x)] • [ 1/cos(x)] )+ (d/dx [1/cos(x)] • sin(x)) y'(x) = cos(x) • [1/cos(x)] + [sin(x)/ cos 2(x)] • sin(x) y'(x) = 1 + sin 2(x)/cos 2(x) y'(x) = [sin(x)/cos(x)]2 + 1 = [tan(x)]2 + 1 Thus if y(x) = tan(x), y'(x) = tan 2(x) +1 Copyright © 2015 C. P. Rubenstein 26
Homework #06 Review #3. Test your answer to Problem 2 by calculating y'(0. 300) and comparing that number with [tan(0. 301) - tan(0. 300)]/. 001, the usual approximation. (Be sure your calculator is set for radians). Does your answer pass the test? Ans: y'(0. 3) = tan 2(0. 3) +1 y'(0. 3) = m = 1. 09569 [tan(0. 301) - tan(0. 300)]/. 001 y'(0. 3) = m = 1. 09603 Very close agreement, so we can be confident that y'(x) is the correct function Copyright © 2015 C. P. Rubenstein 27
Homework #06 Review #4. Use the product rule together with the result from Problem 2 to calculate the derivative of y(x) = [tan (x)]2 Ans: Note that y(x) = [tan (x)]2 ≡ [tan (x)] Using the product rule: d/dx[f(x) • g(x)] = f ' g(x) + g' f(x) where f(x)=g(x)=tan(x) and f ' = g ' = [ tan 2(x) +1] dy/dx = [d/dx tan(x) • tan(x)] + [d/dx tan(x) • tan(x)] dy/dx = [1+ tan 2(x)] • tan(x) + [1+ tan 2(x)] • tan(x) dy/dx = 2 tan(x) [1+ tan 2(x)] or dy/dx = 2 tan(x) + 2 tan(x) • tan 2(x) dy/dx = 2 tan(x)+ 2 tan 3(x) = 2 sec 2(x)tan(x) Copyright © 2015 C. P. Rubenstein 28
Homework #06 Review #5. Test your answer to Problem 4 by comparing y'(. 5) to [tan 2(. 501) - tan 2(. 500)]/. 001. Does your answer pass the test? If you are in doubt, calculate the approximation using a value for dx smaller than. 001. Be sure calculator is set for radians Ans: y'(. 5) = 2 tan(. 5) [1+ tan 2(. 5)] y'(. 5) = m = 1. 41869 [tan 2(. 501) - tan 2(. 500)]/. 001 y'(. 5) = m = 1. 42115 Close enough agreement to trust the expression for y'(x) Repeat with dx = 0. 00001: [tan 2(. 50001) - tan 2(. 500)]/. 0001 = m = 1. 41871 (extremely close) Copyright © 2015 C. P. Rubenstein 29
Homework #06 Review #7. Find the width, a, of the largest area rectangle bounded by the x-axis, the y-axis, the curve y 1= x 2/2, and the curve y 2=2 -x 2 and the line x=a. Hint: The area is given by the width, x, times the height, y 2(x) - y 1(x). Ans: The height of the rectangle, as a function of x, will be y 2(x) - y 1(x) = [2 - x 2] – [x 2/2] = 2 - 3 x 2/2 The width of the rectangle is just x, so the area is A(x) = x ( 2 - 3 x 2/2) = 2 x - 3 x 3/2 Taking d. A/dx we have d. A/dx = 2 - 9 x 2/2. This derivative will be zero when x 2 = 4/9 or x=2/3. The height of the box will be 2 – [3(2/3) 2]/2 = 2 - 4/3 = 2/3 and the area (width times height) will be (2/3) = 4/9. Copyright © 2015 C. P. Rubenstein 30
Homework #06 Review #8. Find the point on straight line y = x that is closest to the point 2, 1. Hint: Use the distance formula to express D 2, the distance between the given point and a point x, y on the line. Take the derivative of D 2 with respect to x. Find the value of x that makes the derivative zero. Ans: Use the distance formula, D 2 = (x-2)2 + (y-1)2 D 2 = (x-2)2 + (x-1)2 D 2 = 2 x 2 - 6 x +5 The derivative is d. D 2/dx = 4 x - 6, which is zero when x = 3/2 Since y=x, D 2 = (3/2 -2)2 + (3/2 -1)2 = 1/4 + 1/4 ; D 2 = ½ Therefore, D = (D 2)1/2 = 1/ 2 Copyright © 2015 C. P. Rubenstein 31
Homework #06 Review #9. The shortest distance from a point to a line will itself be a straight line that is perpendicular to the given line. Find the equation of the straight line through the point 2, 1 that is perpendicular to the line y = x. Find the intersection point of the two lines. Check that your answer agrees with the point you found in Problem 8. Hint: remember that perpendicular lines have slopes that are negative reciprocals of each other. Ans: The given line, y = x, has slope = 1. Therefore, the slope of the connecting line will be the negative reciprocal or -1. Using the point-slope formula, the equation for the connecting line is y-1 = -(x-2) or y = -x+3. Where the lines intersect, their y-values (and their x-values) are equal and thus -x+3 = x or 3 = 2 x and x = 3/2 Using the distance formula to find the distance between the given point and the point where the lines intersect, we have D 2 = (3/2 -2)2 + (3/2 - 1)2 = 1/4 + 1/4 ; D 2 = 1/2 Therefore, D = (D 2)1/2 = 1/ 2 This agrees with the answer we obtained in Problem 8, using calculus. Copyright © 2015 C. P. Rubenstein 32
Homework #06 Review #10. Use your calculator to guess the value of (This is another case where the denominator and numerator are both zero at x=0). Make a table showing the value of the function for smaller and smaller values of x such as x= 0. 1, . 001, etc. Ans: This is another case where the denominator and numerator are both zero at x=0 x 0. 1 0. 001 0. 0001 0. 48809 0. 49876 0. 49988 0. 49999 We see that the limit is going end up being 0. 50000 Copyright © 2015 C. P. Rubenstein 33
Questions? Copyright © 2015 C. P. Rubenstein 34
Strang: Chapter 5 Integrals 5. 1 The Idea of the Integral 5. 2 Antiderivatives 5. 3 Summation vs. Integration 5. 4 Indefinite Integrals and Substitutions 5. 5 The Definite Integral 5. 6 Properties of the Integral and the Average Value 5. 7 The Fundamental Theorem and Its Consequences 5. 8 Numerical Integration Copyright © 2015 C. P. Rubenstein 35
REVIEW: Rules for Differentiation Rule 1. The Derivative of a Constant is zero d/dx [C] = 0 (The graph of a constant is a horizontal line whose slope = 0) Rule 2. Constants can be removed from equation d/dx [C f(x) ] = C df/dx Where C is any constant Rule 3. The “Sum Rule” d/dx [ f(x) + g(x) ] = df/dx + dg/dx Rule 3 a. Combining Rules 2 and 3 above we have d/dx [C 1 f(x) + C 2 g(x)] = C 1 df/dx + C 2 dg/dx Copyright © 2015 C. P. Rubenstein 36
More Rules for Differentiation Rule 4. The “Product Rule” d/dx [f(x) g(x)] = g(x)df/dx + f(x)dg/dx Rule 5. The “Reciprocal Rule” d/dx [1/g(x)] = -dg/dx / [g(x)]2 Rule 6. The “Quotient Rule” d/dx [f(x) / g(x)] = [g(x) df/dx - f(x) dg/dx] / [g(x)]2 Rule 7. The “Chain Rule” Copyright © 2015 C. P. Rubenstein 37
REVIEW: Periodicity All of the trig functions come back to their original values if we increase the angle from a to [a +2 ] or [ a + 4 ], etc, which is why we say these functions are periodic: trig(a + 2 n) = trig(a) for any trig function and any integer n. The periodic functions sin(x) and cos(x) are plotted below. Note that cos(x) = sin(x + /2) and sin(x) = cos(x - /2) the curves are identical but displaced by /2. Copyright © 2015 C. P. Rubenstein 38
REVIEW: Derivatives of xa There are four possibilities for the exponent ‘a’ in y = xa 1. 2. 3. 4. a can be a positive integer: a = n a can be the reciprocal of a positive integer: a = 1/n a can be a positive integer fraction: a = m/n a can be a negative integer fraction: a = - m/n a a-1 In all cases: d/dx (x ) = a x Copyright © 2015 C. P. Rubenstein 39
REVIEW: e – the Magic Constant of Calculus A special value of a is the “magic constant of calculus”, e, for which on your calculator to many decimal places, is e = 2. 7182845. . . The beauty of e is that d/dx (ex) = 1 • ex That is ex is a function whose derivative is itself! Thus the value of the slope equals the function at x Copyright © 2015 C. P. Rubenstein 40
Program #02 “E” Calculating the value of e using an infinite series Copyright © 2015 C. P. Rubenstein 41
TI Calculator Program for e PROGRAM: E : 0 → S : Prompt N : For (I, 0, N-1) Put a zero into the storage location named S Ask the user for a number, N Begin a loop that will be executed N times with I = 0, 1, 2, . . . , N-1 : S+1/I! → S Calculate S + 1/ I! and replace the value of S with this new sum : End loop: Increase the value of I by 1 If I is still < N-1 repeat previous step : Disp S The loop has been executed N times: display the value of S Copyright © 2015 C. P. Rubenstein 42
“E” Program Keystrokes - 1 1. Create a program named ‘E’ 2. Put a zero into the storage location named ‘S’ 3. Prompt the user for a number, N 4. Begin a loop that will be executed N times with I = 0, 1, 2, . . . , N-1 Copyright © 2015 C. P. Rubenstein 43
“E” Program Keystrokes - 2 5. Calculate S + 1/ I! and replace the value of S with this new sum. 6. End loop: Increase the value of I by 1. If I is still < N-1 repeat previous step. 7. The loop has been executed N times, so display the value of S Copyright © 2015 C. P. Rubenstein 44
“E” Program Solution Find the sum of the first 50 terms, i. e. N=50: Presume that “E” is program #1; Resulting Display is: prgm. E Resulting Display is: N=? Set N=50; The answer ‘S’ is calculated as 2. 71828 Done Copyright © 2015 C. P. Rubenstein 45
Questions? Copyright © 2015 C. P. Rubenstein 46
Class #07: Newton’s Method Linear Approximation to a portion of a curve Chain Rule Proof Newton’s Method to find roots TI Calculator Program for Newton’s Method Copyright © 2015 C. P. Rubenstein 47
Linear Approximation to a portion of a curve We have noted several times that, if you zoom in very close to a point on a curve x 1, y(x 1) the curve appears to be a straight line segment and the slope of that line is the value of the derivative y'(x 1). That is why the approximate derivative formula works well when dx is a small number. Now let us work this backward: If we know the value of y(x) at x 1 and we know the value of the derivative y'(x 1) we can use the point-slope formula to write the equation of a straight line that is a good approximation to the function for all values of x close to x 1. y(x) – y 1 ≈ m(x – x 1) Substituting y(x 1) for y 1 and y '(x 1) for m and rearranging, we have y(x) ≈ y(x 1) + y'(x 1) • (x – x 1) This straight line is, of course, just the familiar tangent line. Copyright © 2015 C. P. Rubenstein 48
Linear Approximation for y(x)= (1+x 3)½ Example 1 Find the linear approximation for the function y(x)= (1+x 3)½ in the vicinity of x=1. We use the chain rule to find the derivative: y'(x) = ½ (1+x 3)-½ • 3 x 2 at x =1, y(1) = 2 and y '(1) = The linear approximation for the this function (the equation of the straight line tangent at x=1) is therefore y(x) ≈ y(1) + y'(1) • (x – 1) y(x) ≈ 2 + • (x – 1) y(x) = 1. 06 x + 0. 354 Copyright © 2015 C. P. Rubenstein 49
Graphing the Linear Approximation for y(x)= (1+x 3)½ Example 1, continued If the linear approximation for the this function is y(x) = 1. 06 x + 0. 354 The plots below show the function and the linear approximation. The right-hand plot shows that the approximation is quite good over the region 0. 9 <x < 1. 1. Copyright © 2015 C. P. Rubenstein 50
Linear Approximation of y(x) = sin(x) - x/2 Example 2. Find the linear approximation to the curve y(x) = sin(x) - x/2 in the vicinity of x = 2. ANS: At x = 2, y(2) = sin(2) - 1 = -0. 0907 The derivative is y '(x) = cos(x) – ½ and its value at x = 2 is y '(2) = cos(2) – ½ = - 0. 916 The linear approximation is, therefore y(x) ≈ - 0. 0907 - 0. 916 (x-2) [ y(x) ≈ – 0. 916 x – (0. 0907 + 2 • 0. 916) or y(x) ≈ – 0. 916 x – 1. 9227 ] The function and the linear approximation are shown in the graphs below. (The right-hand graph is a magnified section of the left-hand graph). Copyright © 2015 C. P. Rubenstein 51
Chain Rule Proof Using the definition of the derivative and the linear approximation method just discussed, we can provide a more formal proof of the chain rule, The chain rule allows us to find for d/dx [sin( x 2)]. In this example, g is the sine function and f is the “square function”. The overall function, sin(x 2), is a function of x because x determines the value of x 2 and the value of x 2 determines the value of the sine function. (This “chain” has two links). Applying the definition of the derivative, we have Copyright © 2015 C. P. Rubenstein 52
Linear Approximations We first use linear approximation to expand the term f(x + dx) as f(x) + df/dx • dx : The linear approximation is justified because, in the limit that dx goes to zero, the approximation becomes exact. Note that the argument of g is now the sum of two terms. The second term is very small, since dx will be very small, so we can apply linear approximation to the function g. Copyright © 2015 C. P. Rubenstein 53
Linear Approximations The first and last terms in the numerator cancel each other. We then cancel the common factor dx leaving us with Applying the chain rule to the example function: d/dx sin(x 2) = cos (x 2) • 2 x Copyright © 2015 C. P. Rubenstein 54
Newton's Method to find roots A root of a function, f(x), is a value of x that makes the function equal to zero. For the quadratic function, f(x) = ax 2 +bx +c, you know a formula that gives us the roots: x = But such formulas are rare. Most problems require that we use numerical methods to find approximations to the roots, good to some specified accuracy. You are asked to find a value of x greater than zero (i. e. , positive) that solves x/2 = sin(x). Note that solving this equation is the same as finding a root of the function y(x) = sin(x) - x/2. If you graph this function (see the graph two sections above), you will see that there is a root, i. e. , y = 0, near x = 1. 9. Using your calculator to try various values of x from this starting point you could use a trial and error procedure to home in eventually on a value of x that is a good approximation to the root's exact value. Copyright © 2015 C. P. Rubenstein 55
Derivation of Newton’s Method Isaac Newton devised a systematic procedure that uses linear approximation to home in on a root in very few steps when we know the function y '(x) as well as y(x). Let us use a to represent a root of a given function f(x), i. e. , f(a) =0. We have seen that, in the neighborhood of any point, a, the linear approximation for the function is f(a) ≈ f(a) + f '(a) • (x – a) … Eq. 1 But here, since f(a) = 0, we can write f(a) ≈ f '(a) • (x – a) … Eq. 2 The constant a is, of course, not yet known. The method therefore must begin with a guess of its value. Copyright © 2015 C. P. Rubenstein 56
Newton’s Method We might have drawn a graph which would give us a good guess but often even a wild guess will work. Let x 1 be our guess for the value of a root. Substituting x 1 for x in Equation 2 gives f(a) ≈ f '(a) • (x 1 – a) … Eq. 3 Now comes the trick. We could easily solve this equation for a, the value of the root if we knew the value of f '(a), but we don't yet know a. However, if our guess isn't too bad, we can expect that the value of the derivative does not change much between the points x = a (the actual root) and x = x 1 (our guess). Copyright © 2015 C. P. Rubenstein 57
Newton’s Method So, starting with Equation 3 f(a) ≈ f '(a) • (x 1 – a) … Eq. 3 And if we can expect that the value of the derivative does not change much between the points x = a (the actual root) and x = x 1 (our guess). . . We simply rewrite Equation 3, replacing f '(a) by f '(x 1). f(x 1) ≈ f '(x 1) • (x 1 – a) … Eq. 4 With this done, we solve for a. �� = x 1 – … Eq. 5 . Copyright © 2015 C. P. Rubenstein 58
Equation for Newton’s Method So Equation 5 is Newton's Method, where x 1 is our initial guess at the value of the root of a function. Equation 5 produces a, which is normally a better estimate of the root than our guess of x 1: �� = x 1 – … Eq. 5 Newton's formula thus takes a estimated value for the root and produces a value closer to the actual value. Copyright © 2015 C. P. Rubenstein 59
Equation for Newton’s Method Equation 5 is Newton's Method: �� = x 1 – … Eq. 5 which takes a estimated value x 1 the root and produces a value a closer to the actual value of the root. If we use the value of a as a new guess, i. e. , a new x 1 and start over with this guess for x 1 , Equation 5 again produces a new, improved, value of a, and so on. After repeating (“iterating”) the process several times, we will see that the value of a is no longer changing; we have zeroed in on a very accurate value for the root. Newton's Method is a fast working algorithm, a mathematical procedure. (Long division is an example of a familiar algorithm) Copyright © 2015 C. P. Rubenstein 60
Newton’s Method – Example 1: y(x) = sin(x) - x/2 Example 1. Find the root of the function we discussed above: y(x) = sin(x) - ½ (x) By inspection the derivative is y '(x) = cos(x) - ½ ; take x 1 = 2. 0 as our guess, using Equation 5, we get �� ≈ x 1 – { } �� ≈ 2. 0 – { [sin(2. 0) - 2. 0/2 ] / [cos(2. 0) -½] } we can multiply top and bottom by (-1) to get: �� ≈ 2. 0 – { [2. 0/2 – sin(2. 0)] / [½ - cos(2. 0)] } �� ≈ 1. 900 995 594 Now we use 1. 900995594 as our new value of x 1 and repeat the process: �� ≈ 1. 900995594 – { [1. 900995594 /2 – sin(1. 900995594)] / [cos(1. 900995594) -½ ] } �� ≈ 1. 895 511 645 after 2 iterations a ≈ 1. 895 494 267 after 3 iterations and a ≈ 1. 895 494 267 after 4 iterations Note that it took only three applications (iterations) of Newton's Method for the value of the root to converge to an accuracy of nine decimal places. Copyright © 2015 C. P. Rubenstein 61
Newton’s Method – Example 2: f(x) = x 2 - 7 Example 2. Find the square root of seven. The corresponding function is f (x) = x 2 - 7, since 7 is a root of this function which is proved from: f ( 7) = ( 7)2 - 7 = 7 - 7 = 0. The derivative is f '(x) = 2 x. Taking an initial guess, x 1 =3, and using Newton's Method we have �� ≈ x 1 – { } �� ≈ 3 – {[32 – 7] / 2 • 3} �� ≈ 2. 666 667 (after one iteration) �� ≈ 2. 6666 – {[2. 66662 – 7] / 2 • 2. 6666} �� ≈ 2. 645 833 333 (after 2 iterations) a ≈ 2. 645 751 312 after 3 iterations a ≈ 2. 645 751 311 after 4 iterations a ≈ 2. 645 751 311 (unchanged) after 5 iterations So, after four iterations, we have found the square root of seven to ten decimal places. Next we will create a Newton’s Method program for the TI-83. Copyright © 2015 C. P. Rubenstein 62
Program #03 Newton’s Method For roots of an equation Copyright © 2015 C. P. Rubenstein 63
Equation for Newton’s Method We saw the equation for Newton's Method, where x 1 is our initial guess at the value of the root, produces a, which is normally a better estimate of the root than our guess of x 1. �� = x 1 – … Eq. 5 After repeating (“iterating”) the process several times, we will see that the value of a is no longer changing; we have zeroed in on a very accurate value for the root. Copyright © 2015 C. P. Rubenstein 64
TI Calculator program for Newton's Method The following program will let you do a next iteration of Newton's Method each time you press if you enter the function, f (x) into Y 1 and its derivative, f '(x) into Y 2: PROGRAM: NEWT : Prompt X Prompt for entry of the initial guess. : Lbl 1 Label 1 - indicates the entry point for the next iteration. : X - Y 1(X) /Y 2 (X) → X Equation 5 where Y 1 is the function; Y 2 is its derivative. : DISP (X) Write the value of X on the calculator screen. : PAUSE Pause until “Enter” is pressed. : Goto 1 Jump back to the statement following Label “ 1. ” Put this program into your calculator and verify the two examples given above. You can see that using the program is much easier than entering long numbers when using only calculator mode. Use of this program will make short work of homework problems. Copyright © 2015 C. P. Rubenstein 65
TI Calculator ‘NEWT’ Program Keystrokes N E W T PROGRAM: NEWT : Prompt X : Lbl 1 : X - Y 1(X) /Y 2 (X) → X : DISP (X) : PAUSE : Goto 1 : QUIT Copyright © 2015 C. P. Rubenstein 66
Using the TI Calculator ‘NEWT’ Program Newton’s Method Program Use with Keystrokes For the first example, use f(x) = Y 1 = sin(x)-x/2 and f ’ (x) = Y 2 = cos(x)-1/2 and find: a ≈ 1. 895 494 267 Y 1 = sin(x)-x/2 Y 2 = cos(x)-1/2 If NEWT = second program: If x = 2: Yields: 1. 900 995 594 Yields: 1. 895 511 645 Yields: 1. 895 494 267 Now try: Example 2: Y 1 = x^2 -7 and so on… Y 2 = 2 x a ≈ 2. 645 751 311 Copyright © 2015 C. P. Rubenstein 67
Questions? Copyright © 2015 C. P. Rubenstein 68
In Class #08 No Classes 14 March Pratt Spring Break 14 -20 March 2016 • • • DUE: Take Home Midterm, Homework Set #07 Reading: Strang - Chapter 5: Integrals 2 Do: Linear Approximation, Newton's Method In Class Quiz and Review: Homework Set #07 2 Do: Lecture and Problem Review, Programming For our next class – Session 9 • DUE: Homework Set #08 DUE • Reading: Strang, Chapter 5: Integrals • 2 Do: l'Hôpital's Rule, Kinematics • In Class Quiz and Review: Homework Set #08 • 2 Do: Lecture and Problem Review Copyright © 2015 C. P. Rubenstein 69
Any Questions? Send me an email … crubenst@pratt. edu or c. rubenstein@ieee. org Copyright © 2015 C. P. Rubenstein 70
End Copyright © 2015 C. P. Rubenstein 71
- Slides: 71