# Simplify $\tan^{-1} ( \frac{x-\sqrt{1-x^2}}{x+\sqrt{1-x^2}} )$ with trigonometric substitution

I will explain my approach, help me with the last step please! $$\tan^{-1} {\left(\frac {x - \sqrt {1-x^2}}{x + \sqrt {1-x^2}}\right)}$$

substituting x = $$\sin \theta$$ (as learnt from book) and solving 1-$$\sin^2 \theta$$ = $$\cos^2 \theta$$ $$\tan^{-1} {\left(\frac {\sin \theta - |\cos \theta|}{\sin \theta + |\cos \theta| }\right)}$$

For solving modulus, it was important to determine range of $$\theta$$ , therefore I defined it (as it is my variable,i can define it my way) for [-$$\pi$$/2 , $$\pi$$/2] so that sine covers all values from $$-1$$ to $$1$$ (as , $$-1 \le x \le 1 \,$$ , from domain ) and $$\cos \theta$$ is positive , and hence $$|\cos \theta| = \cos \theta$$.

$$\tan^{-1} {\left(\frac {\sin \theta - \cos \theta}{\sin \theta + \cos \theta }\right)}$$ = dividing by $$\cos \theta$$ $$\tan^{-1} {\left(\frac {\tan \theta - 1}{\tan\theta + 1 }\right)}$$

= by formula of $$\tan (\theta - \pi/4)$$ $$\tan^{-1}( \tan{\left(\theta - \pi/4\right)})$$

That's where I am stuck ,as according to the identity,$$\quad$$ $$tan^{-1} ( \tan \alpha) = \alpha$$ $$\quad$$ only when $$\, -\pi/2 <\alpha < \pi/2$$ . But here $$-3\pi/4 \le \,(\theta-\pi/4) \, \le \pi/4$$ Therefore, I am not going to get ($$\,\theta - \pi/4$$) out of the expression. What i get will be based on that graph of $$\bf {\tan^{-1} (\tan x)}$$ . $$(\theta - \pi/4) +\pi \,$$ for $$\,-3\pi/4 \le \, (\theta -\pi/4) \, < -\pi/2 \,\,$$ and

$$\theta -\pi/4$$ for $$\,-\pi/2 < \, (\theta -\pi/4) \, \le \pi/4 \,\,$$

My teacher just cancelled arctan and tan and wrote $$\theta - \pi/4$$ and he didn't even include that modulus function over $$\cos \theta$$.

So what will be the exact answer because if everyone decide $$\theta$$ as per they like then there will not be a finite answer. Everyone will have their own answers and in each answer they have multiple cases as I just discussed above.

So please help me, very hopefully I signed up in stackexchange!

Found Solution :-

