If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content

Derivative of tan(x) (old)

An older video where Sal finds the derivative of tan(x) using the quotient rule. Created by Sal Khan.

Want to join the conversation?

  • blobby green style avatar for user Benjamin Yunker
    Question on that last step - couldn't you also cancel out cos^2 x in the numerator and denominator, making the solution sin^2 x?
    (13 votes)
    Default Khan Academy avatar avatar for user
  • piceratops ultimate style avatar for user Saraph
    I tried this using a product rule, but I couldn't get same result. Is this only achieveable by quotient rule?
    (4 votes)
    Default Khan Academy avatar avatar for user
  • blobby green style avatar for user Adael Sumner
    would the derivative of tan 5x then be 5sec^2 5x?
    (4 votes)
    Default Khan Academy avatar avatar for user
  • winston default style avatar for user John Shahki
    At , how does cos^2(x)+sin^2(x) = 1? And at , how does the negative sign become a positive sign with -sin(x)?
    (1 vote)
    Default Khan Academy avatar avatar for user
  • leaf green style avatar for user khanasdfqwerty
    what would be the differentiation of 4 tan^2 5X +3

    need hepl
    any one there to answere this question
    (2 votes)
    Default Khan Academy avatar avatar for user
  • piceratops ultimate style avatar for user Travis Petersen
    Just for practice, I tried to derive d/dx(tanx) using the product rule. It took me a while, because I kept getting to (1+sin^2(x))/cos^2(x), which evaluates to sec^2(x) + tan^2(x). Almost there, but not quite. After a lot of fiddling, I got the correct result by adding cos^2(x) to the numerator and denominator. I'm just curious, can anyone tell me if this is the typical move? Is there another way to derive this using the product rule?
    (2 votes)
    Default Khan Academy avatar avatar for user
    • piceratops ultimate style avatar for user Just Keith
      I think you made a mistake somewhere. Here is what I got.
      tan x = sin x sec x
      d/dx tan x = d/dx (sin x sec x)
      d/dx tan x = sin x ( sec² x * sin x) + cos x (sec x)
      d/dx tan x = (sin² x )(sec² x) + 1
      d/dx tan x = (sin² x / cos² x) + 1/1
      The LCD is cos²x
      d/dx tan x = sin²x/cos² x + cos²x/ cos²x
      d/dx tan x = (sin² x + cos² x) / cos² x
      d/dx tan x = 1 / cos² x
      d/dx tan x = sec² x

      Note: to get d/dx (sec x) I did not look up a value, I did this:
      d/dx (sec x) = d/dx (cos x)⁻¹
      = (−1) (cos x)⁻² d/dx (cos x)
      = (−1) (cos x)⁻² (- sin x)
      = sin x / cos² x
      = (sec² x)( sin x)
      (3 votes)
  • male robot hal style avatar for user gabriel savage
    So, similarily, the derivative of tanx is equal to 1+(tanx)^2

    that's a neat result
    (2 votes)
    Default Khan Academy avatar avatar for user
  • blobby green style avatar for user Gavinfauth
    So this may be a rather stupid Question, but why is the derivative of tan(x) = to sinx/cosx? it may have been asked below but im still confused. Doesn't the tan(x) = sec2(x)
    (1 vote)
    Default Khan Academy avatar avatar for user
    • blobby green style avatar for user Creeksider
      We have quite a few "identities" for trig functions, and one of the most important ones is:

      tanx = sinx/cosx

      So this is not the derivative of tanx. Instead, it's just a different way of writing tanx. If you don't recognize this identity, it might be a good idea to spend some time viewing the videos dealing with trig identities.

      The derivative of tanx is sec²x.
      (4 votes)
  • leaf blue style avatar for user Vrushab
    Could someone do it using the chain rule, please?
    (1 vote)
    Default Khan Academy avatar avatar for user
    • piceratops ultimate style avatar for user kalevala
      d/dx[tan(x)]
      = d/dx[sin(x) / cos(x)]
      = d/dx[sin(x) * 1/cos(x)]
      = d/dx[sin(x) * cos(x)^-1]
      = d/dx[sin(x)](cos(x))^-1 + (sin(x))(d/dx[cos(x)^-1]) # product rule
      = cos(x)cos(x)^-1 + sin(x)(-cos(x)^-2)(-sin(x)) # chain rule
      = cos(x)/cos(x) + sin(x)^2/cos(x)^2
      = cos(x)^2/cos(x)^2 + sin(x)^2/cos(x)^2
      = (cos(x)^2 + sin(x)^2) / cos(x)^2
      = 1 / cos(x)^2
      = sec(x)^2
      (4 votes)
  • leaf green style avatar for user william reed
    That is an awful lot of explanation for such a simple answer, but I can see how knowing exactly each step, will expand my knowledge of the concepts and principles needed to further my calculus ability.
    (2 votes)
    Default Khan Academy avatar avatar for user
    • leaf blue style avatar for user Stefen
      Yes, but the answer is simple because we already know it from the work done by those mathematicians of years gone by.

      And you are very very correct when you say "I can see how knowing exactly each step, will expand my knowledge of the concepts and principles needed to further my calculus ability."

      As you get further into calculus, it is less and less a case of "this type of problem requires this type of solution" and more like, "given the properties and concepts you now know, how can you use your intuition to create a solution." You will see, that in one point of view, the more rigorous the math you learn, the more creative and "arty" you need to be with it, but without breaking the rigor by one iota! You will see some amazing leaps of creativity that have given rise to many of the solutions to the most formidable challenges in math.

      Remember, everything, and I mean everything that you are learning in math is a structure to prepare and solidify your intuition to apply to the greater concepts to come, and these greater concepts are not the end, they themselves are structures for even greater things.
      How far will you go?
      (2 votes)

