Part B - Personal Web Pages

SE1EM11 Differentiation and Integration– Part B
Differentiation and Integration 6
Dr Richard Mitchell
Today we will start to look at more typical signals including
exponentials, logarithms and hyperbolics
Some of this can be found in the recommended books
Croft 267-309; James 130-140, 514-517
Stroud 86-94,343,495-517; Singh 224-253,266,362;
Don’t forget to attend the tutorials to get practice
Also, extra support is available from
Exponential, Logarithm, Hyperbolic
We met exponentials in lecture 1, in the RC circuit – though they
can be seen in many systems.
The current decayed smoothly – exponentially.
In this lecture we will look at the exponential function,
its differential and its integral.
Logarithm is inverse exponential
we will consider it and some applications
Hyperbolic functions are combinations of exponentials,
so these too will be considered.
http://www.reading.ac.uk/mathssupport centre
and http://www.mathtutor.ac.uk
p1 RJM 03/10/14
SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
p2 RJM 03/10/14
On Exponentials
Exponentials Formally
Function: exp(x) or ex where e ~ 2.71828
e0 is 1; e1 ~ 2.718; e-1 ~ 0.37; e∞ = ∞; e-∞ = 1/ e∞ = 0
In lecture 1 we argued the variation
of I and V
I
Hence at t = RC, I =
K
We quoted the equation for I
I=
0.37K
T=RC
V
SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
t
E 1
E
e = 0.37 ; V = E - Ee1 = 0.63E
R
R
t
E  RC
e
R
As x → -∞, Exp(x) → 0
so does slope
Exp(0) = 1
so is slope
As x → +∞, Exp(x) → ∞
so does slope
E = V + I R, so V = E – I R
E
t
0.63E
V = E - E e RC
T
p3 RJM 03/10/14
t
Suggests
Let’s look at e formally
SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
p4 RJM 03/10/14
More on Exponentials
Exp(- -∞) = ∞; Slope -∞
Exp(0) = 1; Slope is -1
Exp(-∞) = 0; Slope 0
d(exp(-x))
So
= -exp(-x)
dx
Exp(-2∞) = 0; Slope 0
Exp(2*0) = 1; Slope is 2
Exp(2∞) = ∞; Slope ∞
So
p5 RJM 03/10/14
d(exp(2x))
= 2exp(2x)
dx
SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
© Dr Richard Mitchell, 2014
d(exp(x))
 exp(x)
dx
SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
So for Exponentials
From results, generalise:
Therefore  enxdx =
denx
= nenx
dx
1 nx
e +c
n
Remember for the RC Circuit
I=
t
E  RC
e
R
t
V = E - E e RC
Also I = C
 t
dV
dt
t
t
dV
dE dEe RC
1   RC
E  RC
=
= 0 - E  
=
e
e
dt
dt
dt
RC
 RC 
C
t
dV
E  RC
E t
=C
e
= e RC = I
dt
RC
R
p6 RJM 03/10/14
SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
1
SE1EM11 Differentiation and Integration– Part B
In Class Exercise
Logarithm – Inverse of Exponential
For the RC circuit, E = 5V, R = 100Ω and C = 0.001F
t
5  0.1
Thus I =
e
= 0.05e 10t
100
If y = ex then x = logey or ln(y)
V = 1000  I dt
Log10 often used – for sound : decibels 20 * log10(voltage)
Find an expression for V, given that V = 0 when t = 0s
If x = log10(y) then y = 10x
V = 1000 *  0.05e10tdt
= -
Rules
1000
0.05e10t + c
10
= -5e10t + c
log(a * b) = log (a) + log (b)
log (an) = n * log (a)
So log (a/b) = log (a * b-1) = log(a) – log(b)
log (1) = 0 as for instance 100 = 1
At t = 0, 0 = -5e0 + c; so c = 5
To change base : logaX =
So V = 5 - 5e10t
p7 RJM 03/10/14
SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
p8 RJM 03/10/14
Differential of Logarithm
x = ln(y)
d(ln(y))
=
dy
So
y = exp(x)
1
=
d(exp(x))
dx
dx
=
dy
1
x = sin-1(a)
dy
dx
d(sin-1 (a))
=
da
1
a = sin(x)
d(sin(x))
dx
=
1
cos(x)
But as cos2(x) + sin2(x) = 1, cos(x) = √(1 - sin2(x) )
SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
So
d(sin-1 (a))
=
da
 f(y) dy
1
1 - sin2 (x)
=
1
1 - a2
Similar methods can be used for cos-1 and tan-1.
p10 RJM 03/10/14
Integration of sin-1
y
so
This is a function of x, should be a function of a.
1
1
=
exp(x)
y
-1
 f (x) dx = xy -  f(y) dy
SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
The differential for sin-1 illustrates this further
Note, initially the result is a function of x, but we can then
change it to one of y. Consider also:
p9 RJM 03/10/14
logb (X)
logb (a)
Differential of sin-1
Differential of ex is easy, but what of its inverse ln?
We find it using a neat ‘trick’, namely
is log to base e
Log to base 2 log2 used in information theory, for instance
SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
Logarithmic Graphs
y = f-1(x)
-1
 f (x) dx
If y = sin-1(x), x = sin(y)
So  sin-1 (x) dx = xy -  sin(y) dy = xy + cos(y)
x
A normal ‘linearly’ scaled graph has
axes like the following
The ‘ticks’ on the axes are
linear, hence linear graph
Answer should be function of x :
Shows graph of :
y = sin-1 (x); cos(y) = 1 - sin2 (y) = 1 - x2
Sometimes better for one/both axes to be logarithmic.
So  sin-1 (x) dx = xsin-1 (x) +
Used, for instance, when variables over wide range
p11 RJM 03/10/14
1 - x2 + c
SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
© Dr Richard Mitchell, 2014
p12 RJM 03/10/14
y=3-x
SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
2
SE1EM11 Differentiation and Integration– Part B
Application – Frequency Response
Ranges: RC = 0.3, ω 0.1 to 100 rad/s
If input to RC circuit is K1 sin(t), output is K2 sin(t-).
K
Gain = 2 =
K1
1
1 + (CR)2
and Phase  = - tan-1 (CR)
10
Relevant variation of Gain and Phase requires that ω is from ~
1/30RC to 30/RC if RC=0.3 from 0.1 to 100 rad/s
10
The following log scale is appropriate
1
p13 RJM 03/10/14
2
30
20
10
10
100
SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
0
-1
-45
-90
-2
10
-1
10
0
10
1
10
2
10
-1
10
10
If CR  1, Gain =
1 + (CR)2
1
=
CR
10
;
For former, graph is horizontal line
For latter, Plot log
10
1
vs log( );
CR
SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
sinh x =
e x  e x
-12
-2
1
0
1
10
0
10
1
10
2
SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
1
1+e-z
= sigmoid(z)
ez -e-z
ez +e-z
= tanh(z)
A catenary is a chain hanging under its
own weight.
1
y = tanh x
-1
© Dr Richard Mitchell, 2014
-1
If the output is to be -1..1, f(z) =
6
-1
p17 RJM 03/10/14
1
= 0.707
11
If the output is to be 0..1, f(z) =
1
-1
Gain then is
In some neural networks, the output of a neuron is a summation
passed to a differentiable activation function
12
y = cosh x
e x  e x
cosh x =
2
sinh x
e x  e x
=
cosh x
e x  e x
-1
Applications of Hyperbolics
-1
2
2
The 2 straight lines,
asymptotes, meet at
ω = 1/RC
p16 RJM 03/10/14
Hyperbolic Functions
y = sinh x
10
Gain graph starts on first asymptote and moves away eventually
touching second asymptote
Approximating Freq Response like this is a powerful tool
i.e Plot straight line : gradient is -1, offset –log(CR)
The hyperbolic sine, cosine and
tangent functions are:
1
0
10
ie Plot log(CR)-1 = -log( )  log(CR) vs log( )
p15 RJM 03/10/14
10
Gain graph with ‘asymptotes’
1
1
= 1;
1
1
0
SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
1 + (CR)2
If CR  1, Gain =
tanh x =
0
p14 RJM 03/10/14
Approximating Gain Graph
Gain =
1
1

