Integrals by Maplerestart;In this worksheet, we show how to integrate using Maple.We consider the function NiMvLSUiZkc2IyUieEcqJiwuKiYiIiMiIiIqJClGJyIiJkYsRixGLComIiIpRiwqJClGJyIiJUYsRiwhIiIqJiIjOkYsKiQpRiciIiRGLEYsRiwqJiIjNUYsKiQpRidGK0YsRixGNSomIiIqRixGJ0YsRjUiI0ZGLEYsLCxGMkYsKiZGNEYsRjhGLEY1KiZGL0YsRj1GLEYsKiZGNEYsRidGLEY1RjRGLEY1 . We enter this into Maple by
using the Maple functional notation.f:=x->(2*x^5-8*x^4+15*x^3-10*x^2-9*x+27)/(x^4-4*x^3+5*x^2-4*x+4);This allows for easy evaluation of the function for different values.f(3);We indicate its integral by using the Int command. Int is an inert form of integration and is good for
printing integrals, but does not evaluate.Int(f(x),x);We use the value command to evaluate the integral. The % sign refers to the most recently computed
item. Notice that the constant of integration is not included as part of the answer.value(%);The int command evaluates the indefinite integral by just producing its anti-derivative (without the
constant of integration), and does not print the integral symbol.int(f(x),x);Int and int can also be used for definite integration as seen in the following. Suppose we wish to
integrate our function from NiMvJSJ4RywkIiIjISIi to NiMvJSJ4RyIiIg==. We first plot this part of the graph to take a look at the
function.plot(f(x),x=-2..1);We notice that the function is continuous over our interval of integration.Int(f(x),x=-2..1);We evaluate this definite integral two different ways, by using first value, then int.% = value(%);%% = int(f(x),x=-2..1);We can incorporate the evalf command to get a decimal approximation to the exact integral.evalf(int(f(x),x=-2..1));Instead of entering a function first by using the Maple functional notation, we may also enter it as a
Maple expression directly into the Int and int commands.Int((2*x^5-8*x^4+15*x^3-10*x^2-9*x+27)/(x^4-4*x^3+5*x^2-4*x+4),x)=int
((2*x^5-8*x^4+15*x^3-10*x^2-9*x+27)/(x^4-4*x^3+5*x^2-4*x+4),x);We now look at several examples from class.Example 1Int(exp(3*x)*cos(5*x),x)=int(exp(3*x)*cos(5*x),x);Example 2Int((x^2-3*x+1)*exp(5*x),x)=int((x^2-3*x+1)*exp(5*x),x);Example 3Int((sin(3*x))^4*(cos(3*x))^2,x)=int((sin(3*x))^4*(cos(3*x))^2,x);This answer differs from the one we got in class, but we can check that they are the same by
subtracting the right hand side (rhs) of the above from the answer obtained in class. We
simultaneously simplify.simplify((1/18)*(sin(3*x))^5*cos(3*x)-(1/72)*(sin(3*x))^3*cos(3*x)-(1
/48)*sin(3*x)*cos(3*x)+(1/16)*x-rhs(%));Although we got 0 here, showing equality, it would be sufficient to get any real constant.Example 4Int((cos(x))^4*(sin(x))^5,x)=int((cos(x))^4*(sin(x))^5,x);Again, we compare this answer to the one obtained in class.simplify(-(cos(x))^9/9+2*(cos(x))^7/7-(cos(x))^5/5-rhs(%));Example 5Int((4*x+3)/(x^2+7*x+10),x)=int((4*x+3)/(x^2+7*x+10),x);Notice the lack of absolute values here. What is happening is that Maple assumes that ln is the
complex valued version of the function.Consider the function NiMvLSUiZkc2IyUieEcqJiIiIkYpLCZGJ0YpIiImRikhIiI= . This function is not continuous at NiMvJSJ4RywkIiImISIi. Let's look at its graph.f:=1/(x+5);plot(f,x=-10..5,y=-5..5,discont=true);Now let us look at its indefinite integral.integral:=int(f,x);Next let's see what happens for definite integrals, first using limits of integration to the right of the
discontinuity.Int(f,x=-2..5)=int(f,x=-2..5);Let's substitute these limits of integration into NiMtJSNsbkc2Iy0lJGFic0c2IywmJSJ4RyIiIiIiJkYr as if we were using the Fundamental
Theorem by hand.subs(x=5,ln(abs(x+5)))-subs(x=-2,ln(abs(x+5)));Note that we get equal answers. Next let's try limits of integration to the left of the discontinuity.Int(f,x=-9..-6)=int(f,x=-9..-6);Again, let's substitute these limits of integration into NiMtJSNsbkc2Iy0lJGFic0c2IywmJSJ4RyIiIiIiJkYr.subs(x=-6,ln(abs(x+5)))-subs(x=-9,ln(abs(x+5)));We again get anwers that are equal. Finally, lets try one limit of integration from each side of the
discontinuity.Int(f,x=-10..4)=int(f,x=-10..4);This indicates that Maple can't come up with an answer, which is good. so, even though Maple does
not include the absolute value signs for ln, it does evaluate the definite integrals correctly.Example 6Int((y^2-3)/(y^2+3),y)=int((y^2-3)/(y^2+3),y);Example 7Int((3*x-2)/(x^2-6*x+13),x)=int((3*x-2)/(x^2-6*x+13),x);