#*****************************************************************************80 # ## shellmethod_test tests shellmethod. # # Licensing: # # Copyright 2016 James P. Howard, II # # The computer code and data files on this web page are distributed under # https://opensource.org/licenses/BSD-2-Clause, the BSD-2-Clause license. # # Modified: # # 11 March 2020 # # Author: # # John Burkardt # cat ( date ( ), "\n" ) cat ( "\n" ) cat ( "shellmethod_test\n" ) cat ( " ", version$version.string, "\n" ) cat ( " shellmethod estimates the volume contained in a surface of\n" ) cat ( " revolution using the shell method.\n" ) cat ( "\n" ) source ( "/home/burkardt/public_html/r_src/shellmethod/shellmethod.R" ) a <- 0.0 b <- 1.0 f <- function ( x ) { return ( sqrt ( 2 - x ) ) } value <- shellmethod ( f, a, b ) cat ( ' shellmethod ( x^2, ', a, ',', b, ') = ', value ) # # Terminate. # cat ( "\n" ) cat ( "shellmethod_test\n" ) cat ( " Normal end of execution.\n" ) cat ( date ( ), "\n" ) quit ( )