Mathematics 1Week 6 · Logarithmic Functions: Laws, Graphs and Equations
Week 6 Notes
Mathematics for Data Science 1
Logarithms as the inverse of exponentials: the definition, the laws of logs, change of base, graphs of log functions, and solving exponential and logarithmic equations and inequalities.
6 chapters~21 min read
LogarithmLaws of logsChange of baseGraphsExponential equationsLog equations
The definition of a logarithm, its special values, and the two logs on every calculator.
1.1Definition
In simple words
A logarithm answers the question "what power?" For example, "2 to what power gives 8?" The answer is 3, so log28=3. A log simply undoes an exponential.
Definition
For a>0, a=1 and y>0:
ax=y⟺x=logay
a is the base, y is the argument and x is the logarithm. The function f(x)=logax is the inverse of g(x)=ax from Week 5.
Rules for the base and argument
Base: a>0 and a=1.
Argument must be positive: the log of 0 or of a negative number does not exist, because ax is never 0 or negative.
Exponential form
Log form
23=8
log28=3
34=81
log381=4
5−2=251
log5251=−2
10−3=0.001
log100.001=−3
Reading the table. The base stays the base, and the power on the left becomes the answer on the right. A negative log just means the argument is between 0 and 1 (for a base above 1).
1.2Special values and identities
Identity
Why
Example
loga1=0
a0=1
log71=0
logaa=1
a1=a
log99=1
loga(ax)=x
log undoes the exponential
log229=9
alogax=x(x>0)
the exponential undoes the log
2log27=7
1.3Common and natural logarithms
Name
Base
Written
Where used
Common log
10
logx (or log10x)
school calculations, orders of magnitude
Natural log
e≈2.718
lnx (or logex)
calculus, growth and decay
Notation. In these notes logx means log10x and lnx means logex. So lne=1 and lnex=x. Some books (and many programming languages) use log for the natural log, so check the convention.
Why the base cannot be 1 (extra remark).1x=1 for every x, so "1 to what power gives 8?" has no answer, and "1 to what power gives 1?" has every number as an answer. Neither gives one value, so log1 is not defined.
Two-way conversion. Almost every question in this week starts by switching between ax=y and x=logay. In Example 2(a) the unknown was the base, and the switch still works.
Base below 1 flips the sign (extra remark). In Example 1(d), log1/28=−3=−log28. In general log1/ax=−logax, which Chapter 3 uses to explain the falling graphs.
Exam tips
To evaluate logay, write y as a power of a.
If the unknown is inside the log or in the base, convert to exponential form first.
Common mistakes
Writing log28=4 by dividing 8 by 2. The log asks for a power, not a quotient.
A calculator has only log (base 10) and ln. For any other base, change to one of them: log35=ln3ln5≈1.465.
Example 4: using change of base
Find (a) log23⋅log34, (b) log927.
(a) log34=log23log24, so the product is log24=2.
(b) 27=33 and 9=32, so log927=23log33=23.
Answer: (a) 2 (b) 3/2.
Example 5: given log 2 = 0.3010
Using log102=0.3010, find log8, log5 and log20.
log8=log23=3×0.3010=0.903.
log5=log210=1−0.3010=0.699, because log10=1.
log20=log2+log10=0.3010+1=1.301.
Answer: 0.903, 0.699, 1.301.
2.3Going deeper
Proof of change of base (extra remark). Let x=logaM, so ax=M. Take logb of both sides and use the power law: xlogba=logbM. Divide by logba (not 0, since a=1).
Reciprocal of a number (extra remark). Put M = 1 in the quotient law: logaN1=−logaN. That is why log5251=−log525=−2 in Example 1.
Laws work in both directions. Example 3 combined logs into one; Chapter 5 does the same to solve equations. Splitting one log into many (expanding) uses the same laws read right to left.
Exam tips
Before combining, make sure every log has the same base.
To evaluate a log on a calculator, use lnalnM or logalogM.
Common mistakes
Splitting log(M+N) into logM+logN.
Writing logNlogM=logM−logN. The quotient law is about logNM, not a quotient of logs.
The graph of a log function, its properties, shifting it, and the domain of a log expression.
3.1The function
Definition
f(x)=logax, with a>0, a=1, has domain (0,∞) and range R. It is the inverse of ax, so the graph of logax is the mirror image of the graph of ax in the line y=x.
x
0.25
0.5
1
2
4
8
log2x
−2
−1
0
1
2
3
log1/2x
2
1
0
−1
−2
−3
Figure 1. Graphs of logarithmic functions: bases above 1 (left) and below 1 (right)
Every curve passes through (1, 0) because loga1=0. The y-axis (x = 0) is a vertical asymptote: the curve gets closer and closer to it but never touches it. Left: bases 2, e and 10 rise slowly; for x > 1, the smaller the base (still above 1), the higher the curve. Right: bases ½ and ⅓ fall. Each right-hand curve is a left-hand one flipped in the x-axis, since log1/2x=−log2x (compare the two rows of the table).
3.2Properties of f(x) = logₐ x
Property
a>1
0<a<1
Domain
(0,∞)
(0,∞)
Range
R
R
Passes through
(1, 0) and (a, 1)
(1, 0) and (a, 1)
Behaviour
increasing
decreasing
Sign
x > 1: positive; 0 < x < 1: negative
x > 1: negative; 0 < x < 1: positive
Asymptote
x = 0 (y-axis)
x = 0 (y-axis)
One-one and onto R?
yes: bijective
yes: bijective
Inverse
ax
ax
Comparing logs
If a>1: x1<x2⇒logax1<logax2 (order kept).
If 0<a<1: x1<x2⇒logax1>logax2 (order reversed).
3.3Shifting the graph
In simple words
Replacing x by x−h slides the graph h units to the right, and the asymptote moves to x=h. Adding k to the whole function lifts the graph by k.
Figure 2. A logarithm shifted 3 units to the right
y=log2(x−3) is y=log2x moved 3 units right. Its asymptote is x=3, and it crosses the x-axis at x=4, since log21=0.
3.4Domain of a log expression
In simple words
Whatever is inside the log must be greater than 0. Solve that inequality to get the domain.
Example 6: find the domain
Find the domain of (a) log(x−2), (b) log(5−x), (c) log(x2−4).
(a) x−2>0⇒x>2: (2,∞).
(b) 5−x>0⇒x<5: (−∞,5).
(c) x2−4>0⇒(x−2)(x+2)>0⇒x<−2 or x>2.
Answer: (a) x > 2 (b) x < 5 (c) x < −2 or x > 2.
Example 7: which log is larger?
Which is larger: (a) log23 or log25? (b) log1/23 or log1/25?
(a) Base 2 > 1, so the order is kept: 3 < 5 gives log23<log25.
(b) Base ½ < 1, so the order reverses: log1/23>log1/25.
Answer: (a) log25 (b) log1/23.
3.5Going deeper
Mirror of the exponential.2x passes through (0, 1) and (1, 2); swapping the coordinates gives (1, 0) and (2, 1) on log2x. The horizontal asymptote y = 0 of 2x becomes the vertical asymptote x = 0 of the log.
A vertical shift is a stretch inside (extra remark).log2x+1=log2x+log22=log2(2x). Lifting the graph by 1 is the same as squeezing it towards the y-axis by a factor of 2.
The x-intercept moves with h.loga(x−h)=0 when x−h=1, so the curve crosses the x-axis at x=h+1 for every base. In Figure 2, h = 3 gives x = 4.
Exam tips
For a domain question, set every log argument > 0 and solve; for a quadratic argument, factor first.
To compare logs with the same base, check the base first: above 1 keeps the order, below 1 reverses it.
Common mistakes
Writing ≥0 instead of >0 for the argument: log0 does not exist.
Shifting log2(x−3) to the left. The minus sign moves it right.
Equations with the unknown inside a log, extraneous roots, and log inequalities.
In simple words
For a logarithmic equation, combine logs with the laws until there is one log on each side (or one log equal to a number), then "remove" the log.
5.1Methods
Combine into a single log:logaA=logaB⇒A=B (the log is one-one).
Or convert:logaA=c⇒A=ac.
Check the domain: every expression inside a log must be > 0 in the original equation. Reject answers that break this.
Extraneous roots. Combining logs can create solutions that are not valid in the original equation. Always substitute back or check the domain.
Example 13: convert to exponential form
Solve (a) log2(x+3)=4, (b) lnx=2.
(a) x+3=24=16, so x=13. Check: x+3=16>0.
(b) x=e2≈7.389.
Answer: (a) x = 13 (b) x=e2.
Example 14: sum of logs
Solve log3x+log3(x−2)=1.
Domain: x>0 and x−2>0, so x>2.
Product law: log3[x(x−2)]=1, so x(x−2)=31=3.
x2−2x−3=0⇒(x−3)(x+1)=0⇒x=3 or x=−1.
x = −1 is not in the domain (x > 2): reject it. x = 3 works: log33+log31=1+0=1.
Answer: x = 3.
Example 15: equal logs
Solve log(x+1)+log(x−1)=log8.
Domain: x+1>0 and x−1>0, so x>1.
Combine: log[(x+1)(x−1)]=log8, so x2−1=8 and x2=9.
x = 3 or x = −3. Only x = 3 is in the domain.
Answer: x = 3.
Example 16: power law inside
Solve 2logx=log(4x−3).
Domain: x>0 and 4x−3>0, so x>43.
Power law: logx2=log(4x−3), so x2=4x−3, i.e. x2−4x+3=0.
(x−1)(x−3)=0: x = 1 or x = 3, and both are greater than 43.
Answer: x = 1 or x = 3.
Example 17: reciprocal trick
Solve log2x+logx2=25.
Let u=log2x. Then logx2=u1 (change of base).
u+u1=25⇒2u2−5u+2=0⇒(2u−1)(u−2)=0, so u=21 or 2.
u=2: x=22=4. u=21: x=21/2=2.
x is used as a base, so it needs x>0 and x=1. Both 4 and 2 qualify.
Answer: x = 4 or x=2.
5.2Logarithmic inequalities
In simple words
This is the same idea as comparing logs (Chapter 3): when the base is bigger than 1 the inequality sign stays; when the base is between 0 and 1 the sign flips. Also keep the argument positive.
Inequality
Result
logaA<logaB, a>1
0<A<B
logaA<logaB, 0<a<1
A>B>0
Example 18: solve two inequalities
Solve (a) log2(x−1)<3, (b) log1/2x>1.
(a) Need x−1>0. Base 2 > 1 keeps the sign: x−1<23=8. Together: 1<x<9.
(b) Base ½ < 1 flips the sign: x<(21)1=21. With x>0: 0<x<21.
Answer: (a) 1<x<9 (b) 0<x<21.
5.3Going deeper
Why the domain check matters. In Example 14, x = −1 solves x(x−2)=3 but makes log3x undefined. The combined equation log3[x(x−2)]=1 has a bigger domain than the original, which is where the extra root comes from.
Not every root is extraneous. In Example 16 both roots survive: x = 1 gives 2log1=0=log1, and x = 3 gives log9=log9. Check, but do not reject by habit.
Check of Example 17 (extra remark). For x=2: log22=21 and log22=2, and 21+2=25.
Exam tips
Write the domain as your first line, before any algebra.
In an inequality, write the argument > 0 condition alongside the solved one and intersect them.
Common mistakes
Forgetting to flip the sign for a base between 0 and 1.
Keeping a root that makes some argument zero or negative.
domain (0,∞), range R, through (1, 0), asymptote x = 0; inverse of ax
Increasing / decreasing
a > 1 increasing; 0 < a < 1 decreasing
Exponential equations
equal bases; or take logs; or put u=ax
Log equations
combine, remove the log, check the domain
Values worked in these notes
Question
Answer
log212+log238
5
log927
23
3x=20
x≈2.727
7x=5x+1
x≈4.783
22x−5⋅2x+4=0
x = 0, 2
log3x+log3(x−2)=1
x = 3
log2x+logx2=25
x=4,2
Doubling at 10% a year
≈ 7.27 years
Which tool when?
"Evaluate a log" → write the argument as a power of the base.
"Simplify a sum of logs" → product, quotient and power laws.
"Odd base or calculator" → change of base.
"Unknown in the power" → same base, or take logs, or u = aˣ.
"Unknown inside a log" → domain, combine, remove the log, check.
Mistakes to avoid
log(M+N)=logM+logN.
Never take a log of 0 or of a negative number.
Reject roots that make an argument ≤ 0.
For a base in (0, 1), reverse inequalities.
Source notes
The source PDF says no Week 6 lecture file was attached, and the Week 5 lecture notes list logax only as a function type. So all of this week follows the standard NCERT Class 11 and 12 treatment of logarithms.
Examples 1 to 18 are the source's worked practice items, in the same order. Every number was recomputed.
Here log x means base 10 and ln x base e; some books use log for the natural log.
The source says "the smaller the base, the steeper the rise"; these notes say it more exactly: for x > 1 the curve with the smaller base (above 1) lies higher.
Revision overview
Definitionaˣ = y ⇔ x = logₐ y a > 0, a ≠ 1, y > 0 log = base 10, ln = base e
Lawslog(MN) = log M + log N log(M/N) = log M − log N log(Mʳ) = r log M
Change of baselogₐ M = log M / log a logₐ b = ln b / ln a calculator: ln or log
LogarithmsMathematics for Data Science 1
Graphdomain (0, ∞), range ℝ through (1, 0), asymptote x = 0 mirror of aˣ in y = x
Exponential equationssame base take logs u = aˣ, u > 0
Log equationscombine, remove the log check the domain base < 1 flips inequalities