0% found this document useful (0 votes)
13 views41 pages

Derivative

Uploaded by

moxima3638
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views41 pages

Derivative

Uploaded by

moxima3638
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 41

Derivative of a

function
Math for Electronics 1
Andrew Thangaraj
Electrical Engineering, IIT Madras
Introduction
Example 1: Cardboard box
a

a and b are given.


cut along dotted
b For what x, do we get maximum
lines & fold
volume for the box?

Volume of box is a function of x: V (x) = (a − 2x)(b − 2x)x

Maximise V (x) over x


Example 2: Measurement errors

Option 1 Option 2
Measure diameter with Measure volume with an
an error of ±100 μm error of ±100000 μm3
d = 2r V = 43 πr3
Spherical drop of liquid
Which is the better option for
Goal: Measure radius
measuring radius?

Convert error in f (x)


into error in x.
Example 3: Population growth
India's population: increasing from 1950 till 2023.

Why are the predictions showing


population peaking and then
falling?

Important to look at
population growth rate.

Has the growth rate been


increasing or decreasing?
Recall Problem 3: Critical points, Growth/fall
f (x)
Critical points
Function hits a peak or trough, and
changes behaviour around such points

x1 x2 x3 x4 x

Growth/fall Derivative of a function is


Increasing: x < x1 , x2 < x < x3 , x > x4 the main concept used in
Decreasing: x1 < x < x2 , x3 < x < x4 the solution.
Definition of derivative
Zooming into f (x) = x2 at x0 = 1

Magnitude of step: h = 1

Right side
f (x0 + h) − f (x0 )
f (x0 + h) − f (x0 ) = 3 =3
h

Left side
f (x0 − h) − f (x0 )
f (x0 ) − f (x0 − h) = 1 =1
−h
Zooming into f (x) = x2 at x0 = 1

Magnitude of step: h = 0.5

Right side
f (x0 + h) − f (x0 )
f (x0 + h) − f (x0 ) = 1.25 = 2.5
h

Left side
f (x0 − h) − f (x0 )
f (x0 ) − f (x0 − h) = 0.75 = 1.5
−h
Zooming into f (x) = x2 at x0 = 1

Magnitude of step: h = 0.125

Right side
f (x0 + h) − f (x0 )
f (x0 + h) − f (x0 ) = 0.26.. = 2.125
h

Left side
f (x0 − h) − f (x0 )
f (x0 ) − f (x0 − h) = 0.23.. = 1.875
−h
Zooming into f (x) = x2 at x0 = 1

Magnitude of step: h = 0.0625

Left side Right side

f (x0 − h) − f (x0 ) f (x0 + h) − f (x0 )


= 1.9375 = 2.0625
−h h

As we zoom in, or h → 0

Graph looks like a straight line around x0 .


Slope on either side → 2
Derivative of a function and differentiability

Definition
A function f is said to have a derivative L at a point x0 if the following
holds:
f (x0 + h) − f (x0 )
lim =L
h→0 h

f (x0 + h) − f (x0 )
Notation f ′ (x0 ) = lim denotes the derivative of f at x0
h→0 h

Definition
A function f is said to be differentiable at x0 if f ′ (x0 ) exists.
Example: Derivative of f (x) = x2
2 2
(x0 + h) − x0
f ′ (x0 ) = lim
h→0 h
(x0 + h)2 − x20 2x0 h + h2
= = 2x0 + h = lim 2x0 + h
h h h→0
= 2x0

What does this mean?

Zoom into f (x) = x2 at x = x0 :


line through (x0 , x20 ), slope 2x0
Slope of tangent line and derivative

f (x) Draw a straight line that approximates


the zoomed-in f (x) at x0

Line: tangential to f (x) at (x0 , f (x0 ))

If slope is the same on both sides,


Derivative ≈ slope of line
x
f (x)

Derivative does If f is discontinuous or slopes are different,


not exist at a, b Derivative does not exist

