def add_trailing_load(axle_spacing, axle_wt, space_to_trailing_load,
        distributed_load, span1_begin, span2_end, pt_load_spacing=0.5):
    """Approximates the distributed trailing load as closely spaced point loads.

    The distributed trailing load is approximated as discretly spaced point
    loads. The point load spacing is assumed to be 0.5 unless the user
    specifically enters a different spacing. The number of loads to add is
    determined by dividing the total span length, span 1 plus span 2, by the
    point load spacing. 
    
    Args:
        axle_spacing (list of floats): spacing of axles used for analysis
        axle_wt (list of floats): weight of axles used for analysis
        space_to_trailing_load (float): distance from last discrete axle to
                                        beginning of distributed load
        distributed_load (float): uniformly distributed trailing load magnitude
        span1_begin (float): coordinate location of beginning of span 1
        span2_end (float): coordinate location of end of span 2
        point_load_spacing (float, optional): spacing of approximate discretely
                                           spaced point loads, defaults to 0.5

    Returns:
        axle_spacing (list of floats): user input axle spacing appended with
                                       axle spacing for discretely spaced loads
                                       to approximate the distributed load
        axle_wt (list of floats): user input axle weights appended with axle
                                       weights for discretely spaced loads to
                                       approximate the distributed load

    Notes:
        Based on testing it can be shown that a reasonable level of accuracy is
        found in the forces and reactions using a discrete point load spacing of
        0.5. This spacing assumes the span lengths are entered in feet.   

        If the user does not want to have a distributed load on the entire
        length of the bridge it is suggested that the actual axle spacing and
        axle weights of the trailing load are entered and no distributed load is
        specified.
        """

    #approximate a distributed trailing load as closely spaced point loads
    #each point load is the distributed load times the point load spacing
    #the point load spacing is a function of the span lenght and number of
    #divisions required
    mod_axle_spacing = axle_spacing[:]
    mod_axle_wt = axle_wt[:]
    
    if space_to_trailing_load < 0.0:
        raise ValueError("Must enter a positive float for space to trialing"
                            "load.")
    elif distributed_load < 0.0:
        raise ValueError("Must enter a positive float for distributed load.")
    elif pt_load_spacing <= 0.0:
        raise ValueError("Must enter a positive float (or nothing for default"
                            "value of 0.5) for the point load spacing.")
    elif distributed_load != 0.0 and space_to_trailing_load != 0.0:
        total_span_length = span2_end - span1_begin
        num_loads = int(total_span_length/pt_load_spacing)
        equivalent_pt_load = distributed_load*pt_load_spacing

        mod_axle_spacing.append(space_to_trailing_load)
        mod_axle_wt.append(equivalent_pt_load)

        for x in range(num_loads):
            mod_axle_spacing.append(pt_load_spacing)
            mod_axle_wt.append(equivalent_pt_load)

    return mod_axle_spacing, mod_axle_wt