def next_velocity(v, force, next_force, dt):
    """ calculates next velocity component for a particle."""

    """
    parameters
    ----------
    v : float
        velocity component of particle
    force : float
        current force felt by particle
    next_force : float
        force felt by particle at future timestep
    dt : float
        current timestep

    returns
    ----------
    next velocity component for particle

    """

    return v + dt/2.0 * (force + next_force)