Finding the second derivative of$f(x)=x^2\sqrt{4-x}$ 
Find the second derivative of the function following:

$$f(x)=x^2\sqrt{4-x}$$
Here I go...
$$f(x)= x^2(4-x)^{1\over 2}$$
\begin{align*}
f'(x) &= 2x(4-x)^{1\over 2}+{1\over 2}x^2(4-x)^{-{1\over 2}}(-1)\\ 
&= 2x(4-x)^{1\over 2} - {1 \over 2}x^2(4-x)^{-{1\over 2}}\\ 
&={1\over 2}x(4-x)^{-{1\over 2}}[4(4-x)-x]\\ 
&= {1\over 2}x(4-x)^{-{1\over 2}}(16-5x)\\
f''(x)&= {-{1\over 4}}x(4-x)^{-{3\over 2}}(-1)({1\over 2})(16-5x)+(-5)[{1\over 2}x(4-x)^{-{1\over 2}}]\\
&= {-{1\over 8}}x(4-x)^{-{3\over 2}}(16-5x)-{5\over 2}(4-x)^{-{1\over 2}}\\
&= {-{1\over 8}}x(4-x)^{-{3\over 2}}[(16-5x)-20(4-x)]\\
&={-{1\over 8}}x(4-x)^{-{3\over 2}}(-64+15x^2)
\end{align*}
I think I messed up on the second derivative. Could anyone show me the steps for the second derivative? Thanks!
 A: Notice that
$$f'(x)=\frac12(4-x)^{-1/2}(16x-5x^2)$$
Then
\begin{align*}
f''(x)&=\frac14(4-x)^{-3/2}(16x-5x^2)+(4-x)^{-1/2}(8-5x)\\
&=\frac{4(4-x)(8-5x)+(16x-5x^2)}{4(4-x)^{3/2}}\\
&=\frac{15x^2-96x+128}{4(4-x)^{3/2}}
\end{align*}
A: Your first derivative is 100% correct. The second derivative indeed has an error, as you must do the product rule within a product rule if you don't simplify your first derivative as in Ángel Mario Gallegos answer.
$$f''(x)=(\frac{1}{2}x(4-x)^{\frac{-1}{2}})(-5)+(16-5x)(\frac{1}{2}x[\frac{-1}{2}(4-x)^{\frac{-3}{2}}(-1)]+(4-x)^{\frac{-1}{2}}\frac{1}{2})$$ 
$$=\frac{-5}{2}x(4-x)^{\frac{-1}{2}}+(16-5x)(\frac{1}{4}x(4-x)^{\frac{-3}{2}}+\frac{1}{2}(4-x)^{\frac{-1}{2}})$$
$$=\frac{-5}{2}x(4-x)^{\frac{-1}{2}}+4x(4-x)^{\frac{-3}{2}}+8(4-x)^{\frac{-1}{2}}-\frac{5}{4}x^2(4-x)^{\frac{-3}{2}}-\frac{5}{2}x(4-x)^{\frac{-1}{2}}$$
$$=\frac{\frac{-5}{2}x(4-x)+4x+8(4-x)-\frac{5}{4}x^2-\frac{5}{2}x(4-x)}{(4-x)^{\frac{3}{2}}}$$
$$=\frac{-10x+\frac{5}{2}x^2+4x+32-8x-\frac{5}{4}x^2-10x+\frac{5}{2}x^2}{(4-x)^{\frac{3}{2}}}$$
$$=\frac{\frac{15}{4}x^2-24x+32}{(4-x)^{\frac{3}{2}}}$$
$$=\frac{15x^2-96x+128}{4(4-x)^{\frac{3}{2}}}$$
P.S. I included every simplification step in case you decided to go this route, that's why it is so long 
