def dea_demo():
    """
    >>> dea_demo()
        NO. PANELS      TRAP. APPROX          APPROX W/EA           abserr
        1           0.78539816            0.78539816            0.78539816
        2           0.94805945            0.94805945            0.97596771
        4           0.98711580            0.99945672            0.21405856
        8           0.99678517            0.99996674            0.00306012
       16           0.99919668            0.99999988            0.00115259
       32           0.99979919            1.00000000            0.00057665
       64           0.99994980            1.00000000            0.00003338
      128           0.99998745            1.00000000            0.00000012
      256           0.99999686            1.00000000            0.00000000
      512           0.99999922            1.00000000            0.00000000
     1024           0.99999980            1.00000000            0.00000000
     2048           0.99999995            1.00000000            0.00000000
    """
    def linfun(i):
        return np.linspace(0, np.pi / 2., 2**i + 1)
    dea = Dea(limexp=6)
    print('NO. PANELS      TRAP. APPROX          APPROX W/EA           abserr')
    txt = '{0:5d} {1:20.8f}  {2:20.8f}  {3:20.8f}'
    for k in np.arange(12):
        x = linfun(k)
        val = np.trapz(np.sin(x), x)
        vale, err = dea(val)
        print(txt.format(len(x) - 1, val, vale, err))
>>> dea_demo()
        NO. PANELS      TRAP. APPROX          APPROX W/EA           abserr
        1           0.78539816            0.78539816            0.78539816
        2           0.94805945            0.94805945            0.97596771
        4           0.98711580            0.99945672            0.21405856
        8           0.99678517            0.99996674            0.00306012
       16           0.99919668            0.99999988            0.00115259
       32           0.99979919            1.00000000            0.00057665
       64           0.99994980            1.00000000            0.00003338
      128           0.99998745            1.00000000            0.00000012
      256           0.99999686            1.00000000            0.00000000
      512           0.99999922            1.00000000            0.00000000
     1024           0.99999980            1.00000000            0.00000000
     2048           0.99999995            1.00000000            0.00000000