Logarithmic Functions and Properties

1596 words
8 min read
Python Week 1: the first filter for runtime behavior
Visual companion
Python
Type and operator map

Python Week 1: the first filter for runtime behavior

View
Revision summary

What this note is really saying

Short form

# Logarithmic Functions and Properties ## ๐ŸŽฏ Learning Objectives By the end of this topic, you will be able to: 1. **Define** a logarithm as the inverse of an exponential function 2.

Logarithmic Functions and Properties

๐ŸŽฏ Learning Objectives

By the end of this topic, you will be able to:
  1. Define a logarithm as the inverse of an exponential function
  2. Apply the laws of logarithms (product, quotient, power, change of base)
  3. Graph logarithmic functions for a>1a > 1 and 0<a<10 < a < 1
  4. Convert between exponential and logarithmic forms
  5. Use the natural logarithm lnโกx\ln x and common logarithm logโกx\log x

๐Ÿ“‹ Prerequisites


๐Ÿ“– Core Content

8.1 Intuition: The Inverse of Exponentiation

A logarithm answers the question: "What exponent gives me this number?" If 23=82^3 = 8, then logโก28=3\log_2 8 = 3 ("log base 2 of 8 equals 3"). The logarithm undoes exponentiation. Think of it this way:
  • Exponential: bx=yb^x = y asks: "If I multiply bb by itself xx times, what do I get?"
  • Logarithm: logโกby=x\log_b y = x asks: "How many times do I multiply bb to get yy?"
๐Ÿ’ก Why this matters: Logarithms convert multiplicative relationships into additive ones. This is used everywhere: measuring earthquakes (Richter scale), sound (decibels), acidity (pH), algorithmic complexity (logโกn\log n is the holy grail of efficiency), and in ML (log-likelihood, logistic regression).

8.2 Definition

For b>0b > 0, bโ‰ 1b \neq 1, and x>0x > 0:
logโกbx=yโ€…โ€ŠโŸบโ€…โ€Šby=x\log_b x = y \iff b^y = x
  • Base bb: the base of the exponential
  • Argument xx: the value whose logarithm we take (x>0x > 0)
  • Result yy: the exponent Special bases:
BaseNameNotation
10Common logarithmlogโก10x\log_{10} x or simply logโกx\log x
eeNatural logarithmlogโกex\log_e x or lnโกx\ln x
2Binary logarithmlogโก2x\log_2 x (important in CS)
Key relationship:
logโกbxย andย bxย areย inverseย functions\log_b x \text{ and } b^x \text{ are inverse functions} blogโกbx=xandlogโกb(bx)=xb^{\log_b x} = x \quad \text{and} \quad \log_b(b^x) = x
(Diagram)

8.3 Laws of Logarithms

8.3.1 The Three Core Laws

LawFormulaExampleWhy
Productlogโกb(xy)=logโกbx+logโกby\log_b(xy) = \log_b x + \log_b ylogโก2(8โ‹…4)=3+2=5\log_2(8 \cdot 4) = 3 + 2 = 5bm+n=bmโ‹…bnb^{m+n} = b^m \cdot b^n
Quotientlogโกb(x/y)=logโกbxโˆ’logโกby\log_b(x/y) = \log_b x - \log_b ylogโก3(81/9)=4โˆ’2=2\log_3(81/9) = 4 - 2 = 2bmโˆ’n=bm/bnb^{m-n} = b^m / b^n
Powerlogโกb(xn)=nโ‹…logโกbx\log_b(x^n) = n \cdot \log_b xlogโก(1003)=3โ‹…2=6\log(100^3) = 3 \cdot 2 = 6(bm)n=bmn(b^m)^n = b^{mn}
Derivation of Product Law: Let m=logโกbxm = \log_b x and n=logโกbyn = \log_b y. Then bm=xb^m = x and bn=yb^n = y. Then xy=bmโ‹…bn=bm+nxy = b^m \cdot b^n = b^{m+n}. Taking logโกb\log_b of both sides: logโกb(xy)=m+n=logโกbx+logโกby\log_b(xy) = m + n = \log_b x + \log_b y. โˆŽ

8.3.2 Additional Properties

PropertyFormulaExample
Identitylogโกb1=0\log_b 1 = 0logโก51=0\log_5 1 = 0 (since 50=15^0 = 1 )
Baselogโกbb=1\log_b b = 1logโก77=1\log_7 7 = 1 (since 71=77^1 = 7 )
Reciprocallogโกb(1/x)=โˆ’logโกbx\log_b(1/x) = -\log_b xlogโก2(1/8)=โˆ’3\log_2(1/8) = -3
Change of baselogโกba=logโกcalogโกcb\log_b a = \frac{\log_c a}{\log_c b}logโก25=logโก5logโก2\log_2 5 = \frac{\log 5}{\log 2}