901 30
So plot log(Gain) vs log(ω) and Phase vs log(ω)
Plot Graphs : Gain vs ω and Phase versus ω
0.2
1
 1 to
1.0009
from
1 + (CR)2
Phase  = - tan-1 (CR): -tan-1 0.03=-1.7O to -tan-1 30=-88.1O
Frequency Response : how Gain and Phase vary with ω
0.1
1
Gain =
Later we derive an expression for it, in
terms of unit weight w and tension T
y=
1
p18 RJM 03/10/14
T
 wx   1 
 
 cosh 
w
 T  
SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
3
SE1EM11 Differentiation and Integration– Part B
Differentials / Integrals
sinh ax =
e ax  e ax
cosh ax =
2
e ax  e ax
2
d sinh ax
e ax
e ax
e ax  e ax
 a
a
 a cosh(ax )
=a
dx
2
2
2
Can show that
dcosh ax
=a sinh(ax )
dx
Hyperbolic Identities
e ax  e ax
cosh ax =
2
cosh2 ax =
sinh2 ax =
1
Thus  cosh ax dx = sinh(ax )  c
a
SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
e 2ax  2e ax e ax  e 2ax e 2ax  2  e 2ax
That of exp(3x) is
3exp(3x)
That of ln(x) is
1/x
That of cosh(4x) is
4 sinh(4x)
- ½ exp(-2x) + c
Next week : chain rule and integration by substitution.
e 2ax  2e ax e ax  e 2ax e 2ax  2  e 2ax
=
4
cosh2 x =
e 2x  e 2x
4
p20 RJM 03/10/14
4

2 cosh(2x) 1
=

4
2
2
SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
6.1 Find the following differentials,
a)
d  5 - 5 exp(-4t) 
dt
d 0.25*ln(2x)
dx
b)
c)
d cosh(5x)
dx
6.2 Find the following integrals,
1
a)  10 exp(-0.1x) dx
b)  t-5exp(-2t) dt c)  3cosh(4t) dt
0
SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
given by y = 2x - 5 exp(-3x) at x = 1.
b) Find the mean of f(t) = e3t from t= -2 to 1;
p22 RJM 03/10/14
Tutorial – Week 6 – Qs 4 and 5
6.4 The voltage V in a RC circuit is given by the following
when the input voltage is 0.1 t; V = 0.1 e-t + 0.1 t - 0.1
dV
a) Find
dt
b) Show that V is a solution of the equation
dV
= 0.1t - V
dt
SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
Tutorial – Week 6 – Q 6
6.6 For the mass spring system below, the accelaration
d2x
, is given by -4 e-t  9 e-3t . At t  0,
dt2
its velocity is 1 m/s and its position is 2m.
of the mass,
a) Find an expression for position x.
b) Show that
d2x
dt2
4
dx
 3x  15
dt
Spring, k
6.5 The phase shift of an RC circuit is P  -tan-1 0.5.
dP
.
d
p23 RJM 03/10/14
4
6.3 a) Find the equation of the tangent to the graph
Again the inverse means
Find
=
4
Tutorial – Week 6 – Qs 1, 2 and 3
Today we have looked at exponentials, logarithms and hyperbolics
functions often used in systems
We have argued graphically their differential
p21 RJM 03/10/14
2
4
Summary
∫ exp(-2x) dx is
e ax  e ax
2 - -2
cosh2 ax  sinh2 ax =
=1
1
Thus  sinh ax dx = cosh(ax )  c
a
p19 RJM 03/10/14
sinh ax =
Output position, x
(velocity, v)
Object, mass m
Dashpot, F
SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
© Dr Richard Mitchell, 2014
p24 RJM 03/10/14
SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
4
SE1EM11 Differentiation and Integration– Part B
Tutorial - Week 6 - Hints
6.1 Apply standard rules
6.2 Ditto
Differentiation and Integration 7
Dr Richard Mitchell
6.3 a) m = dy/dx at x = 1; c = y(1) – m
Today : Chain Rule and Integration by substitution
b) Use standard integral for means
Some of this can be found in the recommended books
6.4 a) straightforward
Croft 725-730,822-826; James 497,504-507,553-554
b) show both sides of equation equal.
Stroud 384-387, 827-829; Singh 269-280, 368-370.
6.5 Use inverse function – note diff of tan(x) is sec2(x).
Don’t forget to attend the tutorials to get practice
6.6 a) Integrate, find constant, integrate, find constant
Also, extra support is available from
b) evaluate left hand side of equation – show is 15.
http://www.reading.ac.uk/mathssupport centre
and http://www.mathtutor.ac.uk
p25 RJM 03/10/14
SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
p26 RJM 03/10/14
Chain Rule – Why Need
The Chain Rule – for sin(ωt)
From last two weeks we established graphically that
sin(ωt) simple eg of a function defined by two functions:
dex
de-x
denx
= ex ,
= -e-x and generalised:
= n enx
dx
dx
dx
Therefore  enxdx =
x = f(z)
1 nx
e +c
n
For differential of x with respect to t use chain rule:
dx
dx dz
=
dt
dz dt
So, for
sin(ωt),
d  sin( a) 
=  sin(a)
da
We will next consider the chain rule which can formally confirm
these, and then the equivalent for integration.
p27 RJM 03/10/14
SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
d  sin(z) 
dx
=
= cos(z)
dz
dz
Hence
Cyberneticists and Computer Scientists use neural nets. In some
networks a neuron’s output is given by sigmoid
To differentiate exp(-t/10), let z = -t/10 and x = exp(z)
O=
= exp(z) * -1/10
10
)
dV
 d5

Thus 2
= 2
 5 * -0.1*exp( -t )  = exp( -t )
10 
10
dt
 dt
1
1  e-z

 d5 d 5exp -t
dV
10
= 2 dt
dt
 dt

p29 RJM 03/10/14
  = -10*- 1 exp -t = exp -t
 10 
 10 
10


SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
© Dr Richard Mitchell, 2014
{z is weighted sum of neuron inputs}
For learning, we need to know the differential of O wrt z
Let x = 1 + e-z , so
O = x-1, so
If you feel confident (comes with practice), just write
2
SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
Sigmoid in Neural Networks
V = 5 – 5 exp(-t/10): find I = 2 dV/dt
= -0.1*exp( -t
dz
d( t)
=
=
dt
dt
dsin( t) dx
=
= cos (z)  =  cos(t)
dt
dt
p28 RJM 03/10/14
Example – for RC Circuit
dexp(z) d(-t/10)
dx
dx dz
=
=
dt
dz dt
dz
dt
z = g(t)
For x = sin (ωt), z = ωt, and x = sin (z).
d  sin(a) 
d  sin(2a) 
 cos (a) and
 2cos (2a)
da
da
In general
SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
So
dO
=  x-2 = 
dx
dO
dO dx
=
=dz
dx dz
p30 RJM 03/10/14
dx
= -e-z
dz

-e-z

2
1+e-z

1
1+e-z
=
2

e-z
2
1+e-z 
SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
5
SE1EM11 Differentiation and Integration– Part B
Another Example
The gain of a system, G, as a function of angular frequency ω, is
1
G =
(1 - 0.1ω 2 )2  0.04ω 2
Find the three values of  such that
dG
=0
dω
1
Let G =
so z = (1 - 0.1ω 2 )2  0.04ω 2
z
Simplify : z = 1 - 0.2ω 2  0.01ω 4  0.04ω 2
Continued
G=z
 12
dG
dG dz
=
d
dz d
dG
1 3
=- z 2
dz
2
so
dG
1 3
- 0.32ω  0.04ω 3
= - z 2 - 0.32ω  0.04ω 3 =
3
d
2
2z 2


Want ω where this is zero – need numerator only
i.e.
= 1 - 0.16ω 2  0.01ω 4
or
dz
= - 0.32ω  0.04ω 3
d
or
p31 RJM 03/10/14
dz
= - 0.32ω  0.04ω 3
d
z = 1 - 0.16ω 2  0.01ω 4
- 0.32ω  0.04ω 3 = 0
ω (- 0.32  0.04ω 2 ) = 0
ω = 0 or 0.32 = 0.04ω 2 i.e. ω 2 = 8
So required result is ω = 0 or ω =  8 rad/s
SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
p32 RJM 03/10/14
SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
A Related Technique
Find gradient at point x,y on circle defined by y2 = r2 - x2
Want dy/dx; could take square root + carry on as normal.
Easier way : differentiate both sides with respect to x.
d  r -x
2
RHS:
dx
dy
2
LHS:
So
2
dx

=

= 0 - 2x = -2x
dy
You are to find how the volume of a sphere (V = 4/3 π r3 ) changes
with time if r is 5 – 5e-t/20.
Find
dV dr
dV
,
and hence
dr dt
dt
Answer
dV
4
= 3 r2 = 4 r2
dr
3
 dy = 2y dy
dy dx
dx
2
dr
5 -t/20
1
=
e
= e -t/20
20
dt
4
dy
2x
x
=
= 
dx
2y
r2  x2
Note need to have result with x not y
p33 RJM 03/10/14
Exercise
SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
Integration Using Substitution
This is related to the chain rule used in differentiation.
Let's apply to  sin(t)dt
Simplify by substituting x = ω t, and then integrate
 sin(t) dt =  sin(x) dt
But must integrate f(x) wrt x
dx
1
= , so dt = dx

dt
1
1
Thus  sin(t)dt =  sin(x) dx = -cos(x) *  c
dV
dV dr
1
=
= 4 r2 e -t/20 =  5  5e -t/20
dt
dr dt
4

p34 RJM 03/10/14

p35 RJM 03/10/14
SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
© Dr Richard Mitchell, 2014
e -t/20
Application - Root Mean Square
Mean of one cycle of sin(t)
2
t=2


1
  1
1
sin( t) dt =
- cos(t)  = 1  1  = 0

2 -0 
2  
2
 0
t=0

Not useful measure, so often use root mean
square or rms value of a signal.
rms  sin(t)  =
But we introduced x to help us, answer should have t
1
 sin(t)dt =   cos t   c
2
SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
As x = t,


1
2
b
rms =
 f (t) dt
a
2
b-a
2

2
 sin (t) dt
 0
Looks awkward : use trig identity sin2(x) = ½ (1 – cos(2x))
p36 RJM 03/10/14
SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
6
SE1EM11 Differentiation and Integration– Part B
RMS of Sinusoid
2
1
rms =
2
2
( t) dt
sin2(x) = ½ (1 – cos(2x))
 0

4
rms =

 sin
2
Some more examples of substitution
∫ sin(ω t +  ) dt:
1
=
  2
- 1 sin(4 ) -0 - - 1 sin(0)  = 1

2
2
2
4  

p37 RJM 03/10/14
1
2

2
sin(2 t)  0 
1
dt;
1-t
SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
p38 RJM 03/10/14
Beware of limits : remember
f(t) dt means integrate f(t) and evaluate t = 1 to t = 5
Can use substitution but must change limits accordingly
dx
dx
= 5 or
= dt
dt
5
limits x = 5*2+7=17 and 5*0+ 7=7
we use x = 5t+7, so
2
17
3
3 dx =  1 x4  17 = 1 17 4  7 4
 (5t  7) dt =  x
 20
 7 20
5
0
7

p39 RJM 03/10/14
1
4 - v2
=
=
+c=
-cos( t   )

+c
 = 4056
SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
A(2 + v)
B(2 - v)
A(2 + v) + B(2 - v)
+
=
(2 - v)(2 + v) (2 - v)(2 + v)
4 - v2
1 = A(2 + v) + B(2 - v) = 2(A + B) + v(A - B)
t=
1
4 - v2
SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
dv. Find t as function of v, then v(t).
4 – v2 factorises as (2 – v) and (2 + v)
t=
A
B
+
dv
2-v 2+v
A and B constants
Hence t = -Aln(2 - v) + Bln(2 + v) + c
p40 RJM 03/10/14
What are A and B?
SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
Completing Problem
Ok, but want v(t) not t(v)
2 + v
2 + v 
t - c = 0.25 ln 
 or 4(t - c) = ln 

2 - v
2 - v 
Take exp of both sides
SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
© Dr Richard Mitchell, 2014
e 4(t - c) =
2+v
2-v
(2 - v)e4(t - c) = 2 + v
2e4(t - c) - 2 = v(1 + e 4(t - c) )
so A = B and 1 = 4A
0.25
0.25
+
dv = -0.25 ln(2 - v) + 0.25 ln(2 + v) + c
2-v 2+v
p41 RJM 03/10/14
dx =  ln(x)  c =  ln(1  t) + c
The velocity v of a falling object at time t found using
Gather v terms
Equating coefficients:
0 = (A - B)
1
x
2 + v
t = -0.25 ln(2 - v) + 0.25 ln(2 + v) + c = 0.25 ln 
 +c
2 - v 
A
B
+
2-v 2+v
1 = 2(A + B)
 = 
dx = -dt;
We solve the above by reorganising as follows
Numerators must be equal
t=

Integration by Partial Fractions
Finding A and B and then t
1
-cos(x)
A technique to simplify integrals to ones we can solve.
1
2
3
 (5t  7) dt
0
x = 1 - t;
so
Definite Integrals and Substitution
4 - v2
dx/dt = ω
0

t4 

=
 sin( t   )dt =  sin(x)  dx

 1-cos(2t) dt
=
5
Let x = ω t + ;
v=
p42 RJM 03/10/14
2e 4(t - c) - 2
1 + e 4(t - c)
SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
7
SE1EM11 Differentiation and Integration– Part B
Summary
Today we introduced the Chain rule for differentiation and some
simple Integration by substitution.
The Chain Rule allows us to show
dsin(5t-7)
=
dt
1
cos(5t-7) + c
5
Substitution allows us to show that
1
dx =

9  4x

1
ln(9-4x) + c
4
There are many more ways of substituting – some relevant to
Engineering Maths are given next week
p43 RJM 03/10/14
SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
Tutorial – Week 7 – Q1, 2 and 3
7.1 The current i through a diode in terms of voltage V across it is
i = 0.05(e200V  1)
Find the a.c. resistance r which is defined as r =
8
s=
dt.
40t + 1
Find s given that s = 2 when t = 0.
7.5 The sinusoidal output of a system is given by
O = 5 sin (4t - 0.2)
Find its mean value between t = 0 and t = 0.5.
7.6. Find its rms value between t = 0 and t = 0.5.
p45 RJM 03/10/14
SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
Differentiation and Integration 8
Dr Richard Mitchell
Today : Volumes/Surfaces; More Substitution.
for a set of components is given by F = 5 -
Croft 827-832, 851-890; James 559-568
Don’t forget to attend the tutorials to get practice
Also, extra support is available from
http://www.reading.ac.uk/mathssupport centre
and http://www.mathtutor.ac.uk
p47 RJM 03/10/14
SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
© Dr Richard Mitchell, 2014
.
30
6 + 0.25 t
dF
.
dt
7.3. The gain of a mass-spring, as a function of ω, is
Find the density function =
1
dG
. Find values of ω where
= 0.
dω
ω4 -9ω2 +25
Calculate G at all these values to find where G max.
G=
p44 RJM 03/10/14
SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
Tutorial - Week 7 - Hints
7.1 Use Chain rule to find di/dV…
7.2 Again use the chain rule
7.3 Again the chain rule – look for where numerator is 0 –
remember can have negative frequencies.
7.4 Use substitution
7.5 and 6
Use same substitution for both mean and rms – remember to
change limits – and to use radians.
p46 RJM 03/10/14
SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
Integration – More Substitution
We have looked at using simple substitution for indefinite and
definite integrals
Revision
Some of this can be found in the recommended books
Stroud 829-833,863-871,922-939; Singh 371-384,410-424
di
dV
7.2 In reliability engineering, the distribution function, F,
Tutorial – Week 7 – Q4, 5 and 6
7.4 The position, s, of an object moving in a straight line is
1
1


 cos
0
t
2
dt =
1

2
2 sin 2t  0 =


Now we shall look at more techniques and applications related to
using substitution in integration
First we will see some geometric applications, which will provide
some useful examples later
Starting with volumes of revolution which are extensions of areas
under curves …
p48 RJM 03/10/14
SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
8
SE1EM11 Differentiation and Integration– Part B
Volumes of Solids of Revolution
Lengths of Curves and Surface Areas
y = f(x): ∫f(x) dx = area under curve:
b
 f(x) *  x
xa
sum areas of strips:
b
Length of part, assume straight line, so s2 = x2 +y2
As  x  0, becomes  f(x) dx
a
2
2
2
ds
 dy 
2
y
 s 
Div by  x  : 
= 1
 = 1
 as  x  0

dx
x 
x 
 dx 
If f rotated around x axis have solid of
revolution: volume found by summing
volumes of cylinders, radius y & width δx
Hence length from a to b is:
s=
b

a
b
b
b
2
As  x  0 : V =   y2 dx =    f(x)  dx
a
a
 y x
V=
2
xa
p49 RJM 03/10/14
Surface area, when curve
rotated, found similarly as
SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
p50 RJM 03/10/14
Example – Line Rotated to Cone
4

0
dy
= 3x2 ;
dx
4
2
9 43
 9 x3 
 3 
=
= 12
x  dx =  

16
3
 4 
 16 3  0
s=
2
4
3
1    dx
4

0
3
9
S =  2
x 1  dx
4
16
0
p51 RJM 03/10/14
So

3 x2 5 
= 2
= 15
4 2 4  0

dt
= 4x3
dx
p52 RJM 03/10/14
16
=

 1  916
27
dt
=
4x3
3
 2 
27
=

1
16

20
  25

27 
3
  1  9t  2

= 
3
18

2

0
1  9t dt
3
16
 2  1 

1
16
dt
4x3
SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
=
 53  43
27
43
=
61
1728
eg  tan( t) dt =
SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
© Dr Richard Mitchell, 2014
sin( t)
 cos(t) dt
Let z = cos( t);
dz
=   sin( t)
dt
sin( t)
1
 tan( t) dt =   sin(t)z dz =   z dz
=
NB could have changed to f(x) & used x limits: above easier
p53 RJM 03/10/14
so S =  2 x3 1  9t
dt
4x3
Note, the same substitution also works when integrating the
differential of a function DIVIDED by the function
dx
0
or dx =
Integrals of f’(t) / f(t)
Let t = x4, dt = 4x3 ; For x = 0 to 0.5, t = 0 to 1
S =  2 x3 1  9t
1  9x 4 dx;
Note x3 terms (the main function’s derivative) cancel
0
1
16
3
0
The technique is to make the substitution t = x 4
1  9x 4 dx;
3
 2 x
4
 25 
5
= 
x = 4 = 5
4
 16  0
Completing the Example
 2 x
0.5
multiplied by k*x3 being a multiple of the derivative of x4
SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
0.5
S=
Here the 'main' function is 1  9x4 , a function of x4 ,
4
4
Want S =
SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
Find surface area when y = x3 rotated about axis x = 0..0.5

dy
3
= ;
dx
4
2
b
 dy 
S =  2 y 1  
 dx
 dx 
a
Integration of function * derivative
3
y = x = f(x)
4
V=
2
 dy 
1
 dx
 dx 
p54 RJM 03/10/14
1
1
ln(z)  c = - ln  cos( t)   c


SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
9
SE1EM11 Differentiation and Integration– Part B
Exercise
Substitution Using Trigonometry
y
Find the centre of mass, C, of the
semi-circular lamina radius a :
a
a
m is mass per unit area
Use t = a2 - y2
C =  2my a2 - y2dy
o
x
Most Maths books cover integrals like
Which does not have Engineering application
y=a
0
3 
2
= 0 - -m  a2 2 

3
 
2 3 
= -m  t 2 
3
a 2
p55 RJM 03/10/14
1

a2  a2sin2 (x)
t=0
dt
= -m  t dt
-2y
a2
y=0
=
2 3
ma
3
Try using t =
p56 RJM 03/10/14
dx
= 2 sec2 (a)
da
(a2+t2)
a sin(x)
a tan (x)
a sec(x)
a sinh(x)
SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
dx
=5+3t
dt

dx
dt =  5 + 3 t dt
dt
SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
The differential equation for the RC circuit:
dV
E-V
=
dt
RC
But RHS is function of V not t:
So we invert the equation and get

3 2
t +c
2
Sometimes we need to invert the diff equation…
p58 RJM 03/10/14
Application – solving Diff Eqn
p59 RJM 03/10/14
(t2-a2)
Hence  dx = x =  5 + 3 t dt = 5t +
L
dt
RC
=
dV
E-V
dt
RC
dV = 
dV
dV
E-V
RC
dV
E-V
1
Recalling 
dt = -ln (1 - t)
1-t
a2+t2
As RHS is function of t, can integrate both sides wrt t
F
F
x
F
L
l =  a 
=  tan-1    = tan-1  
2
 2 0
2 x=0
2
2
Hence  dt = t = 
(a2-t2)
eg object, position x, accelerating from initial velocity
L
Integrating both sides wrt V
t
=  dx = x + c = sin-1   + c
a
This is one application of integration – sets up an example
F
x=L
x=L
F
F
l= 
2 sec2 (a) da = 
2 sec2 (a) da
2 (a)
2
4
+
4tan
x=0
x=0 4 sec (a)
p57 RJM 03/10/14
1
a cos(x)dx
a cos(x)
Integration – solving Diff Eqns
x
Force F applied to bar, extension l given by:
x=L
dt
Some Useful Substitutions (others may work)
Example
Let x = 2 tan(a) so
a cos(x)dx  
If an integral has
SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
L F
l= 
dx
2
04 + x
(a2  t2 )
Here the √ is awkward and we substitute to remove it.
a2 cos2x = a2 - a2 sin2x . Let t = a sin(x), so dt = a cos(x) dx
dt
dt
=  2y or dy =
When y = 0, t = a2 ; when y = a, t = 0
dy
-2y
C =  2m y t
1

SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
Continued :
But want V as function of t, so rearrange
t-c
= ln (E - V)
-RC
Raise both sides to power of e
t-c
so e -RC = eln (E - V) = E - V
c
eRC is constant, call it k
t-c
t
c
But e -RC = e RC * e RC
-
t
So t = -RC ln (E-V) + c
-
t
so k e RC = E - V or V = E - ke RC
So t = -RC ln (E-V) + c
SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
© Dr Richard Mitchell, 2014
-
t
If V = 0 at t = 0, 0 = E - ke0 ; k = E. Thus V = E - Ee RC
p60 RJM 03/10/14
SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
10
SE1EM11 Differentiation and Integration– Part B
Catenary: Cable Hanging Own Weight
Catenary Continued
Length of cable 0,0 to P :
You are not expected to remember this, just sit back and appreciate
the application of various techniques.
We will use geometric techniques and others to deduce differential
equations for this & then solve by integration.
Horizontal tension = T
Weight of cable per unit
length = w
Consider what happens at P
At P, Horizontal position x, Vertical position y;
x = 0 when y = 0
At P tension in cable is Tp, at angle θ
p61 RJM 03/10/14
2
x
 dy 
s=  1+ 
 dx
 dx 
0
At P force down = w * s
If cable not moving this force equals vertical part of Tp
So w * s = Tp sin(θ)
At P also, horiz component is Tp cos(θ) which must equal T
Thus tan( ) =
Tpsin( )
Tpcos( )
d2y
SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
2
Let z = sinh(t) ;
x=
dz
T
1
= cosh (t), so x = 
cosh(t)dt
dt
w 1 + sinh2 (t)
T
1
T
T
cosh(t)dt = t + c = sinh1 (z) + c

w cosh(t)
w
w
But at x = 0, z =
p63 RJM 03/10/14
dy
dy
T
= 0, so c = 0, hence x = sinh1 ( )
dx
w
dx
SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
Tutorial – Week 8 – Q1, 2 and 3
8.1 a) Find the volume of revolution of the solid formed when
y2 = 4ax is rotated about the x-axis from x = 0 to1.
b) A parabolic reflector is formed by rotating y = 2 x
about the x-axis, from x = 0 to 1. Find its surface area.
2
8.2 An aerofoil is defined by y2 = 1  x for -2  x  2
4
Find the area below this function and above the x-axis.
8.3 The velocity v of a falling object is given by
Show that v = 2g(1-e-0.5t ) if v = 0 at t = 0
p65 RJM 03/10/14
dv
= g - 0.5v
dt
SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
© Dr Richard Mitchell, 2014
But
2
dy
w
dz
w
 dy 
