## Not run: ------------------------------------
# # First, try to calculate the volume of a regular 4-simplex:
# adapt(5,rep(0,5),rep(1,5),functn=function(x){Jacobian(c(1,x))})
# # Should be close to 1/5! = 1/120 ~= 0.008333
# # (that was the 'di trick')
#
# # Now, try to calculate the volume of a triangular-based pyramid:
# adapt(3,rep(0,3),rep(1,3),functn=Jacobian)
# # Should be close to 1/8=0.125
## ---------------------------------------------
Run the code above in your browser using DataLab