8.3.3 Change of Base Formula

logโกba=logโกcalogโกcb\log_b a = \frac{\log_c a}{\log_c b}
Why this matters: Your calculator probably only has logโก\log (base 10) and lnโก\ln (base ee). To compute logโก25\log_2 5, you use: logโก25=lnโก5lnโก2โ‰ˆ1.6090.693โ‰ˆ2.322\log_2 5 = \frac{\ln 5}{\ln 2} \approx \frac{1.609}{0.693} \approx 2.322.

8.4 Graphing Logarithmic Functions

8.4.1 Graph of f(x)=logโกaxf(x) = \log_a x, a>1a > 1

For f(x)=logโก2xf(x) = \log_2 x:
xx1/81/81/41/41/21/211224488
f(x)f(x)โˆ’3-3โˆ’2-2โˆ’1-100112233
Properties:
  • Domain: (0,โˆž)(0, \infty) (only positive inputs)
  • Range: R\mathbb{R} (all real outputs)
  • xx-intercept: (1,0)(1, 0)
  • Vertical asymptote: x=0x = 0 (y-axis)
  • Increasing (for a>1a > 1)

8.4.2 Graph of f(x)=logโกaxf(x) = \log_a x, 0<a<10 < a < 1

For f(x)=logโก1/2xf(x) = \log_{1/2} x:
  • Decreasing (since base <1< 1)
  • Same intercept at (1,0)(1, 0)
  • Same asymptote x=0x = 0
๐Ÿ” Note: logโก1/ax=โˆ’logโกax\log_{1/a} x = -\log_a x. So decay-base logs are reflections of growth-base logs across the xx-axis. (Diagram)

8.5 Natural Logarithm lnโกx\ln x

The natural logarithm lnโกx=logโกex\ln x = \log_e x has base eโ‰ˆ2.718e \approx 2.718. It's the inverse of exe^x:
lnโก(ex)=xandelnโกx=x\ln(e^x) = x \quad \text{and} \quad e^{\ln x} = x
Properties (same as any log, but with base ee):
  • lnโก1=0\ln 1 = 0
  • lnโกe=1\ln e = 1
  • lnโก(xy)=lnโกx+lnโกy\ln(xy) = \ln x + \ln y
  • lnโก(x/y)=lnโกxโˆ’lnโกy\ln(x/y) = \ln x - \ln y
  • lnโก(xn)=nlnโกx\ln(x^n) = n \ln x

8.6 Worked Examples

