# Nakafa Framework: LLM
URL: /en/subject/high-school/11/mathematics/function-modeling/step-function-modeling
Source: https://raw.githubusercontent.com/nakafaai/nakafa.com/refs/heads/main/packages/contents/subject/high-school/11/mathematics/function-modeling/step-function-modeling/en.mdx
Output docs content for large language models.
---
import { getColor } from "@repo/design-system/lib/color";
import { LineEquation } from "@repo/design-system/components/contents/line-equation";
export const metadata = {
  title: "Step Function Modeling",
  description: "Learn step function modeling with real-world applications like bookstore discounts, elevator capacity, and floor/ceiling functions. Master piecewise graphing.",
  authors: [{ name: "Nabil Akbarazzima Fatih" }],
  date: "05/18/2025",
  subject: "Functions and Their Modeling",
};
## Understanding Step Functions
A step function is a type of mathematical function that has constant values on certain intervals and experiences sudden jumps at specific points. The graph of this function resembles stairs, with horizontal lines connecting points of discontinuity.
### Mathematical Definition
A step function can be defined as a piecewise function of the form:
where  are constants and  are non-overlapping intervals.
**Characteristics of step functions:**
- Constant values on each interval
- Jump discontinuities at interval boundary points
- Graph shaped like stairs
- Belongs to the category of piecewise functions
## Types of Step Functions
### Floor Function
The floor function, denoted by , gives the largest integer less than or equal to .
To make it easier to understand, let's look at the following example:
      Floor Function 
    >
  }
  description={
    <>
      The graph shows the floor function that gives the largest integer value
      that does not exceed x.
    >
  }
  data={[
    {
      points: Array.from({ length: 41 }, (_, i) => {
        const x = (i - 20) * 0.25;
        return { x, y: Math.floor(x), z: 0 };
      }),
      color: getColor("PURPLE"),
      showPoints: false,
      smooth: false,
      labels: [{ text: "f(x) = ⌊x⌋", at: 30, offset: [1, -1, 0] }],
    },
  ]}
  cameraPosition={[0, 0, 12]}
  showZAxis={false}
/>
**Floor function value table:**
| x                                       | -2.5 | -1.7 | -1  | -0.3 | 0   | 0.8 | 1   | 1.9 | 2.4 |
| --------------------------------------- | ---- | ---- | --- | ---- | --- | --- | --- | --- | --- |
|  | -3   | -2   | -1  | -1   | 0   | 0   | 1   | 1   | 2   |
### Ceiling Function
The ceiling function, denoted by , gives the smallest integer greater than or equal to .
Let's look at the following example:
      Ceiling Function 
    >
  }
  description={
    <>
      The graph shows the ceiling function that gives the smallest integer value
      that is not less than x.
    >
  }
  data={[
    {
      points: Array.from({ length: 41 }, (_, i) => {
        const x = (i - 20) * 0.25;
        return { x, y: Math.ceil(x), z: 0 };
      }),
      color: getColor("ORANGE"),
      showPoints: false,
      smooth: false,
      labels: [{ text: "f(x) = ⌈x⌉", at: 30, offset: [1, -1, 0] }],
    },
  ]}
  cameraPosition={[0, 0, 12]}
  showZAxis={false}
/>
### Unit Step Function (Heaviside)
The unit step function or Heaviside function, denoted by  or , is defined as:
Unlike the floor and ceiling functions, the unit step function has a value of 0 for  and 1 for .
      Unit Step Function 
    >
  }
  description={
    <>
      The graph shows the unit step function that jumps from 0 to 1 at point x =
      0.
    >
  }
  data={[
    {
      points: Array.from({ length: 21 }, (_, i) => {
        const x = i - 10;
        return { x, y: x >= 0 ? 1 : 0, z: 0 };
      }),
      color: getColor("TEAL"),
      showPoints: false,
      smooth: false,
      labels: [{ text: "H(x)", at: 12, offset: [1, 0.5, 0] }],
    },
  ]}
  cameraPosition={[0, 0, 12]}
  showZAxis={false}
