Download Relation & Function - STREE-KM

Document related concepts

Abuse of notation wikipedia , lookup

Mathematics of radio engineering wikipedia , lookup

Functional decomposition wikipedia , lookup

Big O notation wikipedia , lookup

Fundamental theorem of calculus wikipedia , lookup

Continuous function wikipedia , lookup

Non-standard calculus wikipedia , lookup

Elementary mathematics wikipedia , lookup

Dirac delta function wikipedia , lookup

History of the function concept wikipedia , lookup

Function of several real variables wikipedia , lookup

Function (mathematics) wikipedia , lookup

Transcript
What is a function?
What is a function?



A function relates an input to an output.
It is like a machine that has an input and an output.
And the output is related somehow to the input.
f(x)
"f(x) = ... " is the classic way of writing
a function.
And there are other ways, as you will
see!
Input, Relationship, Output
Input
Relationship
Output
0
×2
0
1
×2
2
7
Input, Relationship,
× 2 Output
14
10
×2
20
...
...
...
Names

first, it is useful to give a function a name.
The most common name is "f", but you can have other
names like "g" ... or even "marmalade" if you want.
But let's use "f":

You would say "f of x equals x squared"


Names








what goes into the function is put inside parentheses () after
the name of the function:
So f(x) shows you the function is called "f", and "x" goes in
And you will often see what a function does with the input:
f(x) = x2 shows you that function "f" takes "x" and squares
it.
Example: with f(x) = x2:
an input of 4
becomes an output of 16.
In fact we can write f(4) = 16.
The "x" is Just a Place-Holder!










Don't get too concerned about "x", it is just there to
show you where the input goes and what happens to it.
It could be anything!
So this function:
f(x) = 1 - x + x2
Would be the same function if I wrote:
f(q) = 1 - q + q2
h(A) = 1 - A + A2
w(θ) = 1 - θ + θ2
It is just there so you know where to put the values:
f(2) = 1 - 2 + 22 = 3
Sometimes There is No Function Name






Sometimes a function has no name, and you might just
see something like:
y = x2
But there is still:
an input (x)
a relationship (squaring)
and an output (y)
Relating



At the top I said that a function was like a machine. But a
function doesn't really have belts or cogs or any moving
parts - and it doesn't actually destroy what you put into
it!
A function relates an input to an output.
Saying "f(4) = 16" is like saying 4 is somehow related to
16. Or 4 → 16
Relating





Example: this tree grows 20 cm every year, so the height
of the tree is related to its age using the function h:
h(age) = age × 20
So, if the age is 10 years, the height is:
h(10) = 10 × 20 = 200 cm
Here are some example values:
age
h(age) = age × 20
0
0
1
20
3.2
64
15
300
...
...
A Function is Special






But a function has special rules:
It must work for every possible input value
And you can only have one relationship for each input
value
This can be said in one definition:
Formal Definition of a Function
A function relates each element of a set
with exactly one element of another set
(possibly the same set).
A Function is Special
The Two Important Things!




"...each element..." means that every element in X is
related to some element in Y.
We say that the function covers X (relates every element
of it). (But some elements of Y might not be related to
at all, which is fine.)
"...exactly one..." means that a function is single valued. It
will not give back 2 or more results for the same input.
So "f(2) = 7 or 9" is not right!
A Function is Special
The Two Important Things!
(one-to-many)
(many-to-one)
This is NOT OK in a function
But this is OK in a function
If a relationship does not follow those two rules then it is not a function ... it
would still be a relationship, just not a function.
Example: The relationship x → x2

Could also be written as a table:
X: x
Y: x2
3
9
1
1
0
0
4
16
-4
16
...
...
It is a function, because:
Every element in X is related to Y
No element in X has two or more relationships
So it follows the rules.
(Notice how both 4 and -4 relate to 16, which is allowed.)
Example: This relationship is not a
function:





It is a relationship, but it is not a function, for these
reasons:
Value "3" in X has no relation in Y
Value "4" in X has no relation in Y
Value "5" is related to more than one value in Y
(But the fact that "6" in Y is not related to does not
matter)
Vertical Line Test


