def get_next_deriv(xi, step, n, deriv, func):
    """
    (d_theta/d_xi)i+1 = (d_theta/d_xi)i - ([ (2 /xi)i . (d_theta/d_xi)i ] + theta^n ) * d_xi
    """
    return deriv - step * ((2./xi)*deriv + func**n)