I try not to do too many homework problems here because in a former life I was a college professor, and I think it's bad for the student just to hand them answers. But I think I should explain the error message.
When you have a function defined in a MATLAB file (ending in .m or .p), then when referring to the function, you must use @, e.g.
Q = integral(@f,-Inf,Inf)
The @ symbol tells MATLAB that you're referring the function, so it won't try to evaluate it immediately and pass the return values into the function.
If, OTOH, you have a function defined as an anonymous function e.g.
then you can refer to it by the name of the variable that is "holding" the anonymous function,