A dielectric moves toward a stronger electric field. This quick analysis says the opposite. What am I missing? As I understand, a dielectric placed in an electric field will have an induced polarization, which will draw it toward the direction where the electric field increases the fastest in intensity. But consider this:
Imagine a small body of volume $V$ with permitivity $\epsilon$ greater than that of the vacuum $\epsilon_0$ in an electric field $\vec E$. This body is moved a small distance $\delta \vec r$ into a place with an electric field $\vec E + \delta \vec E$. The body is small enough and is moved a small enough distance that the electric field is not appreciably affected. Before moving, the energy in the electroic field inside the body and inside the space the body will occupy after moving is (to first approximation):
$$E=\frac{1}{2}(\epsilon E^2+\epsilon_0(E^2+2\delta \vec E \cdot \vec E))$$
After moving, the energy in the electric field inside the body and inside the space previously occupied by the body is (again, to first approximation):
$$E+\delta E=\frac{1}{2}(\epsilon_0 E^2+\epsilon(E^2+2\delta \vec E \cdot \vec E))$$
So the change in energy is:
$$\delta E=(\epsilon-\epsilon_0)\delta \vec E \cdot \vec E=\frac{1}{2}(\epsilon-\epsilon_0)\delta  E^2$$
So work $\delta E$ has been done against the electric field to move the body to its new position. Thus, the force on the body because of the electric field is
$$\vec F_{e}=-\frac{1}{2}(\epsilon - \epsilon_0)\nabla E^2$$
Which says the force should be in the direction of fastest decrease in electric field intensity. What am I missing?
 A: Your approach is absolutely correct, but you're not using the formula of energy density correctly. Energy per unit volume stored in electric field at some point $P$ is: \begin{equation}\frac{\epsilon}{2}E_p^2 \end{equation}
where $E_p$ is the electric field at $P$ and $\epsilon$ is the permittivity of the material present at $P$.
That being said, when you apply this formula to find the energy stored inside the dielectric, the field $E_p$ will be the field inside the dielectric($E_d$) and not the field in the vacuum($E$). \begin{equation}
E_d=\frac{\epsilon_0E}{\epsilon}\quad ...(\star)\quad(\epsilon:\text{permittivity of dielectric})
\end{equation}Now, I'll do the same mathematics as you did but I'll use the formula correctly.
I'll make the assumptions you made: The dielectric is small enough, therefore electric field can be assumed to be constant over the entire volume($V$) of the dielectric.
Electrostatic potential energy before moving the dielectric ($W$ is the energy, I divided it by Volume of the dielectric. We can rearrange the terms later) (includes the energy of dielectric at $P$and energy of the space where the dielectric will be moved):
\begin{equation}
\frac{W}{V}=\frac{\epsilon}{2}E_d^2+\frac{\epsilon}{2}(E^2+2\vec{E}.d\vec{E})= \frac{\epsilon_0^2}{2\epsilon}E^2 + \frac{\epsilon_0}{2}E^2 +\frac{\epsilon_0}{2}dE^2
\end{equation}
$\quad$ (using ($\star$).  $\quad$ Also $\vec{E}.d\vec{E}=\frac{1}{2}d(\vec{E}.\vec{E})=\frac{1}{2}dE^2$ )
$\quad$ where $d\vec{E}$ is the change in electric field when we move $d\vec{r}$ away from $P$.
Now, potential energy after moving the dielectric by $d\vec{r}$(includes the potential energy stored inside dielectric after it has been moved and the energy stored in space where the dielectric was initially):
\begin{equation}
\frac{W+dW}{V}=\frac{\epsilon_0}{2}E^2+\frac{\epsilon}{2}(E_d^2+2\vec{E_d}.d\vec{E_d})=\frac{\epsilon_0}{2}E^2+\frac{\epsilon_0^2}{2\epsilon}E^2+\frac{\epsilon_0 ^2}{2 \epsilon}dE^2
\end{equation}
Finally,
\begin{equation}
\frac{dW}{V}=\frac{\epsilon_0 ^2}{2 \epsilon}dE^2-\frac{\epsilon_0}{2}dE^2=\frac{\epsilon_0}{2}\left(\frac{\epsilon_0}{\epsilon}-1 \right)dE^2 \Rightarrow dW=\frac{\epsilon_0 V}{2}\left(\frac{\epsilon_0}{\epsilon}-1 \right)dE^2
\end{equation}
This change in potential energy is equal to the negative of the work done by the conservative force (Electric force, $\vec{F}_e$ here):
\begin{equation}
-\vec{F}_e.d\vec{r}=\frac{\epsilon_0 V}{2}\left(\frac{\epsilon_0}{\epsilon}-1 \right)dE^2 \Rightarrow \vec{F}_e.d\vec{r}=\frac{\epsilon_0 V}{2}\left(1- \frac{\epsilon_0}{\epsilon} \right)dE^2= (\Lambda).dE^2\quad ...(\star\star)
\end{equation}
$\quad$ where $\Lambda$ is some positive real number.
Now if $d\vec{r}$ corresponds to a direction along which $E$ increases, RHS of the $(\star\star)$ is positive because $d(E^2)$ is positive. In which case, LHS also needs to be positive for the equation to hold $\therefore$ Electrostatic force will be along the direction of $d\vec{r}$, the direction of increase in $E$, for the dot product to stay positive.
You can also write: $\vec{F}_e=\Lambda \vec{\nabla}E^2$ and deduce the same result, though more precisely.
A: The electric field inside dielectric is not the same as in vacuum: if in the vacuum it is $\vec{E}$ and the surface of dielectric if perpendicular to $\vec{E}$, then electric induction $D=\epsilon E$ is the same in vacuum and dielectric:
$$
D_{vacuum}=D_{dielectric}
$$
$$
E_{dielectric}=\frac{\epsilon_0}{\epsilon}E
$$
The energy $W$ is:
$$
W=\frac{\epsilon E_{dielectric}^2}{2}+\frac{\epsilon_0 (\vec{E}+\delta \vec{E})^2}{2}=\frac{\epsilon_0^2 E^2}{2\epsilon}+\frac{\epsilon_0 (\vec{E}+\delta \vec{E})^2}{2}
$$
$$
W+\delta W=\frac{\epsilon_0^2 (\vec{E}+\delta \vec{E})^2}{2\epsilon}+\frac{\epsilon_0 E^2}{2}
$$
$$
\delta W = \frac{\epsilon_0^2 (2\vec{E}\delta \vec{E} +\delta E^2)}{2\epsilon}-\frac{\epsilon_0(2\vec{E}\delta \vec{E} +\delta E^2)}{2}\approx-\frac{\epsilon_0(\epsilon-\epsilon_0)}{\epsilon}\vec{E}\delta \vec{E}
$$
If $\epsilon>\epsilon_0$ and $\vec{E}\delta \vec{E}>0$, then $\delta W < 0$, the dielectric will move in the direction of increasing $E$.
