Homework 1: Piecewise Functions and Greatest Integer Functions – Answers and Explanations
Piecewise functions and greatest integer functions (also called floor functions) are foundational tools in algebra and precalculus. In practice, they let us describe relationships that change behavior across different intervals or that map real numbers to the largest integer less than or equal to them. In this article we walk through the solutions to the first homework set on these topics, providing step‑by‑step reasoning, key concepts, and a few extra tips to help you master these functions.
1. Introduction
The first homework assignment usually tests two core skills:
- Defining a piecewise function that satisfies a set of conditions.
- Using the greatest integer function ⌊x⌋ to evaluate or simplify expressions.
Below we break down each problem, present the correct answer, and explain the logic behind it. By the end of this read‑through you should feel comfortable setting up and solving similar problems on your own Most people skip this — try not to..
2. Problem 1 – Defining a Piecewise Function
Question:
Write a function ( f(x) ) that equals ( 2x+3 ) when ( x \leq 1 ) and equals ( x^2-4 ) when ( x > 1 ). Then evaluate ( f(0) ), ( f(1) ), and ( f(2) ).
2.1. Constructing the Function
The definition requires a piecewise format:
[ f(x)= \begin{cases} 2x+3, & \text{if } x \leq 1,\[4pt] x^2-4, & \text{if } x > 1. \end{cases} ]
2.2. Evaluating the Function
| (x) | Condition | Expression | Result |
|---|---|---|---|
| 0 | (x \leq 1) | (2(0)+3) | 3 |
| 1 | (x \leq 1) | (2(1)+3) | 5 |
| 2 | (x > 1) | (2^2-4) | 0 |
Answers: (f(0)=3), (f(1)=5), (f(2)=0).
3. Problem 2 – Greatest Integer Function
Question:
Evaluate the following expressions:
a) (\lfloor 3.7 \rfloor)
b) (\lfloor -2.3 \rfloor)
c) (\lfloor 0 \rfloor)
d) (\lfloor -0.
3.1. Understanding the Floor Function
The greatest integer function, denoted (\lfloor x \rfloor), returns the largest integer that is less than or equal to (x). For positive numbers it’s simply the integer part; for negative numbers it rounds down to the next more negative integer Small thing, real impact..
3.2. Calculations
- a) ( \lfloor 3.7 \rfloor = 3 )
- b) ( \lfloor -2.3 \rfloor = -3 ) (since (-3) is the largest integer ≤ (-2.3))
- c) ( \lfloor 0 \rfloor = 0 )
- d) ( \lfloor -0.9 \rfloor = -1 )
Answers: a) 3, b) -3, c) 0, d) -1 The details matter here..
4. Problem 3 – Combining Piecewise and Floor Functions
Question:
Let ( g(x) = \lfloor x \rfloor ) for all real (x). Define a new function ( h(x) ) such that
[ h(x)= \begin{cases} g(x), & \text{if } x < 0,\ 2g(x)+1, & \text{if } x \geq 0. On top of that, > \end{cases} ] Evaluate ( h(-2. Which means 5) ), ( h(0) ), and ( h(3. 2) ) That's the part that actually makes a difference. And it works..
4.1. Step‑by‑Step Evaluation
-
(h(-2.5))
- (x < 0), so use the first case: (h(-2.5)=g(-2.5)=\lfloor -2.5 \rfloor = -3).
-
(h(0))
- (x \geq 0), so use the second case:
(h(0)=2g(0)+1 = 2\lfloor 0 \rfloor + 1 = 2(0)+1 = 1).
- (x \geq 0), so use the second case:
-
(h(3.2))
- (x \geq 0), so use the second case:
(h(3.2)=2g(3.2)+1 = 2\lfloor 3.2 \rfloor + 1 = 2(3)+1 = 7).
- (x \geq 0), so use the second case:
Answers: (h(-2.5)=-3), (h(0)=1), (h(3.2)=7).
5. Problem 4 – Piecewise Function Graphing
Question:
Sketch the graph of the function
[ f(x)= \begin{cases} x^2, & \text{if } x \leq 1,\ 2x-1, & \text{if } x > 1. \end{cases} ] Identify any points of discontinuity No workaround needed..
5.1. Key Points
| (x) | (f(x)) |
|---|---|
| (-2) | ((-2)^2 = 4) |
| (-1) | ((-1)^2 = 1) |
| (0) | (0^2 = 0) |
| (1) | (1^2 = 1) |
| (1.5) | (2(1.5)-1 = 2) |
| (2) | (2(2)-1 = 3) |
5.2. Continuity Check at (x=1)
- Left limit: (\lim_{x \to 1^-} f(x) = 1^2 = 1).
- Right limit: (\lim_{x \to 1^+} f(x) = 2(1)-1 = 1).
- Function value: (f(1)=1).
Since both limits equal the function value, the function is continuous at (x=1). There are no discontinuities.
6. Problem 5 – Solving Inequalities Involving Floor Functions
Question:
Find all real numbers (x) that satisfy (\lfloor 2x \rfloor = 5) Simple, but easy to overlook..
6.1. Translating the Condition
The equation (\lfloor 2x \rfloor = 5) means:
[ 5 \leq 2x < 6. ]
6.2. Solving for (x)
Divide every part by 2:
[ \frac{5}{2} \leq x < 3. ]
Thus, the solution set is:
[ x \in \left[,2.5,;3,\right). ]
Answer: (2.5 \leq x < 3).
7. Problem 6 – Composition of Piecewise and Floor Functions
Question:
Let (f(x) = \lfloor x \rfloor). On the flip side, define (g(x) = f(x^2 - 1)). List the values of (g(x)) for all integer (x) from (-3) to (3).
7.1. Computing (x^2 - 1) for Each Integer
| (x) | (x^2-1) | (f(x^2-1)=\lfloor x^2-1 \rfloor) |
|---|---|---|
| -3 | (9-1=8) | 8 |
| -2 | (4-1=3) | 3 |
| -1 | (1-1=0) | 0 |
| 0 | (0-1=-1) | -1 |
| 1 | (1-1=0) | 0 |
| 2 | (4-1=3) | 3 |
| 3 | (9-1=8) | 8 |
Answers: (g(-3)=8), (g(-2)=3), (g(-1)=0), (g(0)=-1), (g(1)=0), (g(2)=3), (g(3)=8).
8. Problem 7 – Solving a System with a Piecewise Function
Question:
Solve the system
[ \begin{cases} y = \begin{cases} 2x+1, & x < 0,\ x^2, & x \geq 0, \end{cases}\ y = 3. \end{cases} ]
8.1. Case Analysis
-
Case 1: (x < 0)
- (y = 2x+1 = 3) → (2x = 2) → (x = 1).
- But (x=1) contradicts (x<0). No solution here.
-
Case 2: (x \geq 0)
- (y = x^2 = 3) → (x = \pm \sqrt{3}).
- Only (x = \sqrt{3}) satisfies (x \geq 0).
Solution: (x = \sqrt{3}), (y = 3) Not complicated — just consistent..
9. Problem 8 – Graphing a Floor Function
Question:
Sketch (f(x) = \lfloor x \rfloor) for (-2 \leq x \leq 3). Indicate the points where the function jumps.
9.1. Key Features
- Jumps occur at every integer: (-2, -1, 0, 1, 2, 3).
- On each open interval ((n, n+1)) the function is constant at (n).
- At each integer (n), the function value is (n) (closed left), but the right-hand limit is also (n). The function is right‑continuous but has a jump in the sense of a step.
Visual Tip: Draw horizontal segments for each interval and a closed dot at the left endpoint.
10. Problem 9 – Real‑World Application
Question:
A parking garage charges $5 for the first hour and $3 for every additional hour, rounding up to the next whole hour. Express the cost (C(t)) as a piecewise or floor function where (t) is the number of hours parked (a real number) Easy to understand, harder to ignore..
10.1. Modeling the Cost
Let (t) be the exact time parked. The number of additional whole hours after the first is (\lceil t-1 \rceil) (ceil function). Since the problem forbids ceil, we can use floor:
[ \lceil t-1 \rceil = \lfloor t-1 \rfloor + 1. ]
Thus,
[ C(t) = \begin{cases} 5, & 0 < t \leq 1,\[4pt] 5 + 3\bigl(\lfloor t-1 \rfloor + 1\bigr), & t > 1. \end{cases} ]
Simplify the second case:
[ C(t) = 5 + 3\lfloor t-1 \rfloor + 3 = 8 + 3\lfloor t-1 \rfloor. ]
10.2. Sample Calculation
- (t = 1.3): (C(1.3) = 8 + 3\lfloor 0.3 \rfloor = 8 + 3(0) = 8) dollars.
- (t = 2.7): (C(2.7) = 8 + 3\lfloor 1.7 \rfloor = 8 + 3(1) = 11) dollars.
11. Problem 10 – Proving a Property
Question:
Prove that for any real number (x), (\lfloor x \rfloor \leq x < \lfloor x \rfloor + 1) And that's really what it comes down to..
11.1. Proof Outline
-
By definition, (\lfloor x \rfloor) is the greatest integer (\leq x).
- Hence (\lfloor x \rfloor \leq x).
-
Suppose (x \geq \lfloor x \rfloor + 1) And that's really what it comes down to. Simple as that..
- Then (x) would be at least one unit greater than an integer, contradicting the maximality of (\lfloor x \rfloor).
- Therefore (x < \lfloor x \rfloor + 1).
Thus, both inequalities hold for all real (x).
12. Conclusion
This comprehensive walkthrough covered every question from the first homework set on piecewise and greatest integer functions. By dissecting each problem—defining functions, evaluating expressions, graphing, solving inequalities, and modeling real‑world scenarios—you now have a solid toolkit for tackling similar exercises. Remember:
- Piecewise functions: Break the domain into intervals and define a rule for each.
- Greatest integer function: Think of “rounding down” to the nearest integer.
- Combining them: Pay close attention to the domain conditions when composing or evaluating.
With practice, the logic behind these functions will become second nature, and you'll be ready to dive into more advanced topics like step functions, Dirichlet functions, and beyond. Happy studying!