AP Calculus AB and BC · Unit 2 · Topic 2.10

    2.10 Finding the Derivatives of Tangent, Cotangent, Secant, and/or Cosecant Functions

    Reviewed by P V Satish, Senior Faculty of Science and Academic Consultant · PG Life Sciences, PGD Biotechnology · 20+ years teaching NEET and AP · Special interest in biotechnology, biochemistry and the basics of physics
    Updated

    In short

    Writing each function in terms of sine and cosine and using the quotient rule gives the remaining trigonometric derivatives: ddxtan⁡x=sec⁡2x\frac{d}{dx}\tan x = \sec^2 x, ddxcot⁡x=−csc⁡2x\frac{d}{dx}\cot x = -\csc^2 x, ddxsec⁡x=sec⁡xtan⁡x\frac{d}{dx}\sec x = \sec x\tan x and ddxcsc⁡x=−csc⁡xcot⁡x\frac{d}{dx}\csc x = -\csc x\cot x. The "co" functions carry a minus sign.

    What you need to know

    • Derive the derivatives of tan x and sec x using the quotient rule.
    • State the derivatives of all six trigonometric functions.
    • Combine trigonometric derivatives with the product and quotient rules.
    • Find slopes and tangent lines of trigonometric graphs at standard angles.

    Deriving the rules

    Write tan⁡x=sin⁡xcos⁡x\tan x = \frac{\sin x}{\cos x} and apply the quotient rule:

    ddxtan⁡x=cos⁡x⋅cos⁡x−sin⁡x⋅(−sin⁡x)cos⁡2x=cos⁡2x+sin⁡2xcos⁡2x=1cos⁡2x=sec⁡2x\frac{d}{dx}\tan x = \frac{\cos x \cdot \cos x - \sin x \cdot(-\sin x)}{\cos^2 x} = \frac{\cos^2 x + \sin^2 x}{\cos^2 x} = \frac{1}{\cos^2 x} = \sec^2 x

    Similarly sec⁡x=1cos⁡x\sec x = \frac{1}{\cos x} gives 0⋅cos⁡x−1⋅(−sin⁡x)cos⁡2x=sin⁡xcos⁡2x=1cos⁡x⋅sin⁡xcos⁡x=sec⁡xtan⁡x\frac{0 \cdot \cos x - 1 \cdot(-\sin x)}{\cos^2 x} = \frac{\sin x}{\cos^2 x} = \frac{1}{\cos x} \cdot \frac{\sin x}{\cos x} = \sec x\tan x. The same method gives the cotangent and cosecant results, each with a minus sign because their starting points involve cosine in the numerator or sine in the denominator.

    Derivatives of the six trigonometric functions
    FunctionDerivative
    sin⁡x\sin xcos⁡x\cos x
    cos⁡x\cos x−sin⁡x-\sin x
    tan⁡x\tan xsec⁡2x\sec^2 x
    cot⁡x\cot x−csc⁡2x-\csc^2 x
    sec⁡x\sec xsec⁡xtan⁡x\sec x\tan x
    csc⁡x\csc x−csc⁡xcot⁡x-\csc x\cot x

    Patterns that help you remember

    Every function whose name starts with "co" has a derivative with a minus sign: cosine, cotangent and cosecant. The co-functions also pair up with their partners: the derivative of cot⁡x\cot x looks like the derivative of tan⁡x\tan x with every function swapped for its co-function and a minus sign added.

    The derivative of tan⁡x\tan x is always positive where it is defined, because sec⁡2x≥1\sec^2 x \ge 1. That matches the graph of tangent, which rises on every branch between its asymptotes. In the same way, −csc⁡2x-\csc^2 x is always negative, so cotangent falls on every branch.

    Using the rules

    The slope of y=tan⁡xy = \tan x at x=π4x = \frac{\pi}{4} is sec⁡2π4=(2)2=2\sec^2\frac{\pi}{4} = (\sqrt{2})^2 = 2, and the point is (π4,1)\left(\frac{\pi}{4}, 1\right), so the tangent line is y−1=2(x−π4)y - 1 = 2\left(x - \frac{\pi}{4}\right). The slope of y=sec⁡xy = \sec x at x=π3x = \frac{\pi}{3} is sec⁡π3tan⁡π3=23\sec\frac{\pi}{3}\tan\frac{\pi}{3} = 2\sqrt{3}.

    These combine with the product and quotient rules: ddx(xtan⁡x)=tan⁡x+xsec⁡2x\frac{d}{dx}(x\tan x) = \tan x + x\sec^2 x, which at x=π4x = \frac{\pi}{4} is 1+π4⋅2=1+π21 + \frac{\pi}{4} \cdot 2 = 1 + \frac{\pi}{2}. With the chain rule in Unit 3 you will also differentiate expressions such as tan⁡(3x)\tan(3x) and sec⁡2x\sec^2 x.

    Tangent and secant appear in geometry problems. A surveyor standing 10 m from a tower sees its top at an angle of elevation θ\theta, so the height is h=10tan⁡θh = 10\tan\theta. Then dhdθ=10sec⁡2θ\frac{dh}{d\theta} = 10\sec^2\theta, which at θ=π4\theta = \frac{\pi}{4} is 20 metres per radian. Small errors in measuring the angle matter more and more as θ\theta approaches π2\frac{\pi}{2}, where sec⁡2θ\sec^2\theta grows without bound.

    Key terms

    Derivative of tangent
    ddxtan⁡x=sec⁡2x\frac{d}{dx}\tan x = \sec^2 x.
    Derivative of secant
    ddxsec⁡x=sec⁡xtan⁡x\frac{d}{dx}\sec x = \sec x\tan x.
    Derivative of cotangent
    ddxcot⁡x=−csc⁡2x\frac{d}{dx}\cot x = -\csc^2 x.
    Derivative of cosecant
    ddxcsc⁡x=−csc⁡xcot⁡x\frac{d}{dx}\csc x = -\csc x\cot x.

    Common mistakes

    • Writing ddxtan⁡x=sec⁡x\frac{d}{dx}\tan x = \sec x.

      It is sec⁡2x\sec^2 x, the square of secant.

    • Forgetting the minus sign on co-function derivatives.

      Cosine, cotangent and cosecant all have derivatives with a minus sign.

    • Evaluating sec⁡2π4\sec^2\frac{\pi}{4} as sec⁡π216\sec\frac{\pi^2}{16}.

      sec⁡2x\sec^2 x means (sec⁡x)2(\sec x)^2: square the value after evaluating.

    How this topic is tested

    • Memorise the six derivatives as three pairs with the co- sign rule.
    • Evaluate sec and csc at standard angles via 1/cos and 1/sin.
    • Fall back on the quotient rule with sin and cos if unsure.

    Practice questions

    Original AP-style multiple-choice questions. Pick an answer to see the explanation.

    1. Question 1 · MP 1 · Implementing Mathematical Processes

      What is ddxtan⁡x\frac{d}{dx}\tan x?

    2. Question 2 · MP 1 · Implementing Mathematical Processes

      What is the slope of y=tan⁡xy = \tan x at x=π4x = \frac{\pi}{4}?

    3. Question 3 · MP 1 · Implementing Mathematical Processes

      What is the derivative of sec⁡x\sec x at x=π3x = \frac{\pi}{3}?

    4. Question 4 · MP 4 · Communication and Notation

      What is ddxcsc⁡x\frac{d}{dx}\csc x?

    5. Question 5 · MP 1 · Implementing Mathematical Processes

      What is ddx(xtan⁡x)\frac{d}{dx}(x\tan x) at x=π4x = \frac{\pi}{4}?

    Free-response practice

    Write your answer first, then mark it against the scoring guide.

    Free response (no calculator) · 4 points

    Let f(x)=sec⁡x+tan⁡xf(x) = \sec x + \tan x for −π2<x<π2-\frac{\pi}{2} < x < \frac{\pi}{2}.

    1. (a) Find f′(x)f'(x).
    2. (b) Find f′(0)f'(0) and write the equation of the tangent line at x=0x = 0.
    3. (c) Show that f′(x)=sec⁡x⋅f(x)f'(x) = \sec x \cdot f(x).

    Connected topics

    Frequently asked questions

    Do I need to memorise all six?

    Yes, they appear throughout the course, especially with the chain rule and in integration. Learning them in pairs makes it easier.

    Why is the derivative of tan x always positive?

    sec⁡2x=1cos⁡2x\sec^2 x = \frac{1}{\cos^2 x} is a square, at least 1 wherever it is defined.

    Where are these derivatives undefined?

    Wherever the original function is undefined: tan and sec at odd multiples of π/2, and cot and csc at multiples of π.

    How this shows up on the exam42 multiple-choice and 6 free-response questions, with and without a calculator. See how the exam is laid out.

    Free Unit 2 cheat sheet

    Every topic in Unit 2: Differentiation: Definition and Fundamental Properties on a few printable pages: the core idea, key terms, the two traps students fall into and what the exam asks.

    We'll use your email to tell you when new AP Calculus AB practice material is ready. No spam, and we'll delete it if you ask.

    Full-length AP Calculus AB practice examsUnit 2 is one of 8 units on the exam. Two timed exams in the 2027 format (42 MCQ + 6 FRQ, with calculator and no-calculator parts), worked explanations, scoring guides and an estimated 1–5 score. $14.99 · try 5 questions free.

    All topics in Unit 2: Differentiation: Definition and Fundamental Properties

    1. 2.1 Defining Average and Instantaneous Rates of Change at a Point
    2. 2.2 Defining the Derivative of a Function and Using Derivative Notation
    3. 2.3 Estimating Derivatives of a Function at a Point
    4. 2.4 Connecting Differentiability and Continuity: Determining When Derivatives Do and Do Not Exist
    5. 2.5 Applying the Power Rule
    6. 2.6 Derivative Rules: Constant, Sum, Difference, and Constant Multiple
    7. 2.7 Derivatives of cos x, sin x, eˣ, and ln x
    8. 2.8 The Product Rule
    9. 2.9 The Quotient Rule
    10. 2.10 Finding the Derivatives of Tangent, Cotangent, Secant, and/or Cosecant Functions

    Other units in AP Calculus AB

    AP® is a trademark registered by College Board, which is not affiliated with, and does not endorse, this website.