Engineering Mathematics: Differential Calculus Contents Concepts of Limits and Continuity Derivatives of functions Differentiation rules and Higher Derivatives Applications Differential Calculus Concepts of Limits and Continuity The idea of limits f(x) x 2 Consider a function The function is well-defined for all real values of x The following table shows some of the values: x 2.9 2.99 2.99 3 3.001 3.01 3.1 F(x) 8.41 8.94 8.994 9 9.006 9.06 9.61 lim f ( x ) lim x 9 2 x 3 x 3 The idea of limits Concept of Continuity E.g. f ( x ) x 2 is continuous at x=3? The following table shows some of the values: x 2.9 2.99 2.99 3 3.001 3.01 3.1 F(x) 8.41 8.94 8.994 9 9.006 9.06 9.61 lim f ( x ) 9 lim f ( x ) 9 x 3 and lim f ( x ) exists x 3 as lim f ( x ) 9 f ( 3 ) x 3 x 3 lim f ( x ) lim f ( x ) 9 x 3 x 3 => f(x) is continuous at x=3! Differential Calculus Derivatives of functions Derivative (導數) y Given y=f(x), if variable x is given an increment Dx from x=x0, then y would change to f(x0+Dx) Dy= f(x0+Dx) – f(x) Dy/Dx is the slope (斜率) of triangular ABC Y=f(x) f(x0+Dx) B Dy f(x0) A C Dx x0 x0+Dx x Derivative What happen with Dy/Dx as Dx tends to 0? It seems that Dy/Dx will be close to the slope of the curve y=f(x) at x0. We defined a new quantity as follows dy dx df ( x ) dx lim Dx 0 Dy Dx lim Dx 0 f ( x Dx ) f ( x ) Dx If the limit exists, we called this new quantity as the derivative (導數) of f(x). The process of finding derivative of f(x) is called differentiation (微分法). Derivative y Y=f(x) f(x0+Dx) B Dy f(x0) A C Dx x0 x0+Dx Derivative of f(x) at Xo = slope of f(x) at Xo x Differentiation from first principle Find the derivative of y f ( x ) x 3 x with respect to (w.r.t.) x 2 dy dx lim Dx 0 lim Dy Dx f ( x Dx ) f ( x ) Dx Dx 0 ( x D x ) 3( x D x ) ( x 3 x ) 2 lim 2 Dx Dx 0 x 2 x( D x ) ( D x ) 3 x 3 D x x 3 x ) 2 lim 2 2 Dx Dx 0 2 x( D x ) ( D x ) 3D x 2 lim Dx 0 Dx lim ( 2 x D x 3 ) Dx 0 2x 3 To obtain the derivative of a function by its definition is called differentiation of the function from first principles Differential Calculus Differentiation rules and Higher Derivatives Fundamental formulas for differentiation I Let f(x) and g(x) be differentiable functions and c be a constant. d( c ) 0 dx d ( f ( x ) g ( x )) df ( x ) dx d ( cf ( x )) dx c dx df ( x ) dx dg ( x ) dx n d( x ) dx nx n 1 for any real number n Examples 3 x 4 x 1 and Differentiate w.r.t. x y 3x 4x 1 2 d( 3x ) dx 3 d( 4x ) dx 2 3 d ( 1 ) dy dx dx dx d( x ) 4 d( x ) dx 3( 2 x ) 4 0 6x 4 3 2 y 5x 8x 6x 9 2 dy 5x 8x 6x 9 2 dx 0 2 3 5 d (x ) 2 (8) dx d (x ) dx 5 (3 x ) 8 ( 2 x ) 6 0 2 15 x 16 x 6 2 6 d ( x) dx d (9 ) dx Table of derivative (1) df ( x ) Function f ( x ) Constant k x kx kx n ln x ln kx Derivative 0 1 k knx 1 x 1 x n 1 dx Table of Derivatives (2) df ( x ) Function e f (x) kx Derivative ke kx sin kx k cos kx sin( kx ) cos kx k co s( kx ) cos( kx ) dx k sin kx k sin( kx ) Angles in radians Differential Calculus Product Rule, Quotient Rule and Chain Rule - The product rule and the quotient rule Form of product function Form of quotient function e.g.1 y( x ) u ( x )v ( x ) y( x ) u( x ) v( x ) y ( x ) x cos x 2 This is a _________ function with u ( x ) and v ( x ) e x x e.g.2 y( x ) ln x This is a _________ function with and t 1 2 e.g.3 y(t ) cos t e.g.4 f ( t ) ( t 6 ) cos 2 t e.g.5 f ( x ) (3 x 7 )e 2 2 x u( x ) v( x ) The product rule Consider the function y( x ) u ( x )v ( x ) dy Using the product rule, dx du vu dx u ' v uv ' dy e.g.1 Find Solution: dx where y x 2 cos x dv dx e.g.2 Find y ' where y ( x ) Solution: df e.g.3 Find f ' dt Solution: where xe 2x f ( t ) t ln t 3 The quotient rule Consider the function u( x ) y( x ) . v( x ) Applying the quotient rule, dy dx e.g.1 Find y ' where y cos x x Solution: v du u dx v 2 dv dx vu ' uv ' 2 v e x x e.g.2 Find y ' where y ( x ) ln x Solution: e.g.3 Find Solution: dy y ' dt t 1 2 where y ( t ) cos 3 t More Example (1) y Differentiate f ( x ) 2 3x dy ( 2 3x ) d( 2 3x ) ( 2 3x ) dx 2 ( 2 3 x )( 3 ) ( 2 3 x )( 3 ) ( 2 3x ) 12 ( 2 3x ) 2 d( 2 3x ) dx ( 2 3x ) dx 2 3x w.r.t. x g( x ) 2 3x 2 3x 2 More Example (2) Differentiate dy y ( 2 x 4 x 1 )( 3 x 2 x 5 ) 2 d( 3x 2x 5 ) 2 ( 2x 4x 1) 2 dx d( 2x 4x 1) 2 ( 3x 2x 5 ) 2 dx ( 2 x 4 x 1 )( 3 2 dx 2 2 dx dx dx dx d( 5 ) ) ( 3 x 2 x 5 )( 2 2 dx ( 2 x 4 x 1 )( 3( 2 x ) 2 ) ( 3 x 2 x 5 )( 2 ( 2 x ) 4 ) 2 2 ( 2 x 4 x 1 )( 6 x 2 ) ( 3 x 2 x 5 )( 4 x 4 ) 2 2 24 x 24 x 2 x 22 3 2 w.r.t. x 2 dx 2 dx 4 dx dx d ( 1 ) dx ) Fundamental formulas for differentiation II Let f(x) and g(x) be differentiable functions d ( f ( x ) g ( x )) f ( x ) dx d ( f ( x ) / g ( x )) dx d ( g ( x )) g( x ) d ( f ( x )) dx g( x ) df ( x ) dx f(x) dx 2 ( g ( x )) dg ( x ) dx Fundamental formulas for differentiation III d cos( x ) sin( x ) d sin( x ) dx dx d tan( x ) 1 dx (cos( x )) d sec( x ) 2 (sec( x )) d cot( x ) 2 d csc( x ) sec( x ) tan( x ) 1 dx dx de cos( x ) (sin( x )) 2 (csc( x )) csc( x ) cot( x ) dx x e x where dx d ln( x ) dx e 1 x x x 2 2! 1 x where x 3 3! x 4 4! x 5 5! ln( e ) x x ln(x) is called natural logarithm (自然對數) 2 Differentiation of composite functions y x 1 2 To differentiate w.r.t. x, we may have problems as we don’t have a formula to do so. The problem can be simplified by considering composite function: u x 1 2 Let so y and u y x 1 2 we know derivative of y w.r.t. u (by formula): 1 dy du d u du du du 2 1 2 1 u2 1 1 2 u 1 2 but still don’t know dy dx Chain Rule (鏈式法則) Chain Rule states that : given y=g(u), and u=f(x) dy dy dx So our problem dy x 1 d dx dx 1 2 u du y g( u ) 2 dy du dx and u u f ( x ) x 1 2 du dy dx du ( 2 x ) x( x 1 ) 2 2 du dx d u du 1 1 2 du 1 u 1 2 2 d x 1 2 dx 2x Example 1 Differentiate y (cos( x )) 3 w.r.t. x Simplify y by letting u cos( x ) so now By chain rule dy dy du dx dy dy dx du du du dy du du dx 3u dx du 2 3 du 3 yu dx d (cos( x )) sin( x ) dx 3 u ( sin( x )) 3 sin( x )(cos( x )) 2 2 Example 2 2 Differentiate y e w.r.t. x x u Simplify y by letting u x so now y e By chain rule dy dy du 2 dx dy du de du u e du u du dy dx dx dx dy du du dx dx 2 2x dx e 2 x 2 xe u x 2 Example 3 Differentiate y ln( 2 x 3 ) 2 w.r.t. x Simplify y by letting u 2 x 3 so now y ln( u ) By chain rule dy dy du 2 dx dy du d ln( u ) du dx 1 du du u dx dy dy dx du du dx d( 2x 3 ) 2 4x dx 1 u 4x 4x 2x 3 2 Higher Derivatives (高階導數) If the derivatives of y=f(x) is differentiable function of x, its derivative is called the second derivative (二階導數) of y=f(x) 2 d y or f ’’(x). That is and is denoted by dx 2 2 f ''( x) f (2) ( x) d y dx d 2 ( dy ) dx dx 3 Similarly, the third derivative = f (3) ( x) d y dx n the n-th derivative = f (n) (x) d y dx n d dx ( d 3 dx n 1 dx d y n 1 ) 2 ( d y dx 2 ) Example 2 Find dy 4 dx 2 dx dx 4 dx dx d y 2 3 dy d y d y , 2 , 3 dx dx dx d 12 dx dx ( dx dy 3 3 4 2 8 dx ) 16 dx dx d y dx 3 y 4 x x 12 x 8 x 6 if 3 3 dx dx 2 ( d y dx 2 dx dx d dx ) 48 3 d( 6 ) 16 x 3 x 24 x 8 3 2 dx 2 24 dx dx 2 dx dx 2 dx 6 dx dx d(8 ) 48 x 6 x 24 2 dx d ( 24 ) dx 96 x 6 Differential Calculus Applications Slope of a curve Recall that the derivative of a curve evaluate at a point is the slope of the curve at that point. Y=f(x) f(x0+Dx) B Dy f(x0) A Derivative of f(x) at Xo = slope of f(x) at Xo C Dx x0 x0+Dx x Slope of a curve Find the slope of y=2x+3 at x=0 To find the slope of a curve, we have to compute the derivative of y and then evaluate at a point dy dx d( 2x 3 ) 2 dx The slope of y at x=0 equals 2 (y=mx+c now m=2) Slope of a curve Find the slope of y x 1 at x=0, 2, -2 2 dy dx d( x 1) 2 2x dx The slope of y = 2x The slope of y (at x=0) = 2(0) = 0 The slope of y (at x=-2) =2(-2) = -4 The slope of y (at x=2) =2(2) = 4 X=-2 X=2 X=0 Local maximum and minimum point dy 0 For a continuous function, the point at which dx is called a stationary point. This gives the point local maximum or local minimum of the curve D B X1 C A X2 First derivative test (Max pt.) Given a continuous function y=f(x) If dy/dx = 0 at x=xo & dy/dx changes from +ve to –ve through x0, x=x0 is a local maximum point local maximum point x=x0 First derivative test (Min pt.) Given a continuous function y=f(x) If dy/dx = 0 at x=xo & dy/dx changes from -ve to +ve through x0, x=x0 is a local minimum point x=x0 local minimum point Example 1 Determine the position of any local maximum and minimum of the function y x 2 1 First, find all stationary point (i.e. find x such that dy/dx = 0) dy d( x 1) 2 dx when dx x 0, dy dx 2 x , so 2x 0 dy 0 dx when x 0, when x=0 dy 2x 0 dx By first derivative test x=0 is a local minimum point Example 2 Find the local maximum and minimum of y x 3 6 x 2 9 x 2 Find all stationary points first: dy y x 6x 9x 2 3 2 3 x 12 x 9 3( x 1 )( x 3 ) 2 dx dy 0, x 1 when x3 and dx x 0 x<1 x=1 1<x<3 x=3 x>3 dy/dx + + 0 - 0 + Example 2 (con’d) By first derivative test, x=1 is the local maximum (+ve -> 0 -> -ve) x=3 is the local minimum (-ve -> 0 -> +ve) Second derivative test Second derivative test states: There is a local maximum point in y=f(x) at x=x0, 2 dy d y < 0 at x=x0. if 0 at x=x0 and dx dx There is a local minimum point in y=f(x) at x=x0, 2 dy d y > 0 at x=x0. if 0 at x=x0 and dx 2 d y 2 dx 2 If dy/dx = 0 and 2 =0 both at x=x0, the second derivative dx test fails and we must return to the first derivative test. Example Find the local maximum and minimum point of y x 6x 9x 2 3 2 Solution Find all stationary points first: y x 6x 9x 2 3 2 dy 3 x 12 x 9 3( x 1 )( x 3 ) 2 dx dy 0, then x 1 or 2 d y x3 dx dx 2 6 x 12 x 2 d y dx 2 6 ( 1 ) 12 6 0 2 x 1 d y dx 6 ( 3 ) 12 6 0 2 x3 By second derivative test, x=1 is max and x=3 is min. So, (1,2) is max. point and (3,-2) in min. point. Practical Examples 1 e.g.1 A rectangular block, with square base of side x mm, has a total surface area of 150 mm2. Show that the volume of the block is given by V 1 ( 75 x x 3 ) . 2 Hence find the maximum volume of the block. Solution: Practical Examples 2 A window frame is made in the shape of a rectangle with a semicircle on top. Given that the area is to be 8 , 8 show that the perimeter of the frame is P r ( 2 ). r 2 Find the minimum cost of producing the frame if 1 metre costs $75. Solution: