제곱근 안에 이차식이 존재하는 적분의 경우 그 형태를 그대로 적분하기 어렵기 때문에 제곱근을 제거하기 위해 삼각함수나 쌍곡함수의 항등식을 이용하여 치환하는 것을 삼각 치환(Trigonometric Substitution) 또는 쌍곡치환(Hyperbolic Substitution)이라 한다.
일반적으로 2차식은 다음 형태로 만들 수 있으므로
$$ \alpha t^2+\beta t+\gamma = \alpha\left(t+{\beta\over2\alpha}\right)^2+\left(\gamma-{\beta^2\over4\alpha}\right) $$
제곱근 안의 이차식은 $\sqrt{x^2+a^2}, \sqrt{x^2-a^2}, \sqrt{a^2-x^2}$의 3가지 형태로 만들 수 있으며($x = t+{\beta\over 2\alpha}$로 치환하고 $a = \gamma - {\beta^2\over4\alpha}$로 치환) 각각에 대해 삼각함수나 쌍곡함수의 항등식을 이용하여 $x$를 치환하면 제곱근을 제거할 수 있다.
$\sqrt{x^2+a^2}$ 형태의 경우 $x = a \tan \theta$로 치환하여 정리한다(여기서 $\theta \in (-{\pi\over2},{\pi\over2})$). 이 경우 양변을 $\theta$로 미분하여 식을 정리하면 $dx = a\sec^2\theta \ d\theta$를 얻을 수 있고 다음처럼 제곱근을 제거할 수 있다.
$$ \begin{aligned} \sqrt{x^2+a^2} &\Rightarrow \sqrt{(a\tan \theta)^2+a^2} = \sqrt{a^2\tan^2 \theta + a^2} = \sqrt{a^2(\tan^2\theta +1)} \\& = \sqrt{a^2\sec^2\theta} = a|\sec\theta| = a \sec\theta \quad \left(\because \theta \in \left(-{\pi\over2},{\pi\over2}\right)\right)\end{aligned} $$
따라서 $\sec\theta = {\sqrt{x^2+a^2}\over a}$가 된다. 또한 $x = a \tan \theta$ 였으므로 $\tan\theta = {x\over a}$가 된다.
이를 이용하면 $\int \sqrt{x^2+a^2} \ dx$는 다음처럼 정리된다. (아래에서 $\int \sec^3 \theta d\theta = {1\over2}\sec\theta\tan\theta + {1\over2}\ln|\sec\theta+\tan\theta|+C$이다)
$$ \begin{aligned} \int \sqrt{x^2+a^2} \ dx &= \int a\sec\theta \ a\sec^2\theta d\theta = a^2 \int \sec^3\theta \ d\theta \\ &= a^2 \left({1\over2}\sec\theta\tan\theta + {1\over2}\ln|\sec\theta+\tan\theta| \right)+ C\\ &= {a^2\over2}{\sqrt{x^2+a^2}\over a}{x\over a} + {a^2\over2}\ln\left|{\sqrt{x^2+a^2}\over a} + {x\over a}\right| +C \\ &= {x\over2}\sqrt{x^2+a^2} + {a^2\over2} \ln\left|{x + \sqrt{x^2+a^2}\over a}\right| +C \\ &= {x\over2} \sqrt{x^2+a^2} + {a^2\over2}\ln|x+\sqrt{x^2+a^2}| - {a^2\over2}\ln|a| + C \\ &= {1\over2}(x\sqrt{x^2+a^2}+a^2\ln|x+\sqrt{x^2+a^2}|) + C' \end{aligned} $$
마지막에 $-{a^2\over2}\ln|a|$ 부분은 $x$와 관계 없는 상수이므로 적분상수 $C'$에 흡수 된다.
만일 $\int {1\over\sqrt{x^2+a^2}} dx$였다면 다음처럼 정리된다. (여기서 $\theta \in (-{\pi\over2},{\pi\over2})$로 가정하였으므로 $\sec\theta >0$)
$$ \begin{aligned} \int {dx\over \sqrt{x^2+a^2}} &= \int {a\sec^2\theta d\theta \over a|\sec\theta|} = \int \sec\theta d\theta \\& = \ln |\sec\theta + \tan\theta| + C \\ &= \ln\left|{\sqrt{x^2+a^2}\over a} + {x\over a} \right|+C = \ln|x+\sqrt{x^2+a^2}| - \ln |a| + C \\ &= \ln |x+\sqrt{x^2+a^2}|+C' \end{aligned} $$
위와 유사하게 마지막 $-\ln|a|$는 적분상수 $C'$에 흡수된다.
$\sqrt{x^2-a^2}$ 형태의 경우 $x = a \sec \theta$로 치환하여 정리한다(여기서 $\theta \in [0,{\pi\over2})$). 이 경우 양변을 $\theta$로 미분하여 식을 정리하면 $dx = a\sec\theta \tan\theta \ d\theta$를 얻을 수 있고 다음처럼 제곱근을 제거할 수 있다.
$$ \begin{aligned} \sqrt{x^2-a^2} &\Rightarrow \sqrt{(a\sec \theta)^2-a^2} = \sqrt{a^2\sec^2 \theta - a^2} = \sqrt{a^2(\sec^2\theta -1)} \\& = \sqrt{a^2\tan^2\theta} = a|\tan\theta| = a \tan \theta \quad \left(\because \theta \in \left[0,{\pi\over2}\right) \right)\end{aligned} $$