function pcof_antideriv = lagrange_basis_antideriv ( npol, ipol, xpol )

%*****************************************************************************80
%
%% lagrange_basis_antideriv() returns the antiderivative of a Lagrange basis polynomial.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    04 August 2025
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer NPOL, the number of abscissas.
%    NPOL must be at least 1.
%
%    integer IPOL, the index of the polynomial to evaluate.
%    IPOL must be between 1 and NPOL.
%
%    real XPOL(NPOL), the abscissas of the
%    Lagrange polynomials.  The entries in XPOL must be distinct.
%
%  Output:
%
%    real PCOF_ANTIDERIV(1:NPOL+1), the standard polynomial
%    coefficients of the antiderivative of the IPOL-th Lagrange polynomial:
%      L(IPOL)(X) = SUM ( 0 <= I <= NPOL ) PCOF_ANTIDERIV(I+1) * X^I
%

%
%  Get the standard polynomial coefficients of the ipol-th Lagrange
%  basis polynomial.
%
  pcof = lagrange_basis_coef ( npol, ipol, xpol );
%
%  Get the standard polynomial coefficients of the antiderivative of
%  the ipol-th Lagrange basis polynomial.
%
  pcof_antideriv = r8poly_ant_coef ( npol-1, pcof );

  return
end
