The Square Root of a Sum of Squares
The integral \(\int\sqrt{u^2+a^2}\,du\) appeared earlier as a trigonometric-substitution result. This tutorial gives a derivation by integration by parts, which avoids trigonometry, and then uses it as the base case for square roots of arbitrary positive quadratic forms. Any quadratic \(Ax^2+Bx+C\) with \(A>0\) and \(B^2<4AC\) can be rewritten, by completing the square, as \(A(u^2+a^2)\) with \(u\) a shift of \(x\). Its square root is then \(\sqrt{A}\sqrt{u^2+a^2}\), and the base formula applies.
Deriving the Base Formula by Parts
Let \(I=\int\sqrt{u^2+a^2}\,du\), and take the parts \(f=\sqrt{u^2+a^2}\) and \(dg=du\). Then \(df=\frac{u}{\sqrt{u^2+a^2}}\,du\) and \(g=u\), so
Write \(u^2=(u^2+a^2)-a^2\) in the numerator. Then \(\frac{u^2}{\sqrt{u^2+a^2}}=\sqrt{u^2+a^2}-\frac{a^2}{\sqrt{u^2+a^2}}\), and
The original integral \(I\) has reappeared on the right. Moving it to the left gives \(2I=u\sqrt{u^2+a^2}+a^2\ln\bigl(u+\sqrt{u^2+a^2}\bigr)\), and dividing by \(2\) yields the base formula. This is the same cyclic trick used with exponentials and sines: the integral reproduces itself with a sign change, so it can be solved for algebraically.
Checking by Differentiation
The derivative of \(\frac u2\sqrt{u^2+a^2}\) is \(\frac12\sqrt{u^2+a^2}+\frac{u^2}{2\sqrt{u^2+a^2}}\), and the derivative of \(\frac{a^2}{2}\ln\bigl(u+\sqrt{u^2+a^2}\bigr)\) is \(\frac{a^2}{2\sqrt{u^2+a^2}}\). Over the common denominator \(2\sqrt{u^2+a^2}\), the numerator is \((u^2+a^2)+u^2+a^2=2(u^2+a^2)\), and the sum is \(\sqrt{u^2+a^2}\).
General Positive Quadratics
For \(\int\sqrt{Ax^2+Bx+C}\,dx\) with \(A>0\) and \(B^2<4AC\), complete the square: \(Ax^2+Bx+C=A\Bigl[\bigl(x+\frac{B}{2A}\bigr)^2+\frac{4AC-B^2}{4A^2}\Bigr]\). Let \(u=x+\frac{B}{2A}\) and \(a^2=\frac{4AC-B^2}{4A^2}\). Then \(\sqrt{Ax^2+Bx+C}=\sqrt A\sqrt{u^2+a^2}\) and \(du=dx\), so the integral equals \(\sqrt A\int\sqrt{u^2+a^2}\,du\). Applying the base formula and multiplying by \(\sqrt A\) gives the answer. When \(A=1\), the factor \(\sqrt A\) is absent, and when \(A\) is a perfect square, it simplifies to a rational number.
Worked Examples
Worked Example: A Monic Quadratic
Find \(\int\sqrt{x^2+2x+5}\,dx\).
Complete the square: \(x^2+2x+5=(x+1)^2+4\). Let \(u=x+1\) and \(a=2\). The base formula gives \(\frac u2\sqrt{u^2+4}+2\ln(u+\sqrt{u^2+4})\). Therefore
Here \(a^2=4\), so the coefficient of the logarithm is \(\frac{a^2}{2}=2\).
Worked Example: A Pure Scaled Form
Find \(\int\sqrt{4x^2+9}\,dx\).
Write \(4x^2+9=4\bigl(x^2+\frac94\bigr)\), so \(\sqrt A=2\), \(u=x\), and \(a=\frac32\). Then the integral is \(2\bigl[\frac x2\sqrt{x^2+\frac94}+\frac98\ln\bigl(x+\sqrt{x^2+\frac94}\bigr)\bigr]\). Using \(2\sqrt{x^2+\frac94}=\sqrt{4x^2+9}\) and \(x+\sqrt{x^2+\frac94}=\frac12\bigl(2x+\sqrt{4x^2+9}\bigr)\),
The constant \(\ln\frac12\) from rewriting the logarithm is absorbed into \(C\). A linear change of variable \(w=2x\) gives the same result with less work: \(\frac12\int\sqrt{w^2+9}\,dw\).
Worked Example: A Shifted Quadratic with a = 3
Find \(\int\sqrt{x^2+4x+13}\,dx\).
Complete the square: \(x^2+4x+13=(x+2)^2+9\). Let \(u=x+2\) and \(a=3\). Then
The logarithm coefficient is \(\frac{a^2}{2}=\frac92\).
Worked Example: A General Quadratic
Find \(\int\sqrt{2x^2+4x+5}\,dx\).
Complete the square: \(2x^2+4x+5=2(x+1)^2+3=2\bigl[(x+1)^2+\frac32\bigr]\). So \(\sqrt A=\sqrt2\), \(u=x+1\), \(a^2=\frac32\). The base formula gives \(\sqrt2\bigl[\frac u2\sqrt{u^2+\frac32}+\frac34\ln\bigl(u+\sqrt{u^2+\frac32}\bigr)\bigr]\). Since \(\sqrt2\sqrt{u^2+\frac32}=\sqrt{2x^2+4x+5}\),
The factor \(\sqrt2\) multiplies both terms, which is why the logarithm coefficient is \(\frac{3\sqrt2}{4}\).
Worked Example: A Definite Integral
Evaluate \(\int_0^{3/2}\sqrt{4x^2+9}\,dx\).
The antiderivative is \(\frac x2\sqrt{4x^2+9}+\frac94\ln(2x+\sqrt{4x^2+9})\). At \(x=\frac32\): \(\sqrt{18}=3\sqrt2\), so \(\frac34\cdot3\sqrt2+\frac94\ln(3+3\sqrt2)\). At \(x=0\): \(\frac94\ln3\). Subtracting,
The integrand rises from \(3\) to \(3\sqrt2\approx4.24\), so an average near \(3.4\) over length \(1.5\) gives about \(5.1\).
A Reliable Procedure
Confirm \(A>0\) and \(B^2<4AC\).
Write \(Ax^2+Bx+C=A(u^2+a^2)\) with \(u=x+\frac{B}{2A}\).
Factor \(\sqrt A\) outside the integral.
Use \(\frac u2\sqrt{u^2+a^2}+\frac{a^2}{2}\ln(u+\sqrt{u^2+a^2})\).
Recombine radicals, and differentiate.
Common Mistakes
The first mistake is forgetting the factor \(\sqrt A\) after completing the square. The second is using \(a^2=\frac{4AC-B^2}{4A}\) instead of \(\frac{4AC-B^2}{4A^2}\); the extra factor of \(A\) in the denominator is easy to drop. The third is leaving the logarithm with an argument that does not simplify to the original radical, which makes the final answer harder to check.
Quick Reference
| Integrand | Antiderivative |
|---|---|
| \(\sqrt{u^2+a^2}\) | \(\frac u2\sqrt{u^2+a^2}+\frac{a^2}{2}\ln(u+\sqrt{u^2+a^2})\) |
| \(\sqrt{x^2+2x+5}\) | \(\frac{x+1}{2}\sqrt{x^2+2x+5}+2\ln(x+1+\sqrt{x^2+2x+5})\) |
| \(\sqrt{4x^2+9}\) | \(\frac x2\sqrt{4x^2+9}+\frac94\ln(2x+\sqrt{4x^2+9})\) |
Interpreting the Result
The two terms of the base formula have a geometric meaning: the first is a triangle area under the hyperbola \(y^2-u^2=a^2\), and the second is a hyperbolic sector. For large \(u\), the integral grows like \(\frac{u^2}{2}\), since \(\sqrt{u^2+a^2}\approx u\). The logarithmic term is a lower-order correction of size \(\frac{a^2}{2}\ln u\). This matches the arc-length application: the length of the parabola \(y=\frac{x^2}{2}\) over \([0,1]\) is \(\frac12\bigl[\sqrt2+\ln(1+\sqrt2)\bigr]\approx1.148\).
A Numerical Spot Check
Check \(\int_0^{3/2}\sqrt{4x^2+9}\,dx\approx5.165\) with Simpson's rule on three points. The heights are \(3\), \(\sqrt{4\cdot0.5625+9}=\sqrt{11.25}\approx3.354\), and \(3\sqrt2\approx4.243\). Then \(\frac{0.75}{3}(3+4\cdot3.354+4.243)\approx5.1648\), which agrees with the exact value \(5.165\) to three digits.
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 \(\sqrt{x^2+2x+5}\). Hint: \(u=x+1\), \(a=2\). Answer: \(\frac{x+1}{2}\sqrt{x^2+2x+5}+2\ln(x+1+\sqrt{x^2+2x+5})\)
- Find an antiderivative of \(\sqrt{x^2+4x+13}\). Hint: \(u=x+2\), \(a=3\). Answer: \(\frac{x+2}{2}\sqrt{x^2+4x+13}+\frac92\ln(x+2+\sqrt{x^2+4x+13})\)
- Evaluate \(\int_0^{3/2}\sqrt{4x^2+9}\,dx\). Hint: use \(w=2x\). Answer: \(\frac{9\sqrt2}{4}+\frac94\ln(1+\sqrt2)\)
- Evaluate \(\int_0^1\sqrt{x^2+1}\,dx\). Hint: use the base formula with \(a=1\). Answer: \(\frac12\bigl[\sqrt2+\ln(1+\sqrt2)\bigr]\)
Worked Example: A Quadratic with a Perfect-Square Leading Coefficient
Find \(\int\sqrt{9x^2+6x+5}\,dx\).
Complete the square: \(9x^2+6x+5=(3x+1)^2+4\). Let \(w=3x+1\), so \(dw=3\,dx\) and the integral is \(\frac13\int\sqrt{w^2+4}\,dw=\frac13\bigl[\frac w2\sqrt{w^2+4}+2\ln(w+\sqrt{w^2+4})\bigr]\). Therefore
When the leading coefficient is a perfect square, a linear change of variable such as \(w=3x+1\) is cleaner than factoring out \(\sqrt A\), because the factor \(\frac13\) comes from \(dx=\frac{dw}{3}\) and the radical needs no rescaling.
Two Equivalent Ways to Handle the Leading Coefficient
There are two methods for \(A\ne1\). In the factoring method, write \(Ax^2+Bx+C=A(u^2+a^2)\), pull out \(\sqrt A\), and integrate \(\sqrt{u^2+a^2}\) directly. In the linear-substitution method, let \(w=\sqrt A\,u\) when \(A\) is a perfect square, so the quadratic becomes \(w^2+k\) and the integral picks up the factor \(\frac{1}{\sqrt A}\) from \(dx\). The first method works for every \(A>0\). The second is shorter when \(\sqrt A\) is rational. Both give the same answer up to a constant, and you can verify this on the example \(\sqrt{4x^2+9}\), where either route produces \(\frac x2\sqrt{4x^2+9}+\frac94\ln(2x+\sqrt{4x^2+9})\).
Why the Logarithm Argument Changes by a Constant
In the factoring method for \(\sqrt{4x^2+9}\), the logarithm appears as \(\ln\bigl(x+\sqrt{x^2+\frac94}\bigr)\), while in the substitution method it appears as \(\ln\bigl(2x+\sqrt{4x^2+9}\bigr)\). These differ by \(\ln2\), because \(2x+\sqrt{4x^2+9}=2\bigl(x+\sqrt{x^2+\frac94}\bigr)\). A constant difference is absorbed in the arbitrary constant, so both are valid antiderivatives. In a definite integral the constants cancel, and the two methods give identical numbers.
Domain and Behavior
A positive quadratic never vanishes, so \(\sqrt{Ax^2+Bx+C}\) is defined and smooth for every real \(x\). The logarithm's argument \(u+\sqrt{u^2+a^2}\) is always positive, because \(\sqrt{u^2+a^2}>|u|\). No absolute values and no interval restrictions are needed, which makes this one of the most convenient integral families in the unit. As \(|x|\to\infty\), the antiderivative has magnitude close to \(\frac{x^2}{2}\), with the sign of \(x\), because the algebraic term \(\frac u2\sqrt{u^2+a^2}\) dominates the slowly growing logarithm. This matches the fact that the integrand is positive and grows like \(|x|\), so the area accumulates quadratically in both directions.
Where This Fits in the Course
This tutorial belongs to the module “Completing the Square Techniques”. The tutorial just before it is “Integrating Linear Factors Times a Reciprocal Square Root,” and the one that follows is “Integrating Square Roots of Difference Forms.” It extends the radical formulas to arbitrary positive quadratics through completion of the square. The next tutorial treats square roots of difference forms, where the radicand has real roots and the antiderivative uses an absolute value or an arcsine instead, so keep the positive-quadratic case in mind as the model for the signs and constants.
Check Your Understanding
Use the derivation and examples above to answer these questions.
- Why does integration by parts reproduce the original integral in the derivation?
- Complete the square for \(x^2+4x+13\) and identify \(u\) and \(a\).
- Evaluate \(\int_0^1\sqrt{x^2+1}\,dx\).
- Where does the factor \(\sqrt A\) come from?
- Differentiate the base formula and confirm the integrand.