import math


def ac15_defl(w, l, E, I, x):
    """Deflection at x - Beam fixed at both ends - Uniformly dist. loads
    
    Calculates the deflection in the beam at any location, x, along the
    beam due to a uniformly distributed load. 
    
    d = w*math.pow(x,2)/(24.0*E*I)*math.pow(l-x,2)
    
    Args:
        w (float): uniformly distributed load
        
        l (float): length of beam between supports
        
        E (float): modulus of elasticity
        
        I (float): section modulus
        
        x (float): distance along beam from left support
        
    Returns:
        d (tuple(float, str)): deflection at x
        
    Notes:
        1. Consistent units are the responsibility of the user.
    """
    
    d =  d = w*math.pow(x,2)/(24.0*E*I)*math.pow(l-x,2)
    
    text = (f'd = w*math.pow(x,2)/(24.0*E*I)*math.pow(l-x,2) \n' + 
            f'd = {w:.3f}*math.pow({x:.2f},2)/(24.0*{E:.1f}*{I:.1f})'
            f'*math.pow({l:.2f}-{x:.2f},2) \n' + 
            f'd = {d:.3f}')
        
    return d, text