Tutorials › AP Calculus › Differentiating Arctangent Compositions

Inverse Function Derivatives · Tutorial 215 of 999

Differentiating Arctangent Compositions

Use the derivative of arctangent and the chain rule to find and simplify derivatives of composite functions.

Intermediate 9 min read

What You'll Learn

  • Apply the derivative formula for arctangent to a differentiable inner function
  • Explain why the chain rule produces the denominator one plus the inner function squared
  • Differentiate compositions with polynomial, rational, and trigonometric inputs
  • Simplify rational expressions without losing domain restrictions
  • Check derivative values and recognize common chain-rule errors

Introduction

The derivative of \(\arctan x\) is a useful formula, but many problems do not have \(x\) as the input. Instead, the input may be a polynomial, a rational expression, or a trigonometric function. The key is to treat the inside expression as a function in its own right, then apply the chain rule.

This process has a dependable pattern: differentiate the inside, place that derivative in the numerator, and divide by one plus the square of the inside. Careful parentheses matter, especially when simplifying the result or evaluating it at a particular input.

Core formula: If \(g\) is differentiable at \(x\), then \(\displaystyle \frac{d}{dx}\arctan(g(x))=\frac{g'(x)}{1+[g(x)]^2}\).

The Derivative Rule for a Composition

The inverse tangent function, written \(\arctan x\), returns the angle in \((-\frac{\pi}{2},\frac{\pi}{2})\) whose tangent is \(x\). Its derivative is \(\frac{d}{dx}\arctan x=\frac{1}{1+x^2}\). For a composite function, the chain rule says to multiply the derivative of the outside function, evaluated at the inside, by the derivative of the inside.

Theorem: Let \(g\) be differentiable at \(x\). Then \[ \frac{d}{dx}\arctan(g(x)) = \frac{g'(x)}{1+[g(x)]^2}. \] The rule applies wherever \(g\) is defined and differentiable. For a rational \(g\), this excludes any input at which its denominator is zero.

The square applies to the entire inner function: \([g(x)]^2\), not just to one term in its formula. Also, the derivative \(g'(x)\) is essential. Differentiating only the outer arctangent would omit the change in its input.

Why the Formula Works

The composition rule can be justified directly using the relationship between tangent and arctangent. Set \(y=\arctan(g(x))\). By the definition of arctangent, \(\tan y=g(x)\). Since \(y\) lies in \((-\frac{\pi}{2},\frac{\pi}{2})\), the tangent function is differentiable there, so we can differentiate both sides with respect to \(x\).

$$ \frac{d}{dx}(\tan y) = \frac{d}{dx}(g(x)) $$

Applying the chain rule to the left side gives \(\sec^2(y)y'=g'(x)\). The identity \(\sec^2 y=1+\tan^2 y\), together with \(\tan y=g(x)\), then gives \((1+[g(x)]^2)y'=g'(x)\). The factor \(1+[g(x)]^2\) is always positive for real \(g(x)\), so we can divide by it:

$$ y' = \frac{g'(x)}{1+[g(x)]^2}. $$

This proves the composition formula wherever \(g\) is differentiable. It also shows why the square in the denominator belongs to the whole inner expression: it comes from replacing \(\tan^2 y\) with \([g(x)]^2\).

Worked Example: A Polynomial Input

Worked Example: A Polynomial Input

Differentiate \(f(x)=\arctan(3x^2-2x)\), then find \(f'(1)\).

First identify the inside function and its derivative:

$$ g(x)=3x^2-2x, \qquad g'(x)=6x-2. $$

Apply the composition formula, keeping the full inner expression together when squaring:

$$ f'(x) = \frac{6x-2}{1+(3x^2-2x)^2}. $$

At \(x=1\), the inner function is \(g(1)=3-2=1\), and its derivative is \(g'(1)=6-2=4\). Therefore,

$$ f'(1) = \frac{4}{1+1^2} = \frac{4}{2} = 2. $$

Check the substitution in the formula: the numerator is the inside derivative \(4\), while the denominator is one plus the square of the inside value, \(1+1^2=2\). Their quotient is \(2\), as found.

Worked Example: A Rational Input

Worked Example: A Rational Input

Differentiate \(F(x)=\arctan\!\left(\frac{x+1}{x-1}\right)\). State the domain and simplify the derivative.

The inner rational function is defined only when \(x-1\ne 0\), so the domain excludes \(x=1\). Use the quotient rule to differentiate the inside:

$$ g(x)=\frac{x+1}{x-1}, \qquad g'(x) = \frac{(1)(x-1)-(x+1)(1)}{(x-1)^2} = \frac{x-1-x-1}{(x-1)^2} = \frac{-2}{(x-1)^2}. $$

Now apply the arctangent composition rule:

$$ F'(x) = \frac{-2/(x-1)^2}{1+\left(\frac{x+1}{x-1}\right)^2}. $$

To simplify, combine the terms in the denominator using a common denominator:

$$ 1+\left(\frac{x+1}{x-1}\right)^2 = \frac{(x-1)^2+(x+1)^2}{(x-1)^2} = \frac{x^2-2x+1+x^2+2x+1}{(x-1)^2} = \frac{2x^2+2}{(x-1)^2} = \frac{2(x^2+1)}{(x-1)^2}. $$

Dividing by this expression is equivalent to multiplying by its reciprocal. Thus, for \(x\ne1\),

$$ F'(x) = \frac{-2}{(x-1)^2} \cdot \frac{(x-1)^2}{2(x^2+1)} = -\frac{1}{x^2+1}. $$

The cancellation is valid on the original domain \(x\ne1\). The simplified formula does not restore \(x=1\) to the domain of \(F\), because the original composition is still undefined there. As a check at an allowed input, \(x=0\) gives \(g(0)=-1\) and \(g'(0)=-2\), so the composition rule gives \(-2/(1+(-1)^2)=-1\). The simplified formula also gives \(F'(0)=-1/(0^2+1)=-1\).

Worked Example: A Trigonometric Input

Worked Example: A Trigonometric Input

Differentiate \(H(x)=\arctan(\sin(2x))\), then find \(H'(\frac{\pi}{6})\).

Here the inner function is \(g(x)=\sin(2x)\). By the chain rule, its derivative is \(g'(x)=2\cos(2x)\). Therefore,

$$ H'(x) = \frac{2\cos(2x)}{1+\sin^2(2x)}. $$

At \(x=\frac{\pi}{6}\), the angle \(2x\) is \(\frac{\pi}{3}\). Use the exact values \(\cos(\frac{\pi}{3})=\frac12\) and \(\sin(\frac{\pi}{3})=\frac{\sqrt3}{2}\):

$$ H'\left(\frac{\pi}{6}\right) = \frac{2(\frac12)}{1+(\frac{\sqrt3}{2})^2} = \frac{1}{1+\frac34} = \frac{1}{\frac74} = \frac47. $$

Check by evaluating the two parts of the rule separately: \(g'(\frac{\pi}{6})=2(\frac12)=1\), and \(1+[g(\frac{\pi}{6})]^2=1+(\frac{\sqrt3}{2})^2=\frac74\). Their quotient is \(1/(\frac74)=\frac47\), which matches.

A Reliable Process

For a new arctangent composition, it helps to write the inside function explicitly before simplifying. This makes it easier to see which derivative belongs in the numerator and which expression must be squared in the denominator.

1
Name the inside.
Write the expression as \(g(x)\), so the function has the form \(\arctan(g(x))\).
2
Differentiate the inside.
Find \(g'(x)\), using the appropriate differentiation rules for its polynomial, rational, or trigonometric form.
3
Apply the formula.
Write \(g'(x)/(1+[g(x)]^2)\), with parentheses around the complete input before squaring.
4
Simplify and check the domain.
Reduce the expression if useful, but retain any restrictions from the original function.

Common Mistakes and How to Avoid Them

A frequent error is to differentiate the outer function but forget to multiply by the derivative of the inner function. For example, the incorrect calculation

$$ \frac{d}{dx}\arctan(3x^2-2x) \ \overset{\text{wrong}}{=}\ \frac{1}{1+(3x^2-2x)^2} $$

omits the factor \(6x-2\). The correct calculation is

$$ \frac{d}{dx}\arctan(3x^2-2x) = \frac{6x-2}{1+(3x^2-2x)^2}. $$

A second error is to square only part of the inside. In \(\arctan(3x^2-2x)\), the denominator is \(1+(3x^2-2x)^2\), not \(1+3x^4-2x^2\). If expanding is necessary, expand the square of the entire binomial:

$$ (3x^2-2x)^2 = 9x^4-12x^3+4x^2. $$

For rational inputs, also keep track of the original domain. Algebraic cancellation can simplify a derivative formula, but it cannot make the original function defined at an input where its inner expression was undefined.

What the Formula Tells You

The denominator \(1+[g(x)]^2\) is at least \(1\) for every real value of \(g(x)\). Thus it is never zero. Wherever \(g\) is differentiable, the arctangent composition formula introduces no additional denominator restriction beyond those already present in \(g\) and \(g'\). In particular, a polynomial input has no such excluded inputs, while a rational input may.

The numerator records how quickly the inside changes, and the denominator adjusts for how the arctangent responds to the value of that inside. Keeping these roles separate is a useful way to check work: the numerator should be the derivative of the complete input, and the denominator should contain one plus the square of that same complete input.

Takeaway: For \(y=\arctan(g(x))\), differentiate the inside to get \(g'(x)\), then divide by \(1+[g(x)]^2\). Preserve the original domain when simplifying.

Check Your Understanding

For each question, identify the inside function before applying the composition formula.

  1. Differentiate \(y=\arctan(5x^3)\).
  2. Find the derivative of \(y=\arctan(\cos x)\).
  3. Differentiate \(y=\arctan\!\left(\frac{2x}{x+3}\right)\), and state the input excluded from the domain.
  4. For \(y=\arctan(x^2+1)\), find \(y'(1)\).
  5. Explain why the denominator in the composition formula cannot equal zero for real \(g(x)\).

Test yourself: AP Calculus practice exams

Ready to check what you know? Work an AP-style practice exam, then open the full solutions.

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers all of AP Calculus AB & BC: full review, every practice question, and step-by-step solutions to each one.

QR code to download the Calc Pass app

Get the Calc Pass App

Scan to download and practice on the go, with instant scoring.

Calc Pass Volume 1: 1,114 Practice Questions book cover

Vol. 1: 1,114 Questions

The complete practice question bank, organized by AB & BC topic.

View on Amazon
Calc Pass Volume 2: Solutions Manual book cover

Vol. 2: Solutions Manual

Fully worked solutions to every question in Volume 1.

View on Amazon