Functions
Functions
Definition:
A function is a relationship between two sets in which every entry in one set
corresponds to precisely one output in the other. This can be written as f:
X→Y where X is the domain (set of inputs) and Y is the codomain (set of
possible outputs).
2. Function Notation:
o If f is a function and x is an input, the output is denoted as f(x).
3. Types of Functions:
forms a parabola.
o Polynomial Functions: Involves terms like ax where n is a
n
non-negative integer.
o Exponential Functions: Involves terms like a⋅b where b is a
x
constant base.
4. Function Composition:
o Combining two functions, where (f∘g)(x)=f(g(x)).
5. Inverse Functions:
o A function f has an inverse f if f(f (x)) for all x in the range of f.
-1 -1
Applications of Functions:
1. Modeling Relationships:
o Functions are used to model real-world relationships, such as
how distance depends on time in motion, or how supply and
demand affect prices.
2. Problem Solving:
o Functions help solve equations and find unknown values. For
example, if you know the price of an item and the quantity sold,
you can use a function to determine total revenue.
3. Predictive Analysis:
o Functions are used in statistics and data analysis to make
predictions based on trends and patterns. For instance, fitting a
linear regression model to predict future values.
6. Computer Science:
o Functions are fundamental in programming and algorithms.
They help in structuring code, modularizing tasks, and
managing complex systems.
2. Medicine
Drug Dosage: The concentration of a drug in the bloodstream over
time can be modeled by exponential decay functions. This helps in
determining the appropriate dosage and timing for medication.
3. Economics
Supply and Demand: Functions describe the relationship between
the quantity of a good supplied or demanded and its price. For
instance, a supply function might be Q =a+bP is the quantity supplied,
s
5. Computer Science
Algorithm Efficiency: Functions describe the time and space
complexity of algorithms, helping in the design and optimization of
efficient code. For example, the time complexity of sorting algorithms
like merge sort is O (nlogn)
Problem #1
A shipping company charges based on the weight of the package. The cost
is ₱150 for packages up to 10 pounds and has an additional ₱20 for every
pound added after. Use a piece-wise function to represent the shipping
charge in terms of pounds.
Find the shipping fare function S(p) where p represents the number of
pounds of the package.
If the package weighs fifteen pounds, find the desired shipping cost.
Wherein:
P = 1,000 (principal amount)
r = 0.05 (annual interest rate)
n = 4 (number of times interest is compounded per year)
t =10 (number of years)
Substituting these values into the formula we would be getting the result of
A =1000(1+ 0.05 /4)4x10
A = 1000(1+0.0125)40
A ≈1000×1.647A
A ≈1647.00A
Drug Dosage
Problem #3:
A patient with a drug dosage is administered to a hospital, through a
medication from a doctor that follows a decay model where the amount of
drug in the bloodstream after t hours is given by C(t)= C . Suppose that
0e
-kt
C = 500mg, and the decay is at the constant of k=0.2 per hour. How much
0
Solution:
Using the formula of C(t)=500e−0.2 ⋅6
C(t)=500e−1.2
C(t)≈ 500 x 0.301
C(t) ≈ 150.5mg
Problem #4:
Imagine yourself as someone who owns a retailing establishment wherein
you want to forecast your amount sales for the upcoming quarter in order to
schedule workers and inventory. To make this forecast, you can build a
function using previous sales data.
2. To Select a Model: You can select a model for your sales prediction
based on the data. If sales are trending steadily, a popular strategy is
to employ a linear function; if there is a seasonal pattern, a more
complex function is used.
Linear Model: You could utilize a linear function if the growth in your sales
has been consistent. As an illustration:
S(t)=a⋅t+b
where S(t) is the sales amount at time t, a is the rate of increase in sales
per month, and b is the initial sales amount.
Seasonal Model: This can be used if the sales fluctuate within seasons,
you might use a sinusoidal function(function using sine function):
3. Fit the Model: To fit the selected function to your historical data, use
statistical techniques or tools. This entails determining which
parameters—such as a, b, A, B, C, and D—best fit your historical
sales data.
the function S(t)=200 ⋅t + 5000 allows you to forecast sales for any
have found that a=200 (monthly increase) and b=5000(initial sales),
future month t.
Example Calculation
If you want to predict sales for the 13th month, using the linear model:
Problem #5
A parking lot charges ₱30 for parking for the first 3 hours, each further hour
costs ₱5. Represent the amount a person pays as a function of the hours
spent.
Find the parking fee function P(h) where h represents the amount of hours
spent.
P(h) = { 30 if 0 < h ≤ 3
{ ( 30 + 5) p - 3 if p > 3
If the hours spent in the parking lot is 8 what is the total of the parking fee?
P(h) = ( 30 + 5) p - 3 if p > 3
= 30 + 5 ( 8 - 3 )
= 30 + 5 ( 5 )
= 75
Problem#6
Presuming that you and your friends are organizing a road trip to a different
state, and you want to calculate the estimated total cost of the trip taking
into account factors like fuel costs, distance traveled, and fuel usage.
Given Data:
Steps to Solve:
1. Define the Function: You can create a function to calculate the total
cost based on the distance of the trip, fuel efficiency, and fuel price.
Let:
o D be the distance of the trip in miles.
o E be the fuel efficiency of the vehicle in miles per gallon.
o P be the fuel price per gallon in dollars.
3. Perform
C= 20 x 9.00
=Php180.00
Conclusion:
The relationship between distance, fuel efficiency, fuel price, and total cost
was modeled in this case using a function. Using the information provided
parameters, this tool enabled us to calculate the approximate cost of a road
trip. This type of computation is useful for effectively planning travel plans
and creating budgets.
Problem#7
Let's say you want to calculate how much your cell phone data would cost
each month depending on your usage and the price structure offered by
your carrier.
Given Data:
Formula to Use:
To calculate the total monthly cost C based on the data used, you can use
the following piecewise function:
C(x)=40 if x≤5
=40+10⋅(x−5) if x>5
wherein:
Steps to Solve:
C(8)=40+10⋅(8−5)
3. Perform the Calculation:
8−5=3 GB
10⋅3= 30 dollars
Summary:
In this example, the cost of a cell phone data plan was modeled using a
piecewise function. The entire monthly cost was determined by applying
the relevant portion of the algorithm depending on data usage. This type of
feature is helpful for billing systems that have varying charges according to
usage or thresholds.
Problem#8
Suppose you’re buying a house and need to determine your monthly
mortgage payment based on the loan amount, annual interest rate, and
loan term.
Given Data:
M= P⋅ r / n ÷ 1-1 +r / n¿−n ⋅t
where:
Steps to Solve:
1. Convert the Annual Interest Rate to a Monthly Interest Rate:
(1+0.003333¿−360≈ 0.302114
1 − 0.302114 = 0.697886
Then, calculate the monthly payment:
M= 300,000⋅ 0.003333 ÷ 0.697886 ≈ 999.9 ÷ 0.697886
≈1433.27
Conclusion: