Lecture 9.
Arithmetic and geometric series and mathematical induction
1
Recap
We have to use seven steps from taking a problem scenario and to analyzing its run time complexity. These steps are for those problems which are attempted without recursive approach.
A recursive function or method s that method which called itself from within body until its base condition fulfill.There are two components of a recursive method i.e. base and recursive part.A recursive relation is form by considering base condition and total recursive calls with some constants
2
Recap
Constants for recursive relation are a, b and c or others.– One constant refer to cost of base condition (i.e a)– One constant refer to total recursive calling (i.e. b)– One constant refer to cost of those steps which are performed outside the recursive calls.
Always consider worst case analysis for recursive relations.
3
An Arithmetic An Arithmetic Sequence is definedSequence is defined as as
a sequence in which a sequence in which there is a common there is a common difference between difference between consecutive terms.consecutive terms.
What is arithmetic Sequence
4
Which of the following sequences are arithmetic? .
3, 1, 1, 3, 5, 7, 9, . . .
15.5, 14, 12.5, 11, 9.5, 8, . . .
84, 80, 74, 66, 56, 44, . . .
8, 6, 4, 2, 0, . . .
50, 44, 38, 32, 26, . . .
YES 2d
YES
YES
NO
NO
1.5d
6d 5
The general form of an ARITHMETIC sequence.
1aFirst Term:
Second Term:
2 1a a d
Third Term:
Fourth Term:Fifth Term:
3 1 2a a d
4 1 3a a d
5 1 4a a d
nth Term: 1 1na a n d
6
Arithmetic Series )
1a First term
na nth term
nS sum of n terms
n number of terms
d common difference
n 1
n 1 n
nth term of arithmetic sequence
sum of n terms of arithmetic sequen
a a n 1 d
nS a a
2ce
7
Given an arithmetic sequence with
15 1a 38 and d 3, find a .
1a First term
na nth term
nS sum of n terms
n number of terms
d common difference
x
15
38
NA
-3
n 1a a n 1 d
38 x 1 15 3
X = 808
63Find S of 19, 13, 7,...
1a First term
na nth term
nS sum of n terms
n number of terms
d common difference
-19
63
??
x
6
n 1a a n 1 d
?? 19 6 1
?? 353
3 6
353
n 1 n
nS a a
2
63
633 3S
219 5
63 1 1S 052
Example-1
9
16 1Find a if a 1.5 and d 0.5
1a First term
na nth term
nS sum of n terms
n number of terms
d common difference
1.5
16
x
NA
0.5
n 1a a n 1 d 16 1.5 0.a 16 51
16a 9
Example-2
10
n 1Find n if a 633, a 9, and d 24
1a First term
na nth term
nS sum of n terms
n number of terms
d common difference
9
x
633
NA
24
n 1a a n 1 d
633 9 21x 4
633 9 2 244x X = 27
Example-3
11
1 29Find d if a 6 and a 20
1a First term
na nth term
nS sum of n terms
n number of terms
d common difference
-6
29
20
NA
x
n 1a a n 1 d
120 6 29 x 26 28x
13x
14
Example-4
12
Find two arithmetic means between –4 and 5
-4, ____, ____, 5
1a First term
na nth term
nS sum of n terms
n number of terms
d common difference
-4
4
5
NA
x
n 1a a n 1 d
15 4 4 x x 3
The two arithmetic means are –1 and 2, since –4, -1, 2, 5
forms an arithmetic sequence
Example-5
13
Find n for the series in which 1 na 5, d 3, S 440
1a First term
na nth term
nS sum of n terms
n number of terms
d common difference
5
x
y
440
3
n 1a a n 1 d
n 1 n
nS a a
2
y 5 31x
x40 y4
25
12
x440 5 5 x 3
x 7 x440
2
3
880 x 7 3x 20 3x 7x 880
X = 16
Graph on positive window
Example-6
14
Find three arithmetic means between 1 and 41, ____, ____, ____, 41a First term
na nth term
nS sum of n terms
n number of terms
d common difference
1
5
4
NA
x
n 1a a n 1 d
4 1 x15 3x
4
The three arithmetic means are 7/4, 10/4, and 13/4
since 1, 7/4, 10/4, 13/4, 4 forms an arithmetic sequence
Example-7
15
Geometric Series
1a First term
na nth term
nS sum of n terms
n number of terms
r common ratio
n 1
n 1
n1
n
nth term of geometric sequence
sum of n terms of geometric sequ
a a r
a r 1S
r 1ence
16
Find the next three terms of 2, 3, 9/2, ___, ___, ___
3 – 2 vs. 9/2 – 3… not arithmetic
3 9 / 2 31.5 geometric r
2 3 2
3 3 3 3 3 3
2 2 2
92, 3, , , ,
2
9 9 9
2 2 2 2 2 2
92, 3, , ,
27 81 243
4 8,
2 16
Example-1
17
1 9
1 2If a , r , find a .
2 3
1a First term
na nth term
nS sum of n terms
n number of terms
r common ratio
1/2
x
9
NA
2/3
n 1n 1a a r
9 11 2
x2 3
8
8
2x
2 3
7
8
2
3 128
6561
Example-2
18
Find two geometric means between –2 and 54-2, ____, ____, 54
1a First term
na nth term
nS sum of n terms
n number of terms
r common ratio
-2
54
4
NA
x
n 1n 1a a r
1454 2 x
327 x 3 x
The two geometric means are 6 and -18, since –2, 6, -18, 54
forms an geometric sequence
Example-3
19
2 4 1
2Find a a if a 3 and r
3
-3, ____, ____, ____
2Since r ...
3
4 83, 2, ,
3 9
2 4
8 10a a 2
9 9
Example-4
20
9Find a of 2, 2, 2 2,...
1a First term
na nth term
nS sum of n terms
n number of terms
r common ratio
x
9
NA
2
2 2 2r 2
22
n 1n 1a a r
9 1
x 2 2
8
x 2 2
x 16 2
Example-5
21
5 2If a 32 2 and r 2, find a ____, , ____,________ ,32 2
1a First term
na nth term
nS sum of n terms
n number of terms
r common ratio
x
5
NA
32 2
2
n 1n 1a a r
5 1
32 2 x 2
4
32 2 x 2
32 2 x4
8 2 x
Example-6
22
*** Insert one geometric mean between ¼ and 4****** denotes trick question
1,____,4
4
1a First term
na nth term
nS sum of n terms
n number of terms
r common ratio
1/4
3
NA
4
x
n 1n 1a a r
3 114
4r 2r
14
4 216 r 4 r
1,1, 4
4
1, 1, 4
4
Example-7
23
7
1 1 1Find S of ...
2 4 8 1a First term
na nth term
nS sum of n terms
n number of terms
r common ratio
1/2
7
x
NA
11184r
1 1 22 4
n
1
n
a r 1S
r 1
71 12 2
x12
1
1
71 12 2
12
1
63
64
Example-8
24
1, 4, 7, 10, 13, …. Infinite Arithmetic No Sum
3, 7, 11, …, 51 Finite Arithmetic n 1 n
nS a a
2
1, 2, 4, …, 64 Finite Geometric n
1
n
a r 1S
r 1
1, 2, 4, 8, …Infinite Geometric
r > 1r < -1
No Sum
1 1 13,1, , , ...
3 9 27Infinite Geometric
-1 < r < 1
1aS
1 r
Series and their sum
25
B
nn A
a
UPPER BOUND(NUMBER)
LOWER BOUND(NUMBER)
SIGMA(SUM OF TERMS) NTH TERM
(SEQUENCE)
Sigma Notation
26
j
4
1
j 2
21 2 2 3 2 24 18
7
4a
2a 42 2 5 2 6 72 44
n
n 0
4
0.5 2
00.5 2 10.5 2 20.5 2 30.5 2
40.5 2 33.527
0
n
b
36
5
0
36
5
13
65
23
65
...
1aS
1 r
6
153
15
2
x
3
7
2x 1
2 1 2 8 1 2 9 1 ...7 2 123
n 1 n
2n 1S a a 15
2
3
2
747
527
Sigma Notation (Example-1)
28
1
b
9
4
4b 3
4 3 4 5 3 4 6 3 ...4 4 319
n 1 n
1n 1S a a 19
2
9
2
479
784
Sigma Notation (Example-2)
29
Rewrite using sigma notation: 3 + 6 + 9 + 12
Arithmetic, d= 3
n 1a a n 1 d
na 3 n 1 3
na 3n4
1n
3n
Form a Sigma Notation (Example-1)
30
Rewrite using sigma notation: 16 + 8 + 4 + 2 + 1
Geometric, r = ½ n 1
n 1a a r n 1
n
1a 16
2
n 1
n
5
1
116
2
Form a Sigma Notation (Example-2)
31
Rewrite using sigma notation: 19 + 18 + 16 + 12 + 4
Not Arithmetic, Not Geometric
n 1na 20 2
n 1
n
5
1
20 2
19 + 18 + 16 + 12 + 4 -1 -2 -4 -8
Form a Sigma Notation (Example-3)
32
Rewrite the following using sigma notation:3 9 27
...5 10 15
Numerator is geometric, r = 3Denominator is arithmetic d= 5
NUMERATOR: n 1
n3 9 27 ... a 3 3
DENOMINATOR: n n5 10 15 ... a 5 n 1 5 a 5n
SIGMA NOTATION: 1
1
n
n 5n
3 3
Form a Sigma Notation (Example-4)
33
34
Principle of Mathematical Induction
Let P(n) be a predicate defined for integers n.
Suppose the following statements are true:1. Basis step:
P(a) is true for some fixed aZ .2. Inductive step: For all integers k ≥
a,if P(k) is true then P(k+1) is
true.Then for all integers n ≥ a, P(n) is true.
35
Example: Sum of Odd Integers
Proposition: 1 + 3 + … + (2n-1) = n2 for all integers n≥1.
Proof (by induction):1) Basis step:
The statement is true for n=1: 1=12 .2) Inductive step:
Assume the statement is true for some k≥1
(inductive hypothesis) , show that it is true for k+1 .
Example: Sum of Odd Integers Proof (cont.):The statement is true for k:
1+3+…+(2k-1) = k2 (1)We need to show it for k+1:
1+3+…+(2(k+1)-1) = (k+1)2
(2)Showing (2):
1+3+…+(2(k+1)-1) = 1+3+…+(2k+1) = 1+3+…+(2k-1)+(2k+1) =
k2+(2k+1) = (k+1)2 .We proved the basis and inductive steps, so we conclude that the given statement true. ■
by (1)
36
37
Important theorems proved by mathematical induction
Theorem 1 (Sum of the first n integers):
For all integers n≥1,
Theorem 2 (Sum of a geometric sequence):
For any real number r except 1, and any integer n≥0,
2
)1(...21
nnn
1
11
0
r
rr
nn
i
i
38
Proving a divisibility property by mathematical induction
Proposition: For any integer n≥1, 7n - 2n is divisible by 5. (P(n))
Proof (by induction): 1) Basis step:
The statement is true for n=1: (P(1))71 – 21 = 7 - 2 = 5 is divisible by 5.
2) Inductive step:Assume the statement is true for some k≥1 (P(k))
(inductive hypothesis) ; show that it is true for k+1 . (P(k+1))
39
Proving a divisibility property by mathematical induction
Proof (cont.): We are given thatP(k): 7k - 2k is divisible by 5.
(1)Then 7k - 2k = 5a for some aZ . (by definition) (2)
We need to show: P(k+1): 7k+1 - 2k+1 is divisible by 5.
(3) 7k+1 - 2k+1 = 7·7k - 2·2k = 5·7k + 2·7k - 2·2k
= 5·7k + 2·(7k - 2k) = 5·7k + 2·5a (by (2))
= 5·(7k + 2a) which is divisible by 5. (by def.)
Thus, P(n) is true by induction.
Summary
The sum of finite arithmetic series can be found by using following formula
The sum of finite Geometric series can be found by using following formula
The sum of infinite Geometric series can be found by using following formula
40
n 1 n
nS a a
2
n1
n
a r 1S
r 1
1aS
1 r
Summary
Mathematical induction principle is used to varify or proof the predicates or proposition such as a value is divisible by 5
41
In Next Lecturer
In next lecture, we will discuss the analysis of recursive relation using different methods.
42