Chalk−1

Math · Calculus I · Worked example

Differentiate tan x with the quotient rule

Use the quotient rule to show that the derivative of tanx is sec2x, and say where the formula holds.

f⁡(x)=tanx

Write the tangent as a quotient

The tangent is the sine divided by the cosine. Written that way it has a top and a bottom, and the quotient rule applies wherever cosx≠0.

f⁡(x)=sinxcosx

Name the four pieces

The top is sinx, with derivative cosx. The bottom is cosx, with derivative −sinx. Both work as written only with x in radians.

top=sinx,  top′=cosx,bottom=cosx,  bottom′=−sinx
top=sinx,  top′=cosxbottom=cosxbottom′=−sinx

Apply the quotient rule

Bottom times the top’s derivative, minus top times the bottom’s derivative, over the bottom squared. Keep −sinx in brackets for now.

f′(x)=cosxcosx−sinx⁢(−sinx)cos2x
f′(x)=cosxcosx−sinx⁢(−sinx)cos2x

Simplify the numerator

Subtracting −sin2x adds sin2x. The numerator becomes cos2x+sin2x.

f′(x)=cos2x+sin2xcos2x

Use the Pythagorean identity

For every angle, sin2x+cos2x=1, which makes the numerator 1.

f′(x)=1cos2x

Name the result

Since 1⁢/cosx is secx, 1⁢/cos2x is sec2x. The formula holds wherever cosx≠0. That excludes x=π⁢/2+k⁢π for every integer k, the same places where tanx is undefined.

f′(x)=sec2x

Read the answer

A square is never negative, and cos2x is at most 1, so sec2x is at least 1. The tangent rises on every interval between its asymptotes. At x=0 its slope is exactly 1, and at x=π⁢/4 it is 1⁢/⁢(1⁢/2)=2.

Result

The derivative of tanx is sec2x, for every x with cosx≠0.

dd⁢xtanx=sec2x

Your turn

1. One like the example

Differentiate y=cotx by writing it as cosx⁢/sinx.

Show the answer and explanation

d⁢y⁢/⁢d⁢x=−csc2x, wherever sinx≠0.

The top cosx has derivative −sinx and the bottom sinx has derivative cosx. The rule gives (−sinx⋅sinx−cosx⋅cosx)⁢/sin2x =−(sin2x+cos2x)⁢/sin2x =−1⁢/sin2x, which is −csc2x.

y=cosxsinxd⁢yd⁢x=−sinxsinx−cosxcosxsin2xd⁢yd⁢x=−1sin2xd⁢yd⁢x=−csc2x

2. A variation

Differentiate y=sinx⁢/⁢(1+cosx), and simplify.

Show the answer and explanation

d⁢y⁢/⁢d⁢x=1⁢/⁢(1+cosx), wherever cosx≠−1.

The rule gives [cosx⁢(1+cosx)−sinx⁢(−sinx)]⁢/⁢(1+cosx)2. The numerator is cosx+cos2x+sin2x =cosx+1. One factor of 1+cosx then cancels with the bottom.

y=sinx1+cosxd⁢yd⁢x=cosx⁢(1+cosx)−sinx⁢(−sinx)(1+cosx)2d⁢yd⁢x=1+cosx(1+cosx)2d⁢yd⁢x=11+cosx
y=sinx1+cosxd⁢yd⁢x=cosx⁢(1+cosx)+sin2x(1+cosx)2d⁢yd⁢x=1+cosx(1+cosx)2d⁢yd⁢x=11+cosx

3. Somewhere new

Find the equation of the tangent line to y=tanx at x=π⁢/4.

Show the answer and explanation

y=1+2⁢(x−π⁢/4), a line of slope 2 through (π⁢/4,1).

The point is (π⁢/4,1), because tan(π⁢/4)=1. The slope is sec2(π⁢/4) =1⁢/cos2(π⁢/4) =1⁢/⁢(1⁢/2) =2. Point-slope form gives y=1+2⁢(x−π⁢/4).

f⁡(x)=tanxf′(x)=sec2xf′(π4)=2

Keep exploring

Open the steps in Math: the Checker marks every row ✓. Swap the two terms of the numerator and that row reads ✗, because the order in the quotient rule matters.

Return to the concept →
Sources and scope

Authored study material. Tool results depend on the stated inputs and model assumptions.

After reading

Study it, then try it

Practice the key terms as flashcards, then open the example in its tool, change a value and keep a useful result on your board.

Study the 5 key terms Check the derivative in Math Open worked example on a board Quotient rule in Math Reference

Your existing work stays on this device. Examples open as editable copies.