Rules for finding derivatives. In this worksheet we will use the power/sum/difference/product/quotient rules to find derivative of some functions. The results will then be checked against Maple command diff. First, we recall the followings (D stands for Dx , the derivative operator) D(xn ) = n x(n−1) D(k f(x)) = k Df(x) if k is a constant D(f(x) + g(x)) = Df(x) + Dg(x) D(f(x) − g(x)) = Df(x) − Dg(x) D(f(x) g(x)) = Df(x) g(x) + f(x) Dg(x) f(x) D( g(x) )= Df(x) g(x)−f(x) Dg(x) g(x)2 Rules for Trigonometric functions D(sin(x)) = cos(x) D(cos(x)) = −sin(x) D(tan(x)) = 1 cos(x)2 = 1 + tan(x)2 1 2 D(cotan(x)) = − sin(x) 2 = −1 − cotan(x) 1 Sum rule Compute the derivative of > f:=x->x^3+2/x; f := x → x3 + 2 1 x Using the power rule, we have > diff(x^3,x); 3 x2 Writing = x(−1) and using the power rule, we have > diff(x^(-1),x); 1 − 2 x Putting together, we have the derivative of f(x) is 3 x2 + 2 (− x12 ). Check with Maple, we have > diff(f(x),x); 1 3 x2 − 2 2 x 1 x 1 2 Product rule Compute the derivative of > f:=x->(3*x^2-2*x)*(x^3+x^2); f := x → (3 x2 − 2 x) (x3 + x2 ) Think of f(x) as the product of the following functions > p:=x->3*x^2-2*x; q:=x->x^3+x^2; p := x → 3 x2 − 2 x q := x → x3 + x2 We can use the power and sum rules to compute their derivatives and get > deriv_of_p:=diff(p(x),x); deriv_of_q:=diff(q(x),x); deriv of p := 6 x − 2 deriv of q := 3 x2 + 2 x > deriv_of_f:=deriv_of_p * q(x) + p(x)*deriv_of_q; deriv of f := (6 x − 2) (x3 + x2 ) + (3 x2 − 2 x) (3 x2 + 2 x) Using Maple to check our result > diff(f(x),x); (6 x − 2) (x3 + x2 ) + (3 x2 − 2 x) (3 x2 + 2 x) We can see that they are identical. Let’s ask Maple to simplify the above > simplify(%); 15 x4 + 4 x3 − 6 x2 3 Quotient rule Compute the derivative of > f:=x->(3*x-2)/(x^2+1); 3x − 2 x2 + 1 Think of f(x) as the quotient of the following functions > p:=x->3*x-2; q:=x->x^2+1; p := x → 3 x − 2 q := x → x2 + 1 We can use the power and sum rules to compute their derivatives and get > deriv_of_p:=diff(p(x),x); deriv_of_q:=diff(q(x),x); deriv of p := 3 deriv of q := 2 x > deriv_of_f:=(deriv_of_p * q(x) - p(x)*deriv_of_q)/(q(x))^2; 3 x2 + 3 − 2 (3 x − 2) x deriv of f := (x2 + 1)2 Using Maple to check our result > diff(f(x),x); (3 x − 2) x 1 −2 3 2 x +1 (x2 + 1)2 f := x → 2 Doesn’t look like ours! Let’s ask Maple to simplify the above > simplify(%); 3 x2 − 3 − 4 x − (x2 + 1)2 and simplify what we got > simplify(deriv_of_f); 3 x2 − 3 − 4 x − (x2 + 1)2 We can see that the two formulas are identical. 4 Derivative of Trig Functions In this section we will apply the rules for finding derivative and the derivative formulas for elementary trigonometric functions. 4.1 example 1 f:= x->(x^2-2*x)*(sin(x)+2*cos(x)); f := x → (x2 − 2 x) (sin(x) + 2 cos(x)) Think of f as the product of two functions > p:=x->x^2-2*x; q:=x->sin(x)+2*cos(x); p := x → x2 − 2 x q := x → sin(x) + 2 cos(x) Derivative of p, as a polynomial, is easily computed by using the power rule. > deriv_of_p:=diff(p(x),x); deriv of p := 2 x − 2 Derivative of q, as the sum of two Trig. functions, is easily computed by using the sum rule and the Trig formulas. > deriv_of_q:=diff(q(x),x); deriv of q := cos(x) − 2 sin(x) Finally, by the product rule, we have the derivative of f(x) as > deriv_of_f := diff(p(x),x)*q(x)+p(x)*diff(q(x),x); deriv of f := (2 x − 2) (sin(x) + 2 cos(x)) + (x2 − 2 x) (cos(x) − 2 sin(x)) Using Maple, we also have > diff(f(x),x); (2 x − 2) (sin(x) + 2 cos(x)) + (x2 − 2 x) (cos(x) − 2 sin(x)) The results are the same. > 4.2 example 2 f:= x->(x^2-2*x)*(sin(x)+2*cos(x)); f := x → (x2 − 2 x) (sin(x) + 2 cos(x)) Think of f as the product of two functions > p:=x->x^2-2*x; q:=x->sin(x)+2*cos(x); p := x → x2 − 2 x > 3 q := x → sin(x) + 2 cos(x) Derivative of p, as a polynomial, is easily computed by using the power rule. > deriv_of_p:=diff(p(x),x); deriv of p := 2 x − 2 Derivative of q, as the sum of two Trig. functions, is easily computed by using the sum rule and the Trig formulas. > deriv_of_q:=diff(q(x),x); deriv of q := cos(x) − 2 sin(x) Finally, by the product rule, we have the derivative of f(x) as > deriv_of_f := diff(p(x),x)*q(x)+p(x)*diff(q(x),x); deriv of f := (2 x − 2) (sin(x) + 2 cos(x)) + (x2 − 2 x) (cos(x) − 2 sin(x)) Using Maple, we also have > diff(f(x),x); (2 x − 2) (sin(x) + 2 cos(x)) + (x2 − 2 x) (cos(x) − 2 sin(x)) The results are the same. > f:= x->(x^2-3*cos(x))/(sin(x)); x2 − 3 cos(x) f := x → sin(x) Think of f as the product of two functions > p:=x->x^2-3*cos(x); q:=x->sin(x); p := x → x2 − 3 cos(x) q := sin Derivative of p, as a sum, is easily computed by using the power rule and Trig rule. > deriv_of_p:=diff(p(x),x); deriv of p := 2 x + 3 sin(x) Derivative of q is easily computed by using the Trig formulas. > deriv_of_q:=diff(q(x),x); deriv of q := cos(x) Finally, by the quotient rule, we have the derivative of f(x) as > deriv_of_f := (diff(p(x),x)*q(x)-p(x)*diff(q(x),x))/(q(x))^2; (2 x + 3 sin(x)) sin(x) − (x2 − 3 cos(x)) cos(x) deriv of f := sin(x)2 Using Maple, we also have > diff(f(x),x); 2 x + 3 sin(x) (x2 − 3 cos(x)) cos(x) − sin(x) sin(x)2 The results are the same (Check it). 4 4.3 example 3 f:= x->(cos(x)-2*tan(x))/(cot(x)+1); cos(x) − 2 tan(x) f := x → cot(x) + 1 Think of f as the quotient of two functions > p:=x->cos(x)-2*tan(x); q:=x->cot(x)+1; p := x → cos(x) − 2 tan(x) q := x → cot(x) + 1 Derivative of p, as a sum, is easily computed by using the Trig formulas. > deriv_of_p:=diff(p(x),x); deriv of p := −sin(x) − 2 − 2 tan(x)2 Derivative of q, as the sum of a Trig. functions and a constant, is easily computed by using the sum rule and the Trig formulas. > deriv_of_q:=diff(q(x),x); deriv of q := −1 − cot(x)2 Finally, by the quotient rule, we have the derivative of f(x) as > deriv_of_f := (diff(p(x),x)*q(x)-p(x)*diff(q(x),x))/(q(x))^2; (−sin(x) − 2 − 2 tan(x)2 ) (cot(x) + 1) − (cos(x) − 2 tan(x)) (−1 − cot(x)2 ) deriv of f := (cot(x) + 1)2 Using Maple, we also have > diff(f(x),x); −sin(x) − 2 − 2 tan(x)2 (cos(x) − 2 tan(x)) (−1 − cot(x)2 ) − cot(x) + 1 (cot(x) + 1)2 The results are actually the same. > 5
© Copyright 2026 Paperzz