Writing Functions

a function is a relation between a set of inputs (called the domain) and a set of outputs (called the range). Here you will learn more about writing a function.

Writing Functions

A function is a process or relation that associates each element ‘\(a\)’ of a non-empty set \(A\) with at least one single element ‘\(b\)’ of another non-empty set \(B\).

Each function consists of input and output. An input is a variable that enters a function, which is also called an independent variable or domain. The output is the variable that comes out of the function, and it is also called the dependent variable or range.

A function in math can be represented as:

  • a set of ordered pairs
  • an arrow diagram
  • a table form
  • a graphical form

How to Write a Function with an Ordered Pairs Table

Step 1: Analyze the first set of input-output pairs. Identify one solution using addition and another using multiplication.

Step 2: Verify the solutions from Step 1 with the next set of pairs. Repeat this process with additional pairs until only one solution remains consistent.

Step 3: Once a single solution is determined, check all remaining pairs to confirm the rule applies to all of them.

Step 4: Write the function rule as either \(f(x) = x + c\) for addition or \(f(x) = cx\) for multiplication, where \(c\) is the constant used in the established rule.

How to Write Function Rules from Tables and Word Problems

Writing function rules is a core algebra skill. Functions describe relationships between quantities. By analyzing tables or word problems, you can identify the rule and express it in function notation.

Writing Functions from Tables

Step 1: Identify the Pattern Look for the change in output for each unit change in input.

Step 2: Determine if Linear If the change is constant, the function is linear: \(f(x) = mx + b\)

Example Table:

x: 1, 2, 3, 4

y: 5, 9, 13, 17

Change in y: +4 each time. This is linear with slope m = 4.

When \(x=1\), \(y=5\). So \(5 = 4(1) + b\), giving \(b = 1\).

Rule: \(f(x) = 4x + 1\)

Quadratic Functions from Tables

If first differences aren’t constant, check second differences (difference of differences).

Example:

x: 1, 2, 3, 4

y: 2, 5, 10, 17

First differences: 3, 5, 7 (increasing by 2 each time)

Second differences: 2, 2 (constant!)

Second differences being constant indicates a quadratic. The general form is \(f(x) = ax^2 + bx + c\).

Using three points to set up a system of equations:

\(f(1) = a + b + c = 2\)

\(f(2) = 4a + 2b + c = 5\)

\(f(3) = 9a + 3b + c = 10\)

Solving yields \(a = 1\), \(b = 0\), \(c = 1\).

Rule: \(f(x) = x^2 + 1\)

Writing Functions from Word Problems

Step 1: Identify Variables What are you measuring? Input (independent) and output (dependent).

Step 2: Look for Rates and Initial Values Slope and y-intercept in linear relationships.

Example Problem: A cell phone plan costs \(\$25\) per month plus \(\$0.15\) per text message. Write a function for the total monthly cost.

Input: number of texts (x)

Output: total cost in dollars (y)

Fixed cost: \(\$25\) (y-intercept)

Variable cost: \(\$0.15\) per text (slope)

Rule: \(f(x) = 0.15x + 25\)

Function Notation and Interpretation

Function notation \(f(x)\) means “the output of function f when the input is x”.

Example: If \(f(x) = 2x + 3\), then:

\(f(5) = 2(5) + 3 = 13\) means when input is 5, output is 13.

Key Point: The notation \(f(x)\) is not multiplication—it’s function evaluation.

Worked Examples: Complete Solutions

Example 1: A gym charges a \(\$50\) joining fee and \(\$20\) per month. Write a function for the total cost after m months.

Solution: \(C(m) = 20m + 50\) where m is months and C(m) is total cost in dollars.

Example 2: A ball is dropped from 100 feet. Height after t seconds is given by \(h(t) = 100 – 16t^2\). Find the height after 2 seconds.

Solution: \(h(2) = 100 – 16(4) = 100 – 64 = 36\) feet.

Example 3: Write a function for the area of a square with side length s.

Solution: \(A(s) = s^2\) where s is side length and A(s) is area.

Common Mistakes to Avoid

Mistake 1: Confusing independent and dependent variables. Carefully read what’s being asked.

Mistake 2: Forgetting units. Always include units in word problem solutions.

Mistake 3: Not checking your rule. Test your rule with values from the original table or problem.

Deepen your understanding with How to Find Domain and Range of a Function and Composition of Functions.

How to Write Function Rules from Tables and Word Problems

Writing function rules is a core algebra skill. Functions describe relationships between quantities. By analyzing tables or word problems, you can identify the rule and express it in function notation.

Writing Functions from Tables

