area                  package:MASS                  R Documentation

_A_d_a_p_t_i_v_e _N_u_m_e_r_i_c_a_l _I_n_t_e_g_r_a_t_i_o_n

_D_e_s_c_r_i_p_t_i_o_n:

     Integrate a function of one variable over a finite range using a
     recursive adaptive method.  This function is mainly for
     demonstration purposes.

_U_s_a_g_e:

     area(f, a, b, ..., fa = f(a, ...), fb = f(b, ...),
          limit = 10, eps = 1e-05)

_A_r_g_u_m_e_n_t_s:

       f: The integrand as an 'S' function object.  The variable of
          integration must be the first argument. 

       a: Lower limit of integration. 

       b: Upper limit of integration. 

     ...: Additional arguments needed by the integrand. 

      fa: Function value at the lower limit. 

      fb: Function value at the upper limit. 

   limit: Limit on the depth to which recursion is allowed to go. 

     eps: Error tolerance to control the process. 

_D_e_t_a_i_l_s:

     The method divides the interval in two and compares the values
     given by Simpson's rule and the trapezium rule.  If these are
     within eps of each other the Simpson's rule result is given,
     otherwise the process is applied separately to each half of the
     interval and the results added together.

_V_a_l_u_e:

     The integral from 'a' to 'b' of 'f(x)'.

_R_e_f_e_r_e_n_c_e_s:

     Venables, W. N. and Ripley, B. D. (1994) _Modern Applied
     Statistics with S-Plus._ Springer. pp. 105-110.

_E_x_a_m_p_l_e_s:

     area(sin, 0, pi)  # integrate the sin function from 0 to pi.

