# How do you differentiate f(x)=tanx+cotx?

Sep 26, 2016

$\frac{\mathrm{dy}}{\mathrm{dx}} = {\sec}^{2} x + \left(- {\csc}^{2} x\right)$

#### Explanation:

The derivative is distributive over addition and subtraction.

Hence:

$\frac{\mathrm{dy}}{\mathrm{dx}} = {D}_{x} \left[\tan x\right] + {D}_{x} \left[\cot x\right]$

Differentiating we get:

$\frac{\mathrm{dy}}{\mathrm{dx}} = {\sec}^{2} x + \left(- {\csc}^{2} x\right)$

It is important to know the derivatives of the trigonometric functions.