I have this problem in one of my econ classes, and google is not helping much in finding satisfying answers.
So, lets say I have to write the first derivative of $f(x) = \Big[\int_0^1 x^{\frac{n-1}{n}}\Big]^{\frac{n}{n-1}}$. So the function is the integral (from 0 to 1) of $x$ in the power of $(n-1)/n$, then the entire integral function in the power of $n/(n-1)$.
I know we have to do a chain rule in order to derive the F.O.C and apply the $f(g(x))$, however, my question is the following: In the course notes $f(u)$ is assumed to be $f(u)=u^{\frac{n}{n-1}}$, whereas the $g(x)$ is assumed to be $x^{\frac{n-1}{n}}$. Theus they differentiate the expression inside the integral. When I derived on my own without following the course notes step by step, I assumed $g(x)$ to be the entire integral function so that the derivative of $g(x)$ just gave me the expression inside the integral unchanged.
I have had quite a few exchanges by email with my professor regarding this, but his answers never provide a direct response of why $g(x)$ is assumed to be the expression inside the integral and not vice-versa.
I hope my question is clear and hope you guys can give me an answer as my exam is approaching and I still do not understand the reason for this.