On a graph, the idea of single valued means that no
vertical line would ever cross more than one value.
If it crosses more than once it is still a valid curve, but
it would not be a function.
Infinitely Many





My examples have just a few
values, but functions usually
work on sets with infinitely
many elements.
Example: y = x3
The input set "X" is all Real
Numbers
The output set "Y" is also all
the Real Numbers
I can't show you ALL the values,
so I just give a few as an
example:
X: x
Y: x3
-2
-8
-0.1
-0.001
0
0
1.1
1.331
3
27
and so on...
and so on...
Domain, Codomain and Range





In our examples above
the set "X" is called the Domain,
the set "Y" is called the Codomain, and
the set of elements that get pointed to in Y (the actual
values produced by the function) is called the Range.
We have a special page on Domain, Range and
Codomain if you want to know more.
So Many Names!


Functions have been used in mathematics for a very long
time, and lots of different names and ways of writing
functions have come about.
Here are some common terms you should get familiar with:
Example:






Example: with z = 2u3:
"u" could be called the "independent variable"
"z" could be called the "dependent variable" (it depends
on the value of u)
Example: with f(4) = 16:
"4" could be called the "argument"
"16" could be called the "value of the function"
Ordered Pairs








I said I would show you many ways to think about
functions, and here is another way:
You can write the input and output of a function as an
"ordered pair", such as (4,16).
They are called ordered pairs because the input always
comes first, and the output second:
(input, output)
So it looks like this:
( x, f(x) )
Example:
(4,16) means that the function takes in "4" and gives out
"16"
Set of Ordered Pairs











function can then be defined as a set of ordered pairs:
Example: {(2,4), (3,5), (7,3)} is a function that says
"2 is related to 4", "3 is related to 5" and "7 is related 3".
Also, notice that:
the domain is {2,3,7} (the input values)
and the range is {4,5,3} (the output values)
But the function has to be single valued, so we also say
"if it contains (a, b) and (a, c), then b must equal c"
Which is just a way of saying that an input of "a" cannot produce
two different results.
Example: {(2,4), (2,5), (7,3)} is not a function because {2,4} and {2,5}
means that 2 could be related to 4 or 5.
In other words it is not a function because it is not single valued
A Benefit of Ordered Pairs



We can graph them...
... because they are also coordinates!
So a set of coordinates is also a function (if they follow
the rules above, that is)
A Function Can be in Pieces





You can create functions that behave differently
depending on the input value
Example: A function with two pieces:
when x is less than 0, it gives 5,
when x is 0 or more it gives x2
x
Here are some example values:
-3
y
5
-1
5
0
0
2
4
4
16
...
...
Explicit vs Implicit










Before I finish, I would like to mention the terms "explicit" and
"implicit".
"Explicit" is when the function shows you how to go directly from x
to y, such as:
y = x3 - 3
When you know x, you can find y
That is the classic y = f(x) style.
"Implicit" is when it is not given directly such as:
x2 - 3xy + y3 = 0
When you know x, how do you find y?
It may be hard (or impossible!) to go directly from x to y.
"Implicit" comes from "implied", in other words shown indirectly.
Graphing


The Function Grapher can only handle explicit functions,
The Equation Grapher can handle both types (but takes a
little longer, and sometimes gets it wrong).
Conclusion




a function relates inputs to outputs
a function takes elements from a set (the domain) and
relates them to elements in a set (the codomain).
all the outputs (the actual values related to) are together
called the range
a function is a special type of relation where:




every element in the domain is included, and
any input produces only one output (not this or that)
an input and its matching output are together called
an ordered pair
so a function can also be seen as a set of ordered pairs
GRAPH OF FUNCTIONS
TYPE OF FUNCTIONS
Functions are 2 type :
Algebraic function - ฟั งก ์ช ันพีชคณิ ต
คือ ฟั งก์ชนั ที่เขียนอยูใ่ นรูปตัวแปรและค่าคงตัว โดยมีการบวก ลบ
คูณ หาร ยกกาลัง หรื อถอดกรณฑ์


