Functions

advertisement
ACS123
Functions
Dr Viktor Fedun
Automatic Control and Systems
Engineering, C09
Based on lectures by Dr Anthony Rossiter
Why is mathematics important?
Why do engineers need to be good at
mathematics?
Is it sufficient to memorise key results?
Just because a learning technique worked at
school, does that make it the best method
now?
What mathematics do I need to be good at?
Mathematics is a tool-kit
A good engineer:
1. knows which is the best tool to use?
2. Is proficient in using the tool?
3. Can adapt the tool to a new use.
It is not good enough to memorise key results as
the most important skill is abstraction. You
must put your effort into understanding.
Module assessment
•
3 in class tests in weeks 4, 7, 11, 13
These will be similar to exam questions.
• An exam in May or June
If you want feedback on an answer you have done,
ask in a tutorial.
20 credit module, similar pattern in semester 2.
Module organisation
I will teach the first semester
Lectures and tutorials
Of the 5 timetabled hours, 2-3 will be used
for lectures (these times may vary each
week).
MOLE
Please use the discussions board to ask
questions. Then everyone can see the
question and answer.
I will not respond to email queries unless of
a personal or private nature.
Resources
Learning is only effective where students engage
in self-discovery.
1. What you hear, you will usually forget.
2. You only really understand something when
you use it.
3. We will provide ample materials, but YOU will
only learn if you use these properly. [5-6 hours
per week]
Lecturers are here to guide – NOT TO TEACH!
We will answer queries and be as helpful as
possible, but only you can do the work.
Be a function
Stand up.
1. Use your arms to illustrate y=x.
2. What about y=-x?
3. Can you do y=x2, or even x3.
4. What about sine(x) – you may need a
partner. Now do cosine(x).
5. Can you y=mod(x)? Or even y=sqrt(x2)?
6. Can you think of any more?
Common functions
1.
2.
3.
4.
sine, cosine, tangent (and their inverses)
logarithm, exponential
sinh and cosh
straightline, quadratic, general
polynomial
5. combinations of above as products,
composites and fractions.
You should be familiar with shapes of common
functions and be able to sketch quickly.
Example 1
(Page 136, Kuldeep and Singh, Example 3)
[Mechanics]
The displacement, φ(t), of a particle at time t
is given by:
φ(t)= 2t3 + t2 - 10t + 10
(a) Evaluate φ(2), φ(3), φ(5).
(b) Find simplified expressions for:
(i) φ(t2)
(ii) φ(t + 1)
Example 1
Solution
Solution:
(a) We have
(a)φ(2) = (2 x 23) + 22 – (10 x 2) + 10 = 10
(a)φ(3) = (2 x 33) + 32 – (10 x 3) + 10 = 43
(b)φ(5) = (2 x 53) + 52 – (10 x 5) + 10 = 235
Example 1
Solution
(b) (i) For φ(t2) we replace the t with t2 in φ(t)= 2t3 +
t2 - 10t + 10:
φ(t2) = 2(t2)3 + (t2)2 – 10(t2) + 10
= 2t6 + t4 – 10t2 + 10
(ii) For φ(t + 1) we replace t with t+1 in φ(t)= 2t3 +
t2 - 10t + 10:
φ(t+1)= 2(t+1)3 + (t+1)2 – 10(t+1) + 10:
What is a function?
1. A rule which translates an input, usually
to a single output.
2. What are the functions for:
i. Double the input
ii. Shift the input by 3
iii. Cube the input and subtract 1.
3. Write down in words the functions for
y  5 x  2;
y
x  4;
y   ( x  1)
2
What variables can a function
have?
What is the difference between the functions f(x),
g(w), h(y) and k(x)
y  f ( x )  sin( x )
z  g ( w )  sin( w )
x  h( y )  ( y  2)
w  k ( x)  ( x  2)
2
2
A function describes a relationship, the variable
names are unimportant.
Engineers typically use variable names that relate
to the topic: W for weight, h for height, L for
length, etc.
What is a function argument?
The part that appears in the brackets;
• For y=f(x), x is the argument.
• For z=g(w), w is the argument.
Thus argument is another word for the input
to the function.
Independent and dependent variables:
what do you think these are? Use common
sense.
Composition of functions
What do the following statements mean?
y  f ( g ( x ));
f (x)  x ;
g ( x )  sin( x )
y  g ( f ( x ));
f (x)  x ;
g ( x )  sin( x )
w  h ( g ( f ( z )));
2
2
h ( x )  x  3;
Evaluate the following
Find y when x=pi/2.
Find w when z=1.
y  f ( g ( x ));
w  h ( g ( f ( z )));
f (x)  x ;
2
g ( x )  sin( x )
h ( x )  x  3;
Function products
Evaluate A given that:
A = y2h with x=2 and z=3
y  f ( g ( x ));
w  h ( g ( f ( z )));
f (x)  x ;
2
g ( x )  sin( x )
h ( x )  x  3;
Write down a detailed function expression to
express A.
Example 2
(Page 152 Kuldeep Singh, Example 16)
[Reliability Engineering]
The failure density function, f(t), for a component is
given by:
f(t) = 1/8 where 0 < t < 8 years.
Find F(t), R(t) and h(t) where these are defined as:
F(t) = tf(t)
(Failure Distribution function)
R(t) = 1-F(t)
(Reliability function)
h(t) = f(t) / R(t) (hazard Rate function)
and 0 < t < 8 years.
Example 2
(Page 152 Example 16)
Solution
We have:
F(t)
= tf(t) = t(1/8) = t/8.
R(t) = 1-F(t) = 1- t/8
h(t)
= f(t) / R(t)
= (1/8)/(1-t/8)
= 1/(8-t)
Graphs and sketching
By first producing a suitable table, sketch
the graphs of the following functions in the
domain -3 to 3.
y  sin( x )  2
Domain is the
values allowed to
the argument
or independent variable.
Range is the values
the output (dependent
variable) can take.
y  sin( x 

)
2
y  ( x  1)( x  2 )
y  tan( x )
What is the range of these?
Example 3
(Page 110 Example 7)
[Fluid Mechanics]
The streamlines of fluid flow are given by:
y = x2 + c
where c is constant.
Sketch the streamlines for c = 0, -1 ,1, -2, 2, -3 and 3.
Example 3
(Page 110 Example 7)
Solution
The graphs of y = x2 + c for c = 0, -1 ,1, -2, 2, -3 and
3 are:
(c=0)
y = x2
(c=-1)
y = x2 - 1
(c=1)
y = x2 + 1
(c=-2)
y = x2 -2
(c=2)
y = x2 +2
(c=-3)
y = x2 – 3
(c=3)
y = x2 + 3
y
3
2
1
-2
-1
0
-1
-2
-3
c=3
c=2
c=1
c=0
c = -1
c = -2
c = -3
1
2
x
Notice how the graph of y=x2 + c varies as c
changes. The c is where the curve cuts the y axis.
Inverse function
mean that all we’ve done is made a switch in
emphasis
Inverse function
mean that all we’ve done is made a switch in
emphasis
7–4=3
3+4=7
Inverse function
mean that all we’ve done is made a switch in
emphasis
7–4=3
3+4=7
Both of this statements say the same thing, but with a change in emphasis
Inverse function
mean that all we’ve done is made a switch in
emphasis
7–4=3
3+4=7
Both of this statements say the same thing, but with a change in emphasis
Inverse function
mean that all we’ve done is made a switch in
emphasis
7–4=3
3+4=7
Both of this statements say the same thing, but with a change in emphasis
y = f (x)
-1
x = f (y)
Inverse function
example
y=2x-7;
y=f(x)=2x-7
Inverse function
example
y=2x-7;
y=f(x)=2x-7
Identity function
Inverse function
example
y=2x-7;
y=f(x)=2x-7
Identity function
If
and
inverse function
Inverse function
example
y=2x-7;
y=f(x)=2x-7
Identity function
If
and
inverse function
Composition of functions
Inverse function
f
-1
A function f and its inverse f . Because f maps 1 to 4,
-1
the inverse f maps 4 back to 1.
f
-1
One to one function
For every value of x,
there is a distinct
value of y and for
every value of y there
is a distinct value of x.
Which of the following is
one to one?
y  4x  2
y  x  3x  1
2
y e
x
y  sin( x )
Draw the graph and it should be obvious.
Inverse function
y  sin( x )
y  3x  2
1
x  sin ( y )
y2
x
3
Proof
What about?
y  sin( x )  x  cos
2
1
( x)
Inverse function
example
Inverse function
example
Sometimes the inverse of a function cannot be expressed by a formula
with a finite number of terms. For example, if f is the function
-1
then f is one-to-one, and therefore possesses an inverse function f .
The formula for this inverse has an infinite number of terms:
Inverse function
examples
link
Many-to-one and one-to-many
Give some examples of many-to-one and
one-to-many functions.
The logic goes from independent variable to
dependent variable.
Notation
Get into groups and decide three example
functions with the following properties [3
for each item].
1. Continuous
2. Discontinuous
3. Periodic (Why are these important?)
4. Odd
5. Even
Odd
Even
Summary
Independent variable (domain)
Dependent variable (range)
Function
Many-to-one (one-to-one,…)
Odd, even, periodic
Inverse function
Continuous/discontinuous
Composite function
Straight lines
Exponential functions
On some rough paper,
do a sketch of the
following functions.
In what sense are the
functions equivalent?
y1  2
x
y2  3
x
y3  5
x
2
With a suitable rescaling of x,
they are all the same shape.
Functions of this form are called exponentials.
9
y1
y2
y3
8
7
6
5
4
3
2
1
0
-2
-1.5
-1
-0.5
0
0.5
1
1.5
2
Exponential properties
If you double the value
of the independent
variable, you square
the value of the
dependent variable.
There is a constant ratio
which depends solely
on the difference of
the argument:
f ( 2 x )  [ f ( x )]
2
f ( 3 x )  [ f ( x )]
3
f ( ax )
 f ([ a  b ] x )
