From an Antiderivative to a Definite Integral
A reciprocal quadratic can have an antiderivative involving the inverse tangent when its denominator has no real roots. For a definite integral, finding that antiderivative is only part of the work: the original limits must be substituted carefully, including in the transformed argument of the inverse tangent. A missed scale factor or a sign error at one endpoint changes the value of the integral.
This tutorial develops a formula for a general irreducible quadratic and applies it to definite integrals. The main points are to identify the conditions under which the formula applies, preserve the sign of the denominator, and evaluate the transformed expression at both original endpoints.
For such a quadratic, \(4ac-b^2>0\). Define \(D=\sqrt{4ac-b^2}\), taking the positive square root. Since the quadratic has no real zeros, its reciprocal is continuous on every finite interval, so the definite integral exists.
The Formula and Its Conditions
For \(a\ne0\) and \(b^2-4ac<0\), an antiderivative of \(1/(ax^2+bx+c)\) is
The coefficient \(2/D\) is positive, even if \(a\) is negative. The sign of the integrand is accounted for by the argument \(2ax+b\), whose slope is \(2a\). This distinction matters: changing or discarding that slope can give an incorrect sign.
The inverse tangent here is the principal inverse tangent, whose values lie between \(-\pi/2\) and \(\pi/2\). For finite real endpoints \(r\) and \(s\), the definite-integral formula is
Both endpoint values must be computed from the same transformed expression. In particular, the transformed endpoint is \((2ax+b)/D\), not just \(x\), and the lower-endpoint value is subtracted from the upper-endpoint value.
Why the Formula Works
Complete the square in the denominator. Because \(a\ne0\),
Indeed, expanding the numerator gives \(4a^2x^2+4abx+b^2+4ac-b^2=4a(ax^2+bx+c)\). Now set \(u=(2ax+b)/D\). Differentiating gives \(du/dx=2a/D\), while the completed-square identity gives \(1+(2ax+b)^2/D^2=4a(ax^2+bx+c)/D^2\). Therefore
This derivative calculation proves the antiderivative formula. The denominator in the inverse-tangent derivative is positive, and the cancellation is valid because \(a\ne0\). Applying the Fundamental Theorem of Calculus then gives the definite-integral formula by evaluating \(F(s)-F(r)\). The transformed expression varies continuously between the endpoint values, so there is no need to adjust the principal inverse tangent by adding or subtracting a multiple of \(\pi\).
Worked Examples
Worked Example: A Shifted Quadratic on a Finite Interval
Evaluate \(\int_0^1 \frac{dx}{x^2+2x+5}\).
Here \(a=1\), \(b=2\), and \(c=5\). The discriminant is \(b^2-4ac=4-20=-16<0\), so the denominator is irreducible. Calculate the scale parameter:
The transformed endpoint is \((2ax+b)/D=(2x+2)/4=(x+1)/2\), and the outside factor is \(2/D=1/2\). At \(x=1\), the transformed value is \(1\); at \(x=0\), it is \(1/2\). Thus
Since \(\arctan(1)=\pi/4\), this can also be written as \(\pi/8-\frac12\arctan(1/2)\). To check the antiderivative, differentiate \(F(x)=\frac12\arctan((x+1)/2)\):
The derivative matches the integrand, and the endpoint substitution uses the original lower and upper limits in the correct order.
Worked Example: A Quadratic with a Nonunit Leading Coefficient
Evaluate \(\int_{-1}^{2}\frac{dx}{2x^2-4x+5}\).
For this denominator, \(a=2\), \(b=-4\), and \(c=5\). Its discriminant is \(b^2-4ac=16-40=-24<0\). Hence
The transformed argument is \((4x-4)/(2\sqrt6)=(2x-2)/\sqrt6\). At the upper endpoint \(x=2\), it equals \(2/\sqrt6=\sqrt6/3\). At the lower endpoint \(x=-1\), it equals \(-4/\sqrt6=-2\sqrt6/3\). Therefore
Using the oddness of the principal inverse tangent, the bracket is the sum \(\arctan(\sqrt6/3)+\arctan(2\sqrt6/3)\). To check, differentiate \(F(x)=\frac1{\sqrt6}\arctan((2x-2)/\sqrt6)\):
The final equality follows because \((2x-2)^2+6=4x^2-8x+10=2(2x^2-4x+5)\). This check confirms both the outside factor and the transformed argument.
Worked Example: A Negative Quadratic
Evaluate \(\int_0^1\frac{dx}{-x^2+2x-2}\).
Here \(a=-1\), \(b=2\), and \(c=-2\). The discriminant is \(b^2-4ac=4-8=-4<0\), and \(D=\sqrt{4ac-b^2}=\sqrt{8-4}=2\). The transformed argument is \((-2x+2)/2=1-x\), and \(2/D=1\). The endpoint values are \(1\) at \(x=0\) and \(0\) at \(x=1\), so
The negative answer is consistent with the integrand: \(-x^2+2x-2=-((x-1)^2+1)\), which is negative for every real \(x\). For a derivative check, \(F(x)=\arctan(1-x)\) gives
Thus the antiderivative and the sign of the definite integral agree.
Endpoint Tracking and Common Errors
In each example, the original endpoint is substituted into the complete transformed argument before the inverse tangent is evaluated. A useful way to organize the work is to write down the coefficients, compute \(D\), identify the transformed argument and outside factor, and then evaluate that argument at both endpoints. This keeps the scale and endpoint calculations separate.
Verify that \(a\ne0\) and \(b^2-4ac<0\). Only then is \(D=\sqrt{4ac-b^2}\) a positive real number and the stated formula applicable.
Use \(D=\sqrt{4ac-b^2}\) and retain the factor \(2/D\) outside the inverse tangent.
Evaluate \((2ax+b)/D\) separately at the upper and lower endpoints, keeping any negative values.
Use the value at the upper endpoint minus the value at the lower endpoint.
A common mistake is to replace a negative transformed endpoint by its absolute value. In the second example, doing that would incorrectly use \(\arctan(2\sqrt6/3)\) at the lower endpoint. It would produce \(\frac1{\sqrt6}[\arctan(\sqrt6/3)-\arctan(2\sqrt6/3)]\), rather than the correct \(\frac1{\sqrt6}[\arctan(\sqrt6/3)+\arctan(2\sqrt6/3)]\). The correction is to substitute \(x=-1\) into \((2x-2)/\sqrt6\) exactly: the result is \(-2\sqrt6/3\), and \(\arctan(-z)=-\arctan(z)\).
Another potential error is assuming that the answer must be positive because \(2/D>0\). The third example shows why that conclusion is false: when \(a<0\), the denominator can be negative throughout the interval. The endpoint difference then correctly gives a negative integral. A sign check on the integrand is a quick way to detect an inconsistent result.
Why Definite Integrals Need Careful Substitution
The inverse-tangent formula makes these definite integrals explicit, but the endpoint work is part of the mathematics, not just bookkeeping. The quadratic coefficients determine both the scale and the transformed coordinate. Losing either one can produce a plausible-looking expression that does not differentiate to the original integrand or has the wrong sign.
For a finite interval, the negative-discriminant condition guarantees that the denominator never vanishes. This means the integrand is continuous throughout the interval and the Fundamental Theorem of Calculus applies directly. The derivative check is a reliable final test: if the proposed antiderivative differentiates to the reciprocal quadratic, then evaluating it at the original endpoints gives the required definite integral.
Check Your Understanding
Work through these questions using the endpoint and sign checks from the examples.
- For \(3x^2+6x+8\), calculate \(D\) and the transformed argument \((2ax+b)/D\).
- State the conditions on \(a,b,c\) that allow the inverse-tangent formula to be used.
- For \(\int_0^2 dx/(x^2+1)\), identify the transformed values at the two endpoints and write the exact definite-integral value.
- Why must a negative transformed endpoint remain negative when it is substituted into the principal inverse tangent?
- Explain how checking the sign of the integrand can help detect an error in the evaluated definite integral.