---
## How to perform a trig substitution
- Trig substitution is an integration technique that only works when one of three **very specific terms is in the integrand**. By replacing the variable inside this term with a trigonometric one we can often simplify the integrand through the use of the **Pythagorean identity: $\sin^2(x)+\cos^2(x)=1$**
- Since this technique requires the integrand to contain a **specific term** you may have to algebraically re-arrange the integrand before using this technique. Keep your eye out for **integrands that contain radicals** since these are the only integrands that may allow for trig substitution.
- If your integrand contains a valid term *(see below)* you can **replace ALL INSTANCES of the non-constant variable *(usually x)* with it's corresponding trig equation.** *(See below)*
- This substitution will introduce a new variable: $\theta$ into the integrand. This variable is just a placeholder and is meant to be converted back *(through a specific process)* to x later.
$\newline$
$\large\text{Step 1}$
$\int\frac{\sqrt{a-bx^2}}{x}\;dx\;\;\;{\color{grey}\longrightarrow}\;\;\int\frac{\sqrt{a-\cancel{b}\frac{a}{\cancel{b}}\,\sin^2(\theta)}}{\frac{\sqrt{a}}{\sqrt{b}}\,\sin(\theta)}\;dx\;\;\;{\color{grey}\longrightarrow}\;\;\int\frac{\sqrt{a\Big(1-\,\sin^2(\theta)\Big)}}{\frac{\sqrt{a}}{\sqrt{b}}\,\sin(\theta)}\;dx$
$\small\color{grey}\text{Trig substitution: }\;\;x=\frac{\sqrt{a}}{\sqrt{b}}\;\sin\big(\,\theta\,\big)$
- ==As a result of this substitution the constant, $a$ will be in both of the radical's terms, which allows you to factor it out. This factorization should leave behind a term that's equal to one of the **Pythagorean identities.** *(like $\small1-\sin^2\theta$ ).* By using this identity you can **reduce the contents of the radical down to a single perfectly squared term** which enables you to cancel out the radical, *if there is one*.== *Thus greatly simplifying the integrand.*
$\newline$
$\large\text{Step 2}$
$\int\frac{\sqrt{a\Big(1-\,\sin^2(\theta)\Big)}}{\frac{\sqrt{a}}{\sqrt{b}}\,\sin(\theta)}\;dx\;\;\;{\color{grey}\longrightarrow}\;\;\int\frac{\sqrt{a\cos^2(\theta)}}{\frac{\sqrt{a}}{\sqrt{b}}\sin(\theta)}\;dx\;\;\;{\color{grey}\longrightarrow}\;\;\color{LightCyan}\int\frac{\sqrt{a}\cos(\theta)}{\frac{\sqrt{a}}{\sqrt{b}}\sin(\theta)}\;dx$
$\newline$
- The last thing you must do before integrating is to substitute in $d\theta$ for $dx$. Like **u substitution** we set $d\theta$ equal to the **derivative of the substituted trig term**. If the derivative *already exists* in the integrand we can leave it with $dx$ and make our substitution, **canceling it out from the integrand** *(the term equal to the derivative)*. Otherwise, we must bring the derivative term onto the same side as $d\theta$ through division and replace $dx$ with the resulting fraction.
$\newline$
$\large\text{Step 3}$
$\text{Substitution: }\;x=\frac{\sqrt{a}}{\sqrt{b}}\;\sin(\theta)\;\;\;\;\;\therefore d\theta=\frac{\sqrt{a}}{\sqrt{b}}\;\cos(\theta)\;dx\;\;\;{\color{grey}\longrightarrow}\;\;\color{LightCyan}\frac{d\theta}{\frac{\sqrt{a}}{\sqrt{b}}\;\cos(\theta)}=dx$
$\therefore\int\frac{\sqrt{a}\cos(\theta)}{\frac{\sqrt{a}}{\sqrt{b}}\sin(\theta)}\;dx\;\;\;{\color{grey}\longrightarrow}\;\;\color{LightCyan}\int\frac{\sqrt{a}\cos(\theta)}{\frac{a}{b}\sin(\theta)\cos(\theta)}\;d\theta\;\;\;\;\text{\small\color{grey}now simpilify and integrate}$
$\newline$
##### *Trig substitution chart*
>[!quote]
$\text{Terms that can be trigonometrically substituted:}$
$\newline$
$\large\Big(a^2-b^2x^2\Big)\space\space\space\Big(a^2+b^2x^2\Big)\space\space\space \Big(b^2x^2-a^2\Big)\space\space\space \small\Big(\text{Only if }a\ge 0\Big)$
$\newline$
>---
$\text{Terms and their corresponding identities}$
$\newline$
$a-bx^2\longrightarrow\color{LightCyan}\Big(x=\frac{\sqrt{a}}{\sqrt{b}}\cdot \sin\theta\Big)\;\;\;\text{\color{grey}\small Corresponding identity: }\;\Big( \cos^2\theta=1-\sin^2\theta\Big)$
$a+bx^2\longrightarrow\color{LightCyan}\Big(x=\frac{\sqrt{a}}{\sqrt{b}}\cdot \tan\theta\Big)\;\;\;\text{\color{grey}\small Corresponding identity: }\;\Big(\sec^2\theta=1+\tan^2\theta\Big)$ $bx-a\longrightarrow\color{LightCyan}\Big(x=\frac{\sqrt{a}}{\sqrt{b}}\cdot \sec\theta\Big)\;\;\;\text{\color{grey}\small Corresponding identity: }\;\Big(\tan^2\theta=\sec^2\theta-1\Big)$
>- *Although you can perform trig substitution with any integral containing one of the above forms you will usually see them under a square root.*
- After you have **fully integrated the function** you must convert **theta back into x.** ==The easiest way to do this is to construct a triangle and label its sides by re-arranging the identity you used earlier so that the trigonometric function *(for example $sin\theta$)* is isolated on one side of the equation. The fraction left over on the other side of the equation tells us the the value of the opposite side of the triangle and its hypotenuse *(different trig functions will correspond to different sides, recall: SOHCAHTOA)*. We can find the missing side simply, by using the Pythagorean theorem.==
- Now that we have a triangle corresponding to theta but with side lengths *in terms of x* it becomes quite easy to convert the equation back into a non trigonometric form. Anywhere there is a trig function *(like $sin$ $cos$ $tan$....)*, you can replace it by pugging in a fraction that represents that term's corresponding side lengths. For example, $sin$ corresponds to the sides $\small\frac{\text{opp}}{hyp}$ and $tan$ corresponds to $\small\frac{\text{opp}}{\text{adj}}$.
- To replace $\theta$ we can use any **inverse trig function and its corresponding side lengths**.
$\newline$
$\large\text{Step 4}$
$\newline$
$\small\color{grey}\text{Substitution: }\normalsize\color{LightGrey}\;\;x=\sqrt{a}\sin(\theta)\;\longrightarrow\;\sin(\theta)=\frac{x}{\sqrt{a}}\color{grey}=\frac{opp}{hyp}$
$\text{Thus: }x\text{ is length of side opposite to }\theta\text{ and }\sqrt{a}\text{ is length of adjacent side}$
$\therefore\text{Substitute }\sin\theta\text{ with }\frac{x}{\sqrt{a}}\text{ and substitute }\cos\theta\text{ with }\frac{x}{\sqrt{a^2-x^2}}$
$\newline$
>[!quote]
>##### *Triangles used to convert $\theta$ into $x$*
>![[trianglesubinteg.png|850]]
---
## Example problems
>[!example]
>$\text{\large Example problem:}$
>$\int \frac{\sqrt{9-x^2}}{x^2}dx\rightarrow\int\frac{\sqrt{3^2-{\color{Bisque}x}^2}}{x^2}dx\rightarrow(\text{use }x=a\cdot sin\theta)\rightarrow\int\frac{\sqrt{9({\color{Bisque}1-sin^2\theta})}}{9\cdot sin^2\theta}dx$
>$\small\Big(\text{using identity: }1-sin^2\theta=cos^2\theta\Big)\normalsize\longrightarrow\int\frac{\sqrt{9\cdot {\color{Bisque}cos^2\theta}}}{9\cdot sin^2\theta}dx\rightarrow\int\frac{3\cdot cos\theta}{9\cdot sin^2\theta}dx$
>$\newline$
>$\small\Big(\text{we must now relate }\theta\text{ to }x\Big)\normalsize\longrightarrow\Big(x=3\cdot sin\theta\Big)'\longrightarrow\frac{dx}{d\theta}=3\cdot cos\theta\longrightarrow\color{Bisque} dx=3\cdot cos\theta\space d\theta$
>$\small\Big(\text{plug in and integrate}\Big)\normalsize\longrightarrow\int\frac{\color{Bisque}3\cdot cos\theta}{9\cdot sin^2\theta}{\color{Bisque}3\cdot cos\theta}\space d\theta\longrightarrow\int\frac{cos^2\theta}{sin^2\theta}\space d\theta=\int cot^2\theta\space d\theta$
>$\newline$
>$\therefore{\small\text{Since }cot^2\theta\text{ is not a common integral we use identity: }\Big(cot^2\theta=1-csc^2\theta\Big)}$
>$\large\int ({\color{Bisque}1-csc^2\theta})d\theta= \color{Bisque}-cot\theta-\theta+C$
>---
>$\newline$
>$\therefore\text{Now convert }\theta\text{ back into x by using }\Big(x=3\cdot sin\theta\Big)$
>$\small\text{Since }sin\theta=\frac{x}{3}=\frac{\textit{opp}}{\textit{hyp}}\text{ describes only 2 sides of the triangle we use }a^2+x^2=3^2\text{ to find the 3}^{rd}$
>$\small\text{which is: }\sqrt{9-x^2}\text{. Now that we know all the sides in terms of x we can replace }\theta...$
>$\left(cot\theta =\frac{\textit{adj}}{\textit{opp}}=\frac{\sqrt{9-x^2}}{x}\right)\space\space\space\biggl(\theta = sin^-1\Big(\frac{x}{3}\Big)\biggl)$
>$\large\therefore\space -cot\theta -\theta+C\longrightarrow\color{Bisque}\left(-\frac{\sqrt{9-x^2}}{x}-sin^-1\Big(\frac{x}{3}\Big)+C\right)$
>
---
>[!quote]
>##### *Summary:*
>1. Identify a situation where trig substitution can be used and **make that substitution**.
>2. Factor out $a$, creating a term that can be replaced using a trig identity.
>3. Use the trig identity to replace $(1-\text{trig function})$ with a single squared term.
>4. Cancel out the radical.
>5. Substitute in the new value of $dx$ and simplify if possible.
>6. Integrate.
>7. Label the sides of a triangle using the trig substitution equation and Pythagorean theorem.
>8. Use that triangle to replace all instances of $\theta$ with $x$
>9. Add $+C$
---
#mainpage