Integrate $3x\int_{4}^{x^2}e^{-\sqrt{t}}dt$ when $f'(x)=2$ We have functions of $f(x)=3x\int_{4}^{x^2}e^{-\sqrt{t}}dt$. This is function of x, but the integral is about t. Find $f'(2)$. So f'(2) is x=2. The function is becomes $\frac{d}{dx}6\int_{4}^{4}e^{-\sqrt{t}}dt$. Then what is the answer? I think it's to use Leibniz's formula here and solve for the derivative of the integral here. And I have final answer is $f'(2)=\frac{6}{e^2}$. This is right?
 A: You are taking the derivative, so you can't plug in $x = 2$ yet - if you plug in the value first, you would always get a derivative of $0$. You have to find the derivative first. Using Leibniz's formula, you have $$f'(u)=3u \cdot\left(\frac{d}{dx}\int_{4}^{x^2}e^{-\sqrt{t}}\,dt \right)\Biggr|_{x=u} + \int_{4}^{u^2}e^{-\sqrt{t}}\,dt\cdot \left(\frac{d}{dx}3x\right)\Biggr|_{x=u}$$
You can use the fundamental theorem of calculus for the derivative of the integral and then plug in $u = 2$.
A: "$f'(2)$" says first evaluate $f'(x)$, then set $x = 2$.  You have tried to do this in the backwards order and have gotten the boring result that makes it clear you are doing this in the wrong order.
(Try both orders on $g(x) = x^2$ to evaluate $g'(2)$.  My way: $g'(x) = 2x$ and so $g'(2) = 2(2) = 4$.  Your way: $g(2) = 4$ and $\frac{\mathrm{d}}{\mathrm{d}x} 4 = 0$.  You get zero every time you substitute before differentiating, so don't do that.)
It helps to realize $\displaystyle \int_4^{x^2} \mathrm{e}^{-\sqrt{t}}\,\mathrm{d}t$ is a composition of functions.  The inner function is $u(x) = x^2$ and the outer function is $\displaystyle \int_4^{u} \mathrm{e}^{-\sqrt{t}}\,\mathrm{d}t$.  This should make it clear that you need to apply the chain rule here.  Then the derivative of that integral (specifically accumulation function) with respect to $u$ is given by the Fundamental Theorem of Calculus (part 1).  Don't forget to start with the product rule.
\begin{align*}
f'(x) &= \frac{\mathrm{d}}{\mathrm{d}x} 3x \int_4^{x^2} \mathrm{e}^{-\sqrt{t}}\,\mathrm{d}t  \\
    &= \left( \frac{\mathrm{d}}{\mathrm{d}x} 3x \right)  \int_4^{x^2} \mathrm{e}^{-\sqrt{t}}\,\mathrm{d}t + 3x \frac{\mathrm{d}}{\mathrm{d}x} \int_4^{x^2} \mathrm{e}^{-\sqrt{t}}\,\mathrm{d}t  \\
    &= 3 \int_4^{x^2} \mathrm{e}^{-\sqrt{t}}\,\mathrm{d}t + 3x \mathrm{e}^{-\sqrt{x^2}} \frac{\mathrm{d}}{\mathrm{d}x} x^2  \\
    &= 3 \int_4^{x^2} \mathrm{e}^{-\sqrt{t}}\,\mathrm{d}t + 6x^2 \mathrm{e}^{-\sqrt{x^2}}  \text{.}  
\end{align*}
Then \begin{align*}
f'(2) &= 3 \int_4^{(2)^2} \mathrm{e}^{-\sqrt{t}}\,\mathrm{d}t + 6(2)^2 \mathrm{e}^{-\sqrt{(2)^2}}   \\
    &= 3 \int_4^{4} \mathrm{e}^{-\sqrt{t}}\,\mathrm{d}t + 24 \mathrm{e}^{-\sqrt{4}}  \\
    &= 3 \cdot 0 + 24 \mathrm{e}^{-2}  \\
    &= \frac{24}{e^2}  \text{.}
\end{align*}