1    uggh! But let z =
so
=
1  z2
T
dx
dx
T
 dx 
dx
T
1
T
1
We can solve by
=
or x = 
dz
dz
w 1  z2
w 1  z2
=
w*s
T
dy
w*s
w x
 dy 
=
=
* 1+ 
 dx
dx
T
T 0
 dx 
p62 RJM 03/10/14
Catenary Continued
dx2
=
or
dy
at P is slope = tan( )
dx
d2 y
=
dx2
2
w
 dy 
1

T
 dx 
SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
Catenary Concluded
Now x =
dy
T
sinh1 ( ),
w
dx
so
dy
wx 
= sinh 

dx
 T 
wx 
T
 wx  + c
y =  sinh 
 dx = cosh 

w
 T 
 T 
But y = 0 when x = 0
0=
T
T
 w*0 
cosh 
+ c;
 +c =
w
w
 T 
y=
T
 wx  - 1 

 cosh 

w
 T 

c = -
T
w
Next week: differentiation and integration of a product
p64 RJM 03/10/14
SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
Tutorial – Week 8 – Q4 and 5
8.4 The velocity v of a falling object is given by
v = 2g(1-e-0.5t ). Find the distance dropped at time t.
8.5 The figure shows water in a prismatic
channel, for which the water height
y is defined in terms of horizontal
position x by the equation
dy
=
dx
1
16x2  1
Find an expression for y if y = 0 when x = 0.25:
p66 RJM 03/10/14
SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
11
SE1EM11 Differentiation and Integration– Part B
Tutorial – Week 8 – Q6 Extra
8.6 The logistic equation for population P is
a) Show that t = 
0.1 0.1
+
dP
P 10-P
dP
= P(10 - P)
dt
Differentiation and Integration 9
Dr Richard Mitchell
Today : Diff and Int of Products.
A
b) Find P(t) if P = 20 at time t = 0 in the form P =
1-Be-ct
Tutorial - Week 8 - Hints
8.1 Use relevant formulae and integrate.
8.2 Is integral of a squareroot – use trig substitution.
Some of this can be found in the recommended books
Croft 719-724, 815-821 ; James 496-504, 551-553
Stroud 379-383, 834-836; Singh 280-285, 388-396;
Don’t forget to attend the tutorials to get practice
8.3 Invert eqn: find t(v) -> v(t).
8.4 Integrate.
8.5 Use relevant hyperbolic substitution.
8.6 Invert eqn, use Partial Fractions and proceed
p67 RJM 03/10/14
Also, extra support is available from
http://www.reading.ac.uk/mathssupport centre
and http://www.mathtutor.ac.uk
SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
Differentiation of a Product
p68 RJM 03/10/14
SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
Differentiating Damped Sinusoid
We can differentiate the sum of two (or more) terms; and we know
the chain rule for more complicated terms. Next we will consider the
product of two functions.
If drop mass, it
oscillates but
oscillations die out
If the two functions are u and v, then we use the rule
x = e-at sin(bt)
d(uv)
dv
du
=u
+v
dt
dt
dt
e.g. Find velocity of an object with position x = 5 – 3te-2t.
For 3te-2t :
u = 3t so
du
= 3;
dt
v = e-2t so
dv
= - 2e-2t
dt
Thus velocity is 0 - (3t * -2e-2t + e-2t * 3) = (6t - 3)e-2t
p69 RJM 03/10/14
SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
Then its position varies by x = e-at t.
Find
du
= -a e  at
dt
u = e-at ; so
dv
= b cos(bt)
dt
p70 RJM 03/10/14
SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
Differentiation of a Quotient
Consider a machine with gears, used to drive its output, defined in
terms of n, the ratio of one set to another.
Here the machine acceleration is
dx
dt
Answer
a=
du
u = e-at ; so
= - a e  at
dt
dv
v = t; so
=1
dt
d(e -at t 
= e  at
dt
p71 RJM 03/10/14
v = sin(bt); so
d(e -at sin (bt) 
 at
b cos(bt) + sin(bt) (-a e-at ))
= e
dt
= e-at b cos(bt) - a sin(bt) 
Exercise
If there is considerable friction, the mass does not oscillate
How does x change?
x
Mass
 t (-a e-at )) = e  at (1 - at)
SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
© Dr Richard Mitchell, 2014
n2 + 4
8-n
Suppose we want to find how a changes with n: da/dn.
Here we use the quotient rule, again in terms of u and v
 =
d uv
dt
p72 RJM 03/10/14
v
du
dv
- u
dt
dt
2
v
(This can be derived from
that of u * v-1)
SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
12
SE1EM11 Differentiation and Integration– Part B
Using the Quotient Rule
a=
 =
n2 + 4
8 - n
d uv
v
dt
du
u = n2 + 4; so
= 2n
dn
v = 8 - n; so
du
dv
- u
dt
dt
2
v
dv
= -1
dn
2
d  n  4 
8-n 
(8 - n)2n - (n2 + 4)(-1)
Thus 
=
dn
(8 - n)2
=
16n - 2n2 + n2 + 4
=
2
(8 - n)
p73 RJM 03/10/14
Quotient Rule for tan(ωt)
d  sin( t) 
d  cos( t) 
=  cos( t) & so
= - sin( t);
dt
dt
d  tan( t) 
sin( t)
what of
?
tan( t) =
dt
cos( t)
We know
Let u = sin( t);
So
4 + 16n - n2
d(tan( t))
cos( t)*(cos( t)) - sin( t)*(- sin( t))
=
dt
cos2 ( t)
=
2
(8 - n)

 cos2 ( t) + sin2 ( t)
