Concept of derivative Basic differentiation using log tables Motivation: Optimisation: Business/Finance: Maximasing profit, minimasing
costs Mechanics: Finding the state of minimal energy Manufacturing: find the least amount of material to make a particular object Curve sketching Maria GonzalezGonzalez-HSM 2011
In technical language differentiation is concerned with measuring
change. Rate of change: Imaging you are standing on a bridge high above a gorge and are
about to let a stone drop. Because this is only our imagination we can do impossible things like stopping the stone in the middle of the air or ignore complicated factors as air resistance. How can we find the speed 3 seconds after the stone has been released?
Maria GonzalezGonzalez-HSM 2011
36
We can certainly measure AVERAGE speed but the problem is
measuring INSTANTANEOUS speed. Consider we know the exact formula connecting distance fallen y and time x taken to reach as: y = 16 x 2 where y is measured in feet and x in seconds If we want to know how far the stone has dropped in 3 seconds we
simply do: x = 3 ⇒ y = 16 ⋅ 32 = 144 feet But how can we calculate the speed of the stone at x=3? Lets take a further 0.5 seconds and see how far the stone has
travelled between 3 and 3.5 x = 3.5 ⇒ y = 16 ⋅ (3.5) 2 = 196 feet Maria GonzalezGonzalez-HSM 2011
Between 3 and 3.5 the stone has fallen
196 − 144 = 52 feet Since speed is distance divided by time, the average speed over this
time interval is: vavg =
52 = 104 feet per second 0 .5 Difference between the two times
This will be close to the instantaneous speed, but you may well say
that 0.5 is not a small enough measure. If we repeat the argument with a smaller time gap 0.05 you will see that the distance fallen is x = 3.05 ⇒ y = 16 ⋅ (3.05) 2 = 148.84 Between 3 and 3.05 the stone has fallen 148.84 − 144 = 4.84 feet So the average speed 4.84 v avg = = 96.8 feet per second 0.05 Maria GonzalezGonzalez-HSM 2011
37
This is indeed, closer to the instantaneous velocity at x=3
If we want to get closer and closer to the right INSTANTANEOUS speed then the difference between the two times at which we stop the stone should get smaller and smaller Let’s use algebra to write what we just concluded: We want the INSTANTANEOUS velocity at time x (that can be 3 or
any other value). We need to measure the distance travelled at x and a bit later x+h, where h should be really small for accurate results (note that the value of h on the examples above is 0.5 and 0.05 respectively)
Maria GonzalezGonzalez-HSM 2011
For measuring the distance between two times we do: Distance at time x ⇒ y = 16 ⋅ x 2 Distance at time x + h ⇒ y = 16 ⋅ ( x + h ) = 16( x 2 + 2hx + h 2 ) = 16 x 2 + 16 ⋅ 2hx + 16h 2 2
16 ⋅ 2 xh + h 2 16 ⋅ 2 xh + 16h 2 = ( x + h) − x h
Maria GonzalezGonzalez-HSM 2011
38
Do you remember the common factor technique and that we said it
was used to simplify rational expression? Here you have a good example! v=
16 ⋅ 2 xh + 16h 2 h(16 ⋅ 2 x + 16h) = = 16 ⋅ 2 x + 16h h h
Ideally the difference between the two times should be really small,
what means that the terms with h will be tiny (almost zero)… WE CAN IGNORE THEM!
v = 16 ⋅ 2 x This is then the INSTANTANEOUS VELOCITY at any time!
Maria GonzalezGonzalez-HSM 2011
What is the difference between the original formula and the one we
just obtained?
y = 16 ⋅ x 2
v = 16 ⋅ 2 x
x 2 turned into 2 x... 2 x is THE DERIVATIVE of x 2 !! (This explanation has been extracted from “50 Mathematical ideas you really need to Know” with slight modifications)
The formal definition of the derivative is based on the idea
previously explained and it is called differentiation by first principles.
Maria GonzalezGonzalez-HSM 2011
39
NOTATION:You will find, depending on the author/book/lecturer
any of the following notations. They all mean DERIVATIVE dy df y' dx dx ( Remember y = f ( x))
f ' ( x)
Example 31 : Direct applicatio n of the formula
f ( x) x
f'(x)
n
nx
a)
n-1
y = x5 ⇒
dy = 5x 4 dx
Maria GonzalezGonzalez-HSM 2011
Example 32 : Use your maths abilities before using the tables... (Rewrite properly before differentiating)
b) y =
⇒
1 = x −5 x5
x −a =
dy 1 5 −5 = −5 x −5−1 = −5 x −6 = −5 6 = − 6 or 6 dx x x x m
b) y = x 3 = x 3 / 2 3
⇒
1 xa
x n = n xm 1
dy 3 2 −1 3 2 3 = x = x = x dx 2 2 2 Write answer on the same way question was given
f ( x)
f'(x)
xn
nx n-1
Maria GonzalezGonzalez-HSM 2011
40
c) y =
1 5
x2
=
1 x
2 5
=x
−
2
⇒
m
2 5
x −a =
x n = n xm
1 xa
7
dy 2 − −1 2 − 2 =− x 5 =− x 5 =− 5 dx 5 5 5 x7
Example 33 :
f ( x) e
f'(x)
a) y = e 5 x
ex
x
ax
a x ln a
e ax
dy = 5e 5 x dx
⇒
ae ax
Maria GonzalezGonzalez-HSM 2011
⇒
b) y = 3 x
c) y = e − x
f ( x)
⇒
sin x
f'(x) 1 x cos x
cos x
- sin x
tan x
sec 2 x
ln x
dy = 3 x ln 3 dx
dy = −e − x dx
f ( x) e
f'(x) ex
x
ax e ax
a x ln a ae ax
Example 34 :
a ) y = 3 ln x
⇒
dy 1 3 =3 = dx x x
cos x 1 = cos x 2 2 dy 1 sin x ⇒ = (− sin x) = − dx 2 2
b) y =
Maria GonzalezGonzalez-HSM 2011
41
d (c ) = 0 dx
The derivative of a constant is zero To differentiate a sum or a difference all you
need to do is differentiate the individual terms d df dg and then put them back together with the ( f + g) = + dx dx dx appropriate signs d df Differentiating a function multiplied by a (c ⋅ f ) = c dx dx constant is the same as multiplying the constant by the derivative of the function ( f ⋅ g )' ≠ f '⋅g ' Remember…
WE HAVE RULES FOR THESE!!!!
'
f f' ≠ g g'
Maria GonzalezGonzalez-HSM 2011
Example 34 Differentiate the following 1 x a) y = 2 + cos x − ln x b) y = e − x + 3 x − 5 x 1 + cos x − ln x = x −2 + cos x − ln x x2
a) y =
x −a =
1 xa
dy 1 = −2 x −3 − sin x − = dx x f ( x) = x n ⇒ f'(x) = nx n-1
=−
f ( x) = cos x
f ( x ) = ln x
⇒ f ' ( x) = - sin x
⇒ f ' ( x) = 1 / x
2 1 − sin x − x x3
3 c) y = − + 5 tan x − 5 x x Rewrite the function if needed before differentiating!
As we have three functions adding/subtracting, we can differentiate them individually (differentiation properties)
Tidy up your result, in this case rewriting the first power
Maria GonzalezGonzalez-HSM 2011
42
x 1 b) y = e − x + 3 x − = e − x + x 2 / 3 − x 5 5
Rewrite the function if needed before differentiating!
m
x n = n xm
dy 2 1 = −e − x + x −1 / 3 − = dx 3 5 f ( x) = e ax
f ( x) = x n ⇒
⇒ f ' ( x) = ae ax
f'(x) = nx n-1
= −e − x +
2 1 2 1 − = −e − x + − 1/ 2 5 3x 3 x 5
As we have three functions adding/subtracting, we can differentiate them individually (differentiation properties)
Tidy up your result by rewriting the middle Term as a root again
Maria GonzalezGonzalez-HSM 2011
c) y = −
3 + 5 tan x − 5 x = −3 x −1 + 5 tan x − 5 x x x −a =
1 xa
dy = 3x − 2 + 5 sec 2 x − 5 x ln 5 = dx f ( x) = x n ⇒ f'(x) = nx
=
n-1
f ( x) = tan x ⇒ f ' ( x) = sec 2 x
f ( x) = a x
Rewrite the function if needed before differentiating!
As we have three functions adding/subtracting, we can differentiate them individually (differentiation properties), also note that the middle function was multiplied by a constant
⇒ f ' ( x) = a x ln a
3 + 5 sec 2 x − 5 x ln 5 x2
Tidy up your result by rewriting the first term as a Power with positive exponent
Maria GonzalezGonzalez-HSM 2011
43
Exercise 1 : Differentiate the following functions a) y = x + 5 x + ln x c) y = 2 x 5 +
1 − cos x x2
1 − cos x x2 3 + − 5 tan x x
b) y = x 7 + d) y = x2/3
dy 1 −1/ 2 1 1 1 = x + 5 x ln 5 + = + 5 x ln 5 + dx 2 x 2 x x dy 2 b) = 7 x 6 − 2 x −3 + sin x = 7 x 6 − 3 + sin x dx x dy 2 c) = 10 x 4 − 2 x −3 + sin x = 10 x 4 − 3 + sin x dx x dy 2 −1 / 3 2 3 d) = x − 3 x − 2 − 5 sec 2 x = 3 − 2 − 5 sec 2 x dx 3 x 3 x Exercise 1 : a)
Maria GonzalezGonzalez-HSM 2011
Differentiating the multiplication of functions: The product rule
Differentiating the quotient of functions: The quotient rule
Maria GonzalezGonzalez-HSM 2011
44
( f ⋅ g )' = f '⋅g + f ⋅ g '
OR
Example 35 : Differentiate y = ( x 2 − 1)e 5 x
du u = x2 −1 → = 2x dx 2 5x y = ( x − 1)e ⇒ u v v = e5 x → dv = 5e 5 x dx
dy = ( x 2 − 1)5e 5 x + e 5 x (2 x) = (5 x 2 − 5)e 5 x + e5 x (2 x) = dx du dv u v
dx 5x
dx
Common factor
2
= e (5 x − 5 + 2 x) Maria GonzalezGonzalez-HSM 2011
Example 36 : Differentiate y = e − x ln x
du u = e−x → = −e − x dx y = e − x ln x ⇒ v = ln x → dv = 1 dx x
dy e−x 1 1 = e − x + (ln x ) − e − x = − e − x ln x = e − x − ln x dx x x x
( ) u
(
dv dx
v
)
du dx
Common factor
It is better to write " e -x ln x" rather than " ln x e -x " as, if brackets are not used properly
( )
" (ln x ) e -x " , you might get confused at some stage on your calculations thinking that -x
" e " multiplies to x instead of multiplying to " ln x" Maria GonzalezGonzalez-HSM 2011
− x 2 + 1 − 4x + 2x 2 x 2 − 4x + 1 = 2 2 (x2 −1)2 ( x −1)
Join like terms
Maria GonzalezGonzalez-HSM 2011
46
Example 38 : Differentiate y =
2
y=
x ln x
x2 ln x
du = 2x dx dv 1 v = ln x → = dx x
u = x2 →
u v
2 1 (ln x)(2x) − (x ) 2x ln x − x dy x = x = = 2 dx (ln x) ln2 x 2x ln x − x x(2 ln x −1) = = ln2 x ln2 x 2
Can be simplified
Maria GonzalezGonzalez-HSM 2011
Exercise 1 : (Product rule) Differenti ate the following functions
a ) y = x 2 cos x b) y = x ln x c) y = ( x 2 − 3)e 4 x Exercise 2 : Differentiate the following functions 3− x x 4 x − 4x 2 + 2 b) y = x +1 e −2 x c) y = tan x a) y =
Maria GonzalezGonzalez-HSM 2011
47
Exercise 1 : a) c)
dy = 4( x 2 − 3)e 4 x + 2 xe 4 x = 2e 4 x (2 x 2 − 6 + x) dx
Exercise 2 : a) c)
dy dy = − x 2 sin x + 2 x cos x b) = 1 + ln x dx dx
dy 3 dy 3 x 4 + 4 x 3 − 4 x 2 − 8 x − 2 = − 2 b) = dx dx x ( x + 1) 2
dy e − 2 x ( −2 tan x − sec 2 x ) = dx tan 2 x
Maria GonzalezGonzalez-HSM 2011
g f
The chain rule will help us to differentiate a function that comes
from composing others What happens if you are asked to differentiate y = sin( x 2 ) ? You CANNOT apply the log tables directly as the function is not y = sin x
Your function is now the composition of two others: At f(x) , “x” has been replaced by g(x)! f ( x) = sin x
g ( x) = x 2
Maria GonzalezGonzalez-HSM 2011
48
APPROACH 1 The composition of two functions can be derived as follows
( f o g )' ( x) = f ' ( g ( x)) ⋅ g ' ( x) Derivative of Inside outside function left function alone
If y = sin( x 2 ) then
Times derivative of inside function
dy is given by : dx
g
x2
f
sin(
)
Inside function
outside function
Derivative of outside function
dy = cos( x 2 ) ⋅ 2 x = 2 x cos( x 2 ) dx Maria GonzalezGonzalez-HSM 2011
Inside function Times derivative left alone of inside function
Another common approach can be taken if only two functions
are composed, as for three or more it gets too long and messy. APPROACH 2: We will consider the same function as before: To find
dy dx
y = sin( x 2 )
1. Call u to the " inside" function ⇒
u = x2
2. Then y turns into : y = sin u 3. The two functions obtained are easy to differentiate : y = sin u ⇒ u = x2 ⇒
dy = cos u du
du = 2x dx
Maria GonzalezGonzalez-HSM 2011
49
4. To get
dy : dx
dy dy du = ⋅ dx du dx
dy = (cos u ) ⋅ (2 x) = 2 x cos u = 2 x cos( x 2 ) dx Replace u
To get from y to x….. y
u
x
We need to stop at u first! Both approaches are correct so it is up to you to decide which one you want
to use. Maria GonzalezGonzalez-HSM 2011
Example 39 Differentiate the following y = e 3 x sin 2 x
Note that this is the Product Rule 3x
u = e3 x → v = sin2 x = (sin x) 2 →
2
y = e sin x u
v
du = 3e3x dx dv = 2(sin x) ⋅ cosx dx
CHAIN RULE! u
dv dx
v
du dx
dy = 3e 3 x sin 2 x + e 3 x ( 2 sin x cos x ) = dx = e 3 x (3 sin 2 x + 2 sin x cos x ) Maria GonzalezGonzalez-HSM 2011
Common factor
50
Exercise 1 : Chain Rule
a ) y = (2 x + 3) 2 b) y = e cos x c) y = tan( x 2 + 1) d ) y = x 2 − 3x + 1 Exercise 2 : (Mixing rules) Differenti ate the following functions
a ) y = ( x 2 + 2 x) cos 3x b) y = cos 2 x sin 2 x
Maria GonzalezGonzalez-HSM 2011
Exercise 3 : i) For the functions below identify t he appropriat e rule to be applied (PR, QR, CR) or if you can simply differenti ate by using the known formulas. ii) Differenti ate them a)y = sin(ln x)
h ) y = sin 2 ( x 2 + 1) e −t + 1 t j ) y = tan −1 (e x )
x3 + 2x − 1 b) y = 5 c ) y = (3 x − 2) 4
i) y =
d ) y = x 2 ln x
k ) y = ( x 2 + 3) cos (2 x )
e) y = e tan x
l) y =
f ) y = ln( x 2 + 1) g) y =
x +1 x
`1 3x 4 x2 m) y = x +1 n)y = x 2 ln 2 x
Maria GonzalezGonzalez-HSM 2011
51
dy dy = 8 x + 12 b) = − sin x e cos x dx dx dy dy ( x 2 − 3 x + 1) −1 / 2 ( 2 x + 3) 2x + 3 c) = 2 x sec 2 ( x 2 + 1) d ) = = dx dx 2 2 x 2 − 3x + 1
Exercise 1 : a)
dy = −3( x 2 + 2 x) sin 3 x + ( 2 x + 2) cos 3 x dx 2 b) 2 cos 2 x cos x − 2 cos x sin x sin 2 x Exercise 2 : a)
Maria GonzalezGonzalez-HSM 2011
Exercise 6 : dy cos ( ln x) = dx x 2 dy 3 x + 2 b) = dx 5 dy c) = 12(3 x − 2) 3 dx dy d) = 2 x ln x + x = x( 2 ln x + 1) dx dy e) == e tan x sec 2 x dx dy 2x f) = 2 dx x + 1 x − ( x + 1) 1 g) y = =− 2 2 x x a)
dy = 4 x sin( x 2 + 1) cos( x 2 + 1) dx dy − te −t − e − t − 1 e −t (t + 1) + 1 i) = = − dx t2 t2 x x dy e e j) = = x 2 dx 1 + (e ) 1 + e2x dy = 2 x cos (2 x ) − ( 2 x 2 + 6) sin( 2 x ) k) dx dy `4 l) =− 5 dx 3x dy x 2 + 2 x m) = dx ( x + 1)2 h)
n)
dy = 2 x ln 2 x + 2 x ln x = 2 x ln x (ln x + 1) dx