Professional Documents
Culture Documents
Calculus Deriv Def
Calculus Deriv Def
Calculus
Outline
Derivatives
Introduction
Basic definitions
Differentiation and Continuity
Rate of changes
Differentiation rules
Chain rule and L’hospital rule
Higher derivatives
Applications of derivatives
Approximation problems and Taylor’s series
Optimization problems and curve sketching
Solving non-linear equations by Newton iteration method
Calculus
Derivatives
Introduction
Derivatives I
1. The slope of tangent line of a curve y = f (x) at a point
(a, f (a)) is
f (x) − f (a)
mtan = lim
x→a x −a
2. Let f (t) be the position of a moving vehicle depending on the
time t.
displacement f (t + h) − f (t)
average velocity = =
time h
The instantaneous velocity of the vehicle at the time t is
f (t + h) − f (t)
v (t) = lim
h→0 h
Calculus
Derivatives
Introduction
Applications of derivative
Derivatives - Definitions
Derivatives - Examples.
1. Let f (x) = sin x. Find f 0 (0).
We have: limh→0 sin h−sin
h
0
= limh→0 sinh h = 1. Hence,
0
f (0) = 1.
√
2. Let f (x) = x. Find the derivative function f 0 (x).
√ √
0 f (x + h) − f (x) x +h− x
f (x) = lim = lim
h→0 h h→0 h
√ √ √ √
x + h − x ( x + h + x)
= lim √ √
h→0 h ( x + h + x)
(x + h) − x
= lim √ √
h→0 h( x + h + x)
1 1
= lim √ √ = √ .
h→0 x +h+ x 2 x
Calculus
Derivatives
Basic definitions
Theorem
The tangent line to the curve y = f (x) at a point (a, f (a)) is the
line through (a, f (a)) whose slope is equal to f 0 (a), the derivative
of f at x = a. Consequently, the equation of the tangent line at
(a, f (a)) is
y − f (a) = f 0 (a)(x − a).
Derivatives - Exercises I
I (x + 1)n
(
I cos
( x
x sin x1 if x 6= 0 x 2 sin x1 if x 6= 0
I I
0 if x = 0 0 if x = 0
Derivatives - Exercises II
3. Using definition of derivative and the definition of the number
e as a limit
e = lim (1 + x)1/x
x→0
2
y = |x|
−2 −1 0 1 2 x
Calculus
Derivatives
Basic definitions
Proof.
f (x) − f (a)
lim [f (x) − f (a)] = lim (x − a)
x→a x→a x −a
f (x) − f (a)
= lim lim (x − a)
x→a x −a x→a
= f 0 (a) · 0 = 0.
Exercises
dx n (x + h)n − x n
= lim
dx h→0 h
x + nx n−1 h + · · · + kn x k hn−k + hn − x n
n
= lim
h
h→0
n k n−k−1
= lim (nx n−1 + · · · + x h + hn−1 )
h→0 k
= nx n−1 (using binomial formula)
Calculus
Derivatives
Differentiation rules
d
1. dx sin x = cos x
d
2. dx cos x = − sin x
d
2
3. dx tan x = cos1 x
d
2
4. dx cot x = − sin1 x
Calculus
Derivatives
Differentiation rules
Examples.
1. Differentiate y = sin x. We have
d sin(x + h) − sin x
sin x = lim
dx h→0 h
2 cos (x + h/2) sin (h/2)
= lim
h→0 h
sin (h/2)
= lim cos (x + h/2) lim
h→0 h→0 h/2
= cos x · 1 = cos x.
d d d
F 0 (x) = f 0 (g (x))g 0 (x), equivalently, F (x) = f (g ) g (x).
dx dg dx
√
Examples. Let F (x) = x 2 + 1. We can consider F = f ◦ g ,
√
where f (x) = x and g (x) = x 2 + 1. We have, f 0 (x) = 2√1 x and
g 0 (x) = 2x. By the chain rule,
1 1 x
F 0 (x) = f 0 (g (x))g 0 (x) = p 2x = √ 2x = √ .
2 g (x) 2
2 x +1 2
x +1
Calculus
Derivatives
Chain rule and L’hospital rule
Exercises I
1. Differentiate the following functions
Exercises II
Implicit differentiation
Most of the functions we have dealt with are of explicit forms, i.e.,
they can be represented as a function of x: y = f (x), that y is
expressed explicitly in terms of x. Another situation occurs when
we encounter equations like circle equations, folium curves,
horizontal parabolas, etc.
Implicit differentiation.
I Differentiate both sides of the equation with respect to x.
Treating y as a differentiable function of x.
dy
I Collect all the terms with dx on one side of the equation and
solve for dy
dx .
Calculus
Derivatives
Chain rule and L’hospital rule
Examples I
I Find the slope of the tangent line to y 2 = x at (4, −2).
Answer: Differentiate both sides with respect to variable x:
d 2 d
y = x
dx dx
dy
2y = 1 (chain rule to the left and power rule to the right)
dx
dy 1
=
dx 2y
At the point (4, −2), we get the slope of the tangent line:
mtan = dy 1 1
dx | x=4,y =−2 = 2y = − 4 .
I Find the slope of the tangent line to sin(x + y ) = y 2 cos x at
(π, 0).
Answer: On the white board!
Calculus
Derivatives
Chain rule and L’hospital rule
Examples II
Proof.
Applying the implicit differentiation to the equation
f −1 (f (x)) = x. Details are on the white board!
Calculus
Derivatives
Chain rule and L’hospital rule
Examples
1. Since ln x is the inverse of e x , we have
1 1 1
(ln x)0 = = ln x = .
(e y )0 |y =ln x e x
Exercises:
b) sin(x + y ) = y 2 cos x
c) x 2 y + xy 2 = 3x.
√
d) 2 y =x −y
Calculus
Derivatives
Chain rule and L’hospital rule
Logarithmic differentiation I
Theoretically, derivatives of product, quotient, power forms can be
found using basic differentiations. However, in many cases where
they contains many factors, the results can be found quickly if we
take the natural logarithm of both sides before differentiating.
Example: Differentiate
(x 2 + 1)(x + 3)1/2
f (x) = .
x −1
Solution:
(x 2 + 1)(x + 3)1/2
ln f (x) = ln ,
x −1
1
= ln(x 2 + 1) + ln(x + 3) − ln(x − 1).
2
Calculus
Derivatives
Chain rule and L’hospital rule
Logarithmic differentiation II
Differentiating both sides, we get
f 0 (x) 2x 1 1
= 2 + − .
f (x) x + 1 2(x + 3) x − 1
0 2x 1 1
⇔ f (x) = f (x). + −
x 2 + 1 2(x + 3) x − 1
(x 2 + 1)(x + 3)1/2
2x 1 1
⇔ f 0 (x) = + − .
x −1 x 2 + 1 2(x + 3) x − 1
L’Hôpital’s rule
Examples I
x−sin x
1. Find limx→0 x3
. Applying the L’hôpital rule for the form
0
0 , we have
Examples II
ln
√x .
2. Find limx→+∞ x
Applying the L’hôpital rule for the form
∞
∞ , we have
ln
√n
As a sequence, we have limn→∞ n
= 0.
Calculus
Derivatives
Chain rule and L’hospital rule
limx→0 3x−sin x 1 1
1. x 8. limx→0 sin x − x
x
2. limx→∞ xe 3
9. limx→π/4 sinx−π/4
x−cos x
3. limx→0 x ln x
3x
limx→0 e x−1
4. 10. limx→0 x1 − √1x
x
5. limx→0 e x−1
3
√ e x −1−x
6. limx→0 1+x−1 11. limx→0 x2
√ x √
7. limx→0 1+x−1−x/2
x2
12. limx→∞ (x − x 2 + x).
Calculus
Derivatives
Higher derivatives
Higher derivative
Given a function y = f (x). We define recursively higher derivatives
of f as follows:
1. Second derivative:
d 2y
00 00 d dy
f =y = =
dx dx dx 2
2. Third derivative:
d 2y d 3y
d
f 000 = y 00 = =
dx dx 2 dx 3
3. High derivative:
d n−1 y d ny
(n) (n) d
f (x) = y = =
dx dx n−1 dx n
Calculus
Derivatives
Higher derivatives
Example
Find the first, second, third and nth derivatives of the function
f (x) = (1 + x)k .
i) First derivative f 0 (x) = k(1 + x)k−1 (by power and chain rule)
ii) Second derivative
f 00 (x) = (k(1 + x)k−1 )0 = k(k − 1)(1 + x)k−2 (by scalar,
power and chain rule)
iii) Third derivative
f 000 (x) = (k(k − 1)(1 + x)k−2 )0 = k(k − 1)(k − 2)(1 + x)k−3
iv) By induction, the nth derivative
(
k(k − 1) · · · (k − n + 1)(1 + x)k−n if n ≤ k
f (n) (x) =
0 if n > k
Calculus
Derivatives
Higher derivatives
Exercises
Approximation problem
Linear approximation
Application cases:
I When the value of function and its derivative f (a), f 0 (a) are
easy to compute but the function value around x = a is not.
I For discrete and practical cases (there are errors in measure),
we measure the value of function at specific points while we
need calculate the value of the function around measured
points.
Calculus
Applications of derivatives
Approximation problems and Taylor’s series
I (2.0001)5 I (1.06)6
I (8.06)2/3 I sin(5o )
Quadratic approximation:
f 00 (a)
T2 (x) = f (a) + f 0 (a)(x − a) + (x − a)2 .
2!
For this approximation, we have (please check!)
Polynomial approximation
and
(n)
f (n) (a) = Tn (a).
Calculus
Applications of derivatives
Approximation problems and Taylor’s series
Exercises
c0 + c1 x + c2 x 2 + · · · + cn x n + · · · ,
3. Multiplication:
e0 = c0 d0 ,
e1 = c0 d1 + c1 d0 ,
en = c0 dn + c1 dn1 + · · · cn d0
Calculus
Applications of derivatives
Approximation problems and Taylor’s series
Examples
Exercises
Taylor series
Example
1 2 n
1. Maclaurin series of 1−x is 1 + x + x + · · · + x + · · ·
1
2. Maclaurin series of 1−x 2
is 1 + x 2 + x 4 + x 6 + · · · + x 2n + ···
1
3. Maclaurin series of (1−x)2
is 1 + 2x + · · · + (n + 1)x n + ···
4. Maclaurin series of sin x is
1 5
x − 61 x 3 + 5! 1
x + · · · + (−1)n (2n+1)! x 2n+1 + · · ·
x2 xn
5. Maclaurin series of ln(1 − x) is −x − 2 − ··· − n − ···
x2 n
6. Maclaurin series of ln(1 + x) is x − 2 + · · · + (−1)n xn + · · ·
x2 x3 xn
7. Maclaurin series of e x is 1 + x + 2! + 3! + ··· + n! + ···
Calculus
Applications of derivatives
Approximation problems and Taylor’s series
Exercises
I 1 I x
1−3x 4x+1
1
I
x−5
I ln(1 + x)
1 1+x
I
2+5x
I ln 1−x
1
I
(1−x)3
I cos x
1
I
(1−x)(1−3x)
I ex .
Calculus
Applications of derivatives
Approximation problems and Taylor’s series
f (b) − f (a)
f 0 (c) = ,
b−a
or equivalently
f (b) − f (a) = f 0 (c)(b − a).
In other words, there exists a tangent line of the curve which
parallels to the secant line going through (a, f (a)) and (b, f (b)).
Calculus
Applications of derivatives
Approximation problems and Taylor’s series
f (b) − f (a)
h(x) = f (x) − f (a) − (x − a).
b−a
Calculus
Applications of derivatives
Approximation problems and Taylor’s series
f (x2 ) − f (x1 )
f 0 (c) = = 0.
x2 − x1
I x 3√− 3x 2 + 2x + 5, [0, 4] I 3x 2 + 2x + 5,
√ [−1, 1]
I x x + 6, [−6, 0] I 3
x, [0, 1]
f (n+1) (z)
Rn (x) = (x − a)n+1 .
(n + 1)!
Calculus
Applications of derivatives
Approximation problems and Taylor’s series
k(k − 1) . . . (k − n + 1)
k
= .
n n!
Calculus
Applications of derivatives
Approximation problems and Taylor’s series
1. Substitution:
x2
ex = 1 + x + + ···
2!
Let x = 1, we get
1 1
e =1+1+ + + ···
2! 3!
Let x = − ln 2, we get
1
= 1 + 2x + 3x 2 + · · · + (n + 1)x n + · · ·
(1 − x)2
Let x = 21 , then
∞
X (n + 1)
= 4.
2n
n=1
x2 x3
ln(1 + x) = x − + + ···+
2 3
Calculus
Applications of derivatives
Approximation problems and Taylor’s series
Let x = − 12 , then
1 1 1 1
ln 2 = − ln(1/2) = + 2
+ 3
+ ··· + + ···
2 2·2 3·2 n · 2n
We have the identity of the two series
1 1 1 1 1 1
1− + − ··· = + + + ··· + + ···
2 3 2 2 · 22 3 · 23 n · 2n
Calculus
Applications of derivatives
Approximation problems and Taylor’s series
Exercises
Example.
Exercises
√
3
1. Given f (x) = x.
I Approximate f by its Taylor polynomial of degree 2 at a = 8
I How accurate is this approximation when 7 ≤ x ≤ 9.
I For which x is the accuracy√within 0.0001?
I Find an approximation for 3 7 with the accuracy within
0.0001?
2. Find an approximation for e 2 with the accuracy within 0.0001?
Calculus
Applications of derivatives
Optimization problems and curve sketching
Definition
Given a function f defined on domain D
1. f has a local maximum (resp. local minimum) at x = c if
there exists > 0 such that f (x) ≤ f (c) (resp. f (x) ≥ f (c))
for all c − ≤ x ≤ c + .
2. f has a global maximum (resp. global minimum) at x = c if
f (x) ≤ f (c) (resp. f (x) ≥ f (c)) for all x ∈ D. In this case,
f (c) is called maximum value (resp. minimum value) of f (x)
on the domain D.
Calculus
Applications of derivatives
Optimization problems and curve sketching
Remark:
1. Global maximum/minimum is not necessary being a local
maximum/minimum and converse.
2. A function could attain the maximum value at several
numbers but the maximum value (if there exists) must be
unique.
Calculus
Applications of derivatives
Optimization problems and curve sketching
20
2. local maximum at x = 1
10 H1, 5L
3. global maximum at x = −1
-1 1 2 3 4
and maximum value is 37
-10
4. global minimum at x = 3
H3, -27L
-20
Definition
A critical number of a function f is a number c in the domain of f
such that either f 0 (c) = 0 or f 0 (c) does not exist.
Corollary
If f has a local maximum or minimum at x = c, then c is a critical
number of f
Calculus
Applications of derivatives
Optimization problems and curve sketching
Increasing/Decreasing test
Theorem
Given a function f .
1. If f 0 (x) > 0 on an interval, then f is increasing on that
interval.
2. If f 0 (x) < 0 on an interval, then f is decreasing on that
interval.
Proof.
Using the mean value theorem.
Calculus
Applications of derivatives
Optimization problems and curve sketching
Definition
1. If the graph of function f lies above all of its tangents on an
interval I , then it is called convex on I . If the graph of f lies
below all of its tangents on I , it is called concave on I .
2. A point P = (c, f (c)) on the graph of f is called an inflection
point of f if f is continuous at x = c and the curve changes
from convex to concave or from concave to convex at P.
Calculus
Applications of derivatives
Optimization problems and curve sketching
Exercises.
1. Let f (x) = x 4 . Prove that f 00 (0) = 0, but (0, 0) is not an
infection point of the graph of f .
2. Show that the function g (x) = x|x| has an inflection point at
(0, 0) but g 00 (0) does not exist.
Calculus
Applications of derivatives
Optimization problems and curve sketching
Curve sketching
I x3 + x2 − x I x 4/5 (x − 4)2
y −1
I |3t − 4| I
y 2 −y +1
Calculus
Applications of derivatives
Optimization problems and curve sketching
Newton’s iteration I
Geometric scene: Approximating the root by the x-intercepts of
tangent lines using iteration.
r x3 x1 x0
Calculus
Applications of derivatives
Solving non-linear equations by Newton iteration method
Newton’s iteration II
Detailed ideas:
1. Step 1: Start with an initial approximated solution x1
2. Step 2: Consider the tangent line L1 of the curve at the point
(x1 , f (x1 )).
3. Step 3: Let x2 be the x-intercept of the tangent line L1 (x2 is
the x-abscissa of the intersection point between the line L1
and x-axis).
4. Step 4: Consider the tangent line L2 of the curve at the point
(x2 , f (x2 ))
5. Step 5: Let x3 be the x-intercept of the tangent line L3 .
Calculus
Applications of derivatives
Solving non-linear equations by Newton iteration method
f (x1 )
x2 = x1 −
f 0 (x1 )
3. The equation of the tangent line Ln−1 is
f (xn−1 )
xn = xn−1 − .
f 0 (xn−1 )
Calculus
Applications of derivatives
Solving non-linear equations by Newton iteration method
Examples I
xn2 − 2 xn 1 xn 1
xn+1 = xn − = xn − + = +
2xn 2 xn 2 xn
I Initial step: let x0 = 1. Iterate some steps, we get
Error Number of correct digits
x0 = 1 −0.41421 1
x1 = 1.5 0.08579 1
x2 = 1.41667 0.00246 3
x3 = 1.41422 0.00001 5
I Exact root r = 1.41421356...
I What happens if we take x0 = 0?
Calculus
Applications of derivatives
Solving non-linear equations by Newton iteration method
Examples II
2. Let ( √
− r − x, x < r
f (x) = √ .
x − r, x ≥ r
Let the initial value x0 = r − h, we get:
p
f (x0 ) − r − (r − h)
x1 = x0 − 0 = (r −h)− p = r −h+2h = r +h.
f (x0 ) 1/(2 r − (r − h))
Similarly,
x2 = r − h.
By induction, successive approximations go back and forth
between these two values. The Newton’s iteration does not
converge.
Calculus
Applications of derivatives
Solving non-linear equations by Newton iteration method
1.0
1
0.5
-2 -1 1 2 -2 -1 1 2
-0.5
-1
-1.0
-2 -1.5
Theorem
If f 00 (x) exists on an interval I containing r , xn+1 , xn and if
f 00 (x) ≤ M, |f 0 (x)| ≥ K for all x ∈ I , then
M
|xn+1 − r | ≤ (xn − r )2 .
2K
In other words, the Newton method converges to a root with the
quadratic speed of convergence.
Proof.
On the white-board using Taylor’s formula.
Calculus
Applications of derivatives
Solving non-linear equations by Newton iteration method
Examples
Find, correct to six decimal places, the root of the equation
cos x = x.
Consider f (x) = cos x − x. Then, f 0 (x) = − sin x − 1. By the
iteration:
cos xn − xn
xn+1 = xn + .
sin xn + 1
Let x0 = 1. We have
x1 ≈ 0.75036387
x2 ≈ 0.73911289
x3 ≈ 0.73908513
x4 ≈ 0.73908513
Since x3 and x4 agree to six decimal places (eight, in fact), we
conclude that the root of the equation, correct to six decimal
places, is 0.739085.
Calculus
Applications of derivatives
Solving non-linear equations by Newton iteration method
Exercises I
I x =0 I x =4
I x =1
I x =3 I x =5
Calculus
Applications of derivatives
Solving non-linear equations by Newton iteration method
Exercises II
0 1 2 3 4 5 6
I x 3 + 2x − 4 = 0, x0 = 1 I x 5 + 2 = 0, x0 = −1
Calculus
Applications of derivatives
Solving non-linear equations by Newton iteration method
Exercises III
4. Use Newton’s method to approximate the given number
correct to eight decimal places
√
3
√
7
I 30 I 1000
Exercises IV