cos2 ( t)
A battery, internal resistance r,
with variable load R.
Find R to maximise power.
V2
E2R
=
R
 r + R 2
p74 RJM 03/10/14
E2 (r + R)(r + R - 2R)
(r + R) 4
p75 RJM 03/10/14
Is extension of method for differentiating products
v = (r + R)2 so
dv
= 2(r + R)
dR
=
E2 (r - R)
(r + R)3
SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
dv
du
dt = uv -  v
dt
dt
dt
The aim is to choose these suitably so that the term
is easier to solve than
Definite version of integral:
p77 RJM 03/10/14

d(uv)
dv
du
dt = uv =  u dt +  v dt
dt
dt
dt
u
dv
du
dt = uv -  v
dt
dt
dt
p76 RJM 03/10/14
u
dv
dt
dt
p dv
p du
p
dt = uv  q -  v
dt
u
dt
q
q dt
SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
© Dr Richard Mitchell, 2014
SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
Showing Effect of Wrong Choice
Consider
The key is to select which function is u and which dv/dt.
du
dt
dt
Integrating both sides gives
Clearly, this is
zero when R = r.
For integrating product of two functions, u and dv/dt.
v
d(uv)
dv
du
=u
+v
dt
dt
dt
Which rearranged gives
Key to Using Integration By Parts
u
Integration By Parts
This is method for integrating product of two terms.
dP
(r + R)2E2 - E2R*2(r + R)
=
dR
(r + R) 4
=
SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
Find dP/dR and then R so dP/dR = 0
du
u = E2R so
= E2 ;
dR
 =  sec2 (t)
NB sec(x)=1/cos(x)
SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
Application : Min/Max - Optimisation
P=
v = cos( t)
u
 t cos(t) dt
If let u = cos(t) &
du
= - sin(t)
dt
dv
du
dt = uv -  v
dt
dt
dt
dv
=t
dt
and
v =  t dt = 1 t2
2
2
2
So integral is  t cos(t) dt = - cos (t) t +  t sin(t) dt
2
2
This has made matters harder.
p78 RJM 03/10/14
SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
13
SE1EM11 Differentiation and Integration– Part B
But with right choice
Again
 t cos(t) dt
But if u = t and
u
dv
du
dt = uv -  v
dt
dt
dt
dv
= cos(t)
dt
Mass pulled, Spring extended, forced back , opposed by friction.
Then
Second term easy, Use integration by parts for first:
SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
Integrating 2t e-2t
u
dv
= e 2t
dt
Completing Problem
v = 2t e-2t - 3 e-2t
We now know  2t e-2t dt = -t e-2t - 1 e-2t
2
So x =  v dt = -t e -2t - 1 e-2t + 3 e -2t + c = e-2t -t e-2t + c
2
2

So  2t e-2tdt = 2t - 1 e-2t -  - 1 e-2t 2dt
2
2
At t = 0, x = 1; so 1 = 1 - 0 + c;
-2
2
SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
p82 RJM 03/10/14
Application – Solving Diff Eqn
But
So
e5t
dV
+ 5Ve5t = te5t
dt
Completing Problem
For  te5t dt : Let u = t so
du
dv
= 1;
= e5t so v = 0.2e5t
dt
dt
So  te5tdt = t 0.2e5t -  0.2e5t dt = t 0.2e5t - 0.04 e5t + c
So Ve5t = t 0.2e5t - 0.04 e5t + c
Thus V = 0.2 t - 0.04 + c e-5t
d(Ve5t )
= te5t or Ve5t =  te5t dt
dt
Suppose V = 0 at t = 0:
5t
We use integration by parts to evaluate  te
dt
And then divide by e5t to find V:
SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
© Dr Richard Mitchell, 2014
SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
Ve5t =  te5t dt
dV
+ 5V = t
dt
d(Ve5t )
dV 5t
=
e + V5e5t
dt
dt
p83 RJM 03/10/14
x = e-2t - t e-2t
( would need to differentiate
v to solve this problem )
dv
=-4*x -4*v
dt
= -te-2t - 1 e-2t
If multiply by e5t , get
c = 0;
Extension: verify that x and v are solutions of
= -te-2t + 1 e-2t
Suppose we want to solve
SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
Also  3 e-2t dt = - 3 e-2t
2
du
= 2 and v =  e-2t dt = - 1 e-2t
2
dt
p81 RJM 03/10/14
p80 RJM 03/10/14
dv
du
dt = uv -  v
dt
dt
dt
So to integrate 2t e-2t we choose u and v terms sensibly

dv
= -4*x - 4 * v
dt
Suppose v = 2 t e-2t – 3e-2t. Find x if, at time t = 0, x = 1m
Shows why important to make right choice !
Then
Typical in control
Let m = 1kg,
F = 4Nsm-1,
k = 4Nm-1
Object, mass m
So  t cos(t) dt = t *sin(t) -  1*sin(t) dt
= t sin(t) + cos(t) + c
Let u = 2t and
Output position, x
(velocity, v)
Spring, k
Dashpot, F
du
= 1 and v =  cos(t) dt = sin(t)
dt
p79 RJM 03/10/14
Example – Mass Spring System
At t = 0: 0 = 0 - 0.04 + c; so c = 0.04
Hence V = 0.2t - 0.04  0.04e-5t
p84 RJM 03/10/14
SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
14
SE1EM11 Differentiation and Integration– Part B
Using Definite Version of Integral
We quoted earlier that saw(t) ~
sin(2t)
sin(3t) sin(4t)
sin(t) +
2
3
4
T
2 2
 n2 t  dt
 f(t) cos 

T T
 T 
an =
Means
should be 0
Finding bn for Sawtooth
bn =
2

2

 
2
t sin(2nt) dt
du
= 1;
dt
1
and v = - cos(2nt)
2n
Let u = t,
and
{ remember n is constant }
So
dv
= sin(2nt)
dt
2
bn =
T
2
2
 n 2 t  dt
 f(t) sin 

T T
 T 
2
=p85 RJM 03/10/14
1/n
cos(n )
= 
n
 -1/n
So bn =
if n is odd
if n is even
Let’s do bn
SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
=



2
2
2   t
- cos(2nt) 
-  - 1 cos(2nt) dt 
2n
π   2n
 -


- 2
2


2 

1
p86 RJM 03/10/14
But, cos(x) = cos(-x);

So  t cos(2nt)  2 is  cos(n ) - -  cos(-n ) =  cos(n )
2
2
- 2
Also sin(x) = –sin(-x); sin(nπ) = 0 (n integer)

