def euler_richardson_method_2system_ode2(f, g, dt, x, y, xp, yp, range):
    """ The Euler-Richardson method working on a two-coupled system. Required
    for chapter 6, problem 5 in order to express two coupled parameterized
    functions as a single output y(x).
    
    :param f: The first second order diffeq expressed as a lambda.
    :type f: lambda
    :param g: The second second order diffeq expressed as a lambda.
    :type g: lambda
    :param dt: Step size. Smaller is better.
    :type dt: float
    :param x: The initial condition for x.
    :type x: float,int
    :param y: The initial condition for y.
    :type y: float,int
    :param xp: The initial condition for xp.
    :type xp: float,int
    :param yp: The initial condition for yp.
    :type yp: float,int
    :param range: A list which specifies the beginning and the ending of our domain.
    :type range: list
    :return: Returns a tuple for the t,x,y,xp,yp values as lists.
    :rtype: 5-tuple(list)
    """
    # f = x'' and g = y''
    # both requires (t, x, y, x', y')
    # get initial conditions and setup arrays
    t = min(range)
    t_space = [t]
    x_space = [x]
    y_space = [y]
    xp_space = [xp]
    yp_space = [yp]
    
    while t <= max(range):
        # find get midpoints
        t_mid = t + (1/2)*dt
        xp_mid = xp + 1/2*f(t, x, y, xp, yp)*dt
        yp_mid = yp + 1/2*g(t, x, y, xp, yp)*dt
        x_mid = x + (1/2)*xp*dt
        y_mid = y + (1/2)*yp*dt
        
        # get slopes
        xp_s = f(t_mid, x_mid, y_mid, xp_mid, yp_mid)
        yp_s = g(t_mid, x_mid, y_mid, xp_mid, yp_mid)
        x_s = xp_mid
        y_s = yp_mid
        
        # update values
        t += dt
        x += x_s*dt
        y += y_s*dt
        xp += xp_s*dt
        yp += yp_s*dt

        # append values
        t_space.append(t)
        x_space.append(x)
        xp_space.append(xp)
        y_space.append(y)
        yp_space.append(yp)
    
    
    return (t_space, x_space, y_space, xp_space, yp_space)