Free for students · Ad-free · WCAG 2.1 AA Compliant · Accessibility

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

Lesson ~10 min read

In simple terms: In simple terms, this lesson shows you how to find the derivatives of tan, cot, sec, and csc by rewriting them using the sin and cos functions you already know.

Why this matters

Imagine you're an engineer designing a new roller coaster for a theme park in Dallas. You have a section of the track whose curve is modeled by the function f(x) = sec(x). To ensure the ride is both thrilling and safe, you need to know the exact steepness—the slope of the tangent line—at every single point. That's a derivative!

You already know how to find the derivatives of sin(x) and cos(x), but what about the other four trigonometric functions? Do you have to memorize four more brand-new, complicated rules? Not at all. In this lesson, you'll learn a powerful strategy: how to use what you already know about sin(x), cos(x), and the quotient rule to unlock the derivatives for the rest of the trig family.

Concept overview

flowchart TD
    A[Find d/dx of tan(x)] --> B{Rewrite using identity};
    B --> C[tan(x) = sin(x) / cos(x)];
    C --> D{Apply Quotient Rule};
    D --> E["(cos(x)cos(x) - sin(x)(-sin(x))) / cos^2(x)"];
    E --> F{Simplify Numerator};
    F --> G["(cos^2(x) + sin^2(x)) / cos^2(x)"];
    G --> H{Use Pythagorean Identity};
    H --> I[1 / cos^2(x)];
    I --> J{Rewrite using identity};
    J --> K[Result: sec^2(x)];
This diagram is a flowchart that shows the step-by-step process of finding the derivative of tangent of x. It starts with rewriting tangent as sine over cosine, applying the quotient rule, simplifying with algebra, using the Pythagorean identity, and finally rewriting the result as secant squared of x.

Core explanation

Hey there. It's Saavi. I'm so glad you're here.

So far, you've mastered the derivatives of sin(x) and cos(x). You know that:

  • d/dx [sin(x)] = cos(x)
  • d/dx [cos(x)] = -sin(x)

These are the foundational building blocks for all of trigonometry in calculus. Now, we're going to use these two "parent" derivatives to figure out the derivatives of their four relatives: tangent, cotangent, secant, and cosecant.

The Big Idea: Use Identities and the Quotient Rule

The key insight, and what the AP exam really wants you to understand, is that you can recreate these derivative rules on the fly. You don't have to treat them as four new facts to blindly memorize.

Think of it like this: if you have flour and water, you can figure out how to make dough. You don't need a separate grocery list for "dough." In our case, sin(x) and cos(x) are our flour and water, and the Quotient Rule is our recipe book.

Let's derive the derivative of tan(x) together.

Finding the Derivative of Tangent

Step 1: Rewrite tan(x) using its identity. We know from pre-calculus that tan(x) = sin(x) / cos(x). Let's ask for the derivative of that instead.

d/dx [tan(x)] = d/dx [sin(x) / cos(x)]

Step 2: Apply the Quotient Rule. This is where your existing skills come into play. Remember the Quotient Rule? For a function h(x) = f(x) / g(x), its derivative is h'(x) = (g(x)f'(x) - f(x)g'(x)) / [g(x)]^2.

Let's map our functions:

  • f(x) = sin(x) => f'(x) = cos(x)
  • g(x) = cos(x) => g'(x) = -sin(x)

Now, let's plug these into the Quotient Rule formula.

d/dx [tan(x)] = ( (cos(x))(cos(x)) - (sin(x))(-sin(x)) ) / (cos(x))^2

This is the point where most students slip up. They either forget the negative sign on the derivative of cosine, or they mix up the order of the numerator. Be slow and deliberate here. I always say the little phrase "low-dee-high minus high-dee-low, over the square of what's below" to keep it straight.

Step 3: Simplify. Let's clean up that numerator.

= ( cos^2(x) + sin^2(x) ) / cos^2(x)

Look at that! cos^2(x) + sin^2(x) is the famous Pythagorean Identity, which equals 1. This is a perfect example of how calculus constantly builds on your prior algebra and trig knowledge.

= 1 / cos^2(x)

Step 4: Use another identity to write the final answer. We know that 1 / cos(x) = sec(x). So, 1 / cos^2(x) is the same as sec^2(x).

And there we have it.

d/dx [tan(x)] = sec^2(x)

You didn't memorize it. You derived it. You proved it. That's a much more powerful position to be in.

Finding the Derivative of Secant

