Derivate of Function

I have to find the derivative of $\displaystyle g(z) = 1 + \sqrt{4-z}$.

I wrote $\displaystyle g(z)=1+(4-z)^{\frac{1}{2}}$.

Deriving - $\displaystyle g'(z)=\frac{1}{2}(4 - z)^{\frac{1}{2}-1}$ which then simplifies to be $\displaystyle \frac{1}{2}(4 - z)^{-\frac{1}{2}}$.

And finally $\displaystyle g'(z)=\frac{1}{2\sqrt{4-z}}$.

But the answer is positive instead of negative. What did I forget to do?

• What you forgot is The Chain Rule. – Gerry Myerson Feb 16 '16 at 12:03
• Two things - you can't simply delete constants, even though they vanish in derivative. Second, when you derive you have to multiply by inner derivative. In this case $\displaystyle y=\sqrt{f(x)} \Rightarrow y'=\frac{f'(x)}{2\sqrt{f(x)}}$. – Galc127 Feb 16 '16 at 12:08

Derivative of a function like $f(g(z))$ can be taken following the chain rule as; $$\frac{d(f(g(z)))}{dz} = \frac{\partial f(g(z))}{\partial g(z)} \frac{\partial g(z)}{\partial z}$$ where $f(g(z))=\sqrt{4-z}$ and $g(z)=4-z$ for your case.