So  sin(2nt)   2 is
2
So bn =
sin(n ) - sin(-n )
= 2 sin(n ) = 0
Summary
Here we have looked at the differential and integral of product (or
quotient terms)
u = 5t;
p88 RJM 03/10/14
9.1 In the mass-spring system below, the position of the
mass is given by x = 2  e-2t (3 sin(t)  2 cos(t))
a) Show that at time t = 0, the velocity v is -1 m/s.
and hence show that
Spring, k
d2x
dt2
Output position, x
(velocity, v)
Object, mass m
Dashpot, F
p89 RJM 03/10/14
4
dx
 5x = 10
dt
m = 1 kg;
F = 4 Ns/m;
dv
e2t
= e2t so v =
dt
2
SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
Tutorial – Week 9 – Q1
dt2
dt
du
dv
- u
dt
dt
v2
The key to integration is to choose u so second integral is easier.
(as stated)
SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
d2x
v
dv
du
dt = uv -  v
dt
u
dt
dt
You find an term in tutorial!
b) Find
 =
d uv
d(uv)
dv
du
=u
+v
dt
dt
dt
For  e2t 5t dt, what is u and what is v?
2  1
cos(n )

** *cos(n )  = n
  2n

p87 RJM 03/10/14

SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
Example Continued

 
2  1
1
bn =
- t cos(2nt)   2 +
sin(2nt)- 2 
- 2
  2n
4n2
2

1
- t cos(2nt)   2 +
sin(2nt)- 2 
- 2
  2n
2
4n2
Tutorial – Week 9 – Q2
9.2 For the mass-spring system, v, the mass' velocity,
is given by
v = e-4t - 20 t e-4t
a) Find  20te-4t dt
b) Hence find x, the position of the mass, if at t = 0, x = 3m.
c) Find
d2x
dt2
and so show that
Spring, k
k = 5 N/m
d2x
dt2
8
dx
 16x = 32
dt
Output position, x
(velocity, v)
Object, mass m
m = 1 kg;
F = 8 Ns/m;
k = 16 N/m
Dashpot, F
SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
© Dr Richard Mitchell, 2014
p90 RJM 03/10/14
SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
15
SE1EM11 Differentiation and Integration– Part B
Tutorial – Week 9 – Q3
Tutorial – Week 9 – Q4,5 and 6
9.4 The gain of an electronic circuit, in terms of angular
9.3 Differentiate the following using the quotient rule
sin( x)
[used in information theory]
x
b) The displacement of a damped vertical pendulum
a) f(x) = sinc(x) =
x=
cos(5t)
exp(2t)
3  2
Find  such that G is maximised.

ie. find an =
t 2
exp(0.1t)
2 2
 t cos(2nt) dt
 -
{ recall n is constant }
2
9.6. Find area A under of Kte at for t>0 : K and a constant

i.e. solve A =  K t e atdt ;
0
p91 RJM 03/10/14
1  2
9.5 Find the an term for the Fourier Series of a sawtooth.
c) The voltage in an electronic circuit
V=
frequency  is given by G =
SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
Tutorial – Week 9 – Hints
9.1 a) Find dx/dt, and put t = 0. Use diff of product
p92 RJM 03/10/14
Nb as t  , so t e-at  0
Extra!
SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
Differentiation and Integration 10
Dr Richard Mitchell
b) Use diff of product and then show LHS = RHS
9.2 a) Choose u and dv/dt as per examples
Numerical Differentiation and Integration
b) Straightforward
Some of this can be found in the recommended books
c) Diff of a product than show LHS = RHS
Croft 809-813; James 611-13, 709-11;
9.3 Straightforward.
Stroud 673-682; Singh 426-439;
9.4 Use diff of quotient to find dG/dω, find ω where this is zero
and evaluate G at these values.
9.5 Use Integration by Parts
Don’t forget to attend the tutorials to get practice
Also, extra support is available from
http://www.reading.ac.uk/mathssupport centre
9.6 Ditto
and http://www.mathtutor.ac.uk
p93 RJM 03/10/14
SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
p94 RJM 03/10/14
Numerical Differentiation
If have a function, can almost always differentiate it.
But if signal is just numbers, can only differentiate by estimating:
called numerical differentiation.
In control systems, a common controller is PID, it takes a signal x
& returns P * x + I * integral(x) + D * diff(x)
However
As want differential at t, don’t just use gradient before t, rather use
gradient before and after t. Use f(t+h), f(t-h)
f'(t) 
f(t+h) - f(t-h)
2*h
e.g. estimating f’(t) for
f(t) = t2 at t = 2 : h = 0.1.
Suppose data values at times h apart (eg at f(t), f(t+h))
Given rule for differentiation
Might expect estimate of diff
p95 RJM 03/10/14
f'(t) = lim
 t0
f'(t) 
© Dr Richard Mitchell, 2014
f(1.9) = 3.61
f(2) = 4.00
f(t+ t) - f(t)
t
f(2.1) = 4.41
Method 1: (4.41-4.0)/0.1 = 4.1
f(t+h) - f(t)
h
SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
Method 2: (4.41-3.61)/0.2 = 4.0
p96 RJM 03/10/14
SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
16
SE1EM11 Differentiation and Integration– Part B
Why Avoid Numerical Diff
Numerical Differentiation should be avoided if possible.
This is cos it usually involves dividing by a small number
The value being divided could have errors – due to poor
measurement or rounding errors in earlier calculations.
Application : Small Changes
A circular piece of metal is to be copied, but its radius is mismeasured
How do you find the error in the area of the metal?
For f(t), if f is small change in f & t a small change in t.
lim  f
df
=
t  0t
dt
As denominator < 1, these errors are amplified.
Suppose numerator = 4.01 but should be 4: error = 0.01
Suppose also, denominator 0.1
For small changes, this can be approximated as
df  f

dt  t
So a small change in f can be estimated by
df
t
dt
Differential estimated as 4.01 / 0.1 = 40.1
It should be 4 / 0.1 = 40.
Thus error of 0.01 amplified so error now 0.1.
p97 RJM 03/10/14
SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
Applying to Circular Disc
r2,
The area, A, is 
where r is radius.
The change in area due to a small change in r is:
A 
2 * 10 * 0.01 = 0.628
Another example: the error in volume of sphere when radius
measured as 4.01 when it should have been 4.0
4 3
r
3
p99 RJM 03/10/14
so
SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
Why Use Numerical Integration
Often have a function to be integrated, for which an analytical
function can be found
eg ∫ cos(t) dt = sin(t) + c
dA
 r = 2  r r
dr
Suppose radius was measured as 10.01, not 10, i.e. r = 0.01
The error in the area is:
V=
p98 RJM 03/10/14
f 
dV
= 4 r2 . Thus  V = 4 42 * 0.01 = 2.01
dr
SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
Basic Concept
For some functions, a substitution is needed
However, for other functions there is no such solution
eg ∫ exp(t2) dt
Also, sometimes engineers have just data values (from an
experiment say), so no function to be integrated
The solution: approximate integration numerically.
The concept can also be extended for numerical solution of
differential equations.
p100 RJM 03/10/14
SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
Reactangular Integration
If cant integrate f(x), or don’t know f(x) analytically, divide area
into strips, find area of each and sum.
Simplest (least accurate) method; assume each strip rectangle
(a = x0 b = x6)
Each strip
has same
width – call
it h
Area of r'th rectangle
width * height
h * f(xr )
b
Want  f(x) dx
a
Various ways of finding area of each strip ….
p101 RJM 03/10/14
SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
© Dr Richard Mitchell, 2014
6
6
r0
r 0
Area of 7 strips:  h *f(xr )  h *  f(xr )
p102 RJM 03/10/14
SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
17
SE1EM11 Differentiation and Integration– Part B
Trapezoidal Integration
Example
To test use a function which has is an analytical solution so can see
how accurate the two methods are.
More accurate – assume each strip is trapezium – in effect
approximate curve as straight lines between points
5
 exp x 10 dx