I was confused because I was thinking that there can be many solutions differing person to person, but even if you choose any value of $$\theta$$ , you are going to get two solutions which are in the asked question above. The problem resolves when we write $$\theta$$ in terms of $$sin^{-1} x$$ as then we would not simply write like $$\theta = \sin^{-1} x$$ we would write an equation,$$\sin^{-1} x = \sin^{-1} (\sin \theta)$$, now if $$\theta$$ is not in range of $$-\pi/2$$ and $$\,\pi/2$$ , then there would be some constant in $$\pi$$ (like , $$\pi/4 , 2\pi$$ etc. we would have to add or subtract according to the graph of 'sin inverse sin' and when we would put that value of $$\theta$$ , we would end with the solutions as answered by people. (I write the answer in this edit to help anyone who will reach here after searching web , thanks to everyone for answers)

• Your answer is absolutely correct and not your teacher's. You should add one thing while substitution that $\theta\ne-π/4$. – SarGe Jul 17 '20 at 17:21

The domain of the function is $$x\in [-1,-\frac1{\sqrt2})\cup (-\frac1{\sqrt2},1]$$. Then, with the substitution $$\sin \theta =x$$, we have $$\theta \in[-\frac\pi2,-\frac\pi4)\cup (-\frac\pi4,\frac\pi2]$$ and correspondingly

$$\tan^{-1} {\left(\frac {x - \sqrt {1-x^2}}{x + \sqrt {1-x^2}}\right)} =\tan^{-1}\left[\tan{\left(\theta - \frac\pi4\right)}\right]$$

$$= \begin{cases} \theta+\frac{3\pi}4 = \sin^{-1}x +\frac{3\pi}4 & x\in [-1,-\frac1{\sqrt2})\\ \theta -\frac\pi4 = \sin^{-1}x -\frac\pi4 & x\in (-\frac1{\sqrt2},1] \end{cases}$$

• As asked it in the question, what if everyone start defining $\theta$ on their own , say from $7\pi/2$ to $9\pi/2$ , then we will have different answers, how can be there infinite solutions to a single problem – Aryaman Jul 18 '20 at 4:28
• @Aryaman - the choice of $\theta$ won’t change the final result which is expressed in $x$. You may use $7\pi/2$ to $9\pi/2$ and need to revert back to $x$ accordingly – Quanto Jul 18 '20 at 12:32

In the case of $$-\pi/2 \lt \theta-\pi/4 \le \pi/4$$ There is no problem, and we get $$\theta -\pi/4$$.

For the case $$-3\pi/4 \le \theta-\pi/4 \lt -\pi/2$$ You need to adjust by adding $$\pi$$, so that $$\pi/4 \le \theta +3\pi/4 \lt \pi/2$$ The answer should really be $$\begin{cases} \theta-\pi/4 , & -\pi/4 \lt \theta \le \pi/2 \\ \theta+3\pi/4, & -\pi/2\le \theta \lt \pi/4 \end{cases}$$ Your teacher is wrong.

• Can you answer that last part of the question "So what will be ......above" – Aryaman Jul 18 '20 at 4:41
• @Aryaman It doesn’t matter what range you define $\theta$ in, (as long as it covers every possible value of $\sin x$), because the range of $x$ corresponding to that will be the same. So eventually you do need to make cases according the the $x$ values, as in Quanto’s answer. – Tavish Jul 18 '20 at 8:15
• So Tavish , we shouldn't be expecting a unique answer as one can define $\theta$ (for every possible value of sin x) and give different answers for the same range of $x$ – Aryaman Jul 18 '20 at 9:17
• @Aryaman There is a unique answer. Notice, there is no mention of $\theta$ in the question, we have to express the answer in terms of $x$ only. (In my answer, I haven’t made the conversion, but you must) – Tavish Jul 18 '20 at 9:19
• Tavish , see I made some edits , I got your point and it helped me reach the conclusion that I made in edit. – Aryaman Jul 18 '20 at 11:25

I have another answer : let $$x \in (-1,1)\setminus\left\{-\frac{1}{\sqrt{2}}\right\}$$. Then the derivative of the formula with respect to $$x$$ is : \begin{align} \frac{d}{dx}\left(\arctan\left(\dfrac{x-\sqrt{1-x^2}}{x+\sqrt{1-x^2}}\right)\right) &= \frac{d}{dx}\left(\dfrac{x-\sqrt{1-x^2}}{x+\sqrt{1-x^2}}\right)\times \dfrac{1}{1+\left(\dfrac{x-\sqrt{1-x^2}}{x+\sqrt{1-x^2}}\right)^2} \end{align} We compute the first term : \begin{align} \frac{d}{dx}\left(\dfrac{x-\sqrt{1-x^2}}{x+\sqrt{1-x^2}}\right)&= \dfrac{\left(1 +\dfrac{x}{\sqrt{1-x^2}}\right)\left(x + \sqrt{1-x^2}\right) - \left(x - \sqrt{1-x^2}\right)\left(1-\dfrac{x}{\sqrt{1-x^2}}\right) }{\left(x+\sqrt{1-x^2}\right)^2} \\ &= \dfrac{\dfrac{\sqrt{1-x^2}+x}{\sqrt{1-x^2}}\left(x+\sqrt{1-x^2}\right)+\left(x-\sqrt{1-x^2}\right)\dfrac{x-\sqrt{1-x^2}}{\sqrt{1-x^2}}}{\left(x+\sqrt{1-x^2}\right)^2} \\ &= \dfrac{\left(x+\sqrt{1-x^2}\right)^2 + \left(x-\sqrt{1-x^2}\right)^2}{\sqrt{1-x^2}\left(x+\sqrt{1-x^2}\right)^2} \\ &= \dfrac{x^2 + 2x\sqrt{1-x^2} + 1-x^2 + x^2 -2x\sqrt{1-x^2} + 1-x^2}{\sqrt{1-x^2}\left(x+\sqrt{1-x^2}\right)^2} \\ &= \dfrac{2}{\sqrt{1-x^2}\left(x+\sqrt{1-x^2}\right)^2} \end{align} From there, we have : \begin{align} \frac{d}{dx}\left(\arctan\left(\dfrac{x-\sqrt{1-x^2}}{x+\sqrt{1-x^2}}\right)\right) &= \dfrac{2}{\sqrt{1-x^2}\left(x+\sqrt{1-x^2}\right)^2} \times \dfrac{1}{1+\left(\dfrac{x-\sqrt{1-x^2}}{x+\sqrt{1-x^2}}\right)^2} \\ &= \dfrac{2}{\sqrt{1-x^2}}\times \dfrac{1}{\left(x+\sqrt{1-x^2}\right)^2 + \left(x-\sqrt{1-x^2}\right)^2} \\ &= \dfrac{1}{\sqrt{1-x^2}} \end{align} Therefore, the solution is an antiderivative of $$x\in (-1,1)\setminus\left\{-\frac{1}{\sqrt{2}}\right\}\mapsto \frac{1}{\sqrt{1-x^2}}$$. It follows that there exists two constant $$C$$ and $$C'$$ such that: \begin{align} \forall x \in \left(-1,-\dfrac{1}{\sqrt{2}}\right) ,~ \arctan\left(\dfrac{x-\sqrt{1-x^2}}{x+\sqrt{1-x^2}}\right) &= \arcsin x + C \\ \forall x \in \left(-\dfrac{1}{\sqrt{2}},1\right) ,~ \arctan\left(\dfrac{x-\sqrt{1-x^2}}{x+\sqrt{1-x^2}}\right) &= \arcsin x + C' \end{align} To get the value of $$C$$ and $$C'$$, evaluate the limits at $$-1$$ and $$1$$ : \begin{align} C &=\arctan 1- \arcsin( -1)\\ &= \frac{\pi}{4}+\frac{\pi}{2} \\ &= \frac{3\pi}{4} \\ C' &=\arctan 1- \arcsin 1\\ &= \frac{\pi}{4}-\frac{\pi}{2} \\ &= -\frac{\pi}{4} \end{align} It seems like your teacher forgot to check what happens around $$-\frac{1}{\sqrt2}$$.

• Thanks Dldier, for providing a calculus view of the problem, I am new to calculus so it may take me time to appreciate your answer. – Aryaman Jul 18 '20 at 11:29