transcendental function - ฟั งก ์ช ันอดิสย
ั
คือ ฟั งก์ชนั ที่ไม่ใช่ฟังก์ชนั ที่ไม่ใช่ฟังก์ชนั พีชคณิต
Algebraic function
 ฟั งก ์ช ันเชิงเส้น
(Linear function) คือ ฟั งก์ชนั ที่มี
เงื่อนไขในรูป
 ฟั งก ์ช ันคงตัว (constant function) คือ ฟั งก์ชน
ั ที่มี
เงื่อนไขในรูป f(x) = c เมื่อ c ∈ R เป็ นลักษณะเฉพาะชนิดหนึง่ ของ
ฟั งก์ชนั เชิงเส้ นที่มีความชัน (m) เป็ นศูนย์
 ฟั งก ์ช ันค่าสัมบู รณ์ (absolute value function) คือ
ฟั งก์ชนั ที่มีเงื่อนไขในรูปค่าสัมบูรณ์ f(x) = |ax + b| โดย a , b ∈ R
้ นได (step function) คือ ฟั งก์ชนั ที่ให้
 ฟั งก ์ช ันขันบั
กราฟเป็ นขันบั
้ นได จะมีเรนจ์ของฟั งก์ชนั เป็ นค่าคงตัวสาหรับช่วง
ของโดเมนที่กาหนดให้
Algebraic function
ฟั งก ์ช ันกาลังสอง (quadratic function) คือ ฟั งก์ชนั ที่เงื่อนไข
เขียนได้ ในรูป f(x) = ax2 + bx + c
เมื่อ a, b , c ∈ R และ a ≠ 0 จะให้ กราฟเป็ นรูปพาราโบลา ซึง่ มี
ลักษณะ ดังนี ้

ถ้ า a > 0 จะได้ กราฟรูปพาราโบลาหงาย มีจดุ ต่าสุด
ถ้ า a < 0 จะได้ กราฟรูปพาราโบลาคว่า มีจดุ สูงสุด

−𝑏
4ac−b2
,
2𝑎
4a
−𝑏
4ac−b2
,
2𝑎
4a
ฟั งก ์ช ันพหุนาม (polynomial function) คือ ฟั งก์ชนั ที่เขียน
ได้ ในรูปผลบวกของเอกนาม โดยนิยมเรี ยงดีกรี ของตัวแปรจากมากไปน้ อย
Algebraic function
 ฟั งก ์ช ันเอกลักษณ์ (Identity function) คือ ฟั งก์ชน
ั
ที่เงื่อนไขเขียนได้ ในรูป f(x) = x ซึง่ ให้ กราฟรูปเส้ นตรงผ่าน
จุดเริ่ มต้ นทามุม 45 องศา กับแกน X ทวนเข็มนาฬิกา
 ฟั งก ์ช ันเศษส่วน (rational function) คือ ฟั งก์ชน
ั ที่
𝑃(𝑥)
เขียนในรูป
เมื่อ P(x) และ Q(x) ต่างเป็ นฟั งก์ชนั พหุนาม
𝑄(𝑥)
4x2 −3x+1
เช่น f(x) =
x−2
Transcendental function
 ฟั งก ์ช ันตรีโกณมิต ิ
(trigonometric function) คือ
ฟั งก์ชนั ที่เขียนในรูปฟั งก์ชนั ตรี โกณมิติ
 เช่น f(x) = sin x , f(x) = cos x
 ฟั งก ์ช ันเอกซ ์โพเนนชียล (exponential
function) คือ ฟั งก์ชนั ที่มีเงื่อนไขในรูป f(x) = ax โดย a เป็ น
จานวนจริ งบวกคงที่ไม่เท่ากับ 1
 ฟั งก ์ช ันลอการิทม
ึ (logarithmic function) คือ
ฟั งก์ชนั ที่เขียนในรูป f(x) = logax โดย a เป็ นจานวนจริ งบวกคงที่
ไม่เท่ากับ 1
Common functions Reference
Linear Function:
Square Function:
Cube Function:
f(x) = x2
f(x) = mx + b
f(x) = x3
Common functions Reference
Square Root Function:
Absolute Value Function:
f(x) = √x
f(x) = |x|
Reciprocal Function
f(x) = 1/x
Common functions Reference
Exponential Function:
f(x) = ex
Logarithmic Function:
f(x) = ln(x)
Common functions Reference
Floor and Ceiling Function:
The Floor Function
Common functions Reference
Sine Function:
Cosine Function:
Tangent Function:
Dance Moves
Equation of a Straight Line



