So then ##Q## remains constant. I need to use equation ##U=\frac{Q^2}{2*C}##. Then I need to use ##\vec F=-\nabla U## which is ##\vec i *\frac{Q^2*d*(\epsilon-\epsilon_0)}{2*(\epsilon_0*(l-x)+\epsilon *x)^2*w}## Is this right?
First, I think that I need to calculate the capacitance. It is ## C=\epsilon_0*\frac{l*w}{d}-x*\frac{w*\epsilon_0}{d}+\epsilon*\frac{x*w}{d} ##. After that I should calculate the potential energy. It is ##U=\frac{1}{2}*C*V^2 ##. After that I should take its gradient to get the force. So ##\vec F...