# Nakafa Framework: LLM

URL: /en/subject/high-school/11/mathematics/function-modeling/logarithmic-function-concept
Source: https://raw.githubusercontent.com/nakafaai/nakafa.com/refs/heads/main/packages/contents/subject/high-school/11/mathematics/function-modeling/logarithmic-function-concept/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: "Logarithmic Function Concept",
  description: "Master logarithmic functions with graphs, properties, and real-world applications. Learn the inverse of exponentials through examples and practice problems.",
  authors: [{ name: "Nabil Akbarazzima Fatih" }],
  date: "05/18/2025",
  subject: "Functions and Their Modeling",
};

## What is a Logarithmic Function?

Have you ever wondered how long it takes for your investment to double? The answer lies in logarithmic functions! A logarithm is the "inverse" of an exponential. If exponential answers "what is the result?", then logarithm answers "what is the exponent?".

Let's start with a simple example. If we have:

<BlockMath math="2^3 = 8" />

Question: "What power of 2 gives 8?" The answer is 3. This is what logarithm answers:

<BlockMath math="\log_2 8 = 3" />

In general, the relationship between exponential and logarithm:

<BlockMath math="y = b^x \quad \Leftrightarrow \quad x = \log_b y" />

## Definition and Types of Logarithms

A logarithmic function with base <InlineMath math="b" /> (where <InlineMath math="b > 0" /> and <InlineMath math="b \neq 1" />) is expressed as:

<BlockMath math="f(x) = \log_b x \quad \text{for every } x > 0" />

**Types of logarithms commonly used:**

1. **Common Logarithm** (base 10): <InlineMath math="f(x) = \log x" />

   Example: <InlineMath math="\log 100 = 2" /> because <InlineMath math="10^2 = 100" />

2. **Natural Logarithm** (base <InlineMath math="e \approx 2.7183" />): <InlineMath math="f(x) = \ln x" />

   Example: <InlineMath math="\ln e = 1" /> because <InlineMath math="e^1 = e" />

3. **Binary Logarithm** (base 2): <InlineMath math="f(x) = \log_2 x" />

   Example: <InlineMath math="\log_2 8 = 3" /> because <InlineMath math="2^3 = 8" />

## Logarithmic Function Graph

<LineEquation
  title="Comparison of Exponential and Logarithmic Functions"
  description={
    <>
      Graph <InlineMath math="y = \log_2 x" /> is the reflection of{" "}
      <InlineMath math="y = 2^x" /> across the line <InlineMath math="y = x" />.
    </>
  }
  data={[
    {
      points: Array.from({ length: 100 }, (_, i) => {
        const x = (i / 99) * 4 - 1;
        return { x, y: Math.pow(2, x), z: 0 };
      }),
      color: getColor("SKY"),
      labels: [{ text: "y = 2^x", at: 80, offset: [1.5, 1, 0] }],
      showPoints: false,
    },
    {
      points: Array.from({ length: 100 }, (_, i) => {
        const x = (i / 99) * 8 + 0.1;
        return { x, y: Math.log2(x), z: 0 };
      }),
      color: getColor("ROSE"),
      labels: [{ text: "y = log₂ x", at: 80, offset: [0.5, -1, 0] }],
      showPoints: false,
    },
    {
      points: Array.from({ length: 50 }, (_, i) => {
        const x = (i / 49) * 4 - 1;
        return { x, y: x, z: 0 };
      }),
      color: getColor("PURPLE"),
      labels: [{ text: "y = x", at: 40, offset: [1, 1, 0] }],
      showPoints: false,
    },
  ]}
  cameraPosition={[0, 0, 15]}
  showZAxis={false}
/>

**Graph characteristics** <InlineMath math="f(x) = \log_b x" /> with <InlineMath math="b > 1" />:

- Domain: <InlineMath math="x > 0" /> (positive numbers only)
- Range: All real numbers
- x-intercept: <InlineMath math="(1, 0)" />
- Vertical asymptote: y-axis (<InlineMath math="x = 0" />)
- Increasing function for <InlineMath math="b > 1" />

## Properties of Logarithms

### Basic Properties

<div className="flex flex-col gap-4">
  <BlockMath math="\log_b 1 = 0" />
  <BlockMath math="\log_b b = 1" />
  <BlockMath math="\log_b b^n = n" />
  <BlockMath math="b^{\log_b x} = x" />
</div>

### Operational Properties

<div className="flex flex-col gap-4">
  <BlockMath math="\log_b (xy) = \log_b x + \log_b y" />
  <BlockMath math="\log_b \left(\frac{x}{y}\right) = \log_b x - \log_b y" />
  <BlockMath math="\log_b x^n = n \cdot \log_b x" />
  <BlockMath math="\log_b x = \frac{\log_a x}{\log_a b} \quad \text{(change of base)}" />
</div>

## COVID-19 Spread Model

In the early pandemic, COVID-19 spread in Indonesia could be modeled with an exponential function. If on March 2, 2020 there were 2 cases and in 60 days it reached 10,118 cases, then:

<div className="flex flex-col gap-4">
  <BlockMath math="P(t) = 2e^{\frac{1}{60}\ln(5059)t}" />
  <LineEquation
    title="COVID-19 Spread Model"
    description="Exponential growth of COVID-19 cases"
    data={[
      {
        points: Array.from({ length: 61 }, (_, i) => {
          const t = i;
          const P = 2 * Math.exp((1 / 60) * Math.log(5059) * t);
          return { x: t, y: P, z: 0 };
        }),
        color: getColor("RED"),
        labels: [{ text: "P(t)", at: 3, offset: [2, -0.5, 0] }],
        showPoints: false,
      },
    ]}
    cameraPosition={[15, 10, 15]}
    showZAxis={false}
  />
</div>

**Using logarithms**, we can calculate when there will be 50,000 cases:

<div className="flex flex-col gap-4">
  <BlockMath math="50000 = 2e^{\frac{1}{60}\ln(5059)t}" />
  <BlockMath math="t = \frac{60 \cdot \ln(25000)}{\ln(5059)} \approx 81.4 \text{ days}" />
</div>

## Exercises

1. Determine the value of:

   - <InlineMath math="\log_3 27" />
   - <InlineMath math="\log_5 \frac{1}{125}" />
   - <InlineMath math="\ln e^3" />

2. If <InlineMath math="\log_2 x = 4" />, determine the value of <InlineMath math="x" />.

3. Simplify: <InlineMath math="\log_2 8 + \log_2 4 - \log_2 2" />

4. An investment grows according to the formula <InlineMath math="A = 1000 \cdot 2^t" /> (in million rupiah). How many years are needed for the investment to become 8 billion rupiah?

### Answer Key

1. - <InlineMath math="\log_3 27 = 3" />
   - <InlineMath math="\log_5 \frac{1}{125} = -3" />
   - <InlineMath math="\ln e^3 = 3" />

2. <InlineMath math="x = 2^4 = 16" />

3. <InlineMath math="\log_2 8 + \log_2 4 - \log_2 2 = 3 + 2 - 1 = 4" />

4. <InlineMath math="8000 = 1000 \cdot 2^t \Rightarrow 8 = 2^t \Rightarrow t = 3" /> years