Example 1.1 (Easy): Evaluate logโก381\log_3 81. Step 1: 81=3481 = 3^4 Step 2: logโก381=logโก3(34)=4\log_3 81 = \log_3(3^4) = 4
4\boxed{4}
Example 1.2 (Medium): Expand logโก2(8x3y)\log_2\left(\frac{8x^3}{y}\right). \log_2\left(\frac{8x^3}{y}\right) &= \log_2(8x^3) - \log_2 y \\ &= \log_2 8 + \log_2(x^3) - \log_2 y \\ &= 3 + 3\log_2 x - \log_2 y \end{aligned}
\\boxed{3 + 3\\log_2 x - \\log_2 y} **Example 1.3 (Hard):** Condense $2\\ln x - \\frac{1}{2}\\ln(x^2+1) + \\ln 3$ into a single logarithm.
\begin{aligned} &= \ln(x^2) - \ln\sqrt{x^2+1} + \ln 3 \\ &= \ln\left(\frac{x^2}{\sqrt{x^2+1}}\right) + \ln 3 \\ &= \ln\left(\frac{3x^2}{\sqrt{x^2+1}}\right) \end{aligned}
\\boxed{\\ln\\left(\\frac{3x^2}{\\sqrt{x^2+1}}\\right)} **Example 1.4 (Change of base):** Compute $\\log_4 32$ to 3 decimal places. \\log_4 32 = \\frac{\\log_{10} 32}{\\log_{10} 4} = \\frac{1.50515}{0.60206} \\approx 2.500 (Check: $4^{2.5} = 4^{5/2} = \\sqrt{4^5} = \\sqrt{1024} = 32$ โœ“) \\boxed{2.500} \--- ## ๐Ÿ“ Key Formulas โ€” Summary Table | Concept | Formula | Notes | |:---|:---|:---| | Definition | $\\log_b x = y \\iff b^y = x$ | $b > 0, b \\neq 1, x > 0$ | | Product | $\\log_b(xy) = \\log_b x + \\log_b y$ | | | Quotient | $\\log_b(x/y) = \\log_b x - \\log_b y$ | | | Power | $\\log_b(x^n) = n \\log_b x$ | | | Change of base | $\\log_b a = \\frac{\\log_c a}{\\log_c b}$ | For calculator use | | Identity | $\\log_b 1 = 0$ | | | Base | $\\log_b b = 1$ | | | Natural log | $\\ln x = \\log_e x$ | | | Inverse | $b^{\\log_b x} = x$, $\\log_b(b^x) = x$ | | | Domain | $(0, \\infty)$ | | | Range | $\\mathbb{R}$ | | | $x$-intercept | $(1, 0)$ | | | Asymptote | $x = 0$ (vertical) | | --- ## โš ๏ธ Common Pitfalls ### Pitfall 1: $\\log_b(x+y) \\neq \\log_b x + \\log_b y$ **Mistake:** Thinking the product law applies to addition. **Correct:** Only **multiplication** becomes addition: $\\log_b(xy) = \\log_b x + \\log_b y$. There's no simple rule for $\\log_b(x+y)$. ### Pitfall 2: $\\log_b(x^n) \\neq (\\log_b x)^n$ **Mistake:** Confusing power inside argument with power outside. **Correct:** $\\log_b(x^n) = n \\log_b x$ (bring exponent in front). Not $(\\log_b x)^n$. ### Pitfall 3: Forgetting the Domain **Mistake:** Taking $\\log x$ for $x \\leq 0$. **Correct:** $\\log_b x$ is only defined for $x > 0$. $\\log(-5)$ is undefined (in real numbers). ### Pitfall 4: Misapplying Change of Base **Mistake:** Writing $\\log_2 5 = \\frac{\\log 2}{\\log 5}$ (swapped numerator/denominator). **Correct:** $\\log_2 5 = \\frac{\\log 5}{\\log 2}$. The original argument goes in the numerator. --- ## ๐Ÿ“ Practice Questions > **Q1: Evaluate $\\log_5 125$.** > > **Strategy Hint:** $125 = 5^3$. > >
\boxed{3}
> **Q2: Evaluate $\\ln(e^7)$.** > > $\\ln(e^7) = 7$ > >
\boxed{7}
> **Q3: Expand $\\log\\left(\\frac{100x^2}{y^3}\\right)$.** > > $= \\log 100 + 2\\log x - 3\\log y = 2 + 2\\log x - 3\\log y$ > >
\boxed{2 + 2\log x - 3\log y}
> **Q4: Condense $3\\ln x + \\ln y - 2\\ln z$.** > > $= \\ln(x^3) + \\ln y - \\ln(z^2) = \\ln\\left(\\frac{x^3 y}{z^2}\\right)$ > >
\boxed{\ln\left(\frac{x^3 y}{z^2}\right)}
> **Q5: Compute $\\log_3 27$ without a calculator.** > > $27 = 3^3$, so $\\log_3 27 = 3$ > >
\boxed{3}
> **Q6: Compute $\\log_5 2$ using change of base (to 3 decimal places).** > > $\\log_5 2 = \\frac{\\ln 2}{\\ln 5} \\approx \\frac{0.693}{1.609} \\approx 0.431$ > >
\boxed{0.431}
> **Q7: Solve $\\log_2(x) = 5$.** > > $x = 2^5 = 32$ > >
\boxed{32}
> **Q8: What is the domain of $f(x) = \\log_3(x-2)$?** > > Need $x-2 > 0 \\to x > 2$ > >
\boxed{(2, \infty)}
> **Q9: Simplify $\\log_2 8 + \\log_2 16$.** > > $\\log_2 8 = 3$, $\\log_2 16 = 4$, sum = 7 > >
\boxed{7}
> **Q10: Write in exponential form: $\\log_3 81 = 4$.** > > $3^4 = 81$ > >
\boxed{3^4 = 81}
> **Q11: Find $x$: $\\log_x 125 = 3$.** > > $x^3 = 125 \\to x = \\sqrt\[3\]{125} = 5$ > >
\boxed{5}
> **Q12: Show that $\\log_a b = \\frac{1}{\\log_b a}$.** > > **Strategy Hint:** Use change of base with $c = b$. > > $\\log_a b = \\frac{\\log_b b}{\\log_b a} = \\frac{1}{\\log_b a}$ > >
\boxed{\text{Proved}}$$ --- ## ๐Ÿ”— Cross-References - Next topic: [Exponential & Logarithmic Equations](/courses/bsma1001/notes/.%2Fweek06%2Flogarithms-equations) - Previous topic: [Exponential Functions](/courses/bsma1001/notes/.%2Fweek05%2Ffunctions-exponential) - Across courses: BSMA1002 Stats 1 (log transformations in regression); BSMA1003 Maths 2 (logarithmic differentiation) Join Discord Previous5.2 Composite & Inverse FunctionsNext6.2 Exponential & Log Equations
Document outline

Keep your place and jump directly to a heading.

Table of contents

No note selected

Open a chapter to see its outline, backlinks, and sources here.