Does interchanging the derivative and integral apply for $G’(x)=\frac{d}{dx} \Big{(}\int_{1}^{e^x}\frac{1}{1+log(t)}dt \Big{)}?$

analysisdefinite integralsderivativesintegrationreal-analysis

Question

I am looking to differentiate the following integral with respect to $x$ (for $x>0$):

$$G(x)=\int_{1}^{e^x}\frac{1}{1+log(t)}dt$$

Attempt

I know that I can bring the derivative inside of the integral if the inside function and its partial derivative are continuous within the limits.

My only hesitation in this case, is if this proposition still applies to the case where the limits are functions of variables.

If so, does that make the derivative of $G(x)$ simply:

$$G'(x)=\int_{1}^{e^x}0dt=0$$

Since the derivative of the inside with respect to $x$ is $0$ (as it is constant with respect to $x$). Or am I misunderstanding something?

It doesn't feel like this can be the correct answer to the problem, so I would be grateful for any clarification.

Best Answer

I know that I can bring the derivative inside of the integral if the inside function and its partial derivative are continuous within the limits.

What you're quoting here is Differentiation under the integral sign, formally stated as:

"Let $f(x,t)$ be a function such that both $f(x,t)$ and its partial derivative $f_x(x, t)$ are continuous in $t$ and $x$ in some region of the $xt$-plane, including $a(x)\leq t\leq b(x)$, $x_0\leq x\leq x_1$. Also suppose that the functions $a(x)$ and $b(x)$ are both continuous and both have continuous derivatives for $x_0 \leq x \leq x_1<$. Then, for $x_0\le x\le x_1$ $$\frac{\mathrm{d}}{\mathrm{d}x}\int_{a(x)}^{b(x)}f(x,t)\,\mathrm{d}t = f\big(x,b(x)\big) \frac{\mathrm{d}}{\mathrm{d}x} b(x) - f\big(x,a(x)\big) \frac{\mathrm{d}}{\mathrm{d}x} a(x) + \int_{a(x)}^{b(x)}\frac{\partial}{\partial x} f(x,t) \,\mathrm{d}t \tag{1}"$$

It's overkill to try to apply this to your question since your integrand $\frac{1}{1 + \ln(t)}$ only depends on one variable, but it can still be done. Applied correctly you get \begin{align} \frac{\mathrm{d}}{\mathrm{d}x} \left (\int_{1}^{e^{x}}\frac{1}{1 + \ln(t)}\,\mathrm{d}t \right) &= \frac{1}{1 + \ln(e^x)}\frac{\mathrm{d}}{\mathrm{d}x} e^x -\underbrace{ \frac{1}{1 + \ln(1)} \frac{\mathrm{d}}{\mathrm{d}x} (1)}_{0} + \int_{1}^{e^x}\underbrace{\frac{\partial}{\partial x} \frac{1}{1 + \ln(t)}}_{0} \,\mathrm{d}t\\ & = \frac{e^x}{1+x} \end{align}


What's happening here? In reality, differentiation under the integral sign is a generalization of the fundamental theorem of calculus. To see why, assume that we have $a(x) =a$ where $a$ is some constant and $f(x,t) = f(t)$ as in your question. i.e, that the lower bound is just a number and the integrand only depends on one variable. Plugging these conditions into $(1)$ we get: \begin{align} \frac{\mathrm{d}}{\mathrm{d}x} \left (\int_{a}^{b(x)}f(t)\,\mathrm{d}t \right) &= f\big(b(x)\big) \frac{\mathrm{d}}{\mathrm{d}x} b(x) - \underbrace{f\big(a\big) \frac{\mathrm{d}}{\mathrm{d}x} a }_{0}+ \int_{a}^{b(x)}\underbrace{\frac{\partial}{\partial x} f(t)}_{0} \,\mathrm{d}t\\ & = f\big(b(x)\big) \frac{\mathrm{d}}{\mathrm{d}x} b(x) \tag{2} \end{align} because $a$ being a constant implies $\frac{\mathrm{d}}{\mathrm{d}x} a =0$ and since $f$ doesn't depend on $x$ we get $\frac{\partial}{\partial x} f(t)=0$. But recalling the chain rule we notice that the RHS is exactly the derivative of $F(b(x))$ where $F(x)$ is an antiderivative of $f(x)$. But this is just a consequence of the FTC since \begin{align} &\frac{\mathrm{d}}{\mathrm{d}x} \underbrace{\int_{a}^{x}f(t)\,\mathrm{d}t}_{F(x)} =F'(x) =f(x) \tag{FTC}\\ \mathbin{\implies}&\frac{\mathrm{d}}{\mathrm{d}x} \underbrace{\int_{a}^{\color{green}{b(x)}}f(t)\,\mathrm{d}t}_{F(\color{green}{b(x)})} =\frac{\mathrm{d}}{\mathrm{d}x} F(b(x)) \overset{\color{blue}{\text{Chain rule}}}{ =}F'(b(x))b'(x) \overset{\color{blue}{(\text{FTC})}}{=} f\big(b(x)\big)\frac{\mathrm{d}}{\mathrm{d}x} b(x)\end{align} which is exactly the same result we got in $(2)$, but this time we only used the more simple tools of the FTC and the chain rule to get the result.


tl;dr, you were attempting to use differentiation under the integral sign but didn't apply the theorem correctly. This method is overkill because differentiation under the integral sign is a generalization of the FTC for multivariable functions, but since your integral is dependent on only one variable the problem is solvable using only the FTC and the chain rule.

Related Question