Video transcript

In the last video, we saw that the quotient rule, which, once again, I have mixed feelings about because it really comes straight out of the product rule. If we have something in the form f of x over g of x, then the derivative of it could be this business right over here. So I thought I would at least do one example where we can apply that. And can could do it to find the derivative of something useful. So what's the derivative with respect to x-- let me write this a little bit neater-- the derivative with respect to x of tangent of x? And you might say, hey Sal, wait, I thought this was about the quotient rule. But you just have to remember, what is the definition of the tangent of x? Or what is one way to view the tangent of x? The tangent of x is the same thing as sine of x-- let me now color code it-- is the same thing as sine of x over cosine of x. And now it looks clear that our expression is the ratio or it's one function over another function. So now we can just apply the quotient rule. So all of this business is going to be equal to the derivative of sine of x times cosine of x. So what's the derivative of sine of x? Well, that's just cosine of x. So it's cosine of x is derivative of sine of x times whatever function we had in the denominator. So times cosine of x minus whatever function we had in the numerator, sine of x, times the derivative of whatever we have in the denominator. Well what's the derivative of cosine of x? Well the derivative of cosine of x is negative sine of x. So we'll put the sine of x here. And it's a negative so I could just make this right over here a positive. And then all of that over, whatever was in the denominator squared, all of that over cosine of x squared. Now what does this simplify to? Well in the numerator right over here, we have cosine of x times cosine of x. So all of this simplifies to cosine squared of x. And sine of x times sine of x, that's just sine squared of x. And what's cosine squared of x plus sine squared of x? This is one of the most basic trigonometric identities. It comes straight out of the unit circle definition of trig functions. Let me write it over here. Cosine squared of x plus sine squared of x is equal to 1, which simplifies things quite nicely. So cosine squared of x plus sine squared of x, all of this entire numerator is equal to 1. So this nicely simplifies to 1 over cosine of x squared, which we could also write like this, cosine squared of x. These are two ways of writing cosine of x squared, which is the same exact thing as 1 over cosine of x squared, which is the same thing as secant. 1 over cosine of x is just secant of x. Secant of x squared, or we could write it like this. Secant squared of x. And so that's where it comes from. If you know that the derivative of sine of x is cosine of x and the derivative of cosine of x is negative sine of x, we can use the quotient rule, which, once again, comes straight out of the product rule to find the derivative of tangent x is secant squared of x.