f ( bx )
For all x!
Exponential properties
Exponential properties
Exponentiation is not commutative
4+5=5+4
4*5=5*4
but
4
256
5
= 5
=
4
625
Exponential properties
Exponentiation is not commutative
4+5=5+4
4*5=5*4
but
4
5
256
= 5
=
4
625
Exponentiation is not associative
(2 + 3) + 4 = 2 + (3 + 4)
but
3 4
(2 )
= 4096
(2 * 3) * 4 = 2 * (3 * 4)
(
34)
2
= 2.417.851.639.229.258.349.412.353
Exponential convention
1. When dealing with exponential functions
it is usual to assume the same base –
ALWAYS!
2. The assumed base is `e’.
3. It will become clearer later why `e’ is
chosen because this makes a lot of
common algebra much simpler.
4. `e’ is irrational, but has a value near 2.7
Exponential convention
1. When dealing with exponential functions
it is usual to assume the same base –
ALWAYS!
2. The assumed base is `e’.
3. It will become clearer later why `e’ is
chosen because this makes a lot of
common algebra much simpler.
4. `e’ is irrational, but has a value near 2.7
and more precisely
Common exponential
The most common
functions you will deal
with are:
A positive exponent
gives an increasing
function with
increasing argument.
A negative exponent
gives a decreasing
argument with
exponent.
y  e  exp( x )
x
y e
x
 exp(  x )
