In part 1 of this lab, we learned how to use the Maple int command to compute areas. The same command works to compute any definite integral, whether it corresponds to an area or not. For example, to compute the definite integral
you could use the following Maple command.
> int((2*x-3)^5,x=-2..4);
Sometimes you need to compute a definite integral involving a piecewise-defined function. For example, suppose you have a function f(x) defined as follows
and you needed to compute the definite integral
The best way to do this in Maple is to split it up into two integrals and use the appropriate formula, as shown below. How you split the integral up is determined by where the formula defining the function changes.