1

Area of r'th strip is
h * 1  f(xr ) + f(xr+1 )

2

The correct answer is 10 *  exp(0.5) - exp(0.1)  = 5.435504
Total area is sum of these
First, set h = 1, so use values at x = 1, 2, 3, 4 and 5.
If do this directly count f(n)
twice, so better to do
For the rectangular method, the area is:
1 * (e0.1 + e0.2 + e0.3 + e0.4 ) = 5.168257
5


h *  1  f(x0 ) + f(x6 )  +  f(xr ) 
2

r=1
(a = x0 b = x6)
p103 RJM 03/10/14
SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
poor
For the trapezoidal method, the area is:
1 * (0.5 * (e0.1 + e0.5 ) + e0.2 + e0.3 + e0.4 ) = 5.440032 ~ok
p104 RJM 03/10/14
SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
Making Strips Narrower
Simpson’s Rule
You should expect a better result if narrower strips used
Trapezium rule assumes straight line between adjacent pts
Simpson’s rules goes one stage further ;
Width, h
Rectangular
1
5.168257
Trapezoidal
5.440032
It uses an even number of strips
0.5
5.300748
5.436636
0.1
5.408371
5.435549
0.05
5.421926
5.435515
For first three adjacent points (and hence two strips)
find quadratic function going through them
calculate area
0.01
5.432786
5.435504
0.001
5.435232
5.435504
For points 3, 4, 5 (i.e. the following two strips)
find quadratic function and area
0.0001
5.435476
5.435504
etc
Sum all these areas.
Rect poor; Trap good with h = 0.01, or smaller
p105 RJM 03/10/14
e.g exp(x/10) for x = 1..5; use e0.1 e0.2 e0.3 and e0.3 e0.4 e0.5
SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
p106 RJM 03/10/14
Finding Quadratic Function
Simpson’s Continued
Suppose have three x values x0, x1, x2 at intervals h, and are trying to
integrate f(x) knowing f(x0), f(x1) and f(x2).
Use Lagrange Polynomials to find p(x) passing through pts.
Use shorthand : f0 = f(x0), f1 = f(x1), f2 = f(x2).
p(x) =
 x-x1   x-x2 
f +
 x0 -x1   x0 -x2  0
 x-x0   x-x2 
 x-x0   x-x1 
f +
f
 x1 -x0   x1 -x2  1
 x2 -x0   x2 -x1  2
p(x) =
p107 RJM 03/10/14
2h2
f0 -
For simplicity, define r such that
x – x1 = r * h
So
x – x0 = (r + 1) * h
x – x2 = (r - 1) * h
Then Polynomial
p(x) =
 x-x1   x-x2 
2h2
Becomes
f0 -
when x = x1, r = 0
when x = x0, r = -1
when x = x2, r = +1
 x-x0   x-x2 
h2
2
 x-x0   x-x2 
h2
f1 +
 x-x0   x-x1 
SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
© Dr Richard Mitchell, 2014
2h2
f1 +
 x-x0   x-x1 
2h2
f2
p(x) = 1 (r-1)*r*f0 - (r+1)(r-1)* f1 + 1 (r+1)*r*f2
But x0-x1=-h; x0-x2=-2h, etc., so
 x-x1   x-x2 
SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
f2
2
We can now integrate p(x) to get area.
We note that dx = h dr;
p108 RJM 03/10/14
SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
18
SE1EM11 Differentiation and Integration– Part B
Simpson’s Finally
Simpson’s On Exp(t/10)
x2
Then required area becomes  p(x) dx
x0
1

-1
= 
=h 

= h

r-1 *r*f - (r+1)(r-1)* f + r+1 *r*f
0
1
2
2
2

h dr


1 r3 + 1 r2
6
4
1 r3 - 1 r2
6
4
 * f0 -  31 r3 -r
1 f(x ) + 4 f(x ) + 1 f(x )
0
1
2
3
3
3
For next two strips, area is h
Area is
Applying to exp(t/10), where h = 1

* f1 +


1 e 0.1 + e 0.5
3
 * f2  -11
{ recall f0 short for f(x0 ) }
1 f(x ) + 4 f(x ) + 1 f(x )
2
3
4
3
3
3

(m-1)/2
m/2


h
*  f(x0 ) + f( xm ) + 2 *  f(x2r-1 ) + 4* 
f(x2r ) 
3 
r=1
r=1

p109 RJM 03/10/14
SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
+ 4 * (e 0.2 + e0.4 ) + 2*e0.3
= 5.435507
The correct answer is
10*  exp(0.5) - exp(0.1)  = 5.435503526
Here, even with wide strips, answer very good.
If h = 0.5, Simpson’s rule gives 5.4355037
If h = 0.1, answer is 5.43550353
p110 RJM 03/10/14
Summary
SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
Tutorial – Week 10 – Q1 and 2
We have discussed numerical differentiation (to be avoided if poss)
and numerical integration.
These concepts will be extended next term to consider numerical
solution of differential equations.
This concludes this series of lectures on differentiation and
integration
Next term, the calculus theme continues,
with revision and extension of the topics covered,
and will also consider the derivation and solution of differential
equations.
10.1 Small Changes - find change in
a) surface area of a sphere when its radius changes
from 10 to 10.1 m. [Surface area = 4  r2]
b) power in circuit when current changes from
1mA to 0.99 mA, when passing through 10k resistor.
[If I is current going through resistor R, Power = I2R]
c) gain of RC circuit when angular frequency  falls by 1%
from 0.1 rad/s; if R*C = 10 then Gain G =
SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
p112 RJM 03/10/14
Tutorial – Week 10 – Q3 and Q4
5
10.3 Evaluate  sin  0.1t  dt analytically.
1
1
1  2100
10.2 For f = t3 estimate its differential at t = 1, for h = 0.1
using the formula f'(t) 
p111 RJM 03/10/14

f(t  h) - f(t-h)
. Comment.
2*h
SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
Tutorial – Week 10 – Q5
10.5 Revision
Compare results with Rectangular Trapezoidal and
Simpson methods where h is 1.
a) Expand
d(5Ve 0.2t )
dt
b) An RC circuit is described by 5
10.4 Revision
The voltage across the capacitor in a RLC series circuit is
V = 4 - e-t ( sin (3t) + 3 cos (3t) )
dV
+ V = t
dt
Show that V = 0.2e-0.2t  t e0.2t dt
c) Use integration by parts to find  te 0.2t dt
d) Hence find V given that V = 1 at time t = 0.
a) Find the current in the circuit, being I = 0.05 dV
dt
b) Find the voltage across the inductor, being V L = 2 dI
c) Verify that 4I + VL + V = 4
p113 RJM 03/10/14
dt
SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
© Dr Richard Mitchell, 2014
Hints
Q1, 2 and 3 use methods in this week’s notes
Q4 and 5 – look back in previous lectures
p114 RJM 03/10/14
SE1EM11 Differentiation and Integration – Part B
© Dr Richard Mitchell 2014
19