# How can I differentiate this?

I was trying to differentiate this: $\frac{1}{2} \sin^{-1} \frac{2x}{1+x^2}$ but I am really stuck.I obtained an answer that does not match with the one given in the book.Your help is appreciated.[Edit: I used the formula $\frac{d}{dx} \sin^{-1}x=\frac{1}{\sqrt{1-x^2}}$ to get $\frac{1+x^2}{2(1-x^2)}$]

Thank you.

-
Look up derivative of $\arcsin(x)$, compute derivative of $\frac{2x}{1+x^2}$, then use chain rule. – Sasha Sep 26 '11 at 15:55
Do you mean $\frac{d}{dx}\sin^{-1}(x) = \frac{1}{\sqrt{1-x^2}}$? Because $\frac{d}{dx}\tan^{-1}(x) = \frac{1}{1+x^2}$. Also, you need to have an argument after "$\tan^{-1}$"; otherwise, it's not really sensical. – Arturo Magidin Sep 26 '11 at 15:59
I had made careless typos...I believe I edited it a minute before you commented. – Eisen Sep 26 '11 at 16:04
Could you show your attempt to apply the chain rule, so that we can debug properly? – J. M. Sep 26 '11 at 16:07
@SabyasachiMukherjee: Two errors: (i) You forgot to apply the Chain Rule (the whole thing should be multiplied by the derivative of $\frac{2x}{1+x^2}$; and (ii) you simplified $\sqrt{(1-x^2)^2}$ as $1-x^2$; that's only true if $-1\leq x \leq 1$. In general, $\sqrt{a^2}=|a|$. – Arturo Magidin Sep 26 '11 at 16:19

The derivative of the arcsine function is $$\frac{d}{du}\arcsin(u) = \frac{1}{\sqrt{1-u^2}}.$$

So, using the Chain Rule, you would have $$\frac{d}{dx}\frac{1}{2}\arcsin\left(\frac{2x}{1+x^2}\right) = \frac{1}{2}\left(\frac{1}{\sqrt{1 - \left(\frac{2x}{1+x^2}\right)^2}}\right)\left(\frac{2x}{1+x^2}\right)'.$$

The derivative of $\frac{2x}{1+x^2}$ is a simple application of either the Quotient Rule or the Product, Power, and Chain Rules:\ \begin{align*} \frac{d}{dx}\left(\frac{2x}{1+x^2}\right) &= \frac{(1+x^2)(2x)' - 2x(1+x^2)'}{(1+x^2)^2}\\ &= \frac{2(1+x^2) - 2x(2x)}{(1+x^2)^2}\\ &= \frac{2 + 2x^2 - 4x^2}{(1+x^2)^2}\\ &= \frac{2(1-x^2)}{(1+x^2)^2}. \end{align*}

The expression obtained from the derivative of $\arcsin(u)$ can use a bit of simplification too: \begin{align*} \frac{1}{\sqrt{1 - \left(\frac{2x}{1+x^2}\right)^2}} &= \frac{1}{\sqrt{1 - \frac{4x^2}{(1+x^2)^2}}}\\ &=\frac{1}{\sqrt{\frac{(1+x^2)^2 -4x^2}{(1+x^2)^2}}}\\ &= \frac{1}{\frac{\sqrt{1+2x^2+x^4 - 4x^2}}{|1+x^2|}}\\ &= \frac{|1+x^2|}{\sqrt{1-2x^2+x^4}}\\ &= \frac{1+x^2}{\sqrt{(1-x^2)^2}}\\ &= \frac{1+x^2}{|1-x^2|}. \end{align*} (Remember that $\sqrt{a^2}=|a|$, not $a$; we can get rid of the absolute value bars around $1+x^2$ because it is always positive; the same is not true with $1-x^2$).

Putting it all together, we have: \begin{align*} \frac{d}{dx}\frac{1}{2}\arcsin\left(\frac{2x}{1+x^2}\right) &= \frac{1}{2}\left(\frac{1}{\sqrt{1 - \left(\frac{2x}{1+x^2}\right)^2}}\right)\left(\frac{2x}{1+x^2}\right)'\\ &= \frac{1}{2}\left(\frac{1+x^2}{|1-x^2|}\right)\left(\frac{2(1-x^2)}{(1+x^2)^2}\right)\\ &= \frac{1-x^2}{(1+x^2)|1-x^2|}. \end{align*} This can be rewritten with the "sign function", $$\mathrm{sgn}(u) = \left\{\begin{array}{ll} 1 & \text{if }u\gt 0;\\ -1 &\text{if }u\lt 0. \end{array}\right.$$ as $$\frac{d}{dx}\frac{1}{2}\arcsin\left(\frac{2x}{1+x^2}\right) = \frac{\mathrm{sgn}(1-x^2)}{1+x^2}.$$ It's also possible your book was not careful with the square root of the square, so that the answer given is just $$\frac{1}{1+x^2}.$$

-
@AndréNicolas: Oops, quite right. Thank you! – Arturo Magidin Sep 26 '11 at 16:34
Thank you very much,Mr Magidin.I learnt of the loopholes in my technique. – Eisen Sep 26 '11 at 16:39

$y=\sin(x)\Rightarrow\frac{\mathrm{d}y}{\mathrm{d}x}=\cos(x)=\sqrt{1-y^2}\therefore\frac{1}{\sqrt{1-y^2}}=\frac{\mathrm{d}x}{\mathrm{d}y}=\frac{\mathrm{d}}{\mathrm{d}y}\sin^{-1}(y)$

The rest is the chain-rule: \begin{align} \frac{\mathrm{d}}{\mathrm{d}x}\frac{1}{2}\sin^{-1}\left(\frac{2x}{1+x^2}\right) &=\frac{1}{2}\frac{1}{\sqrt{1-\left(\frac{2x}{1+x^2}\right)^2}}\frac{\mathrm{d}}{\mathrm{d}x}\frac{2x}{1+x^2}\\ &=\frac{1}{2}\frac{1+x^2}{|1-x^2|}\frac{2(1+x^2)-2x(2x)}{(1+x^2)^2}\\ &=\frac{1}{2}\frac{1+x^2}{|1-x^2|}\frac{2(1-x^2)}{(1+x^2)^2}\\ &=\frac{\operatorname{sgn}(1-x^2)}{1+x^2}\tag{1} \end{align} Let $x=\tan(\theta)$, then $\frac{2x}{1+x^2}=\sin(2\theta)$. When $|\theta|<\frac{\pi}{4}$, $|x|<1$, so $\operatorname{sgn}(1-x^2)=1$. Then, equation $(1)$ is the reciprocal of $$\frac{\mathrm{d}}{\mathrm{d}\theta}\tan(\theta)=\sec^2(\theta)$$ When $|\theta|\in(\frac{\pi}{4},\frac{\pi}{2})$, $|x|>1$, so $\operatorname{sgn}(1-x^2)=-1$, but $\sin^{-1}(\sin(2\theta))=\pi\operatorname{sgn}(\theta)-2\theta$. Then, equation $(1)$ is the reciprocal of $$\frac{\mathrm{d}}{\mathrm{d}\theta}(-\tan(\theta))=-\sec^2(\theta)$$

-
As the argument to $\sin^{-1}$, $\frac{2x}{1+x^2}$ should be in $[-1,1]$. Thus, $x$ would be in $[-1,1]$ as well. – robjohn Sep 26 '11 at 16:51
If $x=2$, then $\frac{2x}{1+x^2} = \frac{4}{5}$, which lies in $[-1,1]$, so I don't see how you are getting that $x$ must be restricted to $[-1,1]$. Note that for $x\gt 0$, $\frac{2x}{1+x^2}\leq 1$ if and only if $1+x^2-2x\geq 0$, if and only if $(1-x)^2\geq 0$, which always holds; symmetrically for $x\lt 0$ and $\frac{2x}{1+x^2}\geq -1$. So $x$ can be any real number, not just restricted to $[-1,1]$. – Arturo Magidin Sep 26 '11 at 18:27
@Arturo: I don't know what I was thinking. Of course, $\frac{2x}{1+x^2}$ reaches a maximum at $x=1$ and minimum at $x=-1$, but yes, for all $x\in\mathbb{R}$, $\frac{2x}{1+x^2}\in[-1,1]$. I have to correct my answer to account for this. – robjohn Sep 26 '11 at 19:05

Another approach would first prove the trigonometric identity $$\frac12 \arcsin\frac{2x}{1+x^2} = \arctan x \text{ if } -1 \le x \le 1.$$ Then you have to figure out separately what to do when $x>1$ or $x<-1$. If I'm not mistaken, you get $$\frac12 \arcsin\frac{2x}{1+x^2} = \frac\pi2 -\arctan x \text{ if } x>1$$ and $$\frac12 \arcsin\frac{2x}{1+x^2} = -\frac\pi2 -\arctan x \text{ if } x<-1.$$ Then you just need to remember how to differentiate the arctangent function.

-

Shortest way around:

Put $x= tan \theta$ to simplify the expression inside the arcsin function to $sin 2\theta$ .

The value of the given function is then just $\theta$ which is equal to arctan $x$ , which on differentiating gives $\frac {1}{1+x^2}$

-