I'm self-studying Herbst-Schorfheide book on DSGE estimation and having troubles replicating their steps in the derivation of demand for final goods firms (Ungated model is here, page 3: http://ink.library.smu.edu.sg/cgi/viewcontent.cgi?article=1361&context=soe_research). Their final goods producers maximize profit function:
$\Pi_t = P_t (\int_0^1 Y_t(j)^{1-\nu} dj)^\frac{1}{1-\nu} - \int_0^1 P_t (j) Y_t(j) dj$
and get the demand:
$Y_t(j) = (\frac{P_t(j)}{P_t})^{-\frac{1}{\nu}} Y_t$
My trouble is that I cannot understand derivation steps: how FOC looks like and why? Help is much appreciated!