Trigonometric substitution

\(\sqrt{a^2-x^2}\).

  • Consider the integral \(\int\sqrt{a^2-x^2}\,\mathrm dx\).
    • So far, we have only seen definite integrals with particular boundaries like \[ \int_0^a\sqrt{a^2-x^2}\,\mathrm dx=\frac14a^2\pi \] in Calculus I, which follows from the geometrical reasoning that the graph \(y=\sqrt{a^2-x^2}\) over \([0,a]\) is the top right quarter of the circle with radius \(a\) and centre the origin, therefore the area under the graph is one quarter of the area of a disk with radius \(a\).
    • In this section, we'll see that we can get an antiderivative via the substitution \(x=a\sin\theta\).

\(\sqrt{a^2-x^2}\).

  • Recall the Substitution rule formula \[ \int f(u(x))u'(x)\,\mathrm dx=\int f(u)\,\mathrm du. \]
    • There, we use the substitution \(u=u(x)\). That is, the new variable \(u\) is a function of the old variable \(x\).
    • Now we want to use the substitution \(x=x(\theta)=a\sin\theta\), that is the old variable \(x\) is a function of the new variable \(\theta\).
    • We also want to make sure that the function \(x(\theta)\) is invertible, that is one-to-one. We can do this by requiring \(-\frac{\pi}{2}\le\theta\le\frac{\pi}{2}\).
    • Correspondingly, here we need to use the so-called inverse substitution: \[ \int f(x)\,\mathrm dx=\int f(x(\theta))x'(\theta)\,\mathrm d\theta \]

\(\sqrt{a^2-x^2}\).

  • Let's see what happens in the prototypical case \(f(x)=\sqrt{a^2-x^2}\), \(x(\theta)=a\sin\theta\). Suppose that \(a>0\).
    • We have \(x'(\theta)=a\cos\theta\).
    • Therefore, the inverse substitution formula gives \[ \int\sqrt{a^2-x^2}\,\mathrm dx=\int\sqrt{a^2-a^2(\sin\theta)^2}a\cos\theta\,\mathrm d\theta$. \]
    • We can keep going using a trigonometric formula: \[ =\int\sqrt{a^2(1-(\sin\theta)^2)}a\cos\theta\,\mathrm d\theta=\int\sqrt{a^2(\cos\theta)^2}a\cos\theta\,\mathrm d\theta=\int a|\cos\theta|a\cos\theta\,\mathrm d\theta \]
    • Note that \(\cos\theta\ge0\) when \(-\frac{\pi}{2}\le\theta\le\frac{\pi}{2}\). Therefore, we can get rid of the absolute value sign: \[ =\int a^2(\cos\theta)^2\,\mathrm d\theta=\frac12a^2\int1+\cos2\theta\,\mathrm d\theta=\frac{a^2}{2}\left(\theta+\frac12\sin2\theta\right)=\frac{a^2}{2}\sin^{-1}\frac{\theta}{a}+\frac12x\sqrt{a^2-x^2}. \]

\(\sqrt{a^2-x^2}\).

  • We can use the previous calculation to compute the area of the ellipse \[ \frac{x^2}{a^2}+\frac{y^2}{b^2}=1. \]
    • Note that the curve defined by this equation is not a graph. If we want to solve for \(y\), we get \(y=\pm b\sqrt{1-\frac{x^2}{a^2}}=\pm\frac{b}{a}\sqrt{a^2-x^2}\).
    • In the textbook, they cut the ellipse in half and calculate the area under the graph \(y=\frac{b}{a}\sqrt{a^2-x^2}\).
    • It will amount to the same to say that the ellipse is the region between the graphs \(y=\frac{b}{a}\sqrt{a^2-x^2}\) and \(y=-\frac{b}{a}\sqrt{a^2-x^2}\) over \([-a,a]\).
    • Therefore, its area can be given by the definite integral \[ \int_{-a}^a\frac{b}{a}\sqrt{a^2-x^2}-\left(-\sqrt{a^2-x^2}\right)\,\mathrm dx=2\frac{b}{a}\int_{-a}^a\sqrt{a^2-x^2}\,\mathrm dx. \]
    • We want to use the substitution \(x=a\sin\theta\). Therefore we need to change the interval of integration from \(-a\le x\le a\) to \(-\frac{\pi}{2}\le\theta\le\frac{\pi}{2}\).
    • Via the exact same calculation, we get \[ =ab\int_{-\pi/2}^{\pi/2}1+\cos2\theta\,\mathrm d\theta=ab\pi+\frac{b}{2a}(0-0)=\pi ab. \]

\(\sqrt{a^2-x^2}\).

  • \(\int\frac{\sqrt{9-x^2}}{x^2}\,\mathrm dx\).
    • We use the substitution \(x=3\sin\theta\) to get \[ =\int\frac{3\cos\theta}{9(\sin\theta)^2}3\cos\theta\,\mathrm d\theta=\int(\cot\theta)^2\,\mathrm d\theta. \]
    • This is a trigonometric integral of the form \(\int(\cot\theta)^m(\csc\theta)^n\,\mathrm d\theta\) with even \(n\), therefore using a trigonometric formula we get \[ =\int(\csc\theta)^2-1\,\mathrm d\theta=-\cot\theta-\theta+C. \]
    • Now we need to change the variable back to \(x\). We have \[ \cot\theta=\frac{\cos\theta}{\sin\theta}=\frac{\sqrt{9-x^2}/3}{x/3}=\frac{\sqrt{9-x^2}}{x^2}, \] therefore the final answer is \[ \int\frac{\sqrt{9-x^2}}{x^2}\,\mathrm dx=-\frac{\sqrt{9-x^2}}{x^2}-\sin^{-1}\frac{x}{3}+C. \]

\(\sqrt{a^2-x^2}\).

  • \(\int\frac{x}{\sqrt{3-2x-x^2}}\,\mathrm dx\).
    • Here, the additional step is that we need to complete the square under the root sign: \[ 3-2x-x^2=3-(2x+x^2)=3-((x+1)^2-1)=4-(x+1)^2. \]
    • This shows that we should substitute \(u=x+1\) first. Then we get \[ =\int\frac{u-1}{\sqrt{4-u^2}}\,\mathrm du. \]
    • From here we proceed as usual: subsituting \(u=2\sin\theta\) gives \[ =\int\frac{2\sin\theta-1}{2\cos\theta}2\cos\theta\,\mathrm d\theta=\int2\sin\theta-1\,\mathrm d\theta=-2\cos\theta-\theta+C=-\sqrt{4-u^2}-\sin^{-1}\frac{u}{2}+C=-\sqrt{4-(x+1)^2}-\sin^{-1}\frac{x+1}{2}+C. \]
  • Exercises. 7.3: 4, 5, 8, 10, 25, 26.

\(\sqrt{x^2+a^2}\).

  • For integrals with \(\sqrt{x^2+a^2}\), we can make the substitution \(x=a\tan\theta\) with \(-\frac{\pi}{2}\le\theta\le\frac{\pi}{2}\) and \(a>0\): \[ \sqrt{x^2+a^2}=\sqrt{a^2((\tan\theta)^2+1)}=\sqrt{a^2(\sec\theta)^2}=a\sec\theta. \]
  • \(\int\frac{1}{x^2\sqrt{x^2+4}}\,\mathrm dx\).
    • Making the substitution \(x=2\tan\theta\), we get \[ =\int\frac{1}{4(\tan\theta)^22\sec\theta}2(\sec\theta)^2\,\mathrm d\theta=\frac14\frac{\cos\theta}{(\sin\theta)^2}\,\mathrm d\theta. \]
    • Making the substitution \(u=\sin\theta\), we get \[ =\frac14\int u^{-2}\,\mathrm du=-\frac14u^{-1}+C=-\frac{1}{4\sin\theta}+C=-\frac{\csc\theta}{4}+C. \]
    • To convert this back to \(x\), we use the following argument. The assignment \(\tan\theta=\frac{x}{2}\) means that there is a right triangle AOB with \(\measuredangle AOB=\theta\), \(\overline{AB}=x\) and \(\overline{OB}=2\). Therefore, \(\overline{AO}=\sqrt{x^2+4}\), and thus \[ \csc\theta=\frac{\overline{AO}}{\overline{AB}}=\frac{\sqrt{x^2+4}}{x}. \]
    • This shows that the final answer is \[ \int\frac{1}{x^2\sqrt{x^2+4}}\,\mathrm dx=-\frac{\sqrt{x^2+4}}{4x}+C. \]
  • Exercises. 7.3: 7, 12, 19, 23.

\(\sqrt{x^2-a^2}\).

  • For integrals with \(\sqrt{x^2-a^2}\), we can make the substitution \(x=a\sec\theta\) with 0<<$ or \(\pi<\theta<\frac{3\pi}{2}\) and \(a>0\): \[ \sqrt{x^2-a^2}=\sqrt{a^2((\sec\theta)^2-1)}=\sqrt{a^2(\tan\theta)^2}=a\tan\theta. \]
  • \(\int\frac{\mathrm dx}{\sqrt{x^2-a^2}}\), \(a>0\).
    • Using the substitution \(x=a\sec\theta\), we get \[ =\int\frac{a\tan\theta\sec\theta}{a\tan\theta}\,\mathrm d\theta=\int\sec\theta\,\mathrm d\theta=\ln|\tan\theta+\sec\theta|+C=\ln\left|\frac{\sqrt{x^2-a^2}}{a}+\frac{x}{a}\right|+C. \]
  • Exercises. 7.3: 8, 9, 16, 27.
  • More exercises. 7.3: 34, 35, 37, 40.