# Force in electromagnetic system

I'm really confused in the following question,

The flux linkage ($\lambda$) and current ($i$) relation for an electromagnetic system is $\lambda = (\sqrt i / g$ ) . When $i = 2 A$ and $g$ (air-gap length) = 10 cm, the magnitude of mechanical force on the moving part, in $N$, is?

My approach, $$f = i \frac{d \lambda}{d x}$$ $$|f| = \frac{i \sqrt i}{g^2} = 282.84$$ But the answer is in the range 186-190 N

The following curve shows the magnetic-field energy and co-energy. On moving a small distance $dx$, the current remains constant but the flux increases by an amount $d \lambda$
The curve between $\lambda$ and $i$ follows the same pattern. Since, the current remains constant, the differential energy $d W_\text{elec}$ taken from the system is half stored in magnetic field as $d W_{\phi}$ and the rest is used in doing virtual work $f\; dx$, so on balancing the energy we get $$2\; d W_\phi = d W_{\phi} + f\; dx$$ $$f = \frac{d W_{\phi}}{dx} \quad \text N$$ Since the question does not specify about the direction of motion,i.e., $x$ let us assume that the force decreases as $x$ increases and displacement $g$ decreases as $x$ increases. So, the force can be calculated as $$f = - \frac{d W_\phi}{dx} = \frac{d W_\phi^{'}}{dx}$$ As, co-energy $W_\phi^{'}$ increases when $d W_\phi$ decreases. $$W_\phi^{'} = \int_0^2 \lambda \; di = \int_0^2 \frac{\sqrt{i}}{g}\; di$$ $$f = \frac{d W_\phi^{'}}{dx} = -\frac{d W_\phi^{'}}{dg} = -\frac{d}{dg} \int_0^2 \frac{\sqrt{i}}{g}\; di = -\int_0^2 \frac{\partial}{\partial g} \left( \frac{\sqrt{i}}{g} \right)\; di$$ $$f = \int_0^2 \frac{\sqrt{i}}{g^2}\; di = \frac{2}{3} \left[ \frac{i^{3/2}}{g^2} \right]_0^2 = 188.56 \; N$$