Tutorials › Calculus II › Deriving the Inverse Tangent Formula for Quadratics

Completing the Square Techniques · Tutorial 252 of 998

Deriving the Inverse Tangent Formula for Quadratics

Learn why reciprocal sums of squares integrate to an inverse tangent and how the formula follows for a general irreducible quadratic.

Intermediate 9 min read

What You'll Learn

  • Derive the antiderivative of one over a squared variable plus a positive constant.
  • Track the scaling factor when the numerator contains a linear substitution.
  • Complete the square in a general irreducible quadratic denominator.
  • Use the discriminant to express the resulting inverse-tangent formula.
  • Check antiderivatives by differentiation and identify common sign errors.

Why an Inverse Tangent Appears

A quadratic denominator that has no real roots can often be written as a positive or negative constant times a sum of a square and a positive number. The basic model is \(u^2+a^2\), where \(a>0\). Its reciprocal has an antiderivative involving the inverse tangent because the derivative of \(\arctan z\) is \(1/(1+z^2)\).

The important detail is the scale. Replacing \(z\) by \(u/a\) changes both the argument of the inverse tangent and the coefficient in front of it. Keeping track of both factors gives a formula that can then be translated to any irreducible quadratic.

Key idea: For \(a>0\), scaling the standard derivative of \(\arctan z\) gives an antiderivative of \(1/(u^2+a^2)\). Completing the square then puts a general irreducible quadratic into this form.

The Standard Inverse-Tangent Formula

We use \(\arctan z\) for the principal inverse tangent, whose values lie in \((-\pi/2,\pi/2)\). Its derivative is \(1/(1+z^2)\). This derivative follows by setting \(y=\arctan z\), so that \(\tan y=z\), and differentiating: \(\sec^2(y)\,dy/dz=1\). Since \(\sec^2(y)=1+\tan^2(y)=1+z^2\), it follows that \(dy/dz=1/(1+z^2)\).

Let \(a>0\). To find an antiderivative with respect to \(u\), scale the input to the inverse tangent by \(1/a\). By the chain rule,

$$ \frac{d}{du}\left(\frac{1}{a}\arctan\left(\frac{u}{a}\right)\right) = \frac{1}{a}\cdot \frac{1}{1+(u/a)^2}\cdot\frac{1}{a} = \frac{1}{a^2+u^2}. $$

The two factors of \(1/a\) have different sources: one is the coefficient outside \(\arctan\), and the other comes from differentiating \(u/a\). Combining them with the denominator \(1+(u/a)^2\) produces exactly \(u^2+a^2\).

Formula: For \(a>0\), an antiderivative with respect to \(u\) is \( \frac{1}{a}\arctan\left(\frac{u}{a}\right)+C \). The formula is verified by differentiation.

Derivation by Scaling the Variable

The same result can be understood by a change of scale. Set \(t=u/a\), so \(u=at\) and \(du=a\,dt\). Then \(u^2+a^2=a^2(t^2+1)\), and the integral transforms as follows:

$$ \int\frac{du}{u^2+a^2} = \int\frac{a\,dt}{a^2(t^2+1)} = \frac{1}{a}\int\frac{dt}{1+t^2} = \frac{1}{a}\arctan t+C = \frac{1}{a}\arctan\left(\frac{u}{a}\right)+C. $$

Here we used the standard antiderivative \(\int 1/(1+t^2)\,dt=\arctan t+C\), which follows from the inverse-tangent derivative above. This derivation explains why the coefficient is \(1/a\), not \(1/a^2\): the substitution contributes \(du=a\,dt\), leaving one factor \(1/a\) outside the standard integral.

Worked Example: Scaling a Linear Expression

Find an antiderivative of \(1/((2x-1)^2+9)\). Here the squared expression plays the role of \(u^2\), with \(u=2x-1\), and \(a=3\). Since \(du=2\,dx\), we have \(dx=du/2\).

$$ \int\frac{dx}{(2x-1)^2+9} = \frac{1}{2}\int\frac{du}{u^2+3^2} = \frac{1}{2}\cdot\frac{1}{3}\arctan\left(\frac{u}{3}\right)+C = \frac{1}{6}\arctan\left(\frac{2x-1}{3}\right)+C. $$

