Chain rule with fraction In the case of $$f(x)=\ln\big(x+\sqrt{1+x^2}\big)$$
in the derivative we multiply $$f'(x)=\frac{1}{x+\sqrt{1+x^2}}\bigg(1+\frac{2x}{2\sqrt{1+x^2}}\bigg)$$ when the expression multiply the numerator?   
 A: $$\frac{\text{d}}{\text{d}x}\left(\ln\left(x+\sqrt{1+x^2}\right)\right)=$$

Using the chain rule:

$$\frac{\frac{\text{d}}{\text{d}x}\left(x+\sqrt{1+x^2}\right)}{x+\sqrt{1+x^2}}=$$
$$\frac{\frac{\text{d}}{\text{d}x}\left(x\right)+\frac{\text{d}}{\text{d}x}\left(\sqrt{1+x^2}\right)}{x+\sqrt{1+x^2}}=$$
$$\frac{1+\frac{\text{d}}{\text{d}x}\left(\sqrt{1+x^2}\right)}{x+\sqrt{1+x^2}}=$$

Using the chain rule:

$$\frac{1+\frac{\frac{\text{d}}{\text{d}x}\left(1+x^2\right)}{2\sqrt{1+x^2}}}{x+\sqrt{1+x^2}}=$$
$$\frac{1+\frac{\frac{\text{d}}{\text{d}x}\left(1\right)+\frac{\text{d}}{\text{d}x}\left(x^2\right)}{2\sqrt{1+x^2}}}{x+\sqrt{1+x^2}}=$$
$$\frac{1+\frac{0+\frac{\text{d}}{\text{d}x}\left(x^2\right)}{2\sqrt{1+x^2}}}{x+\sqrt{1+x^2}}=$$
$$\frac{1+\frac{\frac{\text{d}}{\text{d}x}\left(x^2\right)}{2\sqrt{1+x^2}}}{x+\sqrt{1+x^2}}=$$
$$\frac{1+\frac{2x}{2\sqrt{1+x^2}}}{x+\sqrt{1+x^2}}=\frac{1}{\sqrt{1+x^2}}$$
A: Following up on the tip of exponentiation of both side.
$$
\mathrm{e}^{f(x)} = \mathrm{e}^{\ln\left(x+\sqrt{1+x^2}\right)} = x+\sqrt{1+x^2}
$$
taking the derivative of both sides
$$
\mathrm{e}^{f(x)} f'(x) = 1 + \frac{1}{2}\frac{2x}{\sqrt{1+x^2}} = 1+\frac{x}{\sqrt{1+x^2}} = \frac{\sqrt{1+x^2} + x}{\sqrt{1+x^2}}
$$
bow the l.h.s we have
$$
\mathrm{e}^{f(x)} f'(x)  = \left(x+\sqrt{1+x^2}\right)\cdot f'(x)
$$
equating the last term in the previous two equations we get
$$
\left(x+\sqrt{1+x^2}\right)\cdot f'(x) = \left(x+\sqrt{1+x^2}\right)\cdot \frac{1}{\sqrt{1+x^2}}
$$
thus we get
$$
f'(x) = \frac{1}{\sqrt{1+x^2}}
$$
the trick used here reduces the pain of doing derivations of the form
$$
f(x) = g(u(x))
$$
where the inverse of $g$ yields forms that are easier to handle in the differentiation such as $\ln (x) $ and $\mathrm{e}^x$.
A: In this problem you are using the chain rule twice, the second time is inside the first. The chain rule says you should multiple by the derivative of $x+\sqrt{1+x^2}$. However when determining that derivative you would need to apply the chain rule again and multiple by the derivative of $1+x^2$. So really your derivative looks like this:
$$f'(x) = \frac{1}{x+\sqrt{1+x^2}}\times\left(1+\frac{1}{2}(1+x^2)^{-\frac{1}{2}}\times2x\right)$$
where each $\times$ symbol indicates another use of the chain rule.
One way this is often written in books is to think of $f(x)$ as a compound function. E.g. like: $f(x)=\ln(g(x))$ where $g(x)=x+\sqrt{h(x)}$ and where $h(x)=1+x^2$.