y (t )  e
y (t )  e
at
 bt
2
exp(0.2t)
exp(-0.2t)
1.5
1
0.5
-1
-0.5
0
0.5
1
1.5
2
2.5
3
Exponentials and systems
engineering
The behaviour of real
systems is often
described as an
exponential decay.
1. Radioactivity follows a
curve of the form.
2. An explosion might be
an increasing function.
3. Many systems have
dynamics with 2
exponentials.
r (t )  r ( 0 ) e
h (t )  h ( 0 ) e
z ( t )  Ae
 at
 at
ct
 Be
 bt
If behaviour has a positive exponent – BEWARE!
Note
Logarithms and exponentials are inverse
functions of one another.
ye
x
f ( x )  exp( x )
ze
3w

x  log
1

f

w
e
y
( x )  log e ( x )
log e z
3
log e ( e )  A
A
log e e  1
or
e
log e A
 A
Even/odd and hyperbolic
Functions
Even functions
An even function is one whereby the vertical
axis is equivalent to a mirror.
In mathematical terms, this means that
f(-x)=f(x)
Examples of even functions
2
Notice symmetry about x=0
1.5
1
0.5
0
x2-2
cos(x)
sin(x)2
-0.5
-1
-1.5
-2
-2
-1.5
-1
-0.5
0
0.5
1
1.5
2
Odd functions
An odd function is one whereby the vertical
axis reverses the value of the function.
In mathematical terms, this means that
f(-x)=-f(x)
Examples of odd functions
Notice asymmetry about x=0
6
x3-2x
sin(x)
tan(x)
4
2
0
-2
-4
-6
-2
-1.5
-1
-0.5
0
0.5
1
1.5
2
Constructing even and odd
functions
Every function can be made up of even and
odd functions. This can make some
engineering problems easier to handle.
EVEN FUNCTIONS
ODD FUNCTIONS
f(x)=f(-x)
f(x)=-f(-x)
f ( x) 
1
2
f ( x) 
1
2
[ f ( x )  f ( x )] 
1
[ f (  x )  f (  x )]
2
[ f ( x )  f (  x )] 
1
2
[ f ( x )  f (  x )]
Constructing even and odd
functions
EVEN
f ( x) 
1
[ f ( x )  f (  x )] 
2
g ( x) 
1
ODD
1
[ f ( x )  f (  x )]
2
[ f ( x )  f (  x )]  g (  x )
2
h( x) 
1
[ f ( x )  f (  x )]   h (  x )
2
EVEN FUNCTIONS
ODD FUNCTIONS
f(x)=f(-x)
f(x)=-f(-x)
Construct even and odd functions
to make up the following
f ( x )  3 x  cos( x )
h ( z )  sin( z 

)
3
2
w
g ( w )  w tan 2 w  e
Construct even and odd functions
to make up the following
3 x  cos( x )
sin( z 

cos( x )
)
sin
3
w tan 2 w  e
2

