MSCI 300 FALL 2015 Calculus 1 Charles Rubenstein
MSCI 300 – FALL 2015 Calculus 1 Charles Rubenstein, Ph. D. Professor of Engineering and Information Science Week 12: Session 9: Monday 11/09/15 Mondays 6: 30 pm-8: 50 pm PMC 705 A
Instructor Contact Information Dr. Charles Rubenstein <crubenst@pratt. edu> Professor of Engineering & Information Science Fall 2015 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 (* Quizzes on Homework due; Reviewed in same session) Copyright © 2015 C. P. Rubenstein 3
* Class Session Archives * http: //www. Charles. Rubenstein. com/300/ 15 fa 09. pdf (Class Power. Point slides) * 15 fa 09 h. pdf (slides in handout format) * *Archive materials normally online by Thursday evenings Copyright © 2015 C. P. Rubenstein 4
FALL 2015 TUTORING AVAILABLE Copyright © 2015 C. P. Rubenstein 5
In Class #09 • • • DUE: Homework Set #08 Reading: Strang - Chapter 6: Exponentials & Logarithms 2 Do: Logs, Inverse Function Derivatives, Implied Differentiation In Class Quiz and Review: Homework Set #08 2 Do: Lecture and Problem Review, Programming For our next class – Session #10 • DUE: Homework Set #09 DUE • Reading: Strang, Chapter 6: Exponentials & Logarithms • 2 Do: Areas, Intro to Integrals; Fundamental Theorem of Calculus • In Class Quiz and Review: Homework Set #09 • 2 Do: Lecture and Problem Review Copyright © 2015 C. P. Rubenstein 6
Questions? Copyright © 2015 C. P. Rubenstein 7
Some Review… Copyright © 2015 C. P. Rubenstein 8
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 9
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 10
Derivatives of xa There are four possibilities for the exponent ‘a’ in y = x a 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 11
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: x x x d/dx (e ) = f '(e ) = e Copyright © 2015 C. P. Rubenstein 12
Questions? Copyright © 2015 C. P. Rubenstein 13
Homework #08 Quiz x The Chain Rule and e 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 14
Homework #08 Quiz #3. Use the chain rule to find the derivative of You have five minutes to do this quiz Copyright © 2015 C. P. Rubenstein 15
Homework #08 Quiz #3. Use the chain rule to find the derivative of Ans: Using Chain Rule f ' (g[x]) = df/dg • dg/dx d/dx [y(x)] = y' (x) = d/dx [y(x)] • d/dx [ x 2] d/dx [y(x)] = y(x) • d/dx [ x 2] Copyright © 2015 C. P. Rubenstein 16
Homework #08 REVIEW x The Chain Rule and e 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 17
Homework #08 Review #1. Use the chain rule [where f( ) = e( ) and g(x) = 2 x ] to show the derivative of y(x) = e 2 x equals y'(x) = 2 e 2 x Ans: Using the chain rule with: f (e(2 x)) = e(2 x) and g(x) = 2 x thus g'(x) = 2 df/dx = f(x) • d/dx (g(x)) df/dx = e 2 x • d/dx (2 x) = 2 e 2 x Copyright © 2015 C. P. Rubenstein 18
Homework #08 Review #2. Now use the product rule [ note that e 2 x = ex • ex and d/dx(ex) = ex with f and g both equaling ex )] to again show that the derivative of e 2 x = 2 e 2 x Ans: Using the product rule: d/dx [f(x) g(x)] = g(x)df/dx + f(x)dg/dx BUT since g(x) = f(x); d/dx [ex • ex] d/dx [f(x) • f(x)] = f(x)df/dx + f(x)df/dx d/dx [ex • ex] = 2 [ f(x) • f '(x) ] d/dx [e 2 x] = 2 [ 1 ex • 1 ex ] d/dx [e 2 x] = 2 e 2 x Copyright © 2015 C. P. Rubenstein 19
Homework #08 Review #3. QUIZ PROBLEM Use the chain rule to find the derivative of Ans: Using Chain Rule f ' (g[x]) = df/dg • dg/dx d/dx [y(x)] = y' (x) = d/dx [y(x)] • d/dx [ x 2] d/dx [y(x)] = y(x) • d/dx [ x 2] Copyright © 2015 C. P. Rubenstein 20
Homework #08 Review # 4. Compare the value of the derivative at x =3 vs. approximate slope formula result to check your answer to Problem 3. (Pick an appropriately small value for dx) Ans. 4 a. Solve at x =3 : 4 b. Use the approximate slope program to calculate at x =3 using dx = 0. 0005 yields m = 48, 696 Copyright © 2015 C. P. Rubenstein 21
Homework #08 Review #5. Find the derivative of y(x) = sin (ex + x) Ans. Using the Chain Rule: f ' (g[x]) = df/dg • dg/dx y' (x) = cos[‘x’] • d/dx [‘x’] Copyright © 2015 C. P. Rubenstein 22
Homework #08 Review 6. Compare the value of the derivative at x =2 vs. approximate slope formula result to check your answer to Problem 5. (Pick an appropriately small value for dx) 6 a. Ans: at x =2 y'(2) = - 8. 384 6 b. Use the approximate slope program on: y(x) = sin (ex + x) at x = 2, with dx = - 0. 001 yields m = - 8. 379 Copyright © 2015 C. P. Rubenstein 23
Homework #08 Review 7. The chain rule is easily extended: if y(x) = f (g[ h(x)] ) y' = df/dg • dg/dh • dh/dx Find the derivative of y(x) = cos ( e 2 sin(x) ) Ans. df/dg = d/dg [cos(e 2 sin(x))] = - sin(e 2 sin(x)) and dg/dh = d/dh [e 2 sin(x)] = e 2 sin(x) and dh/dx = d/dx [2 sin(x)] = 2 cos(x) Putting the pieces together: Copyright © 2015 C. P. Rubenstein 24
Homework #08 Review 8. Compare the value of the derivative at x =1 vs. approximate slope formula result to check your answer to Problem 7. (Pick an appropriately small value for dx) 8 a. Ans. at x=1 y' (x) = 4. 5617 8 b. Be careful with parentheses in your calculator: y 1 = -sin(e^(2 sin(x))) * e^(2 sin*(x)) * 2 cos(x) approx slope program at x = 1, using dx = 0. 001 yields m = 4. 5617 Copyright © 2015 C. P. Rubenstein 25
Homework #08 Review 9. In the figure, point B moves around a unit circle. Point A is constrained to move only along the y-axis. A rod of length 2 connects points B and A. This could be a piston at A moving up and down a cylinder and connected to a crank pin at B via a connecting rod. 9 a 1. Find an expression y(θ) that gives the y-coordinate of point A in terms of the angle θ. Hint: Use the law of cosines which, here, is 22 = 12 + y 2 - 2 • 1 • y cos (θ) Rearranging, 4 = 1 + y 2 -2 y cos (θ) or, 3 = y 2 -2 y cos (θ) Solve for y(θ) by completing the square or using quadratic formula. Completing the Square Technique: We need to find a term, which, when squared equals some of the terms we have already: y 2 and - 2 y cos(θ) - so try [y - cos(θ)] 2 When squared: [y - cosθ]2 = [y 2 - 2 y cos(θ) + cos 2θ] which has two of our original terms! We have 3 = y 2 - 2 y cos(θ) which can be written [y 2 - 2 y cos(θ)] = 3 therefore, to complete the square we add cos 2θ to both sides, yielding: [y - cosθ]2 = 3 + cos 2θ Copyright © 2015 C. P. Rubenstein 26
Homework #08 Review 9. In the figure, point B moves around a unit circle. Point A is constrained to move only along the y-axis. A rod of length 2 connects points B and A. This could be a piston at A moving up and down a cylinder and connected to a crank pin at B via a connecting rod. 9 a 2. Find an expression y(θ) that gives the y-coordinate of point A in terms of the angle θ. Hint: Use the law of cosines which, here, is 22 = 12 + y 2 - 2 • 1 • y cos (θ) 3 = y 2 -2 y cos (θ) which is also: y 2 -2 y cos (θ) = 3 Completing the Square yielded: [y- cosθ]2 = 3 + cos 2θ taking the root of both sides yields Solving for y: From the geometry, we see that y = A can never be negative, so we must pick the + sign root: [ or y = cosθ + (3 + cos 2θ)1/2 ] Copyright © 2015 C. P. Rubenstein 27
Homework #08 Review 9. In the figure, point B moves around a unit circle. Point A is constrained to move only along the y-axis. A rod of length 2 connects points B and A. This could be a piston at A moving up and down a cylinder and connected to a crank pin at B via a connecting rod. 9 b 1. y 2 - 2 y cos(θ) = 3 and therefore Use the chain rule to find an expression for dy/dθ: dy/dθ = { [d/dθ (cosθ)] + [d/dθ(3 + cos 2θ)½ • d/dθ(3 + cos 2θ)] } Differentiation of the pieces yields: d/dθ (cosθ) = - sinθ d/dθ (3 + cos 2θ)½ = [ ½ (3 + cos 2θ)-½ ] d/dθ(3 + cos 2θ) = [d/dθ(3) + d/dθ (cos 2θ)] d/dθ(3) = 0 and d/dθ(cos 2θ) = d/dθ (cosθ)(cosθ) = [(- sinθ)(cosθ) + (- sinθ)(cosθ)] so, d/dθ(3 + cos 2θ) = 2(- sinθ)(cosθ) Putting the pieces together yields: dy/dθ = [- sin(θ) + [ ½ (3 + cos 2θ)-½ • 2(- sinθ)(cosθ)]] Copyright © 2015 C. P. Rubenstein 28
Homework #08 Review 9. In the figure, point B moves around a unit circle. Point A is constrained to move only along the y-axis. A rod of length 2 connects points B and A. This could be a piston at A moving up and down a cylinder and connected to a crank pin at B via a connecting rod. 9 b 2. y 2 - 2 y cos(θ) = 3 and therefore Use the chain rule to find an expression for dy/dθ: dy/dθ = [d/dθ (cosθ) + [d/dθ (3 + cos 2θ)½ • d/dθ[(3 + cos 2θ)]] From the last slide, putting the pieces together yielded: dy/dθ = [- sinθ + [ ½ (3 + cos 2θ)-½ • 2(- sinθ)(cosθ)]] Multiplying through: dy/dθ = - sinθ + [ -2 • (sinθcosθ) • ½ • (3 + cos 2θ)-½ ] and dy/dθ = - sinθ + [ -(sinθcosθ) • (3 + cos 2θ)-½ ] Therefore: dy/dθ = - sin(θ) - [ sinθcosθ / (3+ cos 2θ) ] or dy/dt = - sinθ [ 1 + cosθ / (3+ cos 2θ) ] Copyright © 2015 C. P. Rubenstein 29
Homework #08 Review 9. In the figure, point B moves around a unit circle. Point A is constrained to move only along the y-axis. A rod of length 2 connects points B and A. This could be a piston at A moving up and down a cylinder and connected to a crank pin at B via a connecting rod. 9 c. If theta is a function of time, θ(t) , find an expression for dy/dt which is the velocity of the piston. Using the chain rule: dy/dt = dy/dθ • dθ/dt From 9 b. : dy/dθ = - sin(θ) - [ sinθcosθ / (3+ cos 2θ) ] thus; dy/dt = {- sin(θ) – [sinθcosθ / (3+ cos 2θ)] } • dθ/dt or dy/dt = { - sinθ [1 + cosθ / (3+ cos 2θ)] } • dθ/dt Copyright © 2015 C. P. Rubenstein 30
Questions? Copyright © 2015 C. P. Rubenstein 31
Class #09: Logs & Derivatives Review of Logarithms Converting to a different Base Derivative of the Function y = ax Derivative of the Function y = ln(x) Derivative of the Function y = loga(x) Derivatives of Inverse Trig Functions y = sin-1(x) Implicit Differentiation Derivatives of Exponential & Log Functions Copyright © 2015 C. P. Rubenstein 32
Review of Logarithms 103 = 1000 3 is the logarithm of 1000 because ten raised to the power 3 is 1000 Log 1000 = 3 You know that Logarithms based on powers of 10 are known as 10 -base logarithms or “common logarithms. ” The log and the exponential function are the inverse functions of each other. Copyright © 2015 C. P. Rubenstein 33
Review of Logarithms - Examples Example 1 10 3 = 1000 3 = log 1000 10 x = y x = log y If we use a base other than 10, we use a subscript to indicate the base Example 2 2 3 = 8 3 = log 2 (8) 2 y = x y = log 2 (x) Logs to the base e (loge ) use the notation ln (for “natural log”). e 2 = 7. 389. . . 2 = loge (7. 389. . . ) = ln (7. 389. . . ) Copyright © 2015 C. P. Rubenstein 34
Converting to a Different Base Suppose want to write log(x) in terms of ln(x) From the definition of log(x) we have: x = eln(x) Next, we note the definition: e = 10 log(e) We substitute Equation 2 into Equation 1: x = eln(x) = (10 log(e))ln(x) Using the fact that [a n ] m = a (n • m) we have x = 10(n • m) = 10(log(e) • ln(x)) 1) 2) 3) 4) Recalling from the last slide that the exponent of 10 = log(x): log(x) = log(e) • ln(x) 5) e was an arbitrary choice of base. In general going from base a to base b: loga (x) = logb (x) • loga (b) Copyright © 2015 C. P. Rubenstein 6) 35
Derivative of the Function y = ax We know one special case, d/dx ( ex ) = ex Let us do the general case: Use the relation: a = e ln (a) With this substitution we have: Using the chain rule on this expression gives us: Remember that by experimenting with the numerical approximation to the derivative, we had discovered that the derivative of ax is proportional to ax. When a = 10, the constant of proportionality is ln (10) = 2. 30258. . . , This is the number we found numerically in Noteset 8. Copyright © 2015 C. P. Rubenstein 36
Derivative of the Function y = ln(x) Remember how we first found the derivative of y = x 1/2 by writing its inverse, x = y 2 , taking the derivative of x with respect to y and noting that this is the reciprocal of dy/dx. Let us do the same with the function y = ln (x) : The inverse relation is x = e y Taking the derivative with respect to y gives us dx/dy = e y or dx/dy = x Taking the reciprocal, dy/dx = 1/e y or dy/dx = 1/x. But y = ln(x), so define: Copyright © 2015 C. P. Rubenstein 37
Derivative of the Function y = loga(x) The inverse relation is x = a y Using the discussion above, we can write dx/dy = ln (a) • a y = ln(a) • x Taking the reciprocal: dy/dx = 1/(x ln[a] ) or Copyright © 2015 C. P. Rubenstein 38
Derivatives of Inverse Trig Functions y = sin-1(x) d/dx [ sin-1(x)] Remember that this function, sin-1(x) , is the inverse sine or “arc sine. ” If y = sin-1(x) , then y is the angle whose sine is x, i. e. , Let us now find x = sin(y) To find the derivative, we use this inverse equation and again find dx/dy, since dy/dx is just the reciprocal of dx/dy and substituting x 2 = sin 2(y) at the end: Taking the reciprocal of dx/dy we can also find dy/dx : Copyright © 2015 C. P. Rubenstein 39
Derivatives of Inverse Trig Functions: cos-1(x) & tan-1(x) The derivative of sin -1 : Using the same method as before, we can find the derivative of cos-1 : And of tan-1 : Copyright © 2015 C. P. Rubenstein 40
Implicit Differentiation We found for y = ln(x) that y' = 1/x by writing the inverse relation, x = e y and differentiating with respect to y. However, using the chain rule, we can differentiate directly with respect to x. Taking the derivative of both sides of the inverse relation, we have Dividing each side of the right-hand equation by e y gives us The chain rule lets you take the derivative of both sides of an equation, even when the equation has not been arranged into the form y = f(x) Copyright © 2015 C. P. Rubenstein 41
Implicit Differentiation: Example: y 5 + 3 x = xy + 1, where y = y(x), find dy/dx Solution Part a: Critical here is y = y(x): we’ll need the chain & product rules: 1. Take the derivative of both sides with respect to x: d/dx [y 5 + 3 x = xy + 1] { d/dx[y 5] + d/dx [3 x] = d/dx [xy] + d/dx [1] } 2. Take the derivatives of each piece separately substituting y=y(x) for clarity: dy/dx[y(x)5] = dy/dg • dg/dx = d/dx[y(x)5] • d/dx[y(x)]= 5 y 4 • dy/dx Chain rule dy/dx [3 x] = 3 dy/dx [x • y(x)] = f ' g(x) + g ' f(x) = [1 • y(x) + dy/dx • x] Product rule dy/dx [1] = 0 3. Put the pieces together (and revert back to y=y(x)) : dy/dx = { d/dx[y 5] + d/dx [3 x] = d/dx [xy] + d/dx [1] } dy/dx = { 5 y 4 • dy/dx + 3 = [y + dy/dx • x] + 0 } . Copyright © 2015 C. P. Rubenstein 42
Implicit Differentiation: Example: y 5 + 3 x = xy + 1, where y = y(x), find dy/dx Solution Part b: From Part a we found: d/dx [y 5 + 3 x = xy + 1] { d/dx[y 5] + d/dx [3 x] = d/dx [xy] + d/dx [1] } dy/dx = { [5 y 4 • dy/dx] + 3 = [y + dy/dx • x] + 0 } 4. Rewriting this we find: 5 y 4 dy/dx + 3 = x dy/dx + y 5. Putting dy/dx terms on left: 5 y 4 dy/dx – x dy/dx = y - 3 6. Solving for dy/dx we find: This formula lets us calculate the slope at a point x, y if (and it’s a big if) we know the value of both x and y. Here, the connection between x and y is the equation y 5 + 3 x = xy + 1, a fifth order equation which we cannot solve. For this reason, implicit differentiation is a technique that only rarely lets us “crack” a problem. Copyright © 2015 C. P. Rubenstein 43
Derivatives of Exponential & Log Functions: 1 Using the properties of exponential and logarithmic functions and their derivatives, we can find the derivatives of a wide variety of functions. Example 1. Find the derivative of ln(ln[x]), the “natural log of the natural log of x”: Solution: The key to this problem is that we know d/dx ln( ) = 1/( ). using the chain rule: we find: Copyright © 2015 C. P. Rubenstein 44
Questions? Copyright © 2015 C. P. Rubenstein 45
In Class #10 • • • DUE: Homework Set #09 DUE Reading: Strang, Chapter 5: Integrals 2 Do: Areas, Intro to Integrals; Fundamental Theorem of Calculus In Class Quiz and Review: Homework Set #09 2 Do: Lecture and Problem Review Copyright © 2015 C. P. Rubenstein 46
Any Questions? Send me an email … crubenst@pratt. edu or c. rubenstein@ieee. org Copyright © 2015 C. P. Rubenstein 47
End Copyright © 2015 C. P. Rubenstein 48
- Slides: 48