# Justification for differentiating a Function under the integral

In a physics book I'm reading the authors take this expression, $$\phi(t)=\displaystyle\int_0^a aB(x,t)\mathrm{d}x$$

Then they differentiate with respect to time, $$\dfrac{\mathrm{d}\phi}{\mathrm{d}t}=\displaystyle\int_0^a a\dfrac{\mathrm{d}B(x,t)}{\mathrm{d}t}\mathrm{d}x$$

I assumed that they had differentiated under the integral sign, but in that case the partial derivative of $B$ with respect to $t$ would be taken, right? But here they use the total derivative later to state that: $$\dfrac{\mathrm{d}B(x,t)}{\mathrm{d}t}=\dfrac{\partial B}{\partial t}+\dfrac{\partial B}{\partial x}\cdot\dfrac{\mathrm{d}x}{\mathrm{dt}}$$

Is this correct? If so, why?

EDIT:

For reference, it is a standard physics textbook for class 12 in India.

http://www.amazon.in/Physics-Text-Book-Part-Class/dp/8174506314/ref=sr_1_2?ie=UTF8&qid=1502640532&sr=8-2&keywords=physics+ncert+class+12

The question is:

"A square loop of side $12 \text{ cm}$ with its sides parallel to the x and y-axes is moved with a velocity of $8 \text{ cm-s}^{-1}$ in the positive x-direction in a magnetic field directed along the z-axis. This field is neither uniform in space nor constant in time. The field has a gradient of $10^{-3} \text{ T-cm}^{-1}$ and decreases with time at the rate of $10^{-3} \text{ T-s}^{-1}$. Determine the direction and magnitude of the induced current in the loop if it resistance is $4.50\text{ m}\Omega$."

• $x$ is an integration variable. What would it mean to say that it depends on $t$? Since $x$ can't really be viewed as a function of $t$ all we can really do is treat them as independent variables and so $\frac{\mathrm{d}x}{\mathrm{d}t} = 0$ Commented Aug 13, 2017 at 14:44
• In this case, $x$ was the the displacement along the x-axis which did vary with time because it had a velocity. Commented Aug 13, 2017 at 14:47
• The $x$ in the expression above is can't be a function of the $t$ variable. I suggest you go back through the derivation you got this from and look very carefully at what the various quantities represent. That $t$ is not "the time at which the particle was at position $x$" (unless the writer has made a serious mistake). It may be the time at which some other even took place, or the upper limit of the integral may have a $t$ dependence (although from the expressions you have posted it doesn't seem to) the writer may also be being lazy with their variable names (this is unfortunately common) Commented Aug 13, 2017 at 14:57
• Explicitly, which physics book is this based on, thanks? And could you edit it into your post please, as comments get deleted.
– user163104
Commented Aug 13, 2017 at 15:03
• @BySymmetry Could you explain why $x$ can't be a function of time? Commented Aug 13, 2017 at 16:23