Solution: let u=y^(1-n) du/dx = (1-n) y^(-n) dy/dx = (1-n) y^(-n) [ -Py+Qy^n+f] =-(1-n) Pu +(1-n)Q +(1-n)f u^(n/n-1) Separation of variables [1/(1-n)]Int[du/ { f u^(n/n-1)+Pu-Q}]= Int[dx]= x+ C Factor out the division and integrates the LHS. We get F(u,x)=0 then transform into F(y,x)=0. For n=2, it is very easy to solve. You can try it.