Numerical error with simulation of electric charge in homogeneous magnetic field So, I am trying to make an 2D animation of electric charge in homogeneous magnetic field which is perpendicular to charge's velocity. 
I've got the "circular" motion but the problem is that the speed of charge is increasing within a field. It is a small increase which I assume that is the result of inaccurate numerical method.
I would like to show that speed of charge is constant and any help would be appreciated.
Here is the part of the loop which describes charge's motion
f = Magneticfield( x, y, Vx, Vy, Bz);

Vx += f.x * dt;
Vy += f.y * dt;

x += Vx*dt;
y += Vy*dt;

where 
function Magneticfield( x, y, vx, vy, B){

    return{ x: B*vy, y: -B*vx};

 A: Your results using a forward difference integration are expected, and are resolved using the Boris method/push, the "de facto standard for particle pushing in plasma simulation codes."
The below implementation in Python generates this plot of velocities for 10 periods (blue = forward difference, red = Boris method):

from numpy import *
import matplotlib.pyplot as plt
import math

# Constants
m = 9.1e-31
q = 1.6e-19
B = 1.0
omega = q*B/m
T = 2.0*math.pi/omega

# Initial conditions
Vx0 = 0.0
Vy0 = 1.0

# Time steps
steps = 1000
pts = steps + 1
dt = 10 * T / steps

Vx_F = zeros(shape=(pts,pts))
Vy_F = zeros(shape=(pts,pts))    
Vx_B = zeros(shape=(pts,pts))
Vy_B = zeros(shape=(pts,pts))

Vx_F[0] = Vx0
Vy_F[0] = Vy0
Vx_B[0] = Vx0
Vy_B[0] = Vy0

for i in range(1,steps+1):
  # Forward difference
  Vx_F[i] = Vx_F[i-1] + dt * omega * Vy_F[i-1]
  Vy_F[i] = Vy_F[i-1] - dt * omega * Vx_F[i-1]

  # Boris push
  t = q*dt*B/(2*m)

  VprimeX = Vx_B[i-1] + Vy_B[i-1] * t
  VprimeY = Vy_B[i-1] - Vx_B[i-1] * t

  s = 2.0*t/(1.0+pow(t,2.0))

  Vx_B[i] = Vx_B[i-1] + VprimeY * s
  Vy_B[i] = Vy_B[i-1] - VprimeX * s

plt.gca().set_color_cycle(['red', 'blue'])
plt.plot(Vx_B, Vy_B)
plt.plot(Vx_F, Vy_F)
plt.show()

