#Newtonian eqn for impurity
function NewtonImp(phi, V, x, xdot, t, dt, M, lambda, xstep)
    for i = 1:length(x)
        xdot[i] = xdot[i] + real(dt / M * lambda * sum(V[i+1] .* conj(phi) .* phi) * xstep)
        x[i] = x[i] + real(dt * xdot[i])
    end
end



#if abspath(PROGRAM_FILE) == @__FILE__
#    include("helper.jl")
#    using BenchmarkTools
#    phi = ones(100,100)+0im*ones(100,100)
#    V = [ones(100,100)+0im*ones(100,100),ones(100,100)+0im*ones(100,100),
#    ones(100,100)+0im*ones(100,100)]
#    xarray = [i for i in range(-5 / 2.0, 5 / 2.0, length = 100)]
#    V = V_fct(V, [0,0], 0, xarray, 1)
#    x = [0.0 ,0.0]
#    xdot = [0.0, 0.0]
#    @btime NewtonImp(phi, V, x, xdot, 0.0, 0.1, 1.0, 1.0, 1.0)
#end