Let's try it again for sec(x). The process is identical.

Step 1: Rewrite sec(x) using its identity. sec(x) = 1 / cos(x)

Step 2: Apply the Quotient Rule.

  • f(x) = 1 => f'(x) = 0 (The derivative of a constant is zero!)
  • g(x) = cos(x) => g'(x) = -sin(x)

Plug them in: d/dx [sec(x)] = ( (cos(x))(0) - (1)(-sin(x)) ) / (cos(x))^2

Step 3: Simplify. = ( 0 + sin(x) ) / cos^2(x) = sin(x) / cos^2(x)

This is a correct answer, but it's not in its simplest, most recognizable form. The AP exam will expect you to simplify further.

Step 4: Break it apart to see the final form. Let's strategically rewrite the fraction.

= (1 / cos(x)) * (sin(x) / cos(x))

Do you recognize those pieces? That's sec(x) and tan(x).

So, we get our final rule:

d/dx [sec(x)] = sec(x)tan(x)

Your New Toolkit

By following this exact same process of rewriting with identities and applying the quotient rule, we can find the derivatives for cot(x) and csc(x) as well. (You should try deriving these yourself! It's fantastic practice.)

Here are the four rules we've just uncovered:

Function Derivative
tan(x) sec^2(x)
cot(x) -csc^2(x)
sec(x) sec(x)tan(x)
csc(x) -csc(x)cot(x)

Notice a pattern with the negative signs? The derivatives of the "co-" functions (cosine, cotangent, cosecant) are all negative. This little memory aid can save you points.

While you will eventually want to commit these to memory for speed on test day, the most important thing you learned today is the process. You learned that you have the power to build these rules from scratch using just two basic derivatives and the quotient rule. That's what thinking like a mathematician is all about.

Worked examples

Let's put these new rules into practice with some problems you might see.

Example 1

Product Rule with Tangent

Problem: Find the derivative of f(x) = 5x^3 * tan(x).

Solution: First, identify the structure of the function. This is not just a simple tangent function; it's the product of two functions: 5x^3 and tan(x). This means we need the Product Rule.

Step 1: Identify the parts for the Product Rule. Let u = 5x^3 and v = tan(x). The Product Rule is f'(x) = u'v + uv'.

Step 2: Find the derivatives of the parts.

  • u' = d/dx [5x^3] = 15x^2 (using the Power Rule)
  • v' = d/dx [tan(x)] = sec^2(x) (using our new rule)

Step 3: Assemble the derivative using the Product Rule. Now we just plug our four pieces (u, v, u', v') into the formula.

f'(x) = (15x^2)(tan(x)) + (5x^3)(sec^2(x))

And that's it! There's no further simplification needed.


Example 2

Quotient Rule with Secant

Problem: Find the derivative of g(x) = sec(x) / (x^2 + 1).

Solution: This function is a fraction, so our main tool will be the Quotient Rule.

Step 1: Identify the parts for the Quotient Rule. Let the numerator be f(x) = sec(x) and the denominator be h(x) = x^2 + 1. The Quotient Rule is g'(x) = (h(x)f'(x) - f(x)h'(x)) / [h(x)]^2.

Step 2: Find the derivatives of the parts.

  • f'(x) = d/dx [sec(x)] = sec(x)tan(x)
  • h'(x) = d/dx [x^2 + 1] = 2x

Step 3: Assemble the derivative using the Quotient Rule. This is where careful bookkeeping is essential. Substitute everything into the right place.

g'(x) = ( (x^2 + 1)(sec(x)tan(x)) - (sec(x))(2x) ) / (x^2 + 1)^2

This looks complicated, but it's the correct application of the rule. You can leave the answer in this form. On a free-response question, simplifying is not always necessary unless asked, and trying to simplify can sometimes lead to algebra mistakes.

Try it yourself

Ready to get your hands dirty? You've got this.

Problem 1: Find the derivative of y = e^x * cot(x).

Hint: What's the overall structure of this function? Is it a product, a quotient, or something else? Remember the derivative rule for e^x and the new rule for cot(x). Don't forget the negative sign!

Problem 2: A particle's position along a track is given by p(t) = 4 * csc(t) for t > 0, where t is time in seconds. Find the velocity of the particle at time t = π/6.

Hint: Velocity is the derivative of position. First, find the general velocity function v(t) = p'(t). Then, substitute t = π/6 into your derivative. You'll need to know the values of csc(π/6) and cot(π/6).