I would like to create a function say trap() I would like the input variables to be fun, a, b, n
So the function looks like: trap(fun,a,b,n)
I would like to be able to put in trap(f1(x),0,2,10)
or something along those lines. I would like to be able to input the function I want to use for the function.
How do you do this because I just keep getting argument errors