Step 1: Identify the Pattern Look for the change in output for each unit change in input.

Step 2: Determine if Linear If the change is constant, the function is linear: \(f(x) = mx + b\)

Example Table:

x: 1, 2, 3, 4

y: 5, 9, 13, 17

Change in y: +4 each time. This is linear with slope m = 4.

When \(x=1\), \(y=5\). So \(5 = 4(1) + b\), giving \(b = 1\).

Rule: \(f(x) = 4x + 1\)

Quadratic Functions from Tables

If first differences aren’t constant, check second differences (difference of differences).

Example:

x: 1, 2, 3, 4

y: 2, 5, 10, 17

First differences: 3, 5, 7 (increasing by 2 each time)

Second differences: 2, 2 (constant!)

Second differences being constant indicates a quadratic. The general form is \(f(x) = ax^2 + bx + c\).

Using three points to set up a system of equations:

\(f(1) = a + b + c = 2\)

\(f(2) = 4a + 2b + c = 5\)

\(f(3) = 9a + 3b + c = 10\)

Solving yields \(a = 1\), \(b = 0\), \(c = 1\).

Rule: \(f(x) = x^2 + 1\)

Writing Functions from Word Problems

Step 1: Identify Variables What are you measuring? Input (independent) and output (dependent).

Step 2: Look for Rates and Initial Values Slope and y-intercept in linear relationships.

Example Problem: A cell phone plan costs \(\$25\) per month plus \(\$0.15\) per text message. Write a function for the total monthly cost.

Input: number of texts (x)

Output: total cost in dollars (y)

Fixed cost: \(\$25\) (y-intercept)

Variable cost: \(\$0.15\) per text (slope)

Rule: \(f(x) = 0.15x + 25\)

Function Notation and Interpretation

Function notation \(f(x)\) means “the output of function f when the input is x”.

Example: If \(f(x) = 2x + 3\), then:

\(f(5) = 2(5) + 3 = 13\) means when input is 5, output is 13.

Key Point: The notation \(f(x)\) is not multiplication—it’s function evaluation.

Worked Examples: Complete Solutions

Example 1: A gym charges a \(\$50\) joining fee and \(\$20\) per month. Write a function for the total cost after m months.

Solution: \(C(m) = 20m + 50\) where m is months and C(m) is total cost in dollars.

Example 2: A ball is dropped from 100 feet. Height after t seconds is given by \(h(t) = 100 – 16t^2\). Find the height after 2 seconds.

Solution: \(h(2) = 100 – 16(4) = 100 – 64 = 36\) feet.

Example 3: Write a function for the area of a square with side length s.

Solution: \(A(s) = s^2\) where s is side length and A(s) is area.

Common Mistakes to Avoid

Mistake 1: Confusing independent and dependent variables. Carefully read what’s being asked.

Mistake 2: Forgetting units. Always include units in word problem solutions.

Mistake 3: Not checking your rule. Test your rule with values from the original table or problem.

Deepen your understanding with How to Find Domain and Range of a Function and Composition of Functions.

How to Write Function Rules from Tables and Word Problems

Writing function rules is a core algebra skill that appears throughout mathematics and its applications. Functions describe the relationships between quantities. By analyzing tables or word problems carefully, you can identify the underlying rule and express it in precise function notation.

Writing Functions from Data Tables

Step 1: Identify the Pattern Calculate the change in output for each unit change in input. Look at consecutive y-values and their differences.

Step 2: Determine if Linear If the change in output is constant, the function is linear with the form \(f(x) = mx + b\) where m is the constant change (slope).

Complete Example with Table: Consider this table:

x: 1, 2, 3, 4 / y: 5, 9, 13, 17

Change analysis: From x=1 to x=2, y changes from 5 to 9 (change of +4). From x=2 to x=3, y changes from 9 to 13 (change of +4). Pattern continues with consistent +4 change.

This is linear with slope m = 4. When \(x=1\), \(y=5\). Substituting into \(y = mx + b\): \(5 = 4(1) + b\), which gives \(b = 1\).

Rule: \(f(x) = 4x + 1\)

Verify: \(f(1)=5\) ✓, \(f(2)=9\) ✓, \(f(3)=13\) ✓, \(f(4)=17\) ✓

Identifying Quadratic Functions from Tables

If first differences aren’t constant, check second differences (the differences of the differences).

Worked Example: Consider this table:

x: 1, 2, 3, 4 / y: 2, 5, 10, 17

First differences: 3, 5, 7 (these differences are increasing by 2 each time)

Second differences: 2, 2 (constant!)

