def theory(t):
    return (t ** 2 + 4.0) ** 2 / 16.0

def f(x, y):
    return x * np.sqrt(y)

def RK4(f):
    return lambda t, y, dt: (lambda dy1: (lambda dy2: (lambda dy3: (lambda
        dy4: (dy1 + 2 * dy2 + 2 * dy3 + dy4) / 6)(dt * f(t + dt, y + dy3)))
        (dt * f(t + dt / 2, y + dy2 / 2)))(dt * f(t + dt / 2, y + dy1 / 2)))(
        dt * f(t, y))

def test_RK4(dy=f, x0=0.0, y0=1.0, x1=10, n=10):
    pass
Using lambda functions in RK4 algorithm