APSC173 Assignment5 Solution

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

APSC173 Assignment #5: Power series & Taylor series

Due date: midnight on Friday, March 29th, 2024

Assignment Information
• You must submit assignments by uploading them as a single pdf to Canvas. It is your responsibility to ensure
that submitted assignments are complete and legible.
• The solutions will be posted on Canvas after the due date has passed.
• You may prepare assignments in any way you like (pen/pencil/paper or electronically) as long as you clearly
demonstrate your understanding of the material. Be sure to show your work and not just the final answer.

• You are encouraged to work on the assignment exercises with each other. However, you must write and submit
your own report. You also should be able to answer ‘yes’ to the following questions:
– Do I understand all of the material I am handing in?
– Could I do this assignment over again without any help?

• Only a subset of the questions will be graded.

Exercises
1. (RoC & IoC) Find the series’ radius and interval of convergence:

X xn
i. √
n=0
n2 + 3
Solution: Using the ratio test,
√ √
xn+1 n2 + 3 n2 + 3
lim p · n
= x lim √ =x
n→∞ (n + 1)2 + 3 x n→∞ n2 + 2n + 4

the series converges for |x| < 1. Therefore, the RoC is R = 1. To determine the IoC, we must consider the
endpoints. For x = 1,
∞ ∞
X xn X 1
√ = √
n=0
n2 + 3 n=0 n2 + 3

1
P
which diverges by limit comparison to n. For x = −1, the series converges by the alternating series test.
Therefore, the IoC is [−1, 1).

X n!
ii. xn
n=1
3 · 6 · 9 · · · 3n
Solution: The series can be written as
∞ ∞  n
X n! X x
xn =
n=1
3 · 6 · 9 · · · 3n n=1
3

which is geometric and converges for |x| < 3 and diverges otherwise. Therefore, the RoC is R = 3 and the IoC
is (−3, 3).

1

X (x − 1)2n
iii. . For this series, also compute the total sum within the interval of convergence.
n=0
4n
Solution: The series is geometric, which can be seen by re-writing it as
∞ ∞  n
X (x − 1)2n X (x − 1)2
=
n=0
4n n=0
4

(x−1)2
Thus, it converges for 4 < 1 and diverges otherwise. The IoC is
(x − 1)2
<1
4
(x − 1)2 < 4
|x − 1| < 2
−2 < x − 1 < 2
−1 < x < 3
The IoC is centred at x = 1 and its radius is R = 2. Since the series is geometric, the total sum on the IoC is

X (x − 1)2n 1 4
n
= (x−1)2
=
n=0
4 1− 4 3 + 2x − x2

2. (Taylor series/polynomials) Find the Taylor series or polynomials generated by the following functions:

i. f (x) = x, centred at x = 4, of order 3
Solution: The necessary derivatives are

f (4) = x =2
x=4
1 1
f ′ (4) = √ =
2 x x=4 4
1 3 1
f ′′ (4) = − x− 2 =−
4 x=4 32
3 5 3
f (3) (4) = − x− 2 =
8 x=4 256
The Taylor polynomial of order 3 is
f ′′ (4) f (3) (4)
P3 (x) = f (4) + f ′ (4)(x − 4) + (x − 4)2 + (x − 4)3
2! 3!
1 1 1
= 2 + (x − 4) − (x − 4)2 + (x − 4)3
4 64 512

ex + e−x
ii. f (x) = cosh x = , centred at x = 0
2
Solution: The derivatives follow the pattern
f (0) = 1
ex − e−x
f ′ (0) = =0
2 x=0
ex + e−x
f ′′ (0) = =1
2 x=0
..
.
(
(n) 1, n even
f (0) =
0, otherwise

2
Therefore, the Maclaurin series is

x2 x4 X x2n
1+ + + ··· =
2! 4! n=0
(2n)!

iii. f (x) = cos(2x + π/2), centred at x = π/4


Solution: The derivatives follow the pattern

f (π/4) = cos(2x + π/2) = −1


x=π/4

f ′ (π/4) = −2 sin(2x + π/2) =0


x=π/4

f ′′ (π/4) = −4 cos(2x + π/2) =4


x=π/4
..
.
f (2n) (π/4) = (−1)n 22n

Therefore, the Taylor series is



4 16 X (−1)n 22n
−1 + (x − π/4)2 − (x − π/4)4 + · · · = (x − π/4)2n
2! 4! n=0
(2n)!

iv. f (x) = cos 5x2 , centred at x = 0. For this and subsequent questions you may use the formula for a frequently
used Taylor series.
Solution: Using the formula for the Taylor series of cos u,

X (−1)n u2n
cos u =
n=0
(2n)!

X (−1)n (5x2 )2n
cos 5x2 =
n=0
(2n)!

v. f (x) = x tan−1 x2 , centred at x = 0


Solution: Using the formula for the Taylor series of tan−1 x,

X (−1)n x2n+1
tan−1 x =
n=0
2n + 1
∞ ∞
X (−1)n (x2 )2n+1 X (−1)n x4n+3
x tan−1 x2 = x =
n=0
2n + 1 n=0
2n + 1

1
vi. f (x) = √ , centred at x = 0, of order 4
1 + x3
Solution: The Taylor series of this function is the Binomial Series with m = −1/2 and evaluated at x3 ,
     
−1/2 3 −1/2 −1/2
P4 (x) = 1 + x + (x3 )2 + (x3 )3
1 2 3
1 (−1/2)(−1/2 − 1) 6 (−1/2)(−1/2 − 1)(−1/2 − 2) 9
= 1 − x3 + x + x
2 2! 3!
1 3 5
= 1 − x3 + x6 − x9
2 8 16

3
x3
3. (error) For what values of x can you use sin x ≈ x − 6 with an error less than 5 × 10−4 ?
Solution: By Taylor’s Theorem,

sin x = P3 (x) + R3 (x)


d4
x3 dx4 sin x
sin x = x − + x=c
x4
6 4!
for some c ∈ R. The derivative(s) of sin x are bounded between −1 and 1, so

x3 1 4
sin x − x + ≤ x
6 24

For this error to be less than 5 × 10−4 we require |x| < 4 4! · 5 × 10−4 ≈ 0.33.
In fact, the range of x can be shown to be even bigger since P3 (x) = P4 (x) for the series generated by sin x. Then,

sin x = P4 (x) + R4 (x)


d5
x3 dx5 sin x
sin x = x − + x=c
x5
6 5!

5
Then we require |x| < 5! · 5 × 10−4 ≈ 0.569.

You might also like