%% Find Integral of Named Function
% In a file in your current folder, create a function named cubicPoly that accepts an input to evaluate the cubic polynomial x^3 +x^2 +x+1.
% function y = cubicPoly(x)
% y = x.^3 + x.^2 + x + 1;
% end
% To find the integral of cubicPoly from 0 to 1, pass a handle to the cubicPoly function to integral.

q = integral(@cubicPoly,0,1)

% Copyright 2019 The MathWorks, Inc.