# Evaluating Derivative of $\sqrt{1+\sqrt{1+\sqrt{1-2x}}}$

Did I evaluate the following derivative correctly? I know I have not simplified to the utmost extent, but I want to know if this method is correct.

Consider, $$\sqrt{1+\sqrt{1+\sqrt{1-2x}}}$$

Let A = $$1+\sqrt{1+\sqrt{1-2x}}$$

Let B = $$1+\sqrt{1-2x}$$

Let C = $$1-2x$$

$$\left(\sqrt{1+\sqrt{1+\sqrt{1-2x}}}\right)' = \frac{1}{2}A^{-\frac{1}{2}} \cdot \frac{1}{2}B^{-\frac{1}{2}} \cdot \frac{1}{2}C^{-\frac{1}{2}} \cdot -2 = \frac{-1}{4\sqrt{ABC}}$$

Yes, this is valid. Maybe some explanatory steps in between would help to someone reading it though. It strikes me as not being obvious according to standard well-known derivative rules without a few intermediate steps. \begin{align} \left(\sqrt{1+\sqrt{1+\sqrt{1-2x}}}\right)' &= \left(\sqrt{A}\right)'\\ &=\frac{1}{2}A^{-\frac{1}{2}}A'\\ &=\frac{1}{2}A^{-\frac{1}{2}}\left(1+\sqrt{B}\right))'\\ &=\frac{1}{2}A^{-\frac{1}{2}}\frac{1}{2}B^{-\frac{1}{2}}B'\\ &=\frac{1}{2}A^{-\frac{1}{2}}\frac{1}{2}B^{-\frac{1}{2}}\left(1+\sqrt{C}\right)'\\ &=\frac{1}{2}A^{-\frac{1}{2}}\frac{1}{2}B^{-\frac{1}{2}}\frac{1}{2}C^{-\frac{1}{2}}C'\\ &=\frac{1}{2}A^{-\frac{1}{2}}\frac{1}{2}B^{-\frac{1}{2}}\frac{1}{2}C^{-\frac{1}{2}}(-2)\\ &= \frac{-1}{4\sqrt{ABC}} \end{align}

Another way to see it is that with $$f(x)=\sqrt{1+x}$$, and $$g(x)=-2x$$, you are calculating the derivative of

$$f\circ f\circ f\circ g(x)$$

then you apply the chain rule.

Another way of thinking about it that makes the use of chain rule on nested functions is like so:

Define $$f(x) = \sqrt{1+x}$$ and $$g(x) = -2x$$. Then the original expression $$y(x) = f(f(f(g(x))))$$, which can be more compactly represented as $$y = f^3g$$ if we understand that the "exponent" is denoting repeated composition and that the independent variable $$x$$ that we are differentiating with respect to, is left implicit.

Then application of chain rule immediately gets us:

$$y' = f'(f^2g)\cdot f'fg \cdot f'g \cdot g'$$

So $$y'(x) = \frac 12 (1+ \sqrt{1+\sqrt{1-2x}})^{-\frac 12} \cdot \frac 12(1+\sqrt{1-2x})^{-\frac 12} \cdot \frac 12(1-2x)^{-\frac 12}\cdot (-2)$$.

The results should be the same after simplification.