# Nakafa Learning Content

> For AI agents: use [llms.txt](https://nakafa.com/llms.txt) for the site index. Markdown versions are available by appending `.md` to content URLs or sending `Accept: text/markdown`.

URL: https://nakafa.com/en/subjects/mathematics/derivative-function/derivative-of-trigonometric-function
Source: https://raw.githubusercontent.com/nakafaai/nakafa.com/refs/heads/main/packages/contents/material/lesson/mathematics/derivative-function/derivative-of-trigonometric-function/en.mdx

Learn derivatives of trigonometric functions: sin, cos, tan, and more. Learn formulas, product rule, quotient rule with worked examples and solutions.

---

## The Rules of Trigonometric Functions

Finding the derivative of a trigonometric function is not much different from an algebraic function. We still use the familiar derivative properties, such as the product and quotient rules.

However, before that, we need to know the basic derivatives of the main trigonometric functions like sine and cosine. These basic rules are the foundation for solving more complex derivatives.

## Basic Trigonometric Derivatives

Just like the derivative of a power function, the derivative for a trigonometric function also has its basic pattern. The derivatives for sine and cosine, for example, can be proven directly from the limit definition of a derivative.

Here are the basic derivatives of the six trigonometric functions that we need to memorize:

1.  **Derivative of Sine**:

    <BlockMath math="f(x) = \sin x \implies f'(x) = \cos x" />

2.  **Derivative of Cosine**:

    <BlockMath math="f(x) = \cos x \implies f'(x) = -\sin x" />

3.  **Derivative of Tangent**:

    <BlockMath math="f(x) = \tan x \implies f'(x) = \sec^2 x" />

4.  **Derivative of Cotangent**:

    <BlockMath math="f(x) = \cot x \implies f'(x) = -\csc^2 x" />

5.  **Derivative of Secant**:

    <BlockMath math="f(x) = \sec x \implies f'(x) = \sec x \tan x" />

6.  **Derivative of Cosecant**:

    <BlockMath math="f(x) = \csc x \implies f'(x) = -\csc x \cot x" />

Visible text: 1. **Derivative of Sine**:

 <BlockMath math="f(x) = \sin x \implies f'(x) = \cos x" />

2. **Derivative of Cosine**:

 <BlockMath math="f(x) = \cos x \implies f'(x) = -\sin x" />

3. **Derivative of Tangent**:

 <BlockMath math="f(x) = \tan x \implies f'(x) = \sec^2 x" />

4. **Derivative of Cotangent**:

 <BlockMath math="f(x) = \cot x \implies f'(x) = -\csc^2 x" />

5. **Derivative of Secant**:

 <BlockMath math="f(x) = \sec x \implies f'(x) = \sec x \tan x" />

6. **Derivative of Cosecant**:

 <BlockMath math="f(x) = \csc x \implies f'(x) = -\csc x \cot x" />

## Applying the Rules to Trigonometric Functions

Now let's see how to apply these rules in a few examples.

### Combination of Algebra and Trigonometry

Find the derivative of $$y = 2 \sin x + 5x$$.

Visible text: Find the derivative of .

**Solution:**

We can differentiate this function term by term using the sum rule.

Component: MathContainer
Children:

```math
y' = \frac{d}{dx}(2 \sin x) + \frac{d}{dx}(5x)
```

```math
y' = 2(\cos x) + 5(1)
```

```math
y' = 2 \cos x + 5
```

### Using the Product Rule

Find the derivative of $$y = 2 \sin x \tan x$$.

Visible text: Find the derivative of .

**Solution:**

Use the product rule <InlineMath math="y' = u'v + uv'" />.

Let $$u = 2 \sin x$$ and $$v = \tan x$$.

Visible text: Let and .

Then <InlineMath math="u' = 2 \cos x" /> and <InlineMath math="v' = \sec^2 x" />.

Component: MathContainer
Children:

```math
y' = (2 \cos x)(\tan x) + (2 \sin x)(\sec^2 x)
```

```math
y' = (2 \cos x)\left(\frac{\sin x}{\cos x}\right) + (2 \sin x)(\sec^2 x)
```

```math
y' = 2 \sin x + 2 \sin x \sec^2 x
```

### Using the Quotient Rule

Find the derivative of $$y = \frac{1 + \cos x}{\sin x}$$.

Visible text: Find the derivative of .

**Solution:**

Use the quotient rule <InlineMath math="y' = \frac{u'v - uv'}{v^2}" />.

Let $$u = 1 + \cos x$$ and $$v = \sin x$$.

Visible text: Let and .

Then <InlineMath math="u' = -\sin x" /> and <InlineMath math="v' = \cos x" />.

Component: MathContainer
Children:

```math
y' = \frac{(-\sin x)(\sin x) - (1 + \cos x)(\cos x)}{(\sin x)^2}
```

```math
y' = \frac{-\sin^2 x - (\cos x + \cos^2 x)}{\sin^2 x}
```

```math
y' = \frac{-(\sin^2 x + \cos^2 x) - \cos x}{\sin^2 x}
```

```math
y' = \frac{-1 - \cos x}{1 - \cos^2 x} \quad (\text{Pythagorean Identity})
```

```math
y' = \frac{-(1 + \cos x)}{(1 - \cos x)(1 + \cos x)} \quad (\text{Factorization})
```

```math
y' = \frac{-1}{1 - \cos x} = \frac{1}{\cos x - 1}
```

## Exercises

1. Find the first derivative of $$f(x) = 4x^3 - 5 \cos x$$.
2. Find the first derivative of $$f(x) = \sin x \cos x$$.

Visible text: 1. Find the first derivative of .
2. Find the first derivative of .

### Answer Key

1.  **Solution:**

    Use the subtraction rule to differentiate each term separately.

    **Step** $$1$$: Differentiate the first term

    The derivative of $$4x^3$$ using the power rule is $$3 \cdot 4x^{3-1} = 12x^2$$.

    **Step** $$2$$: Differentiate the second term

    The derivative of $$-5 \cos x$$ is $$-5(-\sin x) = 5 \sin x$$.

    **Step** $$3$$: Combine the results

    <BlockMath math="f'(x) = 12x^2 + 5 \sin x" />

    So, the derivative of the function is $$12x^2 + 5 \sin x$$.

2.  **Solution:**

    Use the product rule, <InlineMath math="f'(x) = u'v + uv'" />.

    **Step** $$1$$: Determine u, v, u', and v'

    Let $$u = \sin x$$ and $$v = \cos x$$.

    Then, <InlineMath math="u' = \cos x" /> and <InlineMath math="v' = -\sin x" />.

    **Step** $$2$$: Apply the Product Rule

    <MathContainer>
        <BlockMath math="f'(x) = (\cos x)(\cos x) + (\sin x)(-\sin x)" />
        <BlockMath math="f'(x) = \cos^2 x - \sin^2 x" />
    </MathContainer>

    **Step** $$3$$: Use a Trigonometric Identity (Optional)

    The result can also be simplified using the double angle identity, $$\cos(2x) = \cos^2 x - \sin^2 x$$.

    <BlockMath math="f'(x) = \cos(2x)" />

    So, the derivative of the function is $$\cos(2x)$$.

Visible text: 1. **Solution:**

 Use the subtraction rule to differentiate each term separately.

 **Step** : Differentiate the first term

 The derivative of using the power rule is .

 **Step** : Differentiate the second term

 The derivative of is .

 **Step** : Combine the results

 <BlockMath math="f'(x) = 12x^2 + 5 \sin x" />

 So, the derivative of the function is .

2. **Solution:**

 Use the product rule, <InlineMath math="f'(x) = u'v + uv'" />.

 **Step** : Determine u, v, u', and v'

 Let and .

 Then, <InlineMath math="u' = \cos x" /> and <InlineMath math="v' = -\sin x" />.

 **Step** : Apply the Product Rule

 <MathContainer>
 <BlockMath math="f'(x) = (\cos x)(\cos x) + (\sin x)(-\sin x)" />
 <BlockMath math="f'(x) = \cos^2 x - \sin^2 x" />
 </MathContainer>

 **Step** : Use a Trigonometric Identity (Optional)

 The result can also be simplified using the double angle identity, .

 <BlockMath math="f'(x) = \cos(2x)" />

 So, the derivative of the function is .