MATH 131 -- Calculus for Physical and Life Sciences 1

Some Integration Examples

December 3, 2004

1.  Left- and Right-hand sums for f(x) = exp(-x)   on [-1,1]:

>    with(Student[Calculus1]):

>    RiemannSum(exp(-x),x=-1..1,partition=4,method=left);

1/2+1/2*exp(1)+1/2*exp(1/2)+1/2*exp(-1/2)

>    evalf(%);

2.986766880

>    RiemannSum(exp(-x),x=-1..1,partition=4,method=right);

1/2+1/2*exp(1/2)+1/2*exp(-1/2)+1/2*exp(-1)

>    evalf(%);

1.811565687

>    evalf(int(exp(-x),x=-1..1));

2.350402387

>    RiemannSum(exp(-x),x=-1..1,output=plot,partition=4,method=left,boxoptions=[color=blue],title=" ",font=[TIMES,ROMAN,12],showpoints=false,scaling=constrained);

[Maple Plot]

>    RiemannSum(exp(-x),x=-1..1,output=plot,partition=4,method=right,boxoptions=[color=blue],title=" ",font=[TIMES,ROMAN,12],showpoints=false,scaling=constrained);

[Maple Plot]

The following command shows an animation of the Left-hand sums as the number of

intervals in the partitions is increased.

>    RiemannSum(exp(-x),x=-1..1,output=animation,iterations=7,method=right,boxoptions=[color=blue],title=" ",font=[TIMES,ROMAN,12],showpoints=false,scaling=constrained);

[Maple Plot]

2.  Approximations to int(sin(x),x = 0 .. 2*Pi)

>    RiemannSum(sin(x),x=0..2*Pi,output=animation,iterations=7,method=left,boxoptions=[color=red],title=" ",font=[TIMES,ROMAN,12],showpoints=false,scaling=constrained);

[Maple Plot]

3.  Area between curves:

>    RiemannSum(3*x-x^2,x=0..3,output=animation,iterations=7,method=right,boxoptions=[color=blue],title=" ",font=[TIMES,ROMAN,12],showpoints=false,scaling=constrained);

[Maple Plot]

4.  Total Change of a function:

>    RiemannSum(4500*exp(-0.05*t)/(1+9*exp(-0.05*t))^2,t=0..15,partition=1000);

904.2907326

5.  Average value of a function:

>    RiemannSum(sin(x),x=0..Pi,output=animation,iterations=7,method=right,boxoptions=[color=blue],title=" ",font=[TIMES,ROMAN,12],showpoints=false,scaling=constrained);

[Maple Plot]

>    evalf(int(sin(x),x=0..Pi));

2.

>    evalf(2/Pi);

.6366197722

>    FunctionAverage(sin(x),x=0..Pi,output=plot,titlefont=[TIMES,ROMAN,12],font=[TIMES,ROMAN,12],scaling=constrained);

[Maple Plot]

>   

>