# Correct application of Leibniz Rule

Consider the following integral

$$I = \int^b_af[x[t];c]dt$$

where $$a,b$$ and $$c$$ are scalers and $$x[t]$$ is a function of $$t$$. I want to know $$\frac{\partial I}{\partial x}$$.

If I apply Leibniz Rule, I get

$$\frac{\partial I}{\partial x} = \int^b_a\frac{\partial f}{\partial x}dt$$

I feel this is an incorrect application of the rule, since $$x$$ is a function of $$t$$.

Alternatively, I can think of re-defining $$f$$ as $$g = f[x+\epsilon;c]$$, where for $$\epsilon = 0$$ we have the original function. Now if I apply Leibniz Rule by differentiating with respect to $$\epsilon$$ (and then evaluate the derivative at $$\epsilon = 0$$), I get,

$$\frac{\partial I}{\partial \epsilon} = \int^b_a\frac{\partial g}{\partial x}|_{\epsilon=0} dt$$

Questions:

1. Am I correct in saying that my first method is incorrect?
2. If the alternative method is correct, does it correctly capture $$\frac{\partial I}{\partial x}$$?

Edit:

It might help to explain what I was thinking of when I wrote the question:

Suppose $$x$$ represents monetary values at different points of time ($$t$$) and $$f$$ is a function of $$x$$. $$I$$ is adding $$f$$ from $$t=a$$ to $$t=b$$. I would like to calculate, how the sum ($$I$$) changes if the entire sequence $$x$$, say, goes up or down.

• Regarding 1) note that you are taking the partial derivative. Jul 31 '20 at 15:11
• @MathsWizzard I see. But $x$ is the only variable argument, so would it matter if I wrote partial instead of total derivative?
– erik
Jul 31 '20 at 15:15
• $I$ is a number since bounds do not depend on $x$ so derivative is $0$.
– zwim
Jul 31 '20 at 15:18
• @erik I would still write it as partial derivative because remember that one could also take the derivative with respect to $t$ (by the fundamental theorem of calculus) Jul 31 '20 at 15:23
• @MathsWizzard: $I$ is a function on the space of functions $x(t)$ (with domain $[a,b]$ and presumably some continuity/differentiability restrictions). This is called a functional in the calculus of variations literature. In no way is an integral $\int_a^b g(t)\,dt$ a function of $t$. At any rate, NO partial derivatives involved, but recognize that you're differentiating in an infinite-dimensional space. Jul 31 '20 at 16:48