0% found this document useful (0 votes)
70 views2 pages

MAST20026 Real Analysis With Applications, August 10, 2011. This Document Was Produced by Steve Carnie and Adapted by Alex Ghitza

This document describes three laboratory exercises exploring sequences and series: (1) Examines the sequence of partial sums of the series for Euler's number e and determines the minimum N for approximations within given errors ε. (2) Similarly examines the sequences of partial sums for the series representing log(2) and π/4 and determines the minimum N. (3) Compares the sequences 1/√n, 1/n, and 1/2n to demonstrate an > bn > cn for all n.

Uploaded by

vanessa8pangestu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
70 views2 pages

MAST20026 Real Analysis With Applications, August 10, 2011. This Document Was Produced by Steve Carnie and Adapted by Alex Ghitza

This document describes three laboratory exercises exploring sequences and series: (1) Examines the sequence of partial sums of the series for Euler's number e and determines the minimum N for approximations within given errors ε. (2) Similarly examines the sequences of partial sums for the series representing log(2) and π/4 and determines the minimum N. (3) Compares the sequences 1/√n, 1/n, and 1/2n to demonstrate an > bn > cn for all n.

Uploaded by

vanessa8pangestu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

LABORATORY CLASS 1

NUMBERS, SEQUENCES, AND SERIES

The aims of this lab are:


(i) to explore sequences in order to enhance your understanding of convergence and to illus-
trate the dependence of N on ε;
(ii) to explore monotonic sequences trying to determine whether they are bounded and thus
convergent;
(iii) to explore sequences of partial sums, which produce infinite series.
In all examples examine the MATLAB code and analyze the effect of various commands.
Before starting, copy the folder Lab1 from the lab server M&S Lab Materials\620-295????
to D:MATLAB and set the path to D:MATLAB including subfolders.

1. Euler’s number: code Lab1Ex1


We start with the sequence (an ), where
 n
1
an = 1 + for all n ∈ N.
n
The limit of this sequence is Euler’s number e ≈ 2.718281828459045 . . ..
Lab1Ex2.m is a function M-file which takes a positive integer N as input and computes and
plots the sequence up to the N -th term. It also computes the error, that is, |aN − e| as output:
type error=Lab1Ex1(100) at the command line, then hit Return to run with N = 100. Use ↑
to recall the command and edit N .
Let N be the smallest natural number such that |an − e| < ε for all n ≥ N . To explore the
dependence of N on ε consider (i) ε = 0.1, (ii) ε = 0.01, (iii) ε = 0.001 and (iv) ε = 0.0001
and determine by experiment how large N needs to be to get an approximation within the
prescribed error ε. Determine N in each case:
Answers: (i) (ii) (iii) (iv)

2. Partial sums: code Lab1Ex2


A common class of sequences is formed from partial sums. Here are two examples also related
to irrational numbers:
1 1 1 1
an = 1 − + − + . . . ± for all n ∈ N,
2 3 4 n
1 1 1 1
bn = 1 − + − + . . . ± for all n ∈ N,
3 5 7 2n − 1

where the last term is positive or negative depending on whether n is odd or even.
The first sequence gets closer and closer to
log(2) ≈ 0.6931471805 . . . ,
and the second to
π
≈ 0.7853981633 . . . .
4
For each of the four values (i) ε = 0.1, (ii) ε = 0.01, (iii) ε = 0.001 and (iv) ε = 0.0001 use
Lab1Ex2 to experimentally determine the smallest natural number N such that |an −log(2)| < ε
for all n ≥ N :
MAST20026 Real analysis with applications, August 10, 2011.
This document was produced by Steve Carnie and adapted by Alex Ghitza.
1
2 LABORATORY CLASS 1 NUMBERS, SEQUENCES, AND SERIES

Answers: (i) (ii) (iii) (iv)


Repeat for bn :
Answers: (i) (ii) (iii) (iv)
Lab1Ex2.m is a function M-file which computes and plots both sequences up to n = N with
N as input and both errors as output: type [error1,error2]=Lab1Ex2(100) at the command
line to run with N = 100.
3. Compare the partial sums: code Lab1Ex3
We explore three sequence
1 1 1
an = 1 + √ + √ + . . . + √ , for all n ∈ N,
2 3 n
1 1 1
bn = 1 + + + . . . + , for all n ∈ N,
2 3 n
1 1 1
cn = 1 + 2 + 2 + . . . + 2 , for all n ∈ N.
2 3 n

One possible way to determine if the series converges to a limit or not is to compare with
another series whose behaviour we know.
What do (an ), (bn ), and (cn ) get closer and closer to? Run Lab1Ex3(100). It demonstrates
that
an > bn > cn for all 1 ≤ n ≤ 100.
Try to prove these inequalities for all n ≥ 1.
Later you will use inequalities like this to prove convergence or divergence of complicated
series.

You might also like