The equation of a straight line is usually written this way:
y = mx + b
(or "y = mx + c" in the UK see below)
Slope (or Gradient)
Y Intercept
y = how far up
x = how far along
m = Slope or Gradient (how steep the line is)
b = the Y Intercept (where the line crosses the Y axis)
Equation of a Straight Line



How do you find "m" and "b"?
b is easy: just see where the line crosses the Y axis.
m (the Slope) needs some calculation:
Equation of a Straight Line

Example 1
b = 1 (where the line crosses the Y-Axis)
Therefore y = 2x + 1
With that equation you can now ...
... choose any value for x and find
the matching value for y
For example, when x is 1:
y = 2×1 + 1 = 3
Check for yourself
that x=1 and y=3 is actually on the
line.
Or we could choose another value
for x, such as 7:
y = 2×7 + 1 = 15
And so when x=7 you will
have y=15
Equation of a Straight Line
Country Note:
Different Countries teach different "notation" (as sent to me by kind readers):
In the US,Australia, Canada, Egypt, Eritrae, Iran,Mexico, Portugal, Philippines and Saudi
Arabia the notation is:
y = mx + b
In the UK, Australia (also), Bahamas, Bangladesh, Belgium, Brunei, Bulgaria, Cyprus, Germany,
Ghana, India, Indonesia, Ireland, Jamaica, Kenya, Kuwait, Malaysia, Malawi, Malta, Nepal,
Netherlands, New Zealand, Nigeria, Pakistan, Peru, Poland, Singapore, Solomon Islands, South
Africa, Sri Lanka,Turkey, UAE, Zambia and Zimbabwe
y = mx + c
In Afghanistan, Albania, Brazil, China, Czech Republic, Denmark, Ethiopia, France, Lebanon,
Holland, Kosovo, Kyrgyzstan, Romania, Spain, Tunisia and Viet Nam:
In Azerbaijan, China, Finland, Russia and Ukraine:
In Greece:
In Italy:
In Japan:
In Cuba and Israel:
In Latvia:
In Romania:
In Sweden:
In Serbia and Slovenia:
y = ax + b
In your country:
let us know!
y = kx + b
ψ = αχ + β
y = mx + q
y = mx + d
y = mx + n
y = jx + t
y = gA + C
y = kx + m
y = kx + n
PROBLEM 1
จงหาว่าจุดที่กาหนดให้ ตอ่ ไปนี ้ อยูบ่ นกราฟของ y ที่กาหนดให้ หรื อไม่
1) จุด (2,7) เมื่อ y = 2x + 3
2) จุด (8 , 23) เมื่อ y = 34 x + 16
3) จุด (-3 , 11) เมื่อ 3x + y = 2
4) จุด (4 , -2) เมื่อ y = -2
PROBLEM 2
จงหาค่าของ a หรื อ b ถ้ าจุดที่กาหนดให้ ท้ายข้ ออยูบ่ นกราฟของฟั งก์ชนั
1.
y = ax + 8 ; (1 , -2)
2.
y – ax = 1 ; (3 , 3)
3.
4.
y=
2
x + b ; (14 , 1)
7
y–b=
2
1
x ; ( , 1)
9
2
PROBLEM 3
เมื่อจุดเยือกแข็งของน ้าเท่ากับ 0 ˚C หรื อ 32 ˚F และจุดเดือดของน ้า
เท่ากับ 100 ˚C หรื อ 212 ˚F จงเขียนความสัมพันธ์ของความสัมพันธ์ของ
อุณหภูมิที่เป็ นองศาเซลเซียส ( ˚C ) และองศาฟาเรนไฮต์ ( ˚F ) ในรูปของ
ฟั งก์ชนั เชิงเส้ น y = ax + b โดย
i. เขียนความสัมพันธ์ของอุณหภูมิที่เป็ นองศาฟาเรนไฮต์ให้ อยูใ่ นรูป ˚C
ii. เขียนความสัมพันธ์ของอุณหภูมิที่เป็ นองศาเซลเซียสให้ อยูใ่ นรูป ˚F
iii. ถ้ าอุณหภูมิของน ้าวัดได้ 110 ˚F จะเท่ากับกี่องศาเซลเซียส
iv. ถ้ าอุณหภูมิของน ้าวัดได้ 40 ˚C จะเท่ากับกี่องศาฟาเรนไฮต์
PROBLEM 4
บริ ษั ท แห่ ง หนึ่ ง จ่ า ยค่ า จ้ า งซึ่ง คิ ด จากค่ า พาหนะ และค่ า เบี ย้ เลี ย้ งให้
พนัก งานขายทุก คน คนละเท่ า ๆ กัน และจ่า ยค่า จัด การเกี่ ยวกับ การขาย
(commission) ซึ่งคิดเป็ นร้ อยละจากยอดขายที่พนัก งานแต่ละคนขายได้
ปรากฏว่า เมื่อเดือนที่ผา่ นมา วิทวัสได้ รับเงินจากบริษัท 31,000 บาท โดยเขา
มียอดขาย 300,000 บาท สุนทรได้ รับเงินจากบริษัท 32,500 บาท
i. เขียนฟั งก์ชนั แทนรายได้ ที่พนักงานได้ รับในแต่ละเดือนในรูปของสมการ
ii. บริษัทจ่ายค่าจัดการเกี่ยวกับการเขียนให้ กบั พนักงานร้ อยละเท่าใด
iii. บริษัทจ่ายค่าเบี ้ยเลี ้ยงและค่าพาหนะให้ พนักงานเป็ นเงินเดือนละกี่บาท
QUADRATIC
FUNCTIONS
Parabola Or Square Function