3x
cos z
cos
3
w
e
w

sin z
3
e
w
w tan 2 w 
2
e
w
2
2
EVEN 
1
[ f ( x )  f (  x )]
2
USE
ODD 
e
1
2
[ f ( x )  f (  x )]
w
Simple rules
•
•
•
•
•
•
EVEN*EVEN = EVEN
ODD*ODD = EVEN
EVEN*ODD=ODD
EVEN+EVEN=EVEN
ODD+ODD=ODD
ODD+EVEN=NEITHER ODD NOR EVEN
Can you prove these?
Common even/odd functions
EVEN
cos
x2n
cosh
ODD
sin
x2n+1
tan
sinh
Today we focus on cosh and sinh
e e
x
cosh x 
2
x
e e
x
;
sinh x 
2
x
Plots of cosh and sinh
4
3
2
1
e e
x
cosh x 
x
e e
x
;
0
sinh
x
2
x
2
-1
cosh(x)
sinh(x)
-2
-3
-4
-2
-1.5
-1
-0.5
0
0.5
1
1.5
2
Engineering examples of cosh and
sinh
• Some examples taken from the following
book:
– “Engineering Mathematics through
Applications”
• Kuldeep Singh
– Published by: Palgrave MacMillan
– ISBN 0-333-92224-7
Example 1
(Page 251 Example 21)
[Electrical Principles]
A transmission line of length L has voltage V.
At a distance x from the sending end, the
voltage is given by:
VL = ½(V + IZ0)e-φx + ½(V - IZ0)eφx (*)
Where I is the current, Z0 is the characteristic
impedance and φ is the propagation
coefficient.
Show that at x = L:
VL = Vcosh(φL) - IZ0sinh(φL)
VL = ½(V + IZ0)e-φx + ½(V - IZ0)eφx (*)
Solution:
Putting x = L into (*) gives:
VL = ½(V + IZ0)e-φL + ½(V - IZ0)eφL
= V(e-φL + eφL)/2 + IZ0(e-φL - eφL)/2
= Vcosh(φL) + IZ0(e-φL - eφL)/2
so VL = Vcosh(φL) + IZ0sinh(φL)
Example 2
(Page 251 Example 22)
[Electronics]
In a semiconductor, a force, F, exerted on an
electron is given by:
F = Qcke-kx/(1+e-kx)2
(*)
Where c and k are constants, x is the distance
from the pn junction and Q is the charge.
Show that
F = Qck/2[1+cosh(kx)]
Show that F = Qck/2[1+cosh(kx)]
Solution:
so
hence
F = Qcke-kx/(1+e-kx)2
(*)
F = Qcke-kx/(1 + 2e-kx + e-2kx)
= Qcke-kx / e-kx (ekx + 2 + e-kx)
= Qck /(ekx + 2 + e-kx)
= Qck /(2 + ekx + e-kx)
= Qck /(2 + 2(ekx + e-kx)/2)
= Qck /(2 + 2cosh(kx))
F = Qck/2[1+cosh(kx)]
Solution to ODES
Where an ODE takes the form
2
d x
dt
2
a x0
2
The solution can be represented in two
similar ways.
x  Ae
 at
 Be ;
