Derivation of demand for intermediate goods in DSGE model
So I've seen this sort of thing where you basically differentiate with respect to each Y_j so the integral drops out (seen this in moral hazard chapter from 
MWG and Romer's endogenous growth model). 

The foc becomes:

$P_t(Y_t(j)^{(1-v)})^{v/(1-v)}Y^{-v}-P_t(j)=0$

This gets the result.