# I'm stuck integrating $\int \sqrt{x^2-a^2} dx$ using trigonometric substitution

When I'm trying to integrate $$\int \sqrt{x^2-a^2} dx$$ using trigonometric substitution, I get stuck. Here's the complete solution so far:

$$x(\theta)=a\sec{\theta}\\ x'(\theta)=a\tan{\theta}\sec{\theta}\\ \theta=\sec^{-1}\left(\frac{x}{a}\right)\implies \theta\in\left[0,\frac{\pi}{2}\right)\cup\left(\frac{\pi}{2},\pi\right]\\$$

\begin{align} \int \sqrt{x^2-a^2} dx &=\int \sqrt{[x(\theta)]^2-a^2}x'(\theta)d\theta\\ &=\int \sqrt{a^2\sec^2{\theta}-a^2}a\tan{\theta}\sec{\theta}d\theta\\ &=a^2\int \sqrt{\tan^2{\theta}}\tan{\theta}\sec{\theta}d\theta\\ &=a^2\int |\tan{\theta}|\tan{\theta}\sec{\theta}d\theta \end{align}

I take it that at this point I end up with two integrals one for when $$\tan{\theta}>0$$ (on $$\left[0,\frac{\pi}{2}\right)$$) and another one for when $$\tan{\theta}<0$$ (on $$\left(\frac{\pi}{2},\pi\right]$$):

$$\theta\in\left[0,\frac{\pi}{2}\right): \int \sqrt{x^2-a^2} dx = a^2\int \tan^2{\theta}\sec{\theta}d\theta\\ \theta\in\left(\frac{\pi}{2},\pi\right]: \int \sqrt{x^2-a^2} dx = a^2\int (-\tan{\theta}\tan{\theta}\sec{\theta})d\theta = -a^2\int \tan^2{\theta}\sec{\theta}d\theta$$

But that doesn't seem to be right because the integral of a function has one unique answer, as far as I know. What am I doing wrong?

• It may be helpful (for aesthetic reasons) to note that $$\left[0,\frac\pi2\right)\cup\left(\frac\pi2,\pi\right]=[0,\pi]\setminus\left\{\frac\pi2\right\}$$ – clathratus Jan 28 at 5:06
• Let the expression $\sqrt{x^2-a^2}$ suggest a right triangle. One side of the triangle is $x$, one side is $a$ and the last side is $\sqrt{x^2-a^2}$. Then for your trigonometric substituion, let $\theta$ be one of the angles (not the right angle) of that triangle. After integration, look at your triangle to re-write everything in terms of $x$. – GEdgar Feb 2 at 2:17

## 2 Answers

I completely agree with Paras Khosla's comment. Further, quoting "Calculus" volume 1, 2nd Edition, 1966, page 266 (by Tom Apostol), integrals of the form $$\;\int\sqrt{(cx+d)^2 - a^2}\,dx\;$$ should be attacked via the substitution $$\;cx + d = a \sec t.$$

I am (superficially redundantly) answering because on the one hand you showed a good effort but on the other hand (apparently through no fault of your own), you have made a serious workflow mistake. This is not the type of problem whose solution a Calculus student should be attempting to derive from scratch. If you are in a Calculus class, then your class materials (e.g. textbook) should have explicitly provided the information in this answer's first paragraph.

Do not try to attack problems like this on your own. Instead, buy a moderately priced Calculus book. To determine which book to buy, ask your teacher (if available) or heavily research user comments (e.g. Amazon.com's customer reviews).

Buying the right math book can be tricky; it needs to be customized to your experience, goals, and budget. Generically, try to buy one with a lot of exercises, don't be in a hurry, don't skip any exercises, and (for the exercises where you are having trouble) post a query on a math forum like this one (showing heavy preliminary effort, just as you did with this query).

I am upvoting because of the good preliminary (though misguided) effort that you made. Note that the whole issue of when to go for it, as you did is tricky. Math students need to look for a balance between making a reasonable preliminary effort and never trying to re-invent the wheel.

• Thank you, but I'm not sure how this answers my question. – ranguy Jan 27 at 17:32
• @ranguy sorry if I wasn't clear. Per Paras Khosla's comment, this particular problem is best attacked via the substitution $x = a \sec t \;\Rightarrow\; dx = a \sec t \tan t \, dt.\;$ This transforms the integral into a new integral with the dummy variable $t.$ – user2661923 Jan 27 at 17:36
• The downvote is not mine, by the way. I can't upvote you because I don't have enough reputation yet. – ranguy Jan 27 at 17:36

Your substitution needs to be defined as follows:

$$x=g(\theta)=a\sec{\theta}, \ \ \ \ \theta\in\left[0,\frac{\pi}{2}\right)\cup\left[\pi,\frac{3\pi}{2}\right) \\ \implies \ g'(\theta)=a\tan{\theta}\sec{\theta}$$

Because:

$$g'(\theta)=\left(a\sec{\theta}\right)'=\left(\frac{a}{\cos{\theta}}\right)'=a\frac{\sin{\theta}}{\cos^{2}{\theta}}=a\frac{\sin{\theta}}{\cos{\theta}}\frac{1}{\cos{\theta}}=a\tan{\theta}\sec{\theta}$$

Defines an inverse function (one to one) that returns positive tangents for the specified interval, since the sine and the cosine have the same sign in said intervals.