This is the Square Function:
f(x) = x2

This is its graph:
It is a Parabola.
It has symmetry about
the y-axis (like a mirror
image).
And it is an even
function.
Its Domain is the Real
Numbers:
Its Range is the NonNegative Real
Numbers:
[0, +∞)
y = x2
y = 1 – x2
y = 2x2 + 4
y = –(x + 3)2
y = x2 + 2x
y = -x2 + 4x + 5
่
่
จงใช้ความรู ้เรืองกราฟเพื
อแสดงว่
าสมการที่
้ ่
กาหนดให้ในข้อใดต่อไปนี ที
มีคาตอบของสมการที่เป็ นจานวนจริงเพียง 1 จานวน
x2
-4=0
มีคาตอบของสมการที่เป็ นจานวนจริง 2 จานวน
2x2 + 5 = 0
ไม่มีคาตอบของสมการที่เป็ นจานวนจริง
-3x2 – 7 = 0
2(x + 1) 2 = 0
-5(x + 3)2 – 7
จงหาคาตอบของอสมการโดยใช้ กราฟ
x2 – x – 2 > 0
x2 – 5x – 6 ≥ 0
จงหาคาตอบของอสมการโดยใช้ กราฟ
–(x – 7)(x + 3) ≤ 0
-2x2 + 7x + 4 > 0
จงหาคาตอบของอสมการโดยใช้ กราฟ
x2 > 3x
x2 + 2x ≥ 8
จงหาคาตอบของอสมการโดยใช้ กราฟ
-x2 – 6x ≤ -7
x2 – 3x – 1 ≤ 3
Exponential Function

This is the Exponential Function:
f(x) = ax
a is any value greater than 0



Properties depend on value of "a“
When a=1, the graph is a horizontal line at y=1
Apart from that there are two cases to look at:
Exponential Function

Apart from that there are two cases to look at:
a between 0 and 1
Example: f(x) = (0.5)x
For a between 0 and 1
As x increases, f(x) heads to 0
As x decreases, f(x) heads to infinity
It is a Strictly Decreasing function
(and so is "Injective")
It has a Horizontal Asymptote along
the x-axis (y=0).
a above 1
Example: f(x) = (2)x
For a above 1:
As x increases, f(x) heads to infinity
As x decreases, f(x) heads to 0
it is a Strictly Increasing function
(and so is "Injective")
It has a Horizontal Asymptote along
the x-axis (y=0).
Exponential Function
f(x) = ax




