Sand falls from a stationary hopper onto a freight car that moves with uniform velocity $v$. The sand falls at a rate of $dm/dt$. What force is needed to keep the freight car moving at the speed of $v$?
(Source: Variable Mass in Newtonian Mechanics)
The correct solution is $F = \frac{d}{dt} mv = v \frac{dm}{dt}$.
I found a contradiction if I use the work-energy theorem to solve the problem
$$W = \Delta K = \frac{1}{2} m v^2$$
$$F = \frac{dW}{dx} = \frac{d}{dx}\left(\frac{1}{2} m v^2\right) = \frac{1}{2} v^2 \frac{dm}{dx} = \frac{1}{2} v^2 \frac{dm}{dt} / \frac{dx}{dt} = \frac{1}{2} v^2 \frac{dm}{dt} / v = \frac{1}{2} v \frac{dm}{dt}$$
What is wrong with this approach?
I found in Kinetic energy of a variable mass particle that the form of the kinetic energy derived from the Newton's second law of motion with variable mass is consistent with the conclusion here. Does that mean that the standard form of the work-energy theorem does not apply when solving problems with a variable mass?