1 Derivatives of Piecewise Defined Functions
[Pages:11]MATH 1010E University Mathematics Lecture Notes (week 4) Martin Li
1 Derivatives of Piecewise Defined Functions
For piecewise defined functions, we often have to be very careful in computing the derivatives. The dierentiation rules (product, quotient, chain rules) can only be applied if the function is defined by ONE formula in a neighborhood of the point where we evaluate the derivative. If we want to calculate the derivative at a point where two dierent formulas "meet", then we must use the definition of derivative as limit of dierence quotient to correctly evaluate the derivative. Let us illustrate this by the following example.
Example
1.1
Find
the
derivative
0( ) fx
at
every
x
2
R
for
the
piecewise
defined function
( )= fx
52
when 0
x
x< ,
2 2 + 5 when 0
xx
x.
Solution: We separate into 3 cases: x < 0, x > 0 and x = 0. For the first two cases, the function f (x) is defined by a single formula, so we could just apply dierentiation rules to dierentiate the function.
0( ) = (5 2 )0 = 2 for 0
fx
x
x< ,
0( ) = ( 2 2 + 5)0 = 2 2
for
0
fx x x
x
x> .
At = 0, we have to use the definition of derivative as limit of dierence x
quotient. First of all,
(0) = 02 2(0) + 5 = 5
f
.
Then we calculate the left-hand and right-hand limits:
lim f (h) f (0) = lim (5 2h) 5 = lim 2 = 2
h!0
h
h!0
h
h!0
,
( ) (0)
( 2 2 + 5) 5
lim f h f = lim h h
= lim ( 2) = 2
!0+ h
h
!0+ h
h
!0+ h
.
h
1
Since both of them exists and are equal, we have
0(0) = lim f (h) f (0) = 2
f
!0
.
h
h
Therefore, putting all of these together, we see that is dierentiable for
f
every x 2 R and
0( ) = fx
2
when
x
0 ,
2 2 when 0
x
x> .
Remark 1.2 From the example above, we see that the derivative 0( ) is fx
still a continuous function (check this!). This is not always true for any function! (Have you seen a counterexample? See Homework 2)
Example 1.3 Consider the function defined by
( )= fx
+
when 1
ax b
x,
3 + + 2 when
1
ax x b
x> ,
for what value(s) of a, b 2 R is the function f dierentiable at every x 2 R?
Solution: First, it is easy to see that for ANY a, b 2 R, the function f
is dierentiable at every x 6=
1 since is defined by a polynomial on f
( 1 +1) and ( 1 1). The only catch is at the point = 1.
,
,
x
If is dierentiable at = 1, it must also be continuous at = 1.
f
x
x
Therefore, we need
lim ( ) = ( 1)
! x
1f
x
f
.
Now, f ( 1) = a + b and the left-hand and right-hand limits are
lim ( ) = ( 1)3 + ( 1) + 2 = + 2 1
x! 1 f x a
b ab,
lim ( ) = ( 1) + = +
! x
1+ f
x
a
b a b.
If is continuous, then both of these limits must be the same and equal to f ( 1). Hence, we have
f
+ = +2 1 )
=1
ab a b
b.
Now, we take = 1. To find the value of which make dierentiable
b
a
f
at x = 1, we require the limit
( 1 + ) ( 1)
lim f
hf
!0
h
h
2
to exists, which is equivalent to the statement that the left-hand and righthand limits exist and are equal. The left hand limit is
lim
( f
1+ ) h
( f
1) =
lim
[( a
1 + ) + 1] h
h!0
h
h!0
h
The right hand limit is
( + 1) a = lim ah = h!0 h a.
lim
( f
1+ ) h
!0+ h
h
( 1)
[ ( 1 + )3 + ( 1 + ) + 2] ( + 1)
f
= lim a
h
h
a
!0+ h
h
[( 1 + )3 + 1] +
= lim a
h
h
h!0+
h
=
lim
[( ah
1 + )2 h
( 1 + ) + 1] +
h
h
!0+ h
h
= 3 +1 a.
Therefore, if we set them equal to each other, we obtain the condition
=3 +1 aa
)
= a
1 2.
In summary, we have = 1 2 and = 1 if is dierentiable at every
a
/
b
f
x 2 R.
2 Dierentiation Rules II: Product and Quotient
Rules
Theorem 2.1 If and are dierentiable functions, then both their prodfg
uct and quotient are dierentiable and we have
fg
f /g
(1) Product Rule:
[ ( ) ( )]0 = 0( ) ( ) + ( ) 0( ) f xgx f xgx f xg x,
(2) Quotient Rule:
( ) 0 fx
=
( ) 0( ) gxf x
()
((
( ) 0( ) f xg x
))2
,
gx
gx
provided
that
() gx
6=
0.
Remark 2.2 Observe that the dierentiation rule [ ( )]0 = 0( ) where kf x kf x
k is a constant is just a special case of product rule by taking g(x) k, which has 0( ) = 0.
gx
3
Before we go into the proof of these rules, let us first look at a few examples of how to apply these rules to help us calculate derivatives.
Example 2.3
d [( + 2)( 2 + 1)] = ( + 2)0( 2 + 1) + ( + 2)( 2 + 1)0
xx
xx
xx
dx
= (1)( 2 + 1) + ( + 2)(2 )
x
x
x
= 3 2+4 +1 x x.
d [sin cos ] = (sin )0 cos + sin (cos )0
xx
x x xx
dx = cos x cos x + sin x( sin x)
= cos 2 x.
2 + 1
( + 1)( 2 + 1)0 ( 2 + 1)( + 1)0
dx
=x
+1
x
x
( + 1)2
x
dx x
x
( + 1)(2 ) ( 2 + 1)(1)
=x
xx ( + 1)2
x
2+2 1
=
xx ( + 1)2
.
x
sin
(sin )0 sin ( )0
d
x
=x
x
xx
2
dx x
x
cos sin
=x
x
2
x .
x
Note that for the last two examples, the calculation is valid only for
6= 1 and 6= 0 respectively.
x
x
Question: Does the limit limx!0 d sin x exist? If we define
dx x
sin x
( )= fx
x
1
when x 6= 0, when = 0
x,
then does 0(0) exists? If so, is it related to the limit at the beginning? f
Question: Calculation the derivatives of all the trigonometric and hyperbolic functions!
Now, we come back to the proof of the product rule and quotient rule.
4
Proof of Product Rule: Using the definition of derivative,
[ ( ) ( )]0 = lim f (x + h)g(x + h) f (x)g(x)
f xgx
h!0
h
=
lim
[( fx
+
)( hgx
+
) h
( ) ( + )] + [ ( ) ( + ) f xgx h f xgx h
( ) ( )] f xgx
!0 h
(+)
= lim ( + ) f x h
!0 g x h
h
h
h
()
(+)
f x + lim ( ) g x h
!0 f x
h
h
g(x)
= ( ) 0( ) + ( ) 0( ) gxf x f xg x.
In
the
last
equality,
we
have
also
used
that
lim !0
h
( gx
+
) h
=
() gx
since
g
is continuous (even dierentiable) by assumption.
Proof of Quotient Rule: Using the definition of derivative,
( ) 0 fx
=
f (x+h)
lim
(+ gx h
f (x) ()
gx
()
!0
gx
h
h
=
lim
( fx
+
)() hgx
()( + ) f xgx h
!0
()( + )
h
hg x g x h
f (x+h)g(x) f (x)g(x) + f (x)g(x) f (x)g(x+h)
= lim
h
h
h!0
()( + ) gxgx h
( ) f (x+h) f (x)
( ) g(x+h) g(x)
= lim g x
h!0
fx
h
h
()( + )
gxgx h
( ) 0( ) ( ) 0( )
=
gxf x f xg x
( ( ))2
.
gx
Again we have used the continuity of in the last equality. g
3 Composite Functions
Apart from addition, subtraction, multiplication and division to get new functions, there is another useful way to obtain new functions from old called composition.
Definition 3.1 Given two functions : ! and : ! , we can fD E gE F
define the composite function
:!
by
( ) := ( ( ))
gfD F
g fx gfx .
5
If we think of functions as assignments, then g f means assigning x to f (x) first and then we further assign f (x) to g(f (x)). Note that in order for the composition g f to be well defined, the domain of g must contain
the image of . However, we do not require either or to be injective or
f
fg
surjective.
Question: Which of the following statement is true?
? f and g are injective ) g f is injective?
? and are injective )
is injective?
fg
gf
? g is not injective ) g f is not injective?
? is not surjective )
is not surjective?
g
gf
D
E
F
f
x
g
y=f(x)
z=g(y)
g o f
Let us look at one example. Consider two functions defined by
f : R ! R,
( ) := cos
fx
x,
g : R ! R,
( ) := 2 gy y,
the composition g f : R ! R is hence
( ) = ( ( )) = (cos ) = cos2
g fx gfx g x
x.
Note that we can also do the composition in a dierent order for this exam-
ple. We can form f
g : R ! R which is defined by
( ) = ( ( )) = ( 2) = cos 2
f gy fgy fy
y.
Note that even in this case both
and
are defined, they are NOT
gf fg
equal to each other. Therefore, the ordering is important when we talk
about composition:
Remark 3.2 In general, we have g f 6= f g even when both are welldefined.
6
The notation g f may be confusing sometimes since we are writing g
first and then f but the composition means doing f first and then g. One
good way to memorize this is that when g f acts on x, we write g f (x).
It is which hits first, and then followed by . This is the reason why we
f
x
g
use this convention.
Also, in the above example, we write as a function of and as a
gf
x fg
function of . When comparing them as functions, the name of the variable y
(x and y) are irrelevant. It is the rule of assignment that determines the
function. For example, we consider f (x) = x and g(y) = y as the same
"function". It will become clear later that it is useful to keep using for x
elements in the domain of and as elements in the codomain of .
fy
f
Composition is a rather nice operation which preserves many of the an-
alytic properties of and . fg
Theorem 3.3 If
(i) f is continuous at x0, and
(ii) g is continuous at y0 := f (x0),
then g
f is continuous at x0. In other words, composition of continuous
functions is continuous.
The "proof" is rather
intuitive.
When
x
is
close to x0,
then := ( ) y fx
is also close to y0 := f (x0) by the continuity of f . On the other hand,
since y is close to y0, we must have g(y) close to g(y0). This is the same as
saying
that
( ( )) gf x
is
close
to
( gf
(x0)).
A rigorous proof can given using
the
definition of continuity. Interested students can try to write down
a complete proof as an exercise.
We have already used this theorem implicitly many times when we eval-
uate limits. For example, when we compute
lim cos2 = (cos 0)2 = 1
!0
x
,
x
we have used the continuity of cos and square function which justifies the direct substitution with = 0 to compute the limit.
x
4 Dierentiation Rules III: Chain Rule
Composition of dierentiable functions is also dierentiable. Theorem 4.1 (Chain Rule) If
7
(i) f is dierentiable at x0, and
(ii) g is dierentiable at y0 := f (x0),
then g
f is dierentiable at x0 and
( g
f
)0(x0)
=
0( gf
(x0))
?
f
0(x0).
Remark 4.2 The chain rule simply says that the derivative of composition
is just the product of derivatives. Yet this is one of the most confusing rules
among all the dierentiation rules we have seen so far. The reason is that
we have to be careful at which points we are evaluating the derivatives! We
are
NOT
evaluating
0
g
at
x0,
but
at
f (x0)
instead.
If
you
recall
the
step-by-
step assignment picture of composite functions, you see that it is indeed the
only way for the formula to make sense since g0(x0) is not even defined as
x0
is
not
in
the
domain
of
! g
Let us turn to some examples.
Example 4.3 Calculate the derivatives of the following functions:
(i) cos 2, x
(ii) ( 2 + 1)7, x
(iii) sin x, e
(iv)
sin
2
x
.
e
Solution: (i) Let ( ) = 2 and ( ) = cos , then ( ) = cos 2 is
fx x gy
y
g fx
x
the function we want to dierentiate. Note that
0( ) = 2
and
0( ) = sin
fx x
gy
y.
Therefore, applying chain rule we get
( )0( ) = 0( ( )) 0( ) = ( sin( 2)) ? (2 ) = 2 sin 2
g f x g fx f x
xx
x x.
(ii) Let ( ) = 2+1 and ( ) = 7. We have 0( ) = 2 and 0( ) = 7 6,
fx x
gy y
fx x gy y
Therefore,
d ( 2 + 1)7 = 7( 2 + 1)6 ? (2 ) = 14 ( 2 + 1)6
x
x
x xx
.
dx
8
................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.
Related download
- the laplace transform and initial value problems
- numerical differentiation uc santa barbara
- 1 derivatives of piecewise defined functions
- truncation errors using taylor series to approximation
- solutions to first order ode s 1 equations
- numerical solution of 2nd order linear odes
- first order partial differential equations
- 5 numerical differentiation
- the first and second derivatives dartmouth college
- using matlab s differential equation solver
Related searches
- derivatives of trig functions definition
- derivatives of inverse functions pdf
- derivatives of trig functions examples
- derivatives of trigonometric functions pdf
- derivatives of trigonometric functions worksheet
- derivatives of trig functions rules
- derivatives of trigonometric functions list
- derivatives of inverse functions calculator
- derivatives of logarithmic functions examples
- derivatives of inverse functions practice
- derivatives of trig functions list
- derivatives of inverse functions homework