def height_fun(x, x0, A, xt):
    """
    Model the height of a cantilevered microubule.
    
    The MT is fixed at x0 and pulled up. A is the shape giving/ scaling factor,
    equal to F/EI, where F ist the forc acting on the MT at xt, and EI is the
    flexural regidity of the mictotubule.
    """
    def heaviside(x, x0):
        return 1 * (x >= x0)
    
    return heaviside(x, x0) * A * ((xt - x0) / 2 * (x - x0)**2 - ((x - x0)**3) / 6)