How to apply the chain rule of differentiation when one of the intermediate variables is a multivariable function inside an integral?

57 Views Asked by At

I have a function that has the following expression: $$F(\theta)=\int_{-\infty}^{\infty} f_1(f_2(\theta, x), y(x))dx$$

where $\frac{\partial f_1}{\partial \theta}$ is well defined at the infinity. So, to calculate $\frac{\partial F}{\partial \theta}$, I can apply the Leibniz integral rule and do $$ \frac{\partial F}{\partial \theta}=\int \frac{\partial f_1(f_2(\theta, x), y(x))}{\partial \theta}dx $$ $$ \frac{\partial F}{\partial \theta}=\int \frac{\partial f_1}{\partial f_2}\frac{\partial f_2}{\partial \theta} dx. $$ However, if I were to apply the chain rule first to $F$, I would have $$ \frac{\partial F}{\partial \theta} = \frac{\partial F}{\partial f_1}\frac{\partial f_1}{\partial f_2}\frac{\partial f_2}{\partial \theta}. $$ I would like to know how I can calculate the expression of $\frac{\partial F}{\partial f_1}$, or does the chain rule not apply to this case? The reason I suspect this is because $\frac{\partial f_2}{\partial \theta}$ is still dependent of $x$ which in the first method should be traced out by the integral.

Thank you!