/>
## Properties of Step Functions
**General properties:**
1. Domain:  (usually)
2. Range: Set of discrete values
3. Continuity: jump discontinuities at certain points
**Special properties of floor and ceiling functions:**
1. 
2. 
3. 
4. 
**Comparison table of floor and ceiling functions:**
| x    |  |  | Difference |
| ---- | --------------------------------------- | ------------------------------------- | ---------- |
| -2.3 | -3                                      | -2                                    | 1          |
| -1   | -1                                      | -1                                    | 0          |
| 0.7  | 0                                       | 1                                     | 1          |
| 2    | 2                                       | 2                                     | 0          |
| 3.8  | 3                                       | 4                                     | 1          |
## Transformations of Step Functions
### Vertical Translation
The function  shifts the floor function graph upward (if ) or downward (if ).
Vertical Translation of Floor Function>}
  description={
    <>
      Comparison of  with{" "}
       and{" "}
      .
    >
  }
  data={[
    {
      points: Array.from({ length: 41 }, (_, i) => {
        const x = (i - 20) * 0.25;
        return { x, y: Math.floor(x), z: 0 };
      }),
      color: getColor("PURPLE"),
      showPoints: false,
      smooth: false,
      labels: [{ text: "f(x) = ⌊x⌋", at: 30, offset: [0, 0.5, 0] }],
    },
    {
      points: Array.from({ length: 41 }, (_, i) => {
        const x = (i - 20) * 0.25;
        return { x, y: Math.floor(x) + 2, z: 0 };
      }),
      color: getColor("CYAN"),
      showPoints: false,
      smooth: false,
      labels: [{ text: "g(x) = ⌊x⌋ + 2", at: 30, offset: [0, 0.5, 0] }],
    },
    {
      points: Array.from({ length: 41 }, (_, i) => {
        const x = (i - 20) * 0.25;
        return { x, y: Math.floor(x) - 1, z: 0 };
      }),
      color: getColor("ROSE"),
      showPoints: false,
      smooth: false,
      labels: [{ text: "h(x) = ⌊x⌋ - 1", at: 30, offset: [2, 0.5, 0] }],
    },
  ]}
  cameraPosition={[0, 0, 12]}
  showZAxis={false}
/>
### Horizontal Translation
The function  shifts the graph to the right (if ) or to the left (if ).
## Practice Problems
1. Determine the value of 
2. A bookstore gives discounts based on the number of purchases:
   - 1-5 books: no discount
   - 6-10 books: 10% discount
   - 11-20 books: 15% discount
   - > 20 books: 20% discount
   If the price per book is Rp 50,000, create a function that represents the total price after discount!
3. Graph of function  for 
4. Solve the equation 
5. An elevator can accommodate a maximum of 8 people. If there are  people who want to use the elevator, how many times must the elevator operate?
### Answer Key
1. **Calculating floor and ceiling function values:**
   
     
     
     
   
2. **Bookstore discount function model:**
   Let  be the number of books purchased, then the total price after discount is:
   
     
   
3. **Graph of function :**
   For each interval:
   - 
   - 
   - 
   - 
   - 
   - 
   If we create the graph, it would look approximately like the following:
   
         Graph of 
       >
     }
     description={
       <>
         The graph shows the transformation of the floor function with a scale
         factor of 2 and vertical translation of -1.
       >
     }
     data={[
       {
         points: Array.from({ length: 25 }, (_, i) => {
           const x = (i - 12) * 0.25;
           return { x, y: 2 * Math.floor(x) - 1, z: 0 };
         }),
         color: getColor("VIOLET"),
         showPoints: false,
         smooth: false,
         labels: [{ text: "f(x) = 2⌊x⌋ - 1", at: 18, offset: [1, 1, 0] }],
       },
     ]}
     cameraPosition={[0, 0, 10]}
     showZAxis={false}
   />
4. **Solving the equation :**
   
     
     
     
   
   So the solution set is .
5. **Calculating the number of elevator operations:**
   If there are  people and the elevator can accommodate a maximum of 8 people, then the number of elevator operations required is:
   
   The ceiling function is used because if there are remaining people (less than 8), one additional elevator operation is still required.