When second differences are constant, the function is quadratic with form \(f(x) = ax^2 + bx + c\).

Using three points to set up a system of equations:

\(f(1) = a(1)^2 + b(1) + c = a + b + c = 2\)

\(f(2) = a(4) + b(2) + c = 4a + 2b + c = 5\)

\(f(3) = a(9) + b(3) + c = 9a + 3b + c = 10\)

Solving this system yields \(a = 1\), \(b = 0\), \(c = 1\).

Rule: \(f(x) = x^2 + 1\)

Verify: \(f(1)=2\) ✓, \(f(2)=5\) ✓, \(f(3)=10\) ✓, \(f(4)=17\) ✓

Writing Functions from Word Problems

Step 1: Identify Variables What are you measuring? Clearly define the independent variable (input, what changes) and dependent variable (output, what you’re measuring).

Step 2: Look for Rates and Initial Values In linear relationships, identify the slope (rate of change per unit) and y-intercept (starting value when input is zero).

Real-World Example: A cell phone plan costs \(\$25\) per month as a base fee plus \(\$0.15\) per text message. Write a function for the total monthly cost.

Identify variables: Input (x) = number of text messages. Output (y) = total cost in dollars

Identify values: Fixed cost = \(\$25\) (y-intercept, the amount you pay with zero texts)

Variable cost = \(\$0.15\) per text (slope, the rate of change)

Rule: \(f(x) = 0.15x + 25\)

Interpretation: \(f(50) = 0.15(50) + 25 = 7.50 + 25 = \$32.50\) for 50 texts

Function Notation and Proper Interpretation

Function notation \(f(x)\) means “the output of function f when the input is x”. This is NOT multiplication.

Example: If \(f(x) = 2x + 3\), then:

\(f(5) = 2(5) + 3 = 10 + 3 = 13\) means when the input is 5, the output is 13.

\(f(-1) = 2(-1) + 3 = -2 + 3 = 1\) means when the input is -1, the output is 1.

Key Point: The notation \(f(x)\) represents an output value, not a multiplication operation. Always substitute the value inside the parentheses for x.

Worked Examples: Complete Solutions

Example 1: Gym Membership Cost A gym charges a \(\$50\) joining fee and \(\$20\) per month. Write a function for the total cost after m months of membership.

Solution: \(C(m) = 20m + 50\) where m is the number of months and C(m) is the total cost in dollars.

This means after 6 months: \(C(6) = 20(6) + 50 = 120 + 50 = \$170\) total spent.

Example 2: Falling Object Height A ball is dropped from a height of 100 feet. The height after t seconds is given by \(h(t) = 100 – 16t^2\). Find the height after 2 seconds.

Solution: \(h(2) = 100 – 16(2)^2 = 100 – 16(4) = 100 – 64 = 36\) feet.

The ball has fallen 64 feet and is now 36 feet above the ground.

Example 3: Area of a Square Write a function for the area of a square with side length s.

Solution: \(A(s) = s^2\) where s is the side length and A(s) is the area.

A square with side length 5 units has area \(A(5) = 25\) square units.

Common Mistakes and How to Avoid Them

Mistake 1: Confusing Variables Get confused about which is independent and which is dependent. Always ask: “What am I controlling?” (independent) and “What am I measuring?” (dependent).

Mistake 2: Forgetting Units Omitting units in word problem solutions. Always include units in your final answer and in your function (specify that the output is in dollars, feet, etc.).

Mistake 3: Not Checking Rules Writing a rule but not verifying it works. Always test your rule with values from the original table or problem to catch errors.

Deepen your understanding with How to Find Domain and Range of a Function and Composition of Functions.

How to Write Function Rules from Tables and Word Problems

Writing function rules is a core algebra skill that appears throughout mathematics and its applications. Functions describe the relationships between quantities. By analyzing tables or word problems carefully, you can identify the underlying rule and express it in precise function notation.

Writing Functions from Data Tables

Step 1: Identify the Pattern Calculate the change in output for each unit change in input. Look at consecutive y-values and their differences.

Step 2: Determine if Linear If the change in output is constant, the function is linear with the form \(f(x) = mx + b\) where m is the constant change (slope).

Complete Example with Table: Consider this table:

x: 1, 2, 3, 4 / y: 5, 9, 13, 17

Change analysis: From x=1 to x=2, y changes from 5 to 9 (change of +4). From x=2 to x=3, y changes from 9 to 13 (change of +4). Pattern continues with consistent +4 change.

This is linear with slope m = 4. When \(x=1\), \(y=5\). Substituting into \(y = mx + b\): \(5 = 4(1) + b\), which gives \(b = 1\).