In General:
It is always greater than 0, and never crosses the xaxisIt always intersects the y-axis at y=1 ... in other words
it passes through(0,1)
At x=1, f(x)=a ... in other words it passes through (1,a)
It is an Injective (one-to-one) function
Its Domain is the Real Numbers:
Its Range is the Positive Real Numbers: (0,
+∞)
Inverse of Exponential Function
ax is the inverse function of loga(x)
(the Logarithmic Function)
f(x) = loga(x)
So the Exponential Function can be "reversed" by the
Logarithmic Function.
The Natural Exponential Function
This is the "Natural" Exponential Function:
f(x) = ex
Where e is "Eulers Number" = 2.718281828459 (and more ...)
At the point (1,e) the slope of the line is e and the line is
tangent to the curve.
Absolute Value Function
This is the Absolute Value Function:
f(x) = |x|
It is also sometimes written: abs(x)
This is its graph:
It makes a right angle at (0,0)
It is an even function.
Its Domain is the Real
Numbers:Real Numbers
Its Range is the Non-Negative
Real Numbers: [0, +∞)
Floor and Ceiling Function
The floor and ceiling functions give you the nearest integer up or down.
Floor and Ceiling Function
Floor and Ceiling of Integers
What if you want the floor or ceiling of a number that is already an integer?
That's easy: no change!
Example: What is the floor and ceiling of 5?
The Floor of 5 is 5
The Ceiling of 5 is 5
Here are some example values for you:
x
Floor
Ceiling
-1.1
-2
-1
0
0
0
1.01
1
2
2.9
2
3
3
3
3
Floor and Ceiling Function
Definitions
Example: How do we define the floor of 2.31?
Well, it has to be an integer ...
... and it has to be less than (or maybe equal to) 2.31, right?
2 is less than 2.31 ...
but 1 is also less than 2.31,
and so is 0, and -1, -2, -3, etc.
Oh no! There are lots of integers less than 2.31.
So which one do we choose?
Choose the greatest one (which is 2 in this case)
So we get:
The greatest integer that is less than (or equal to) 2.31 is 2
Floor and Ceiling Function
Which leads to our definition:
Floor Function: the greatest integer that is less than or equal to x
Likewise for Ceiling:
Ceiling Function: the least integer that is greater than or equal to x
As A Graph
The Floor Function is this curious "step" function (like an infinite staircase):
The Floor Function
(Note: a solid dot means "including"
an open dot means "not including")
Floor and Ceiling Function
If it looks confusing, just imagine you are at some x-value (say x=1.5), and see
what y-value you get ... does it make sense now?
Example: at x=2 we meet an open dot at y=1 (so it does not include x=2), and a solid
dot at y=2 (which does include x=2) so the answer is y=2
And this is the Ceiling Function:
Floor and Ceiling Function
If it looks confusing, just imagine you are at some x-value (say x=1.5), and see
what y-value you get ... does it make sense now?
Example: at x=2 we meet an open dot at y=1 (so it does not include x=2), and a solid
dot at y=2 (which does include x=2) so the answer is y=2
And this is the Ceiling Function:
The "Int" Function

The "Int" function (short for "integer") is like the "Floor"
function, BUT some calculators and computer programs
show different results when given negative numbers:



Some say int(-3.65) = -4 (the same as the Floor function)
Others say int(-3.65) = -3 (the rule is: neighbouring
integer closest to zero, or "just throw away the .65")
So be careful with this function!
The "Frac" Function

When you use the Floor Function, you "throw away" the
fractional part. That part is called the "frac" or "fractional
part" function:
frac(x) = x - floor(x)
It looks like a sawtooth:
Example: what is frac(3.65)?
frac(x) = x - floor(x)
So: frac(3.65) = 3.65 - floor(3.65) = 3.65 - 3
= 0.65
Example: what is frac(-3.65)?
frac(x) = x - floor(x)
So: frac(-3.65) = (-3.65) - floor(-3.65) = (-3.65)
- (-4) = -3.65 + 4 = 0.35