Maple Project 1 - due April 5 ( with changes 4-12-06 )

Purposes: To illustrate the use of the student package to help learn the techniques of integration that are suitable if one is integrating by hand. To see Maple's powerful "automatic" techniques of integration. Also to gain experience with numerical integration using Simpson's method, the Trapezoid method and Maple's default method.

Commands used:

  • with(student): --- loads the student package which helps carry out step by step solutions to problems. IMPORTANT NOTE -- begin your Maple session with this command for this assignment.
  • Int -- writes an integral in "pretty print" format without actually integrating. This is called an inert function since nothing is actually calculated. Useful to solve a problem step by step.
  • int -- actually integrates to determine result of integration, when possible
  • changevar -- uses substitution to change the variable of integration
  • value -- evaluate an inert function. For example value(Int(x^2,x)); means the same as int(x^2,x);
  • subs -- useful to substitute an expression for a variable in a formula
  • intparts -- do integration by parts
  • op -- split off a piece (or operand) of a complicated formula
  • convert -- used to convert an expression to a different form. You will use this with the argument partfrac to determine the partial fraction decomposition of an fraction
  • simplify – simplifies a complicated expression
  • expand -- this will be used to break an integral of a sum into the sum of integrals
  • trapezoid --evaluates a integral numerically using the trapezoid method
  • simpson -- evaluates an integral numerically using Simpson's method
  • evalf -- used to force to calculate the numerical result of numerical integartion

In Maple you can get help on any of the above commands using "help(command);". For example:

help(intparts);

Note that Maple wants a semicolon at the end of most lines. Don't forget it.

Examples of the use of the above commands (except trapezoid, simpson and evalf) are in the Maple worksheet "L13-intTechReview.mws" on my website ( You should look through this worksheet carefully enough so that you can repeat the procedures shown on the worksheet for the problems below. The worksheet is part of a package "Calculus II: A Complete Set of Lessons" written by Jack Wagner and Karen Brucks which is at

I recommend that you look at the site.

I want you to follow the procedures modeled to do step by step solutions to the problems 1,2, 3 and 4 below. Include enough steps in your solutions so that you clearly illustrate how one could do the problem by hand. Of course in Maple you can use the int command or the value command to determine the final result for any integral, assuming there is an antiderivative for the problem. I don't want you to use int or value for problems 1 to 4 until the answer for the final integral would be clear, even if you were doing it by hand.

For problem 5 you should just use int and simplify. A step by step solution is not required. Problems 6,7 and 8 ask you to use numerical integration to evaluate a definite integral.

For each of the 8 questions on the next page copy the work from your Maple session and paste the relevant work following the question (in MS word) . Go to to download a word version of this assignment. Print out the entire word document, except for this first page of instructions, and turn it in. You can do this assignment in a team of up to 2 people. Just turn in one set of answers for both people. Make sure that you answer all the parts that are in bold.

Solutions (and problems) to Maple Assignment 1Name(s) ______

1. Use Maple to show the step by step solution to . (use substitution).

2. Use Maple to show the step by step solution to . (use partial fractions).

3. Use Maple to show the step by step solution to. (use parts). Note: enter sin(ax) as sin(a*x).

4. Use Maple to show the step by step solution to. Write your final answer without trig functions. (use substitution). Note: after substituting x = sec(t) for some reason using "F:= subs(sqrt(sec(t)^2-1)=tan(t),F);" does not work but "F:= subs(1/sqrt(sec(t)^2-1)=1/tan(t),F);" does.

5. Use Maple to show the final answer (only) to. Only turn in the final answer after it is simplified with Maple's simplify. Note that one should use exp(x) for ex rather than e^x. Also don't forget to include *'s to indicate multiplication.

6. First try to integrate using Maple's int (so use "int(exp(x^2)*sin(x)/(x+4),x);". If Maple returns the same indefinite integral it means that Maple cannot find and antiderivative and that probably no antiderivative exists for the given function. Now use the trapezoid method to find the definite integral to four digit accuracy. The Maple command (make sure the you use "with(student):" at the beginning of your work session) for the trapezoid method with, for example, 32 steps is

evalf( trapezoid( exp(x^2)*sin(x) / (x+4), x = 1.0 .. 5.0, 32));.

Start with 8 steps and successively double the number of steps until successive approximations have four leading digits that are identical. List you final value (not the intermediate work) and the number of steps.

7. Now use the Simpson's method to find the definite integral to four digit accuracy. The Maple command (make sure the you use "with(student) ;" at the beginning of your work session) for the Simpson's method with, for example, 32 steps is

evalf( simpson( exp(x^2)*sin(x) / (x+4), x = 1.0 .. 5.0, 32));.

Start with 8 steps and successively double the number of steps until successive approximations have four leading digits that are identical. List you final value (not the intermediate work) and the number of steps. Which method do you recommend Simpson's method or the trapezoid method?

8. If you use

evalf( int( exp(x^2)*sin(x) / (x+4), x = 1.0 .. 5.0, 4));.

the default Maple numerical integration scheme will be invoked. This is fancier (and should be quicker than Simpson's or the trapezoid method). Also the last parameter is not the number of steps but rather the number of digits accuracy desired. Thus the above command will do numerical integration with enough steps (determined automatically) so the answer has four place accuracy. Try it out. Is it quicker that Simpson? Also try out the same integral but with 100 digit (not 4) accuracy. Turn in the Maple output of the integral to 100 digit accuracy. Now repeat the calculation of this integral to 100 digit accuracy using only hand calculations (JUST KIDDING).