# Using FTC1 to differentiate a definite integral that has a function for a bound

Let $h$ be the function defined by $h(x) = \int^{x^2}_0 e^{x+t} dt$ for all real numbers $x$. I've looked in Stewart and I've looked in Spivak. They both say to use the chain rule when evaluating something like this, which gives me $h'(x) = e^{x+x^2} \cdot 2x$, but apparently the true answer is $h'(x) = (2x + 1) \cdot e^{x+x^2} - e^x$.

Could somebody explain this?

-
Rewrite as $e^x\int_0^{x^2}e^t\,dt$. Use Product Rule. – André Nicolas Nov 9 '11 at 22:41

First, notice that $\int_0^{x^2} e^{x+t} \,dt= \int_0^{x^2} e^xe^t \,dt = e^x \int_0^{x^2} e^t\,dt$. Since we are integrating with respect to $t$, $x$ can be treated like a constant.

Next, let $u=x^2$ and $g(u)=\int_0^u e^t \,dt$.

So we have $h(x) = e^xg(x^2)$.

The derivative is $h'(x)=e^xg(x^2)+e^xg'(x^2)2x$ (using the product rule and then the chain rule on $g(x^2)$.

However, $g'(u) = e^u$ by the fundamental theorem. Therefore, $h'(x)=e^x\left(\int_0^{x^2}e^t\,dt\right)+2xe^xe^t$. Simplifying, we have $h'(x)=2xe^{x+x^2} + \int_0^{x^2} e^{x+t}\,dt$

-
Thank you! I didn't see that. – Matt Gregory Nov 9 '11 at 23:19