From arctan x to arctan(ax + b)
The tutorial on the plain inverse tangent gave \(\int\arctan x\,dx=x\arctan x-\frac12\ln(1+x^2)+C\). Many problems instead contain an affine argument, such as \(\arctan(2x)\) or \(\arctan(x+1)\). The structure is the same, but the inner linear function introduces a factor from the chain rule. Two routes lead to the answer: substitute first and then use the known formula, or apply integration by parts directly with the shifted argument.
Either route needs the same ingredient, the derivative \(\frac{d}{dx}\arctan(ax+b)=\frac{a}{1+(ax+b)^2}\). The factor \(a\) in the numerator is the chain rule, and it is the source of the \(\frac1a\) that appears in the final answer.
Deriving the Formula
Let \(w=ax+b\), so \(dw=a\,dx\) and \(dx=\frac{dw}{a}\). Then \(\int\arctan(ax+b)\,dx=\frac1a\int\arctan w\,dw\). The known antiderivative of \(\arctan w\) gives
Replacing \(w\) by \(ax+b\) produces the stated result. Nothing here requires \(a>0\); the formula holds for negative \(a\) as well, because the substitution is valid for any nonzero slope and \(1+w^2\) is always positive.
Checking by Differentiation
Differentiate the bracket with respect to \(x\). The product rule gives \(a\arctan(ax+b)+(ax+b)\cdot\frac{a}{1+(ax+b)^2}\), and the logarithm contributes \(-\frac12\cdot\frac{2a(ax+b)}{1+(ax+b)^2}=-\frac{a(ax+b)}{1+(ax+b)^2}\). The rational terms cancel, leaving \(a\arctan(ax+b)\). Multiplying by the outside factor \(\frac1a\) returns \(\arctan(ax+b)\), as required.
Worked Examples
Worked Example: A Scaled Argument
Find \(\int\arctan(2x)\,dx\).
Here \(a=2\) and \(b=0\). The formula gives \(\frac12\bigl[2x\arctan(2x)-\frac12\ln(1+4x^2)\bigr]\), which simplifies to
Notice that the factor \(\frac12\) from \(\frac1a\) multiplies both terms inside the bracket. The first term loses its leading \(2\), while the logarithm coefficient becomes \(\frac14\).
Worked Example: A Shifted Argument
Find \(\int\arctan(x+1)\,dx\).
With \(a=1\) and \(b=1\), the quadratic is \(1+(x+1)^2=x^2+2x+2\). Therefore
The quadratic \(x^2+2x+2\) has no real roots, so it is positive for every \(x\) and the logarithm needs no absolute value.
Worked Example: A Definite Integral with a Scaled Argument
Evaluate \(\int_0^1\arctan(2x)\,dx\).
Use \(F(x)=x\arctan(2x)-\frac14\ln(1+4x^2)\). Then \(F(1)=\arctan2-\frac14\ln5\) and \(F(0)=0\), so
The integrand rises from \(0\) to about \(1.107\), and its average height on \([0,1]\) is the area itself, \(0.705\), which is plausible for a concave increasing curve.
Worked Example: A Negative Slope
Find \(\int\arctan(1-x)\,dx\).
Here \(a=-1\) and \(b=1\), so \(\frac1a=-1\). The formula gives
The sign flip is the whole difficulty. Differentiating, the chain rule produces \(-1\) from the inner function, which the leading minus sign compensates.
A Reliable Procedure
Write the inside as \(ax+b\) and record \(a\) with its sign.
Setting \(w=ax+b\) turns the problem into \(\frac1a\int\arctan w\,dw\).
Use \(w\arctan w-\frac12\ln(1+w^2)\) inside the bracket.
Replace \(w\) by \(ax+b\) and expand \(1+(ax+b)^2\) if a simpler quadratic is wanted.
Differentiate and confirm that the chain-rule factor \(a\) is cancelled by \(\frac1a\).
Common Mistakes
The most frequent error is forgetting the factor \(\frac1a\), writing \((ax+b)\arctan(ax+b)-\frac12\ln(1+(ax+b)^2)\) with no outside factor. Its derivative is \(a\arctan(ax+b)\), which is \(a\) times too large. A second error is to simplify \(\frac1a\cdot(ax+b)\) incorrectly when \(b\ne0\): the term \(\frac{ax+b}{a}\arctan(ax+b)\) is \(\bigl(x+\frac ba\bigr)\arctan(ax+b)\), not \(x\arctan(ax+b)\).
A third error concerns the quadratic: \(1+(ax+b)^2\ne1+a^2x^2+b^2\). The cross term \(2abx\) must be kept when the quadratic is expanded.
Quick Reference
| Integrand | Antiderivative |
|---|---|
| \(\arctan(2x)\) | \(x\arctan(2x)-\frac14\ln(1+4x^2)\) |
| \(\arctan(x+1)\) | \((x+1)\arctan(x+1)-\frac12\ln(x^2+2x+2)\) |
| \(\arctan(ax+b)\) | \(\frac1a\bigl[(ax+b)\arctan(ax+b)-\frac12\ln(1+(ax+b)^2)\bigr]\) |
| \(\arctan(1-x)\) | \(-(1-x)\arctan(1-x)+\frac12\ln(1+(1-x)^2)\) |
Interpreting the Result
The affine argument stretches and shifts the graph of \(\arctan\). A slope \(a>1\) compresses the curve horizontally, so the integrand climbs to its limiting height \(\frac\pi2\) more quickly, and the area under it over a fixed interval increases. A shift \(b\) slides the curve left or right. Because the area scales like \(\frac1a\) under a horizontal stretch, the factor \(\frac1a\) in the antiderivative is the same bookkeeping that appears in any change of variable.
Practice Problems with Answers
Try each problem before reading the answer. Every answer below was checked by differentiation or by numerical integration.
- Find an antiderivative of \(\arctan(3x)\). Hint: take \(a=3\) and multiply the bracket by \(\frac13\). Answer: \(x\arctan(3x)-\frac16\ln(1+9x^2)\)
- Evaluate \(\int_0^1\arctan(2x)\,dx\). Hint: use the antiderivative from the second worked example. Answer: \(\arctan2-\frac14\ln5\approx0.705\)
- Find an antiderivative of \(\arctan(x-2)\). Hint: expand \(1+(x-2)^2\). Answer: \((x-2)\arctan(x-2)-\frac12\ln(x^2-4x+5)\)
- Evaluate \(\int_0^1\arctan(3x-1)\,dx\). Hint: here \(a=3\), \(b=-1\), so the bracket is evaluated at \(2\) and \(-1\). Answer: \(\frac13\bigl[2\arctan2-\frac\pi4-\frac12\ln5+\frac12\ln2\bigr]\)
Two Routes to the Same Answer
Instead of substituting first, apply integration by parts directly with \(u=\arctan(ax+b)\) and \(dv=dx\). Then \(du=\frac{a\,dx}{1+(ax+b)^2}\) and \(v=x\), so the formula produces \(x\arctan(ax+b)-\int\frac{ax}{1+(ax+b)^2}\,dx\). The remaining integral is a rational function whose numerator is not exactly the derivative of the denominator when \(b\ne0\). One must write \(ax=(ax+b)-b\), integrate the logarithmic part, and then handle the leftover \(-b\) term as an inverse tangent. That produces the same answer, but the substitution route is shorter and less error prone.
The comparison is instructive. When \(b=0\), both routes are equally short. When \(b\ne0\), the substitution route hides the extra arctangent term inside the combination \((ax+b)\arctan(ax+b)\), which is why it is preferred for affine arguments.
Worked Example: Definite Integral with a Negative Slope
Evaluate \(\int_0^1\arctan(1-x)\,dx\).
Substituting \(w=1-x\) reverses the limits: \(x=0\) gives \(w=1\) and \(x=1\) gives \(w=0\). Since \(dx=-dw\), the integral becomes \(\int_0^1\arctan w\,dw\), which is the first example of the previous tutorial:
The reflection \(x\mapsto1-x\) maps the interval \([0,1]\) onto itself, so the area is unchanged. Recognizing such a symmetry avoids any sign bookkeeping with \(\frac1a\).
Domain and Behavior
The arctangent is defined for every real number, so \(\arctan(ax+b)\) is continuous everywhere and every definite integral exists. There is no restriction on the interval, unlike the logarithm and inverse sine integrals, where the argument must stay in a restricted range. The logarithm \(\ln(1+(ax+b)^2)\) in the answer is also defined for every real \(x\), because its argument is at least \(1\). This is why no absolute value signs or interval conditions appear in the result.
For large \(|x|\) the integrand approaches \(\pm\frac\pi2\), so the antiderivative grows roughly like \(\frac{\pi}{2}|x|\). The logarithm contributes only a slow correction of order \(\frac{1}{a}\ln|ax|\).
A Sanity Check You Can Always Run
Before trusting any answer of this type, test it at a convenient point. For \(\arctan(x+1)\) at \(x=0\), the integrand equals \(\arctan1=\frac\pi4\approx0.785\). Differentiating the claimed antiderivative at \(x=0\) must give the same number. The product-rule term contributes \(\arctan1+\frac{1}{2}\), the logarithm contributes \(-\frac12\), and the sum is \(\frac\pi4\). A mismatch at a single point immediately reveals a missing factor or a sign error, which is far faster than re-deriving the whole calculation.
Where This Fits in the Course
This tutorial belongs to the module “Integration by Parts I”. The tutorial just before it is “Integrating The Inverse Sine And Cosine,” and the one that follows is “Integrating x Times The Inverse Tangent.” It generalizes the arctangent formula just derived and prepares for products such as \(x\arctan x\).
Check Your Understanding
Use the formula and examples above to answer these questions.
- Why does the antiderivative of \(\arctan(ax+b)\) carry an overall factor \(\frac1a\)?
- Find \(\int\arctan(4x)\,dx\).
- Expand \(1+(2x-3)^2\) as a quadratic in \(x\).
- Evaluate \(\int_0^{1/2}\arctan(2x)\,dx\) in terms of \(\ln2\) and \(\pi\).
- Differentiate \(x\arctan(2x)-\frac14\ln(1+4x^2)\) and show the result is \(\arctan(2x)\).