Rule: \(f(x) = 4x + 1\)

Verify: \(f(1)=5\) ✓, \(f(2)=9\) ✓, \(f(3)=13\) ✓, \(f(4)=17\) ✓

Identifying Quadratic Functions from Tables

If first differences aren’t constant, check second differences (the differences of the differences).

Worked Example: Consider this table:

x: 1, 2, 3, 4 / y: 2, 5, 10, 17

First differences: 3, 5, 7 (these differences are increasing by 2 each time)

Second differences: 2, 2 (constant!)

When second differences are constant, the function is quadratic with form \(f(x) = ax^2 + bx + c\).

Using three points to set up a system of equations:

\(f(1) = a(1)^2 + b(1) + c = a + b + c = 2\)

\(f(2) = a(4) + b(2) + c = 4a + 2b + c = 5\)

\(f(3) = a(9) + b(3) + c = 9a + 3b + c = 10\)

Solving this system yields \(a = 1\), \(b = 0\), \(c = 1\).

Rule: \(f(x) = x^2 + 1\)

Verify: \(f(1)=2\) ✓, \(f(2)=5\) ✓, \(f(3)=10\) ✓, \(f(4)=17\) ✓

Writing Functions from Word Problems

Step 1: Identify Variables What are you measuring? Clearly define the independent variable (input, what changes) and dependent variable (output, what you’re measuring).

Step 2: Look for Rates and Initial Values In linear relationships, identify the slope (rate of change per unit) and y-intercept (starting value when input is zero).

Real-World Example: A cell phone plan costs \(\$25\) per month as a base fee plus \(\$0.15\) per text message. Write a function for the total monthly cost.

Identify variables: Input (x) = number of text messages. Output (y) = total cost in dollars

Identify values: Fixed cost = \(\$25\) (y-intercept, the amount you pay with zero texts)

Variable cost = \(\$0.15\) per text (slope, the rate of change)

Rule: \(f(x) = 0.15x + 25\)

Interpretation: \(f(50) = 0.15(50) + 25 = 7.50 + 25 = \$32.50\) for 50 texts

Function Notation and Proper Interpretation

Function notation \(f(x)\) means “the output of function f when the input is x”. This is NOT multiplication.

Example: If \(f(x) = 2x + 3\), then:

\(f(5) = 2(5) + 3 = 10 + 3 = 13\) means when the input is 5, the output is 13.

\(f(-1) = 2(-1) + 3 = -2 + 3 = 1\) means when the input is -1, the output is 1.

Key Point: The notation \(f(x)\) represents an output value, not a multiplication operation. Always substitute the value inside the parentheses for x.

Worked Examples: Complete Solutions

Example 1: Gym Membership Cost A gym charges a \(\$50\) joining fee and \(\$20\) per month. Write a function for the total cost after m months of membership.

Solution: \(C(m) = 20m + 50\) where m is the number of months and C(m) is the total cost in dollars.

This means after 6 months: \(C(6) = 20(6) + 50 = 120 + 50 = \$170\) total spent.

Example 2: Falling Object Height A ball is dropped from a height of 100 feet. The height after t seconds is given by \(h(t) = 100 – 16t^2\). Find the height after 2 seconds.

Solution: \(h(2) = 100 – 16(2)^2 = 100 – 16(4) = 100 – 64 = 36\) feet.

The ball has fallen 64 feet and is now 36 feet above the ground.

Example 3: Area of a Square Write a function for the area of a square with side length s.

Solution: \(A(s) = s^2\) where s is the side length and A(s) is the area.

A square with side length 5 units has area \(A(5) = 25\) square units.

Common Mistakes and How to Avoid Them

Mistake 1: Confusing Variables Get confused about which is independent and which is dependent. Always ask: “What am I controlling?” (independent) and “What am I measuring?” (dependent).

Mistake 2: Forgetting Units Omitting units in word problem solutions. Always include units in your final answer and in your function (specify that the output is in dollars, feet, etc.).

Mistake 3: Not Checking Rules Writing a rule but not verifying it works. Always test your rule with values from the original table or problem to catch errors.

Deepen your understanding with How to Find Domain and Range of a Function and Composition of Functions.

Related to This Article

What people say about "Writing Functions - Effortless Math: We Help Students Learn to LOVE Mathematics"?

No one replied yet.

Leave a Reply

X
51% OFF

Limited time only!

Save Over 51%

Take It Now!

SAVE $55

It was $109.99 now it is $54.99

The Ultimate Algebra Bundle: From Pre-Algebra to Algebra II