Tutorials › Calculus I › Deriving The Arctangent Derivative

Implicit and Inverse Differentiation · Tutorial 583 of 1495

Deriving The Arctangent Derivative

Derive d/dx arctan x = 1/(1+x^2) by implicit differentiation and use it to differentiate compositions with the arctangent.

Intermediate 9 min read

What You'll Learn

  • Define arctan x as the angle y in (-pi/2, pi/2) with tan y = x.
  • Differentiate tan y = x implicitly and use sec^2 y = 1 + tan^2 y.
  • Obtain d/dx arctan x = 1/(1+x^2) for all real x.
  • Apply the Chain Rule to arctan(3x), arctan(x^2) and arctan(1/x).
  • Verify the formula on sample inputs and avoid the usual confusions.

Setting Up the Inverse Tangent

The tangent function is not one-to-one on its whole domain, but it is strictly increasing on the open interval \(\left(-\tfrac\pi2,\tfrac\pi2\right)\), where it takes every real value exactly once. The arctangent is the inverse of tangent restricted to that interval. For each real \(x\), \(y=\arctan x\) is the unique number in \(\left(-\tfrac\pi2,\tfrac\pi2\right)\) with \(\tan y=x\). The derivative of arctangent follows by differentiating this defining relation. The same method gave the derivatives of arcsine and arccosine earlier in the module.

Theorem: For every real \(x\), \(\dfrac{d}{dx}\arctan x=\dfrac{1}{1+x^2}.\)

Derivation from tan y = x

1
Name the angle.
Let \(y=\arctan x\), so \(\tan y=x\) with \(-\tfrac\pi2<y<\tfrac\pi2\). We take for granted that the inverse of a differentiable, strictly monotone function with nonzero derivative is differentiable, so \(y\) is a differentiable function of \(x\).
2
Differentiate implicitly.
Differentiating \(\tan y=x\) with respect to \(x\) and using the Chain Rule on the left gives \(\sec^2y\cdot\dfrac{dy}{dx}=1\). Note that \(\sec^2y\ge1>0\), so we may divide.
3
Express \(\sec^2y\) in terms of \(x\).
Divide the identity \(\sin^2y+\cos^2y=1\) by \(\cos^2y\) (which is nonzero because \(y\) is strictly between \(-\tfrac\pi2\) and \(\tfrac\pi2\)). This gives \(\tan^2y+1=\sec^2y\). Since \(\tan y=x\), we get \(\sec^2y=1+x^2\).
4
Solve.
Therefore \(\dfrac{dy}{dx}=\dfrac{1}{\sec^2y}=\dfrac{1}{1+x^2}\).

Two features of the result are worth noting. First, the formula holds for every real \(x\); unlike arcsine, arctangent has no points of vertical tangent. Second, the derivative is always positive and is largest at \(x=0\), where it equals \(1\). So the graph of the arctangent rises everywhere, steepest at the origin, and flattens out toward the horizontal asymptotes \(y=\pm\tfrac\pi2\) as \(|x|\) grows.

Worked Example: Checking the Formula on Sample Inputs

Verify \(\dfrac{d}{dx}\arctan x=\dfrac1{1+x^2}\) at \(x=0\), \(x=1\) and \(x=\sqrt3\).

The formula predicts the values

$$ \frac1{1+0}=1,\qquad\frac{1}{1+1}=\frac12,\qquad\frac{1}{1+3}=\frac14. $$

Compare with difference quotients using known values of arctangent: \(\arctan0=0\), \(\arctan1=\tfrac\pi4\approx0.785398\), and \(\arctan\sqrt3=\tfrac\pi3\approx1.047198\). Near \(x=1\), \(\arctan1.001\approx0.785898\) and \(\arctan0.999\approx0.784898\), so the central difference quotient is \(\dfrac{0.785898-0.784898}{0.002}=0.5000\), matching \(\tfrac12\). The same estimate at the other two points also agrees with the predicted values.

Worked Example: A Linear Inner Function

Differentiate \(f(x)=\arctan(3x)\).