a b
Examples: Continuity and differentiability
f (x) = {
x2 , ∣x∣ < 1
f (x) = ∣x∣ 2, ∣x∣ > 1

x x


⎪−x, x ≤ −1
f (x) = ⎨∣x∣1/5 ,
f (x) = {
x7 , ∣x∣ < 1 ∣x∣ < 1
−1, ∣x∣ ≥ 1 ⎪

x/5 + 4/5, x≥1

x x
Differentiation rules
Constant and identity functions

f (x) = c f (x) = x

f (x0 + h) − f (x0 ) c−c f (x0 + h) − f (x0 ) c+h−c


= =0 = =1
h h h h

f ′ (x0 ) = lim 0 = 0 f ′ (x0 ) = lim 1 = 1


h→0 h→0

Both functions are differentiable at all points on the real line.


From known to new: Differentiation rules

Known (cf (x0 ))′ = cf ′ (x0 )


Scaling,

(c) = 0 ′
(x) = 1 Addition, (f (x0 ) + g(x0 ))′ = f ′ (x0 ) + g ′ (x0 )
Subtraction (f (x0 ) − g(x0 ))′ = f ′ (x0 ) − g ′ (x0 )
Suppose f ′ (x0 ) and
g ′ (x0 ) exist and are finite (f (x0 )g(x0 ))′ = f (x0 )g ′ (x0 ) + f ′ (x0 )g(x0 )
Multiplication, (f (g(x0 )))′ = f ′ (g(x0 ))g ′ (x0 )
Composition,
Division f (x0 ) ′ g(x0 )f ′ (x0 ) − g ′ (x0 )f (x0 )
( ) =
g(x0 ) g(x0 )2

If f , g differentiable at x0 , the following are differentiable at x0 :


cf (x), f (x) ± g(x), f (x)g(x), f (g(x)) (if f ′ (g(x0 )) exists), f (x)/g(x) (if g(x0 ) 
= 0)
From known to new: Differentiation rules

Known (cf (x))′ = cf ′ (x)


Scaling,

(c) = 0 ′
(x) = 1 Addition, (f (x) + g(x))′ = f ′ (x) + g ′ (x)
Subtraction (f (x) − g(x))′ = f ′ (x) − g ′ (x)
Suppose f ′ (x) and g ′ (x)
exist and are finite (f (x)g(x))′ = f (x)g ′ (x) + f ′ (x)g(x)
Multiplication, (f (g(x)))′ = f ′ (g(x))g ′ (x)
Composition,
Division f (x) ′ g(x)f ′ (x) − g ′ (x)f (x)
( ) =
g(x) g(x)2

If f , g differentiable at x, the following are differentiable at x:


cf (x), f (x) ± g(x), f (x)g(x), f (g(x)) (if f ′ (g(x)) exists), f (x)/g(x) (if g(x) =
 0)
Proof of product rule

′ f (x + h)g(x + h) − f (x)g(x)
(f (x)g(x)) = lim
h→0 h

f (x + h)g(x + h) − f (x)g(x) = (f (x + h) − f (x))g(x + h) + f (x)(g(x + h) − g(x))

f (x + h)g(x + h) − f (x)g(x) f (x + h) − f (x) g(x + h) − g(x)


= g(x + h) + f (x)
h h h

(f (x)g(x))′ = f ′ (x)g(x) + f (x)g ′ (x)


Proof of composition rule or chain rule

f (g(x + h)) − f (g(x)) f (g(x + h)) − f (g(x)) g(x + h) − g(x)


(f (g(x)))′ = lim =
h→0 h g(x + h) − g(x) h

~
~+h ~)
~
~ = g(x), h f (g(x + h)) − f (g(x)) f (x ) − f (x
x = g(x + h) − g(x) = ~
g(x + h) − g(x) h

~ ~ ~)
f (x + h) − f (x ′ ~ (technical)
lim ~ = f (x)
h→0 h

(f (g(x)))′ = f ′ (g(x))g ′ (x)


Derivative of x , a: real
a
Derivative of xn , n = 1, 2, …

(x)′ = 1

(x2 )′ = (x ⋅ x)′ = x ⋅ (x)′ + (x)′ ⋅ x = 2x

(x3 )′ = (x2 ⋅ x)′ = x2 ⋅ (x)′ + (x2 )′ ⋅ x = 3x2

(xn )′ = nxn−1 (induction assumption)

(xn+1 )′ = (xn ⋅ x)′ = xn ⋅ (x)′ + (xn )′ ⋅ x = (n + 1)xn (next step verification)

(xn )′ = nxn−1
Derivative of xr/s , r, s = 1, 2, … and xa , a: positive real

g(x) = xr/s , f (x) = xs , composition f (g(x)) = (xr/s )s = xr

f (g(x))′ = (xr )′ = rxr−1

(g(x)s )′ = rxr−1
(xr/s )′ = (r/s)x(r/s)−1

sg(x)s−1 g ′ (x) = rxr−1


Since a > 0 is the limit of a sequence of
s(xr/s )s−1 g ′ (x) = rxr−1 positive rationals,technical

(xa )′ = axa−1
g ′ (x) = (r/s)x(r/s)−1
Derivative of xa , a: real

If a < 0, xa xb = 1, b ≜ −a > 0

(xa xb )′ = 0

(xa )′ xb + xa (xb )′ = 0
(xa )′ = axa−1 , a > 0

(xa )′ x−a + xa ⋅ bxb−1 = 0

(xa )′ = axa−1 , a < 0

(xa )′ = axa−1
Polynomials, rationals and
other examples
Polynomial functions

2 3
Assume pm 
= 0.
p(x) = p0 + p1 x + p2 x + p3 x + ⋯ + pm xm
Degree m

Using the combining rules and the known derivatives,

p′ (x) = p1 + 2p2 x + 3p3 x2 + ⋯ + mpm xm−1

Polynomials are differentiable at all points on the real line.


Rational functions
p0 + p1 x + p2 x2 + ⋯ + pm xm
f (x) =
q0 + q1 x + q2 x2 + ⋯ + qn xn Assume pm , qn 
=0
Numerator degree m
Numerator p(x) = p0 + p1 x + p2 x2 + ⋯ + pm xm Denominator degree n

Denominator q(x) = q0 + q1 x + q2 x2 + ⋯ + qn xn

Using the combining rules and the known derivatives,

′ ′
′ q(x)p (x) − q (x)p(x)
f (x) = 2
if q(x) 
=0
q(x)

Rationals are differentiable at all points where denominator is nonzero.


Problems: Find derivative, where it exists

1+x
f (x) = f (x) = 1 − x2
1−x

x x−1
f (x) = f (x) =
1− 3
x (x + 1)(x + 2)

(x − 1)(x − 2)
f (x) =
(x + 1)(x + 2)(x + 3)
Properties and details
Another form of the definition of derivative

′ f (x0 + h) − f (x0 )
f (x0 ) = lim
h→0 h

The above definition is equivalent to the following:


f (x) − f (x0 )
f ′ (x0 ) = lim
x→x0 x − x0

f (x) − f (x0 ) f (x0 + (x − x0 )) − f (x0 ) Change of variables: h = x − x0


=
x − x0 x − x0 x → x0 implies h → 0

Taking limit as x → x0 on both sides and using the


change of variables, the equivalence is proved.
Derivative and linear approximation

Equation of line
f (x)
y = f (x0 ) + f ′ (x0 )(x − x0 )
f (x0 )

This approximation can be


x0 x made more rigorous. Wait for
the "Mean Value Theorem"
′ f (x) − f (x0 )
f (x0 ) = lim
x→x0 x − x0

f (x) − f (x0 )
For x very close to x0 , f ′ (x0 ) ≈ or f (x) ≈ f (x0 ) + f ′ (x0 )(x − x0 )
x − x0
Differentiability implies continuity
f (x) − f (x0 )
Suppose f is differentiable at x0 , i.e. f (x0 ) = lim

exists
x→x0 x − x0

f (x) − f (x0 )
f (x) − f (x0 ) = (x − x0 )
x − x0

Taking limits on both sides as x → x0


f (x) − f (x0 ) Caution
lim f (x) − f (x0 ) = lim (x − x0 )
x→x0 x→x0 x − x0 Continuity does not imply
f (x) − f (x0 ) differentiability.
= lim lim (x − x0 )
x→x0 x − x0 x→x0
Counterexample: ∣x∣ at 0
= f ′ (x0 ) ⋅ 0 = 0

So, lim f (x) = f (x0 ), and f is continuous at x0


x→x0
Domains of functions and limit/derivative

Domain of a function f : set of values of input for which f is defined

So far, our functions have the entire real line as domain,


i.e. f (x) is defined for all x ∈ R

In some cases, the domain of a function may be restricted.


For example, f may be defined only for x > 0, or for a < x < b.

Limits and derivatives of a function f at x0 is well-defined only if the


interval x0 − δ < x < x0 + δ , for some δ > 0, is included in the domain
Higher-order derivatives
Derivative as a function
f : function from R to R

f (x0 + h) − f (x0 ) exists for x ∈ D


Suppose f (x0 ) = lim

0
h→0 h

Then, f ′ : function from D to R

f (x) = ∣x∣ f ′ (x)


D = R ∖ {0}
What about the
derivative of f ′ ?
x x
Higher-order derivatives: first, second, third...

f : function from R to R

f (x0 + h) − f (x0 )
First derivative: f ′ (x0 ) = lim function from D1 to R
h→0 h
′ ′
f (x0 + h) − f (x0 ) function from D2 to R
Second derivative: f (x0 ) = lim
′′
h→0 h
′′ ′′
f (x0 + h) − f (x0 ) function from D to R
Third derivative: f (x0 ) = lim
′′′ 3
h→0 h

and so on....
Examples

f (x) = x2 f (x) = 1/x


f ′ (x) = 2x f ′ (x) = −1/x2
f ′′ (x) = 2 f ′′ (x) = 2/x3
f ′′′ (x) = 0 f ′′′ (x) = −6/x4
More examples

f (x) = x
f (x) = 1+x+x2 +x3
f ′ (x) = 1/2 x
f ′ (x) = 1+2x+3x2
f ′′ (x) = 2 + 6x f ′′ (x) = −1/4 x3
f ′′′ (x) = 6 f ′′′ (x) = 3/8 x5
Linear and quadratic approximations
Approximations for function f (x) near x0
′′
′ f (x0 )
g(x) = f (x0 ) + f (x0 )(x − x0 ) ′
h(x) = f (x0 ) + f (x0 )(x − x0 ) + (x − x0 )2
2

At x = x0 At x = x0

f (x0 ) = g(x0 ) f (x0 ) = h(x0 )

f ′ (x0 ) = g ′ (x0 ) f ′ (x0 ) = h′ (x0 )

f ′′ (x0 ) may not be equal to g ′′ (x0 ) = 0 f ′′ (x0 ) = h′′ (x0 )

f ′′′ (x0 ) may not be equal to h′′′ (x0 ) = 0


Illustration of approximations

f (x) = 1/x

quadratic
linear

You might also like