Maple Project 2 MTH 142 Spring 2001

Department of Mathematics, University of Rhode Island


define in Maple the function $f(x) = e^{\sin(x)}$. Produce a plot of the function with $1 \leq x \leq 2$.

Obtain taylor polynomials $P_{1}(x)$, $P_{2}(x)$, $P_{3}(x)$ of $f(x)$ for $x$ near $a=1$. Obtain both an exact expression, and also a formula with coefficients in decimal form.

Plot $f(x)$ together with $P_{1}(x)$, $P_{2}(x)$, $P_{3}(x)$, for $1 \leq x \leq 2$.

The error when approximating f(x) by $P_{n}(x)$ at $x$ is defined as

\begin{displaymath}E_{n}(x) = P_{n}(x) - f(x) = \mbox{approximation - exact value}\end{displaymath}

Calculate $E_{1}(1.01)$, $E_{2}(1.01)$, and $E_{3}(1.01)$. Comment on the numbers you obtain.


It can be shown mathematically that

\begin{displaymath}S = \sum_{n=1}^{\infty} \frac{1}{n^{2}} =

Verify that Maple produces the same result.

Define the the partial sum function

\begin{displaymath}partialsum(N) = \sum_{n=1}^{N}\frac{1}{n^{2}}, \quad N=1,2,\ldots\end{displaymath}

Produce a pointplot of $partialsum(N)$, for $N=1,2,\ldots,100$.

The error when approximating $S$ by $partialsum(N)$ is defined as

\begin{displaymath}Err(N) = partialsum(N) - S \end{displaymath}

Calculate $Err(10)$, $Err(100)$, $Err(1000)$ . Comment on the numbers you obtained.

COMMENTS and additional information

Your name, date, class and section should be at the top of your paper. The final project should have only one author. You may discuss the project with your classmates, but what you turn in should contain your own original answers. Plagiarism is considered a serious offence.
Before each Maple computation, you should insert an explanation of what you are about to do. Neatness and good English will be taken into account. It is not sufficient to have it right; you should communicate it well.
Maple should be used in all calculations and plots.
For additional information on Plotting, solving equations and calculating integrals in maple: see the maple worksheet `` Introduction to Maple in Calculus II''(intro142.mws) , located in
MAPLE HELP will be available in some of the labs. The schedule and location will be announced at the web site .
To submit this project, you may use the Mathematics Department's electronic submission system, available at ( you must register as soon as possible ).


> restart;                 # good to have this at the top of worksheet; 
> with(student);           # adds leftsum, rightsum, trapezoid functions (and others)
> with(plots);             # adds extra functionality for plots
> f:=x->x^2;               # define a function
> f:=x->evalf(x^2);        # define a function, force it to give decimal result
> plot([f(x),g(x)],x=0..5);# plot two functions 
> p1:=pointplot({seq([n,g(n)],n=1..10)}):
                           # plot points (1,g(1)), (2,g(2)),...,(10,g(10)), 
                           # and store the plot under the name p1
> display([p1,p2]);        # show two plots called p1 and p2 in one set of coordinate axes
> Pi                       # the number 3.1415...
> exp(2.5);                # exponential function evaluated at 2.5
> taypol:=n->convert( taylor(f(x),x=1,n+1),polynom);
                           # taypol(5) gives the Taylor polynomial of degree 5 of
			   # the function f(x) about x = 1;
> sub(x=2,p);              # substitute x=2 into p (here p could be a polynomial, for example)			   
> sum(1/n,n=1..infinity);  # infinite sum from n=1 to n=infinity of 1/n

Orlando Merino