Week 5 Full
Week 5 Full
/Taylor Series/Limits II
1 / 57
The factorial of an integer number
n! = n · (n − 1) · (n − 2) · . . . 2 · 1
▶ 1! = 1
▶ 3! = 3 · 2 · 1 = 6
▶ 4! = 4 · 3 · 2 · 1 = 24
▶ 100! = 100 · 99 · . . . · 2 · 1 ≈ 9.332621544394410 · 10157 has
158 digits!
2 / 57
The function e x
∞
x2 x3 x4 X xk
ex = 1 + x + + + + ... =
| 2 {z3! 4! } k=0 k!
series
This means
e = e 1 = 1 + 1 + 1/2 + 1/6 + 1/24 + · · · ≈ 2.718281828459046
4 / 57
The function e x
∞
x2 x3 x4 X xk
ex = 1 + x + + + + ... =
| 2 {z3! 4! } k=0 k!
series
∞ n
x
X xk X xk
e = = lim
k! n→∞ k!
k=0
| {z } |k=1{z }
no polynomial in x polynomial of degree n in x
5 / 57
The derivative of the function e x
d x
For the derivative it holds thate = e x because:
dx
!
d x d x2 x3 x4
e = 1+x + + + + ...
dx dx 2 3! 4!
!
d d d x2 d x3 d x4
= 1+ x+ + + + ...
dx dx dx 2 dx 3! dx 4!
!
x2 x3
= 0+1+x + + + ...
2 3!
= ex
with
d x k+1 xk xk
= (k + 1) · =
dx (k + 1)! (k + 1)! k!
6 / 57
The inverse of e x is the function ln(x)
y = e x ⇐⇒ x = ln(y )
−5
−5 0 5
e ln(x) = x, ln(e x ) = x
7 / 57
The inverse of e x is the function ln(x)
d d
(g ◦ f )(x) = x ⇐⇒ g ′ (f (x)) · f ′ (x) = 1 =⇒
dx dx
1 1
(g )′ (f (x)) = ⇐⇒ (g )′ (e x ) =
chain rule f ′ (x) d e x −5
−5 0 5
e x =e x
dx
1 1
⇐⇒ (g )′ (y ) = x ⇐⇒ (ln)′ (y ) =
y :=a y g =ln y
so
d 1
ln(x) =
dx x
8 / 57
Exponential and logarithmic functions
ax with domain (−∞, ∞) and range (0, ∞) is increasing thus
1-to-1
2x and log2(x) (1/2)x and log1/2(x)
4 4
3 3
2 2
1 1
0 0
−1 −1
−2 −2
−2 −1 0 1 2 3 4 −2 −1 0 1 2 3 4
9 / 57
Exponential and logarithmic functions
Remember:
e x ′ = e x =⇒
x ′ ′
ax ′ = e ln(a ) = e x ln(a) = e x ln(a) · ln(a) = ax · ln(a)
Remember:
(ln(x))′ = 1/x.
With function f (x) = ax and inverse of this g (x) = a log(x):
1 1
(g )′ (y ) = = x
chain rule f ′ (x) a · ln(a)
1
= =⇒
y :=e x y ln(a)
d 1
dx loga (x) = x
a ln(a)
11 / 57
Function x → f (x)g (x) and its derivative
g (x)
f (x)g (x) = e ln(f (x)) = e g (x) ln(f (x))
x x = (e ln(x) )x = e x ln(x)
▶ or expression x x is e−power:
x)
x x = e ln(x = e x ln(x)
Derivative:
′
x ′
x ln(x) x ln(x) 1
(x ) = e =e 1 · ln(x) + x · = x x (ln(x) + 1)
x
13 / 57
Logarithmic equations
Basic principle
Examples:
▶ ln(x) + ln(x + 2) = 1
▶ ln2 (x) + ln(x 2 ) − 3 = 0
√
▶ Solve y from e y = x6 for x ≥ 1
15 / 57
Logarithmic inequalities
16 / 57
Exercises: Exponential and logarithmic equations
▶ Write ln 98 in terms of ln(2) and ln(3)
▶ Simplify ln(sin(x)) − ln sin(x)
4
6
▶ Simplify e − ln(5x )
▶ Simplify e ln(5x)−ln(2y )
▶ Solve y from ln(y ) = 2x + 7
▶ Solve y from ln(y − 3) − ln(5) = 3x + ln(x)
▶ Solve e 2x = 9
3
▶ Derivative of y = cos(e −4x )
▶ Derivative of y = ln(x 8 )
▶ Derivative of y = ln x9
dy
▶ dx for x 3y = y 5x
▶ Solve ln(2x) + 3 ln((x + 32 )1/3 ) = 1
17 / 57
Computer algorithms for Mathematical Operations
1. Arithmetic operations
→ addition, multiplication as in schoolbook
2. Algebraic functions
→ polynomials ax n + bx n−1 + . . . + c = 0
3. Special functions
→ sin(x), cos(x), e x , ln(x), . . . ???
18 / 57
Approximate f (x) with 1st degree polynomial p1 (x)
First degree polynomial p approximates f at x = a:
p(x) = c0 + c1 (x − a) has two degrees of freedom.
2
x
0
−3 −2 −1 0 1 2 3
x
20 / 57
Approximate f (x) with 2nd degree polynomial p2 (x)
(x − a)2 ′′
p2 (x) = f (a) + (x − a)f ′ (a) + f (a)
| {z } 2
tangent line p1 (x)
21 / 57
Approximate f (x) with 3rd, 4th, . . . degree polynomial
Suppose we want to use more derivatives of f and p identical:
p5
1
0.5
0
sin
−0.5 p3
p
7
at a = 0 −1−1 0 1 2 3 4
24 / 57
Approximate f (x) with 3rd, 4th, . . . degree polynomial
p5
1
0.5
0
sin
−0.5 p3
p
7
at a = 0 −1−1 0 1 2 3 4
25 / 57
Approximate f (x) with 3rd, 4th, . . . degree polynomial
p5
1
0.5
0
sin
−0.5 p3
p
7
−1
−1 0 1 2 3 4
26 / 57
Approximate f (x) with 3rd, 4th, . . . degree poly. (VI)
p5
1
0.5
0
sin
−0.5 p3
p
7
−1
−1 0 1 2 3 4
27 / 57
Taylor polynomial pn approximates f around point a
1
pn (x) = f (a) + f ′ (a)(x − a) + f ′′ (a)(x − a)2
2!
1 ′′′ 1
+ f (a)(x − a)3 + · · · + f (n) (a)(x − a)n
3! n!
28 / 57
Taylor series: Matching all derivatives . . .
The function p∞ that approximates the function f in a and which
matches all derivatives f (0) (a) = f (a), f ′ (a), f ′′ (a), f (3) (a),
f (4) (a), . . . in a is:
1
p∞ (x) = f (a) + f ′ (a)(x − a) + f ′′ (a)(x − a)2
2!
1 ′′′ 1
+ f (a)(x − a)3 + · · · + f (n) (a)(x − a)n + · · ·
3! n!
1
p∞ (x) = pn (x) + f (n+1) (c)(x − a)n+1
| {z } (n + 1)!
f (x)
x2 x3
ex = 1+x + 2! + 3! + ···
x3 x5
sin(x) = x− 3! + 5! − ···
x2 x4
cos(x) = 1− 2! + 4! − ···
x2 x3
ln(1 + x) = x − 2 + 3 − ···
1
1−x = 1 + x + x2 + · · ·
31 / 57
Taylor series in a = 0 for known functions
p(x) = f (0) + f ′ (0)x + 12 f ′′ (0)x 2 + 1 ′′′
3! f (0)x
3 + ···
p5
1
0.5
0
sin
−0.5 p3
p7
−1
−1 0 1 2 3 4
33 / 57
Some notation for every Taylor polynomial
n
1 2 1 X 1
ex ≈ 1+x + x + · · · + xn = xk
2! n! k!
k=0
n X (−1)k
1 3 1
sin(x) ≈ x − x + · · · + (−1)n x 2n+1 = x 2k+1
3! (2n + 1)! (2k + 1)!
k=0
34 / 57
Taylor polynomial/series of polynomials
E.g.: f (x) = x 2
Preparation: f ′ (x) = 2x, f ′′ (x) = 2, f ′′′ (x) = 0, etc.
1 ′′
p(x) = f (0) + f ′ (0)x + 2! 1 ′′′
f (0)x 2 + 3! f (0)x 3 + · · ·
1 1
=0+0·x + 2! · 2x 2 + 3! · 0 · x 3 + 0 + 0 + · · · = x 2!
We find that for all polynomials it holds that:
Taylor series of polynomial = polynomial itself
Evt Taylor polynomial can also exist ̸= polynomial itself!:
3
p
E.g.: Taylor polynomial of x 5 + 3x 3 + 1:
5
0th-degree: p0 (x) = 1 2
p3
1st-degree: p1 (x) = 1 p0
1
2nd-degree: p2 (x) = 1
3rd-degree: p3 (x) = 3x 3 + 1 0
4th-degree: p4 (x) = 3x 3 + 1
5th-degree: p5 (x) = x 5 + 3x 3 + 1 −1
−1 −0.5 0 0.5 1
6th-and higher degrees: also x 5 + 3x 3 + 1
35 / 57
Taylor series cut off and O-notation
x3 x5
E.g.: sin(x) = x − 3! + 5! − ···
36 / 57
Taylor series cut off and O-notation
x 100x 2 + 5x 3 100x 2 5x 3
1 105 100 5
0.1 1.005 1 0.005
0.01 0.010005 0.01 0.000005
0.001 0.000100005 0.0001 0.000000005
37 / 57
Calculation with O-notation
x3 x5
E.g.: sin(x) = x − 3! + 5! − ···
x3
sin(x) = x − 3! + O(x 5 ) als x → 0
But you can also say:
sin(x) = x + O(x 3 ) if x → 0
then you cut the series off earlier, and you neglect more terms
x 2 +O(x 3 )
E.g.: x = x + O(x 2 )
38 / 57
Determination of Taylor series
39 / 57
Determination of Taylor series
40 / 57
Examples Taylor series
x
E.g.: Taylor series of ex around x = 0
x
WRONG:
1 + x + 12 x 2 + · · ·
because this is not a polynomial in x, but a rational function
GOOD: x e −x = x (1 − x + 12 x 2 − · · · )
3
E.g.: Taylor series of e x with 3rd degree around x = 0
1 + x 3 + 21 x 6 + · · · = 1 + x 3 + O(x 6 )
here only 2 terms remain
41 / 57
Step-by-step: Taylor series in a ̸= 0
42 / 57
Linear, quadratic approximations: examples
√
Taylor
√ polynomial of degree 0, 1, 2 for f (x) = 1 + x in x = 0
Of 1 + x we do not know a standard Taylor series
=⇒ use the definition
f ′ (x) = 12 (1 + x)−1/2 , f ′′ (x) = − 41 (1 + x)−3/2
Degree 0: p(x) = f (0) = 1
Degree 1: p(x) = 1 + f ′ (0)x = 1 + 12 x
Degree 2: p(x) = 1 + 21 x + 21 · (− 41 )x 2
√ 1
Useful: 1+x ≈1+ x
2
√
Assume we want to approximate
√ 1.1
Linear approximation: 1.1 ≈ 1 + 21 · 0.1 = 1.05
√
Quadratic approximation: 1.1 ≈ 1 + 21 0.1 − 18 · (0.1)2 = 1.04875
√
True value: 1.1 = 1.04880 · · ·
43 / 57
Exercises: Taylor polynomial and Taylor series
44 / 57
Limits, with l’Hôpital and Taylor
sin(x)
Reminder: lim =1 why??
x→0 x
sin(x)/x
0.5
−0.5
−1 −0.5 0 0.5 1
45 / 57
Limits with l’Hôpital
f (x)
Assume f (a) = 0 and g (a) = 0; the question is: lim =?
x→a g (x)
f (x)−f (a)
f (x) f (x) − f (a) x−a f ′ (x)
lim = lim = lim = lim
x→a g (x) x→a g (x) − g (a) x→a g (x)−g (a) x→a g ′ (x)
x−a
Therefore rule of l’Hôpital:
f (x) f ′ (x)
lim = lim ′
x→a g (x) x→a g (x)
ex ∞
E.g.: lim (of type ∞ )
x→∞ x 2
ex ex
= lim = lim =∞
x→∞ 2x x→∞ 2
47 / 57
Limits with Taylor
You can also use Taylor for the limit, it’s an alternative to l’Hôpital
Taylor makes it hereby possible to divide by a factor
sin(x) x − 16 x 3 + · · · 1 − 16 x 2 + · · ·
E.g.: lim = lim = lim =1
x→0 x x→0 x x→0 1
With O-notation:
sin(x) x + O(x 3 ) 1 + O(x 2 )
lim = lim = lim =1
x→0 x x→0 x x→0 1
48 / 57
Limit with Taylor
4
1
2
ln(1 + 2x 2 ) + 1
1+x 2
−1 1
2
(2x 2 − 4x2 + O(x 6 )) − x 2 + x 4 + O(x 6 )
lim = lim
x→0 sin(x 2 ) − x 2 cos(x 2 ) x→0 x 2 + O(x 6 ) − x 2 (1 − 12 x 4 + O(x 8 ))
O(x 6 )
= lim = ?? no luck! “constants are in the O”
x→0 O(x 6 ) + O(x 10 )
Therefore now Taylor with 6th powers:
4x 4 6
1
2
(2x 2 −2
+ 8x3 + O(x 8 )) − x 2 + x 4 − x 6 + O(x 8 )
lim 6
x→0 x 2 − x6 + O(x 10 ) − x 2 (1 − 12 x 4 + O(x 8 ))
( 43 − 1) x 6 + O(x 8 ) 1
3
+ O(x 2 ) 1.1
= lim = lim = =1
x→0 (− 16 + 12 ) x 6 + O(x 10 ) x→0 1
3
+ O(x 4 ) 3 3
49 / 57
Problem cases for limits . . .
What are the problem cases and why exactly?
We have seen earlier:
▶ ̸=0
0 : can be ∞, −∞ or can not exist;
consider left and right limits
▶ 00 : l’Hôpital, factor division or Taylor
▶ ∞∞ : divide by largest in denominator or l’Hôpital
▶ 0 · ∞: (which is stronger?)
▶ ∞ − ∞: (which is stronger?)
▶ 00 : 0x = 0 if x > 0, but x 0 = 1 for all x, thus problem
▶ ∞0 : ∞x = ∞ if x > 0, but x 0 = 1 if x < ∞: problem
▶ 1∞ : 1x = 1 if x ̸= ∞
but (1 + 10−10 )∞ = ∞ and (1 − 10−10 )∞ = 0
50 / 57
Case 0 · ∞ or 0 · (−∞)
0 ∞
0 · ∞: rewrite to 0 or ∞
51 / 57
Case ∞ − ∞
52 / 57
Cases 00 , ∞0 , 1∞ : use trick with e ln(··· )
3
lim (1 + )x :
x→∞ x
Is type “1∞ ”; remember these examples with all tricks
3
E.g.: lim (1 + )x
x→∞ x
53 / 57
Case ∞0
√
▶ lim x 1/ x
is of the form ∞0 thus
x→∞
√
▶ lim ( x)1/x is of the form ∞0 thus
x→∞
54 / 57
Step-by-step plan limits
1. Always first try filling in
if it is no problem case: done!
̸=0
2. 0 : consider lim+ and lim
x→a x→a−
if eg ∞ and ∞ then the limit is also ∞
if eg ∞ and −∞ the limit does not exist
0
3. 0: l’Hôpital (several times), or Taylor,
or dividing factor
∞
4. ∞: divide through biggest power in
denominator or l’Hôpital)
0 ∞
5. 0 · ∞: rewrite to 0 or ∞
6. ∞ − ∞: rewrite as 1 term
7. ∞0 , 1∞ , 00 : trick with e ln
Note: 0
∞, 0∞ and ∞∞ are not problem cases
55 / 57
Exercises: Limits Indeterminate Form
2x − 16
▶ lim
x→8 6x 2 − 384
3x 2
▶ lim (a) with l’Hôpital; (b) with Taylor
x→0 cos(x) − 1
2x(cos(2x) − 1)
▶ lim (a) with l’Hôpital; (b) with Taylor
x→0 sin(3x) − 3x
3
e x − cos(x 3 ) − 14 ln(1 + 4x 3 )
▶ lim
x→0 sin(x 2 ) + arctan(x 2 ) − 2x 2
x 3 − 4x + 15
▶ lim (a) with l’Hôpital; (b) with dividing
x→−3 x 2 − x − 12
factor
ex + x 2
▶ determine lim with l’Hôpital
x→∞ 2e x − x
▶ lim+ x 9/(1−x)
x→1
▶ lim (1 + 2x)19/(2 ln(x))
x→∞
56 / 57
Week 5: We have seen
57 / 57