With \(u=3x\) and \(u'=3\), the Chain Rule gives

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

Check at \(x=1\): the formula gives \(\dfrac3{10}=0.3\). A difference quotient with \(\arctan3.003\approx1.249346\) and \(\arctan2.997\approx1.248746\) gives \(\dfrac{1.249346-1.248746}{0.002}=0.3000\).

Worked Example: Reciprocal Argument

Differentiate \(g(x)=\arctan\left(\dfrac1x\right)\) for \(x\ne0\).

Take \(u=1/x\), so \(u'=-1/x^2\). Then

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

At \(x=2\), \(g'(2)=-\tfrac15\). This result has an interpretation. For \(x>0\), \(\arctan x+\arctan(1/x)=\tfrac\pi2\), which is constant, so the derivative of \(\arctan(1/x)\) must be the negative of the derivative of \(\arctan x\). Indeed \(-\dfrac1{1+x^2}\) is exactly that negative.

Worked Example: A Tangent Line

Find the tangent line to \(y=\arctan x\) at \(x=1\).

The point is \((1,\tfrac\pi4)\) and the slope is \(\dfrac{1}{1+1}=\tfrac12\). The tangent line is

$$ y-\frac\pi4=\frac12\,(x-1). $$

At \(x=1.2\) the line predicts \(y\approx0.785398+0.1=0.885398\), and the true value is \(\arctan1.2\approx0.876058\), a small difference as expected for a short step.

Common Mistakes

Confusing the inverse with the reciprocal. The notation \(\tan^{-1}x\) means \(\arctan x\), not \(\dfrac{1}{\tan x}\). The derivative of \(\cot x=\dfrac1{\tan x}\) is \(-\csc^2x\), which is a different function entirely.

Leaving the answer in terms of \(y\). The derivation produces \(\dfrac{1}{\sec^2y}\). The result must be rewritten as a function of \(x\), which is why the identity \(\sec^2y=1+\tan^2y\) is needed.

Dropping the Chain Rule factor. The derivative of \(\arctan(3x)\) is \(\dfrac3{1+9x^2}\), not \(\dfrac{1}{1+9x^2}\). At \(x=0\) the correct slope is \(3\), reflecting that the argument \(3x\) changes three times as fast as \(x\).

Worked Example: Arctangent Inside a Product

Differentiate \(p(x)=x\arctan x\) and evaluate \(p'(1)\).

Use the Product Rule with \(\dfrac{d}{dx}x=1\) and \(\dfrac{d}{dx}\arctan x=\dfrac1{1+x^2}\):

$$ p'(x)=\arctan x+\frac{x}{1+x^2}. $$

At \(x=1\), \(p'(1)=\dfrac\pi4+\dfrac12\approx0.785398+0.5=1.285398\).

Check: with \(p(x)=x\arctan x\), \(p(1.001)\approx0.786684\) and \(p(0.999)\approx0.784113\), giving a difference quotient of about \(1.285\).

Summary of the Derivative Formulas

FunctionDerivativeDomain of validity
\(\arctan x\)\(\dfrac{1}{1+x^2}\)all real \(x\)
\(\arctan u(x)\)\(\dfrac{u'(x)}{1+u(x)^2}\)\(u\) differentiable
\(\arctan(ax)\)\(\dfrac{a}{1+a^2x^2}\)all real \(x\), \(a\) constant

Notice that every denominator has the form \(1+(\text{argument})^2\) and every numerator is the derivative of the argument. This is the pattern to look for when you meet such a derivative in a problem, and when you meet the reverse pattern in an integral. If you forget the formula, you can rebuild it in four lines from \(\tan y=x\), which is far more reliable than recalling a table.

Worked Example: Concavity of the Arctangent

Find the second derivative of \(\arctan x\) and describe its concavity.

Write \(\dfrac{d}{dx}\arctan x=(1+x^2)^{-1}\) and differentiate with the Chain Rule:

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

The denominator is positive, so the sign of the second derivative is the sign of \(-2x\). The arctangent is concave up for \(x<0\), concave down for \(x>0\), and has an inflection point at the origin where its slope \(1\) is largest.

Check: at \(x=1\), the second derivative is \(-\dfrac{2}{4}=-0.5\), which equals the derivative of \(\dfrac{1}{1+x^2}\) at \(1\), namely \(-\dfrac{2x}{(1+x^2)^2}=-0.5\). The two expressions agree because they are the same quantity.

Worked Example: A Linear Approximation Near the Origin

Estimate \(\arctan(0.1)\) using the tangent line at \(x=0\).

At \(x=0\), \(\arctan0=0\) and the slope is \(1\), so the linearization is \(L(x)=x\). Thus \(\arctan(0.1)\approx0.1\).

Check: the true value is \(\arctan0.1\approx0.0996687\), so the estimate is high by about \(0.000331\). Because the curve is concave down for \(x>0\), the tangent line lies above it, so the overestimate is the expected direction.

Notice how this tutorial used the same pattern as the other inverse-function derivatives. In each case, the inverse relation is written in a form that can be differentiated, the derivative of the forward function appears, and the Pythagorean-type identity converts the result back to \(x\). With arctangent, the identity \(\sec^2y=1+\tan^2y\) makes the answer algebraic: there is no square root, unlike the derivatives of arcsine and arccosine, which involve \(\sqrt{1-x^2}\). That algebraic simplicity is why the arctangent appears so often in integrals of rational functions.

Worked Example: A Composition with Exponential and Arctangent

Differentiate \(q(x)=\arctan(e^{x})\) and find the limit of \(q'(x)\) as \(x\to\infty\) and as \(x\to-\infty\).

With \(u=e^x\) and \(u'=e^x\), the formula gives \(q'(x)=\dfrac{e^x}{1+e^{2x}}\). Dividing the numerator and the denominator by \(e^x\) gives the equivalent form \(\dfrac{1}{e^{-x}+e^{x}}=\dfrac{1}{2\cosh x}\).

As \(x\to\pm\infty\), the denominator \(e^{-x}+e^{x}\) grows without bound, so \(q'(x)\to0\) in both directions. At \(x=0\), \(q'(0)=\dfrac{1}{2}\), the largest value. So \(q\) increases everywhere but flattens out toward its horizontal asymptotes \(\arctan(0)=0\) as \(x\to-\infty\) and \(\tfrac\pi2\) as \(x\to\infty\).

Where This Fits in the Course

This tutorial belongs to the module “Implicit and Inverse Differentiation”. The tutorial just before it is “Deriving The Arccosine Derivative,” and the one that follows is “Deriving The Arccotangent Derivative.”

Using the Result for Antiderivatives

Because \(\dfrac{d}{dx}\arctan x=\dfrac{1}{1+x^2}\), the function \(\arctan x\) is an antiderivative of \(\dfrac{1}{1+x^2}\), which shows that \(\displaystyle\int\frac{dx}{1+x^2}=\arctan x+C\). Definite integrals follow at once: \(\displaystyle\int_0^1\frac{dx}{1+x^2}=\arctan1-\arctan0=\frac\pi4\). The Chain Rule example \(\dfrac{d}{dx}\arctan(3x)=\dfrac{3}{1+9x^2}\) likewise gives \(\displaystyle\int\frac{3\,dx}{1+9x^2}=\arctan(3x)+C\). These antiderivatives are the main reason the arctangent derivative matters in later work.

Practice Problems with Answers

Try each problem before reading the answer. Each answer below was verified by differentiation or by evaluating a difference quotient or integral numerically.

  1. Differentiate \(\arctan(x^2)\) and evaluate at \(x=1\).
    Answer. \(\dfrac{2x}{1+x^4}\); at \(x=1\) it equals \(1\).
  2. Differentiate \(x\arctan x-\tfrac12\ln(1+x^2)\).
    Answer. \(\arctan x+\dfrac{x}{1+x^2}-\dfrac{x}{1+x^2}=\arctan x\).
  3. Differentiate \(\arctan(e^x)\).
    Answer. \(\dfrac{e^x}{1+e^{2x}}\).
  4. Find the equation of the tangent line to \(y=\arctan x\) at \(x=0\).
    Answer. The slope is \(1\) and \(\arctan0=0\), so \(y=x\).

Check Your Understanding

Work these without looking back.

  1. Differentiate \(\arctan(x^2)\) and evaluate the derivative at \(x=1\).
  2. Differentiate \(x\arctan x-\tfrac12\ln(1+x^2)\) and simplify.
  3. Why is \(\sec^2y\ne0\) in the derivation, and where is that fact used?
  4. Find the limit of \(\arctan'(x)\) as \(x\to\infty\) and interpret it.
  5. Show that \(\arctan x+\arctan(1/x)\) has derivative \(0\) for \(x>0\).

Test yourself: Calculus I final exam practice

Ready to check what you know? Work a full-length practice final, then open the complete worked solutions.

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers the full Calculus AB & BC curriculum (the core of Calculus I and II): 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