Check by differentiation. With \(z=(2x-1)/3\), we have \(z'=2/3\), so

$$ \frac{d}{dx}\left[\frac{1}{6}\arctan\left(\frac{2x-1}{3}\right)\right] = \frac{1}{6}\cdot\frac{1}{1+((2x-1)/3)^2}\cdot\frac{2}{3} = \frac{1}{9+(2x-1)^2}. $$

This is the original integrand. The factor \(1/2\) from \(du=2\,dx\) is essential.

Translating the Formula to a General Quadratic

Consider \(Ax^2+Bx+C\), where \(A\ne 0\). Its discriminant is \(\Delta=B^2-4AC\). The quadratic is irreducible over the real numbers precisely when \(\Delta<0\). Completing the square gives

$$ Ax^2+Bx+C = A\left[ \left(x+\frac{B}{2A}\right)^2 + \frac{4AC-B^2}{4A^2} \right]. $$

When \(\Delta<0\), the second term inside the brackets is positive. Define the positive number \(a=\sqrt{4AC-B^2}/(2|A|)\). Then the completed-square form is \(A[(x+B/(2A))^2+a^2]\). The absolute value in the definition of \(a\) ensures \(a>0\), whether \(A\) is positive or negative.

Let \(u=x+B/(2A)\). Since \(du=dx\), the standard formula gives an antiderivative of the reciprocal quadratic:

$$ \int\frac{dx}{Ax^2+Bx+C} = \frac{1}{A}\int\frac{du}{u^2+a^2} = \frac{1}{Aa}\arctan\left(\frac{u}{a}\right)+C_0. $$

Here \(C_0\) denotes the arbitrary constant of integration. Substituting the expressions for \(u\) and \(a\) yields a useful formula expressed directly in the original coefficients:

Theorem: If \(A\ne0\) and \(\Delta=B^2-4AC<0\), then for every real \(x\),
$$ \int\frac{dx}{Ax^2+Bx+C} = \frac{2}{\sqrt{-\Delta}}\arctan\left(\frac{2Ax+B}{\sqrt{-\Delta}}\right)+C_0. $$
The denominator has no real zeros, so the formula applies throughout \(\mathbb R\).

Why the Coefficient Formula Works

To check the compact formula, write \(D=\sqrt{-\Delta}>0\) and \(z=(2Ax+B)/D\). Then \(z'=2A/D\). Differentiating the proposed antiderivative gives

$$ \frac{d}{dx}\left[\frac{2}{D}\arctan z\right] = \frac{2}{D}\cdot\frac{1}{1+z^2}\cdot\frac{2A}{D} = \frac{4A}{D^2+(2Ax+B)^2}. $$

Since \(D^2=-\Delta=4AC-B^2\), the denominator in this last expression simplifies:

$$ D^2+(2Ax+B)^2 = 4AC-B^2+4A^2x^2+4ABx+B^2 = 4A(Ax^2+Bx+C). $$

Therefore the derivative is \(4A/[4A(Ax^2+Bx+C)]=1/(Ax^2+Bx+C)\). This verifies the formula directly, including when \(A<0\). The signs in the argument and the coefficient work together; the formula does not require a positive leading coefficient.

Worked Examples with General Quadratics

Worked Example: A Quadratic with Positive Leading Coefficient

Find an antiderivative of \(1/(6x^2+12x+25)\). First compute the discriminant: \(\Delta=12^2-4(6)(25)=144-600=-456\), so the quadratic is irreducible. Completing the square gives

$$ 6x^2+12x+25 = 6(x^2+2x)+25 = 6\bigl((x+1)^2-1\bigr)+25 = 6(x+1)^2+19 = 6\left((x+1)^2+\frac{19}{6}\right). $$

Thus \(u=x+1\), \(a=\sqrt{19/6}\), and the factor \(1/6\) comes from the leading coefficient. The standard formula gives

$$ \int\frac{dx}{6x^2+12x+25} = \frac{1}{6\sqrt{19/6}} \arctan\left(\frac{x+1}{\sqrt{19/6}}\right)+C_0 = \frac{1}{\sqrt{114}}\arctan\left(\sqrt{\frac{6}{19}}(x+1)\right)+C_0. $$

For a check, put \(z=\sqrt{6/19}(x+1)\), so \(z'=\sqrt{6/19}\). Differentiating gives

$$ \frac{1}{\sqrt{114}}\cdot \frac{\sqrt{6/19}}{1+(6/19)(x+1)^2} = \frac{1/19}{1+(6/19)(x+1)^2} = \frac{1}{19+6(x+1)^2} = \frac{1}{6x^2+12x+25}. $$

The derivative agrees with the integrand.

Worked Example: A Quadratic with Negative Leading Coefficient

Find an antiderivative of \(1/(-2x^2+4x-5)\). Its discriminant is \(\Delta=4^2-4(-2)(-5)=16-40=-24\). Complete the square carefully, keeping the negative factor:

$$ -2x^2+4x-5 = -2(x^2-2x)-5 = -2\bigl((x-1)^2-1\bigr)-5 = -2(x-1)^2-3 = -2\left((x-1)^2+\frac{3}{2}\right). $$

Using \(u=x-1\) and \(a=\sqrt{3/2}\), the reciprocal has the factor \(-1/2\) from the denominator:

$$ \int\frac{dx}{-2x^2+4x-5} = -\frac{1}{2\sqrt{3/2}} \arctan\left(\frac{x-1}{\sqrt{3/2}}\right)+C_0 = -\frac{1}{\sqrt{6}}\arctan\left(\sqrt{\frac{2}{3}}(x-1)\right)+C_0. $$

Check with \(z=\sqrt{2/3}(x-1)\), so \(z'=\sqrt{2/3}\):

$$ \frac{d}{dx}\left[-\frac{1}{\sqrt6}\arctan z\right] = -\frac{1}{\sqrt6}\cdot\frac{\sqrt{2/3}}{1+(2/3)(x-1)^2} = -\frac{1/3}{1+(2/3)(x-1)^2} = -\frac{1}{3+2(x-1)^2} = \frac{1}{-2x^2+4x-5}. $$

The negative sign is necessary because the original denominator is negative for every real \(x\).

A Common Scaling Mistake

A frequent error is to scale the argument of \(\arctan\) but omit the corresponding coefficient. For example, an incorrect proposed antiderivative for \(1/(u^2+9)\) is \(\arctan(u/3)\). Differentiating exposes the error:

$$ \frac{d}{du}\arctan\left(\frac{u}{3}\right) = \frac{1}{1+(u/3)^2}\cdot\frac{1}{3} = \frac{3}{u^2+9}, $$

which is three times the required integrand. The correction is to include the outside factor \(1/3\):

$$ \frac{d}{du}\left[\frac{1}{3}\arctan\left(\frac{u}{3}\right)\right] = \frac{1}{u^2+9}. $$

When applying this formula to a quadratic, there may be another scale to track: the leading coefficient \(A\), as well as any factor introduced by the substitution for \(u\). Differentiating the final expression is a reliable way to check that all factors have been included.

When the Formula Applies

The inverse-tangent formula in this tutorial requires a positive sum-of-squares parameter \(a\), or, for the general quadratic, a negative discriminant. A quadratic with \(\Delta<0\) has no real roots, and its completed-square constant is positive after the leading coefficient is factored out. If \(\Delta\ge0\), this derivation does not apply: the quadratic cannot be put into the required irreducible form with a positive \(a^2\).

The constant \(C_0\) is arbitrary on any interval where the antiderivative is being considered. In the irreducible case, the denominator is nonzero on all of \(\mathbb R\), so there is no need to split the real line into separate intervals. The formula is useful because it converts a broad class of quadratic denominators into one standard pattern, while making the required condition and all scale factors explicit.

Check Your Understanding

Use differentiation to check your results, and pay attention to the conditions and scale factors.

  1. Derive an antiderivative of \(1/(u^2+16)\) by scaling the inverse-tangent derivative.
  2. What coefficient must multiply \(\arctan(u/5)\) to obtain an antiderivative of \(1/(u^2+25)\)?
  3. For \(3x^2+6x+10\), compute the discriminant and state whether the general inverse-tangent formula applies.
  4. Explain why a negative leading coefficient in an irreducible quadratic leads to a negative factor in its antiderivative.
  5. Differentiate the compact formula for \(1/(Ax^2+Bx+C)\) and identify the identity that reduces its denominator to the original quadratic.

Test yourself: Calculus II 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