Text Books:
1. Erwin Kreyszig, Advanced Engineering Mathematics , 10th
Edition, USA, John Wiley & Sons, INC, 2011.
2. B.S. Grewal, Higher Engineering Mathematics, 43rd Edition.
New Delhi, Khanna Publishers, 2015.
3. B.V. Ramana, Higher Engineering Mathematics, Noida,
McGraw Hill Education, 2017.
9
Differentiable Function
10
Differentiable Function
Definition
Let f : R −→ R be a function. Then f is said to be differentiable
at a ∈ R if the limit
f (x) − f (a) f (a + h) − f (a)
f ′ (a) = lim = lim
x→a x −a h→0 h
exists and finite.
10
Differentiable Function
Example
Show that the function f (x) = x 2 is differentiable everywhere in
R.
11
Differentiable Function
Example
Show that the function f (x) = x 2 is differentiable everywhere in
R.
Answer:
• Let a ∈ R be an arbitrary point.
11
Differentiable Function
Example
Show that the function f (x) = x 2 is differentiable everywhere in
R.
Answer:
• Let a ∈ R be an arbitrary point.
• Then
f (x) − f (a)
f ′ (a) = lim
x→a x −a
x − a2
2
= lim
x→a x − a
= lim (x + a)
x→a
= 2a
11
Differentiable Function
Example
Show that the function f (x) = x 2 is differentiable everywhere in
R.
Answer:
• Let a ∈ R be an arbitrary point.
• Then
f (x) − f (a)
f ′ (a) = lim
x→a x −a
x − a2
2
= lim
x→a x − a
= lim (x + a)
x→a
= 2a
11
• As a was arbitrary, f is differentiable everywhere.
Differentiable Function
Example
Check the differentiability of f (x) =| x | at 0.
12
Differentiable Function
Example
Check the differentiability of f (x) =| x | at 0.
Answer:
• We have
f (x) − f (0)
f ′ (0) = lim
x→0 x −0
|x |
= lim .
x→0 x
12
Differentiable Function
Example
Check the differentiability of f (x) =| x | at 0.
Answer:
• We have
f (x) − f (0)
f ′ (0) = lim
x→0 x −0
|x |
= lim .
x→0 x
• Now, left-hand and right-hand limits are:
|x | −x
lim = lim = −1
x→0 − x x→0 − x
and
|x | x 12
lim+ = lim+ =1
Differentiable Function
|x|
• Since left-hand and right-hand limits are different, limx→0 x
does not exist.
13
Differentiable Function
|x|
• Since left-hand and right-hand limits are different, limx→0 x
does not exist.
• So, f is not differentiable at x = 0.
13
Differentiable Function
Exercises!
Check the differentiability of the following functions
1.
x + 1, if x < 0
f (x) =
2x − 3, if x ≥ 0
at x = 0.
2.
1, if x < 5
f (x) =
0, if x ≥ 5
at x = 5
3.
sin x, if 0 ≤ x < π
f (x) =
cos x, if π ≤ x < 2π
14
Continuous Function
15
Continuous Function
Definition
Let f : R −→ R be a function. Then f is said to be continuous
at x = a ∈ R if
lim f (x) = f (a).
x→a
15
Continuous Function
Definition
Let f : R −→ R be a function. Then f is said to be continuous
at x = a ∈ R if
lim f (x) = f (a).
x→a
Continuous
f is continuous at x = a, means
• f (a) is well-defined.
• both limx→a+ f (x) and limx→a− f (x) exist.
• limx→a f (x) = limx→a+ f (x) = limx→a− f (x) = f (a).
15
Continuous Function
Example
Check the continuity at x = 1 of the function
x 2 , if x < 1
f (x) =
2x − 1, if x ≥ 1
16
Continuous Function
Example
Check the continuity at x = 1 of the function
x 2 , if x < 1
f (x) =
2x − 1, if x ≥ 1
Answer:
• limx→1+ f (x) = limx→1+ (2x − 1) = 1
16
Continuous Function
Example
Check the continuity at x = 1 of the function
x 2 , if x < 1
f (x) =
2x − 1, if x ≥ 1
Answer:
• limx→1+ f (x) = limx→1+ (2x − 1) = 1
• limx→1− f (x) = limx→1− x 2 = 1
16
Continuous Function
Example
Check the continuity at x = 1 of the function
x 2 , if x < 1
f (x) =
2x − 1, if x ≥ 1
Answer:
• limx→1+ f (x) = limx→1+ (2x − 1) = 1
• limx→1− f (x) = limx→1− x 2 = 1
• f (1) = 2 · 1 − 1 = 1
16
Continuous Function
Example
Check the continuity at x = 1 of the function
x 2 , if x < 1
f (x) =
2x − 1, if x ≥ 1
Answer:
• limx→1+ f (x) = limx→1+ (2x − 1) = 1
• limx→1− f (x) = limx→1− x 2 = 1
• f (1) = 2 · 1 − 1 = 1
• So, limx→1 f (x) = limx→1+ f (x) = limx→1− f (x) = f (1)
• Thus, f is continuous at x = 1.
16
Continuous Function
Example
Check the continuity at x = 2 of the function
x 2 −4 , if x ̸= 2
f (x) = x−2
5, if x = 2
17
Continuous Function
Example
Check the continuity at x = 2 of the function
x 2 −4 , if x ̸= 2
f (x) = x−2
5, if x = 2
Answer:
• f (2) = 5
• Again, limx→2 f (x) = 4 ̸= f (2)
• Thus, f is not continuous at x = 2.
17
Continuous Function
Example
Check the continuity and differentiability at x = 0 of the function
f (x) =| x |
18
Continuous Function
Example
Check the continuity and differentiability at x = 0 of the function
f (x) =| x |
Answer:
• f (0) = 0
18
Continuous Function
Example
Check the continuity and differentiability at x = 0 of the function
f (x) =| x |
Answer:
• f (0) = 0
• Right-hand limit, limx→0+ f (x) = limx→0+ x = 0
18
Continuous Function
Example
Check the continuity and differentiability at x = 0 of the function
f (x) =| x |
Answer:
• f (0) = 0
• Right-hand limit, limx→0+ f (x) = limx→0+ x = 0
• Left-hand limit, limx→0− f (x) = limx→0− (−x) = 0
18
Continuous Function
Example
Check the continuity and differentiability at x = 0 of the function
f (x) =| x |
Answer:
• f (0) = 0
• Right-hand limit, limx→0+ f (x) = limx→0+ x = 0
• Left-hand limit, limx→0− f (x) = limx→0− (−x) = 0
• Thus, f is continuous at x = 0.
18
Continuous Function
Example
Check the continuity and differentiability at x = 0 of the function
f (x) =| x |
Answer:
• f (0) = 0
• Right-hand limit, limx→0+ f (x) = limx→0+ x = 0
• Left-hand limit, limx→0− f (x) = limx→0− (−x) = 0
• Thus, f is continuous at x = 0.
f (x)−f (0)
• But f is not differentiable at x = 0 as limx→0 x−0 does
not exist.
18
Continuous Function
Important Conclusion
• Continuity does not ensure Differentiability.
19
Continuous Function
Important Conclusion
• Continuity does not ensure Differentiability.
• Differentiability implies Continuity.
19
Continuous Function
Theorem
• A differentiable function is always continuous, but the
converse is not true.
20
Continuous Function
Theorem
• A differentiable function is always continuous, but the
converse is not true.
20
Approximation
21
Approximation
Definition
• Linear approximation is a method used in calculus to
approximate the value of a function near a given point using
the tangent line at that point.
21
Approximation
Definition
• Linear approximation is a method used in calculus to
approximate the value of a function near a given point using
the tangent line at that point.
22
Approximation
Why We Need Linear Approximation
• It gives a simple and fast way to estimate the value of a
function near a known point — especially when the exact
calculation is hard or impossible.
Example
Compute the values of
√
• 4.05
• sin(0.02)
• e 0.01
23
Approximation
Figure 1: Linear Approximation
24
Approximation
Linear Approximation
• Let f (x) be a function, which is differentiable on an interval I ,
containing a point a.
• Linear approximation of f near the point a is:
y − f (a)
f ′ (a) =
x −a
=⇒ y = f (a) + f ′ (a)(x − a).
• L(x) = y = f (a) + f ′ (a)(x − a) is called the Linear
approximation of f near a
25
Underestimates and overestimates
• If f (x) is concave up in a neighbourhood of (a, f (a)), then the
tangent line lies below the graph of f , and the approximated
value is an underestimate. In this case, the value obtained by
linear approximation is less than the actual value of f (x) in a
neighbourhood of a.
26
Underestimates and overestimates
• If f (x) is concave up in a neighbourhood of (a, f (a)), then the
tangent line lies below the graph of f , and the approximated
value is an underestimate. In this case, the value obtained by
linear approximation is less than the actual value of f (x) in a
neighbourhood of a.
• If the tangent line lies above the graph of f , then the
approximated value is an overestimate. We remake that linear
approximation gives good estimates when x is close to a but
the accuracy of the approximation gets worse when the points
are farther away from a.
26
Approximation
Example
√
Compute the value 4.05.
Answer:
√
• Let f (x) = x. Here, a = 4 is near the point of 4.05.
√
• f (4) = 4 = 2 and f ′ (x) = 12 √1x =⇒ f ′ (4) = 14 .
• Linear Approximation:
L(x) = f (a) + f ′ (a)(x − a)
1
= 2 + (x − 4)
4
√
• So, f (x) = x ≈ 2 + 14 (x − 4)
√
• Putting x = 4.05, we have 4.05 ≈ 2 + 14 (4.05 − 4) = 2.0125
27
Approximation
Answer:
• Actual value is: 2.01246118 (Use Calculator)
• The approximated value is: 2.0125
• Error is | 2.0125 − 2.01246118 |= 0.00003882
28
Approximation
Example
Compute the value sin(0.02).
Answer:
• Let f (x) = sin x. Here, a = 0 is near the point of 0.02.
• f (0) = sin 0 = 0 and f ′ (x) = cos x =⇒ f ′ (0) = 1.
• Linear Approximation:
L(x) = f (a) + f ′ (a)(x − a)
= 0 + 1(x − 0) = x
• So, f (x) = sin x ≈ x near a = 0
• Putting x = 0.02, we have sin(0.02) ≈ 0.02
29
Approximation
Exercises!
Calculate following using linear approximation.
√
4
1. 1.1
2. e 0.01
30
Approximation
Exercises!
Prove the following linear approximation
1. cos x ≈ 1 when x ≈ 0
2. e x ≈ 1 + x when x ≈ 0
3. ln(1 + x) ≈ x when x ≈ 0
31
Approximation
• More Accurate Approximation: Quadratic Approximation
32
Approximation
Definition
• Let f be a function that is twice differentiable near a point
x = a the quadratic approximation of f (x) is
1
f (x) ≈ f (a) + f ′ (a)(x − a) + f ′′ (a)(x − a)2
2
33
Approximation
Example
√
Calculate 4.05 using quadratic approximation.
Answer:
√
• Let f (x) = x, and a = 4.
• Then f (4) = 2, f ′ (4) = 14 , and f ′′ (4) = − 32
1
.
• So, the quadratic approximation is
1
f (x) ≈ f (4) + f ′ (4)(x − 4) + f ′′ (4)(x − 4)2
2
1 1 1
≈ 2 + (x − 4) + (− )(x − 4)2
4 2 32
34
Approximation
• Putting x = 4.05
1 1 1
f (4.04) ≈ 2 + (4.05 − 4) + (− )(4.05 − 4)2
4 2 32
1
= 2 + 4(0.05) − (0.05)2
64
= 2 + 0.0125 − 0.0000390625
√
4.05 ≈ 2.01246094
√
• Actual Value: 4.05 = 2.01246118 (Use Calculator)
√
• Linear Approximation: 4.05 = 2.01245
• Quadratic ≫ Linear Approximation (Better Accuracy)
35
Approximation
Exercises!
Calculate the following terms using quadratic approximation
1. e 0.1
2. cos(0.2)
3. ln(1.1)
√
4. 3 8.1
36
Approximation
Exercises!
Prove the following linear approximation
1. sin x ≈ x when x ≈ 0
x2
2. cos x ≈ 1 − 2 when x ≈ 0
2
3. e ≈ 1 + x + x2 when x ≈ 0
x
2
4. ln(1 + x) ≈ x − x2 when x ≈ 0
5. (1 + x)r ≈ 1 + rx + r (r 2−1) x 2 when x ≈0
37
Approximation
Exercises!
π
Find the quadratic approximation of f (x) = ln(sin x) near x = 2
38
Taylor’s Theorem
Taylor’s Theorem
• It approximates a function using a polynomial.
• It expresses a function as the sum of its derivatives at a single
point, multiplied by powers of the distance from that point.
39
Taylor’s Theorem
Definition
Let f (x) be a (n + 1)-times differentiable function at a point a.
Then, for any x near a, the function can be written as:
f ′′ (a) f (n) (a)
f (x) =f (a) + f ′ (a)(x − a) + (x − a)2 + · · · + (x − a)n + Rn (x)
2! n!
=Pn (x) + Rn (x)
(n+1)
• Rn (x) = f (n+1)!
(c)
(x − a)n+1 is called the error/remainder term,
where c is in between a and x.
• If a = 0, the series is called a Maclaurin series
• We call: Taylor’s series is convergent if Rn (x) −→ 0 as
n −→ ∞
40
The Remainder Estimation Theorem:
If there is a positive constant M such that f (n+1) (c) ≤ M for all c
between x and a, inclusive, then the remainder term Rn (x) in
Taylor’s Theorem satisfies the inequality
|x − a|n+1
|Rn (x)| ≤ M .
(n + 1)!
If this inequality holds for every n and the other conditions of
Taylor’s Theorem are satisfied by f (x), then the series converges to
f (x).
41
Error Estimation for Linear Approximation
Let f : R − > R be differentiable at a ∈ R. Consider the linear
polynomial P1 (x) defined by
P1 (x) = f (a) + f ′ (a)(x − a).
We may assume that a < x. Let
M = sup{|f ′′ (c)| : c ∈ [a, x]} < ∞. Then
M
|E1 (x)| = |f (x) − P1 (x)| ≤ (x − a)2 .
2
The above estimate gives an idea “how good the approximation
P1 (x) is, i.e., how fast the error E1 (x) goes to 0 as x− > a”.
42
Example
To illustrate the linear approximation and the error estimation,
√
consider f (x) = x and a = 1. Then P1 (x) = x/2 + 1/2 which is
the linear approximation to f near a. Note that P1 (1.1) = 1.05
√
which is an approximate value of 1.1. However, the actual value
√
of 1.1, up to five decimal places is 1.04880. If we take x = 1.1,
then M = sup{|f ′′ (c)| : c ∈ [1, 1.1]} ≤ 1/4 and
E1 (x) ≤ (0.1)2 /8 = 1/800 .
43
44
Error Estimation for Quadratic Approximation
Let f : R − > R be twice differentiable at a ∈ R. Consider the
linear polynomial P2 (x) defined by
f ′′ (a)
P2 (x) = f (a) + f ′ (a)(x − a) + (x − a)2
2
which is the Taylor’s polynomial of degree 2 and is called the
quadratic approximation to f near a. If f , x and a are considered
as in Taylor’s theorem with n = 2 and
M = sup{|f (3)(c)| : c ∈ [a, x]} < ∞. Then the error function
M
|E2 (x)| = |f (x) − P2 (x)| ≤ |(x − a)3 |.
6
√
In case f (x) = x, a = 1 and x = 1.1, then
3
|E2 (x)| ≤ 8×6 (0.1)3 = 1/16000 . Verify that P2 (1.1) = 1.04875
and compare this value with P1 (1.1).
45
Taylor’s Theorem
Example
Find the Taylor’s series of e x at a = 0 (Maclaurin series).
Answer:
• Let f (x) = e x . Then f ′ (x) = f ′′ (x) = · · · = f (n) (x) = e x .
• So, f ′ (0) = f ′′ (0) = · · · = f (n) (0) = e 0 = 1
• So, the Taylor’s series is
f ′′ (0) 2 f (n) (0) n
e x = f (0) + f ′ (0)x + x + ··· + x + Rn (x)
2! n!
x2 xn
=1+x + + ··· + + Rn (x)
2! n!
• We prove that Rn (x) −→ 0 as n → ∞
46
Taylor’s Theorem
f (n+1) (c) n+1
• Here, Rn (x) = (n+1)! x , where c is in between 0 and x
• If 0 ≤ c ≤ x =⇒ e ≤ e c x
• If x ≤ c ≤ 0 =⇒ e c ≤ e 0 = 1
• Take M = max(1, e |x| )
ec | x |n+1
| Rn (x) |= x n+1 ≤ M
(n + 1)! (n + 1)!
• So, we have | Rn (x) |−→ 0 as n → ∞ (Factorials grow
faster than exponentials)
47
Taylor’s Theorem
• So, the Taylor’s Series is
∞
x2 xn xk
ex = 1 + x +
P
2! + ··· + n! + ··· = k!
k=o
• The Taylor’s series of ex is convergent.
48
Taylor’s Theorem
Example
Find the Taylor’s series of sin x centered at a = 0.
• Here, f (x) = sin x, a = 0.
• The Taylor’s Series is
f ′′ (0) 2 f (n) (0) n
sin x = f (0) + f ′ (0)x + x + ··· + x + Rn (x)
2! n!
x3 x5 x7
=x− + − + · · · + Rn (x)
3! 5! 7!
f (n+1) (c) n+1
• Rn (x) = (n+1)! x , where c is in between 0 and x
|x|n+1
• | Rn (x) |≤ (n+1)!
• So, | Rn (x) |−→ 0 as n → ∞
49
50
Taylor’s Theorem
• The Taylor’s Series of sin x is
x3 x5 x7
sin x = x − + − + ···
3! 5! 7!
51
Taylor’s Theorem
Exercises!
Find the Taylor’s series of the following function:
1. f (x) = cos x centered at a = 0
2. f (x) = ln(1 + x) centered at a = 0, where −1 < x ≤ 1
1
3. f (x) = 1−x centered at a = 0, where | x |< 1
52
Taylor’s Theorem
Example
x2
Estimate the error if P2 (x) = 1 − 2 is used to approximate cos x
at a = 0.6
Answer:
• We are estimating f (x) = cos x by a 2nd degree Taylor
polynomial P2 (x) (centered at a = 0).
• So, the error term is (for n = 2)
f 3 (c) 3
| R2 (x) |x=0.6 = x x=0.6
3!
| sin c | 3 1
= x x=0.6 ≤ (0.6)3 = 0.036
3! 6
53
Taylor’s Theorem
Example
Estimate the maximum error when approximating the function
√
f (x) = x centered at a = 4 with the Taylor polynomial for
n = 2, on the 4 ≤ x ≤ 4.2.
Answer:
3
• Error is R2 (x) = f 3!(c) (x − 4)3 , where 4 ≤ x ≤ 4.2 and c lies
between 4 and x.
5
• Now, f 3 (c) = 38 c − 2 , and f 3 (4) = 256
3
(Note: f 3 is decreasing)
• So, the maximum error
f 3 (c)
max | R2 (x) | = max (x − 4)3
4≤x≤4.2 3!
1 0.008
= f 3 (4)(4.2 − 4)3 =
6 512
54
Taylor’s Theorem
Exercises!
Estimate the maximum error for the following approximation:
1. f (x) = sin x, n = 4, a = π6 , and 0 ≤ x ≤ π
3
2
2. f (x) = e x , n = 3, a = 0, and 0 ≤ x ≤ 0.1
1
3. f (x) = x2
, n = 2, a = 1, and 0.9 ≤ x ≤ 1.1
4. f (x) = x ln x, n = 3, a = 1, and 0.5 ≤ x ≤ 1.5
55