at
OR
x  C cosh at  D sinh at
Identities
You should be familiar with common
identities using cosh and sinh.
Prove the following:
cosh
2
x  sinh
2
x 1
cosh( x  y )  cosh x cosh y  sinh x sinh y
sinh( x  y )  sinh x cosh y  sinh y cosh x
cosh 2 x  cosh x  sinh x  2 cosh
sinh 2 x  2 sinh x cosh x
2
2
2
x 1
Use of hyperbolic equations with
parametric descriptions
Some simple curves lend
themselves to parametric
descriptions. Consider:
2
2
2
x  y r
1. Circle
2 2
2 2
2
2. Ellipse
a x b y  r
2
2
2
3. Hyperbola
x  y r
2
1.5
x  y 1
2
2
x  y 1
2
2
2
2
1
0.5
0
-0.5
-1
-1.5
-2
-2
-1.5
-1
-0.5
0
0.5
1
1.5
2
x
2
2
2

y
2
0 .6
2
1
2
Parametric descriptions
x  y 1
2
x
2
2
2
2

y
2

x  cos  , y  sin 
2
0 .6
2
1
2

x  2 cos  , y  0 . 6 sin 
the sine and cosine functions give a parametric equation for the ellipse
x  y 1
2
2
2

x  cosh t , y  sinh t
the hyperbolic sine and hyperbolic cosine give a parametric equation
for the hyperbola
ENGINEERING APPLICATION: Space orbits can be
either elliptical or hyperbolic (often called a sling
shot).
Questions
1. Simplify the following expressions.
f 
0 . 5 sinh 4 x  cosh
2
2x
3 cosh 2 x
g  (cosh 2 x  sinh 2 x ) f
h  cosh( x  y ) sinh( x  y )
2. Find parametric expressions for x,y
satisfying the following hyperbola.
2 x  6 y  21
2
2
Link between cosine, sine, cosh
and sinh
You may find the following useful.
e
ix
 cos x  i sin x
e e
ix
cos( x ) 
i sin( x ) 
 ix
2
ix
 ix
e e
2
 cosh ix
 sinh ix
Download