Lagrange's equations are d d t ∂ ∂ L ∂ ∂ x ˙ ˙ = ∂ ∂ L ∂ ∂ x (same for y and z). So calculating the partial derivatives: d d t ∂ ∂ L ∂ ∂ x ˙ ˙ = m x ¨ ¨ + q d A x d t = m x ¨ ¨ + q d t [ ∂ ∂ A x ∂ ∂ t d t + ∂ ∂ A x ∂ ∂ x d x + ∂ ∂ A x ∂ ∂ y d y + ∂ ∂ A x ∂ ∂ z d z ] = m x ¨ ¨ + q [ ∂ ∂ A x ∂ ∂ t + ∂ ∂ A x ∂ ∂ x x ˙ ˙ + ∂ ∂ A x ∂ ∂ y y ˙ ˙ + ∂ ∂ A x ∂ ∂ z z ˙ ˙ ] ∂ ∂ L ∂ ∂ x = − − q ∂ ∂ ϕ ϕ ∂ ∂ x + q ( ∂ ∂ A x ∂ ∂ x x ˙ ˙ + ∂ ∂ A y ∂ ∂ x y ˙ ˙ + ∂ ∂ A z ∂ ∂ x z ˙ ˙ ) equating and simplifying: m x ¨ ¨ + q ( ∂ ∂ A x ∂ ∂ t + ∂ ∂ A x ∂ ∂ x x ˙ ˙ + ∂ ∂ A x ∂ ∂ y y ˙ ˙ + ∂ ∂ A x ∂ ∂ z z ˙ ˙ ) = − − q ∂ ∂ ϕ ϕ ∂ ∂ x + q ( ∂ ∂ A x ∂ ∂ x x ˙ ˙ + ∂ ∂ A y ∂ ∂ x y ˙ ˙ + ∂ ∂ A z ∂ ∂ x z ˙ ˙ ) F x = − − q ( ∂ ∂ ϕ ϕ ∂ ∂ x + ∂ ∂ A x ∂ ∂ t ) + q [ y ˙ ˙ ( ∂ ∂ A y ∂ ∂ x − − ∂ ∂ A x ∂ ∂ y ) + z ˙ ˙ ( ∂ ∂ A z ∂ ∂ x − − ∂ ∂ A x ∂ ∂ z ) ] = q E x + q [ y ˙ ˙ ( ∇ ∇ × × A ) z − − z ˙ ˙ ( ∇ ∇ × × A ) y ] = q E x + q [ r ˙ ˙ × × ( ∇ ∇ × × A ) ] x = q E x + q ( r ˙ ˙ × × B ) x and similarly for the y and z directions. Hence the force equation is: F = q ( E + r ˙ ˙ × × B )