# variation method

Define $F[\phi]=\int dr \{V(\phi)+\frac{1}{2} \kappa \vert \nabla \phi \vert^2 \}$, then how can we deduce that$\frac{\delta F}{\delta \phi}= \frac{d V}{d \phi}-\kappa \nabla^2 \phi$?

I feel confused on some basic points, so details will be very helpful to correct my possible errors!