# Differentiating $\int\cdots \int f(X_1,X_2,\ldots,X_n)\varphi_1(x_1,\theta)\cdots\varphi_n(x_n,\theta)~dx_1\cdots dx_n$

Differentiating:$$\int_{-\infty}^\infty \cdots \int_{-\infty}^\infty f(X_1,X_2,\ldots,X_n)\varphi_1(x_1,\theta)\cdots\varphi_n(x_n,\theta)\,dx_1 \cdots dx_n$$ with respect to $\theta$.

The result is given in one line, (the next one). I do not understand how this is. (Statistics proof) Anyway the result given being:

$$\int_{-\infty}^\infty \cdots \int_{-\infty}^\infty f(X_1,X_2,\ldots,X_n) \sum_{i=1}^n \left(\frac{\partial}{\partial \theta}\varphi(x_i,\theta)\frac{1}{\varphi(x_i,\theta)}\right) \varphi_1(x_1,\theta)\cdots\varphi_n(x_n,\theta)\,dx_1\cdots dx_n$$

• shouldn't the $\varphi$ inside the brackets be indiced with $i$, too? – Max Jul 23 '16 at 17:27
• You switch from $X_i$ to $x_i$. You should know that mathematics is case sensitive. $X\neq x$. – Asaf Karagila Jul 23 '16 at 17:29
• yeah it should. – Bozo Vulicevic Jul 23 '16 at 17:36

Let us rewrite the product rule as follows: $$(fg)'=f'g+g'f=\frac{f'}{f}fg+\frac{g'}{g}fg=\left(\frac{f'}{f}+\frac{g'}{g}\right)fg$$ Yours is just the generalization to $n$ factors, but is handled in the exact same way.
The first question is: Under what circumstances is $$\frac \partial {\partial\theta} \int_{-\infty}^\infty \cdots \int_{-\infty}^\infty \bullet\bullet\bullet$$ the same as $$\int_{-\infty}^\infty \cdots \int_{-\infty}^\infty \frac \partial {\partial\theta} \bullet\bullet\bullet \text{ ?}$$
The next question is: Why is $$\frac \partial {\partial\theta} \varphi_1(x_1,\theta)\cdots\varphi_n(x_n,\theta)$$ the same thing as $$\sum_{i=1}^n \left(\frac{\partial}{\partial \theta}\varphi(x_i,\theta)\frac{1}{\varphi(x_i,\theta)}\right) \varphi_1(x_1,\theta)\cdots\varphi_n(x_n,\theta) \text{ ?}$$