# Nakafa Learning Content

> For AI agents: use [llms.txt](https://nakafa.com/llms.txt) for the site index. Markdown versions are available by appending `.md` to content URLs or sending `Accept: text/markdown`.

URL: https://nakafa.com/en/subjects/mathematics/function-modeling/rational-function
Source: https://raw.githubusercontent.com/nakafaai/nakafa.com/refs/heads/main/packages/contents/material/lesson/mathematics/function-modeling/rational-function/en.mdx

Learn rational functions through domain checks, simplification, operations, and modeling problems such as a chicken coop design.

---

## What is a Rational Function?

Have you ever seen fractions in mathematics? Well, rational functions are similar to fractions, but more interesting because they involve variables!

A rational function is a function in the form of a fraction, where both the numerator and denominator are polynomial functions. Simply put, a rational function can be written as:

```math
f(x) = \frac{P(x)}{Q(x)}
```

Where:

- $$P(x)$$ is a polynomial in the numerator
- $$Q(x)$$ is a polynomial in the denominator
- $$Q(x) \neq 0$$ (denominator cannot be zero)

Visible text: - is a polynomial in the numerator
- is a polynomial in the denominator
- (denominator cannot be zero)

## Examples of Rational Functions in Life

Let's look at a real example to better understand rational functions.

**Chicken Coop Problem:**

Mr. Budi wants to build a rectangular chicken coop with an area of $$100 \text{ m}^2$$. He wants to know the relationship between the length and width of the coop.

Visible text: Mr. Budi wants to build a rectangular chicken coop with an area of . He wants to know the relationship between the length and width of the coop.

If the length of the coop is $$x \text{ meters}$$, then:

Visible text: If the length of the coop is , then:

- $$\text{Area} = \text{length} \times \text{width} = 100$$
- $$x \times \text{width} = 100$$
- Width is $$\frac{100}{x}$$

Visible text: - 
- 
- Width is

The function $$f(x) = \frac{100}{x}$$ is an example of a rational function!

Visible text: The function is an example of a rational function!

## Types of Rational Functions

### Simple Rational Function

The simplest form of a rational function:

```math
f(x) = \frac{k}{x}
```

Where $$k$$ is a constant. Example: $$f(x) = \frac{5}{x}$$

Visible text: Where is a constant. Example:

### Linear Rational Function

Both numerator and denominator are linear functions:

```math
f(x) = \frac{ax + b}{cx + d}
```

Example: $$f(x) = \frac{2x + 3}{x - 1}$$

Visible text: Example:

### Quadratic Rational Function

Involves quadratic functions in the numerator or denominator:

```math
f(x) = \frac{x^2 + 2x + 1}{x - 3}
```

## Domain of Rational Functions

The domain of a rational function is all values of $$x$$ that make the function defined. Remember, the denominator cannot be zero!

Visible text: The domain of a rational function is all values of that make the function defined. Remember, the denominator cannot be zero!

**How to find the domain:**

1. Find values of $$x$$ that make the denominator $$= 0$$
2. The domain is all real numbers except those values

Visible text: 1. Find values of that make the denominator 
2. The domain is all real numbers except those values

**Example:** Determine the domain of $$f(x) = \frac{x + 2}{x - 3}$$

Visible text: **Example:** Determine the domain of

**Solution:**

- Denominator is zero when: $$x - 3 = 0$$
- So: $$x = 3$$
- Domain: $$D_f = \{x | x \neq 3, x \in \mathbb{R}\}$$

Visible text: - Denominator is zero when: 
- So: 
- Domain:

## Simplifying Rational Functions

Rational functions can be simplified by finding common factors in the numerator and denominator.

### Without Factoring

Simplify: $$f(x) = \frac{6x^2}{3x}$$

Visible text: Simplify:

**Solution:**

Component: MathContainer
Children:

```math
f(x) = \frac{6x^2}{3x}
```

```math
= \frac{6x \cdot x}{3x}
```

```math
= \frac{6x}{3} \cdot \frac{x}{x}
```

```math
= 2x
```

### With Factoring

Simplify: $$f(x) = \frac{x^2 - 4}{x - 2}$$

Visible text: Simplify:

**Solution:**

Component: MathContainer
Children:

```math
f(x) = \frac{x^2 - 4}{x - 2}
```

```math
= \frac{(x + 2)(x - 2)}{x - 2}
```

```math
= x + 2
```

Note: $$x \neq 2$$ (from the original domain)

Visible text: Note: (from the original domain)

## Operations on Rational Functions

### Addition and Subtraction

Just like regular fractions, we need to find a common denominator first!

**Example:** $$\frac{2}{x} + \frac{3}{x + 1}$$

Visible text: **Example:**

**Solution:**

Component: MathContainer
Children:

```math
\frac{2}{x} + \frac{3}{x + 1}
```

```math
= \frac{2(x + 1)}{x(x + 1)} + \frac{3x}{x(x + 1)}
```

```math
= \frac{2(x + 1) + 3x}{x(x + 1)}
```

```math
= \frac{2x + 2 + 3x}{x(x + 1)}
```

```math
= \frac{5x + 2}{x(x + 1)}
```

### Multiplication

Multiply numerator with numerator, denominator with denominator:

```math
\frac{a}{b} \times \frac{c}{d} = \frac{ac}{bd}
```

**Example:** $$\frac{x + 1}{x} \times \frac{2x}{x - 1}$$

Visible text: **Example:**

**Solution:**

```math
\frac{x + 1}{x} \times \frac{2x}{x - 1} = \frac{2x(x + 1)}{x(x - 1)} = \frac{2(x + 1)}{x - 1}
```

### Division

Remember, dividing means multiplying by the reciprocal:

```math
\frac{a}{b} \div \frac{c}{d} = \frac{a}{b} \times \frac{d}{c} = \frac{ad}{bc}
```

## Exercises

1. Determine the domain of $$f(x) = \frac{x + 3}{x^2 - 9}$$

2. Simplify $$f(x) = \frac{x^2 - 1}{x + 1}$$

3. Calculate $$\frac{1}{x - 1} - \frac{2}{x + 1}$$

4. A car travels $$300 \text{ km}$$. If the average speed is $$v \text{ km/h}$$, write the travel time function in terms of $$v$$.

Visible text: 1. Determine the domain of 

2. Simplify 

3. Calculate 

4. A car travels . If the average speed is , write the travel time function in terms of .

### Answer Key

**Answer** $$1$$:

Visible text: **Answer** :

Component: MathContainer
Children:

```math
x^2 - 9 = 0
```

```math
(x + 3)(x - 3) = 0
```

```math
x = -3 \text{ or} x = 3
```

Domain: $$D_f = \{x | x \neq -3, x \neq 3, x \in \mathbb{R}\}$$

Visible text: Domain:

**Answer** $$2$$:

Visible text: **Answer** :

Component: MathContainer
Children:

```math
f(x) = \frac{x^2 - 1}{x + 1}
```

```math
= \frac{(x + 1)(x - 1)}{x + 1}
```

```math
= x - 1
```

With the condition $$x \neq -1$$

Visible text: With the condition

**Answer** $$3$$:

Visible text: **Answer** :

Component: MathContainer
Children:

```math
\frac{1}{x - 1} - \frac{2}{x + 1}
```

```math
= \frac{(x + 1) - 2(x - 1)}{(x - 1)(x + 1)}
```

```math
= \frac{x + 1 - 2x + 2}{(x - 1)(x + 1)}
```

```math
= \frac{-x + 3}{(x - 1)(x + 1)}
```

**Answer** $$4$$:

Visible text: **Answer** :

Component: MathContainer
Children:

```math
\text{Time} = \frac{\text{Distance}}{\text{Speed}}
```

```math
t(v) = \frac{300}{v}
```