From eee5d109d5e922ea47b52303675fd398766a7150 Mon Sep 17 00:00:00 2001 From: Hananoshika Yomaru Date: Thu, 21 May 2026 00:33:01 -0700 Subject: [PATCH] Enhance chapter content and metadata: Update SKILL.md to include requirements for chart axes in all widgets. Implement axis labels, arrowheads, and graduations in the simultaneous graph explorer widget. Update math curriculum JSON to reflect the status change of multiple chapters to live. Add last modified timestamps to chapter templates and generate corresponding metadata for improved site navigation and SEO. --- .agents/skills/ofb/SKILL.md | 3 + content/math/complex-numbers/_index.md | 228 +++++++++++++++ content/math/complex-numbers/core.html | 109 ++++++++ content/math/complex-numbers/supplement.html | 107 +++++++ .../math/exponential-logarithmic/_index.md | 262 ++++++++++++++++++ .../math/exponential-logarithmic/core.html | 138 +++++++++ .../exponential-logarithmic/supplement.html | 112 ++++++++ .../math/factor-remainder-theorems/_index.md | 226 +++++++++++++++ .../math/factor-remainder-theorems/core.html | 108 ++++++++ .../factor-remainder-theorems/supplement.html | 106 +++++++ content/math/functions-graphs/_index.md | 257 +++++++++++++++++ content/math/functions-graphs/core.html | 131 +++++++++ content/math/functions-graphs/supplement.html | 114 ++++++++ .../widgets/simultaneous-graph-explorer.tsx | 64 +++++ content/math/linear-programming/_index.md | 174 ++++++++++++ content/math/linear-programming/core.html | 92 ++++++ .../math/linear-programming/supplement.html | 70 +++++ content/math/sequences-series/_index.md | 169 +++++++++++ content/math/sequences-series/core.html | 91 ++++++ content/math/sequences-series/supplement.html | 66 +++++ content/math/variations/_index.md | 152 ++++++++++ content/math/variations/core.html | 79 ++++++ content/math/variations/supplement.html | 61 ++++ data/math-curriculum.json | 14 +- frontend/src/main.tsx | 24 ++ scripts/generate-site-metadata.ts | 35 ++- static/feed.xml | 55 +++- static/sitemap.xml | 32 ++- themes/openfreebooks/sass/_book.scss | 13 + themes/openfreebooks/templates/chapter.html | 16 +- themes/openfreebooks/templates/index.html | 2 +- 31 files changed, 3093 insertions(+), 17 deletions(-) create mode 100644 content/math/complex-numbers/_index.md create mode 100644 content/math/complex-numbers/core.html create mode 100644 content/math/complex-numbers/supplement.html create mode 100644 content/math/exponential-logarithmic/_index.md create mode 100644 content/math/exponential-logarithmic/core.html create mode 100644 content/math/exponential-logarithmic/supplement.html create mode 100644 content/math/factor-remainder-theorems/_index.md create mode 100644 content/math/factor-remainder-theorems/core.html create mode 100644 content/math/factor-remainder-theorems/supplement.html create mode 100644 content/math/functions-graphs/_index.md create mode 100644 content/math/functions-graphs/core.html create mode 100644 content/math/functions-graphs/supplement.html create mode 100644 content/math/linear-programming/_index.md create mode 100644 content/math/linear-programming/core.html create mode 100644 content/math/linear-programming/supplement.html create mode 100644 content/math/sequences-series/_index.md create mode 100644 content/math/sequences-series/core.html create mode 100644 content/math/sequences-series/supplement.html create mode 100644 content/math/variations/_index.md create mode 100644 content/math/variations/core.html create mode 100644 content/math/variations/supplement.html diff --git a/.agents/skills/ofb/SKILL.md b/.agents/skills/ofb/SKILL.md index 26150a0..a276e0e 100644 --- a/.agents/skills/ofb/SKILL.md +++ b/.agents/skills/ofb/SKILL.md @@ -50,6 +50,7 @@ bun run build # production: JS + Zola + pagefind → public/ | Chapter URLs | `/{subjectId}/{chapter-slug}/` (e.g. `/math/quadratic-equations/`) | | Map | Mermaid DAG view (`?view=tree`) driven by `graph.edges` | | Graph | `graph.edges` must be **acyclic**; builder throws on cycles | +| Chart axes (all widgets) | Every coordinate chart must render **x/y axis labels, positive-direction arrowheads, and visible graduations (ticks + scale labels)**. Apply this consistently across all subjects/widgets. | | Accessibility | Avoid decorative characters that may render as emoji on mobile. Prefer broadly supported symbols/text so desktop and mobile stay visually consistent. | ## Common tasks → where to edit @@ -130,6 +131,8 @@ Live chapters live under `content/{subject}/{slug}/`: **Checkpoints (all subjects):** use `book-question`, `book-question__prompt`, `book-question__solution` (styled in theme `_book.scss`). Never use `book-question__answer`. +**Charts (all subjects):** coordinate charts in chapter widgets must include axis labels, arrowheads, and graduation/tick scale by default. Do not ship unlabeled axes. + **Math checkpoints / dots:** follow [math-chapter-patterns.md](math-chapter-patterns.md); shared dot classes in `content/math/subject.scss`. Reference: `content/math/quadratic-equations/`. diff --git a/content/math/complex-numbers/_index.md b/content/math/complex-numbers/_index.md new file mode 100644 index 0000000..5ee41ca --- /dev/null +++ b/content/math/complex-numbers/_index.md @@ -0,0 +1,228 @@ ++++ +title = "Complex numbers" +description = "Represent complex numbers in Cartesian form and perform operations including conjugates and division." +template = "chapter.html" +weight = 14 +[extra] +subject = "math" +chapter_id = "complex-numbers" +strand = "Number & Algebra" ++++ + +
+

+ Complex numbers extend the real number system so equations like + \(x^2+1=0\) can be solved. In high school, you usually write a complex number in + Cartesian form: + \[ + z = a + bi, + \] + where \(a,b\in\mathbb{R}\) and \(i^2=-1\). +

+ +

The imaginary unit \(i\)

+
+

Definition

+

\[ i^2 = -1 \]

+
+

+ Useful cycle: + \[ + i^1=i,\quad i^2=-1,\quad i^3=-i,\quad i^4=1, + \] + and then the pattern repeats every 4 powers. +

+ +

Real and imaginary parts

+

+ For \(z=a+bi\): +

+ +

Example. If \(z=3-4i\), then \(\Re(z)=3\), \(\Im(z)=-4\).

+ +

Basic operations

+

+ Add/subtract by combining like terms: +

+

+ \[ + (a+bi)\pm(c+di)=(a\pm c)+(b\pm d)i. + \] +

+

+ Multiply using expansion and \(i^2=-1\): +

+

+ \[ + (a+bi)(c+di)=ac+adi+bci+bd\,i^2=(ac-bd)+(ad+bc)i. + \] +

+

Example. \((2+3i)(1-4i)=2-8i+3i-12i^2=14-5i.\)

+ +

Conjugate and modulus

+

+ The conjugate of \(z=a+bi\) is + \[ + \overline{z}=a-bi. + \] + Multiplying by conjugates removes imaginary parts: + \[ + z\overline{z}=(a+bi)(a-bi)=a^2+b^2. + \] +

+

+ The modulus (distance from origin in Argand plane) is: + \[ + |z|=\sqrt{a^2+b^2}. + \] +

+

Example. For \(z=3-4i\), \(\overline{z}=3+4i\), \(|z|=5\).

+ +

Division in Cartesian form

+

+ To divide by \(c+di\), multiply top and bottom by \(c-di\): +

+

+ \[ + \frac{a+bi}{c+di} + =\frac{(a+bi)(c-di)}{(c+di)(c-di)} + =\frac{(a+bi)(c-di)}{c^2+d^2}. + \] +

+

Example. \(\dfrac{1+2i}{3-i}\):

+

+ \[ + \frac{1+2i}{3-i}\cdot\frac{3+i}{3+i} + =\frac{(1+2i)(3+i)}{10} + =\frac{1+7i}{10} + =\frac{1}{10}+\frac{7}{10}i. + \] +

+ +

Argand plane (graph view)

+

+ Plot \(z=a+bi\) as the point \((a,b)\): horizontal axis is real part, vertical axis is + imaginary part. This lets you interpret \(|z|\) as geometric distance. +

+ +

Why this matters: solving quadratics

+

+ If \(x^2+4=0\), then \(x^2=-4\), so + \[ + x=\pm 2i. + \] + Complex numbers ensure every quadratic has two roots (counting multiplicity), and later this + extends to all polynomial equations. +

+
+ +
+

History

+

+ Complex numbers first appeared when mathematicians tried to solve cubic equations in the + 16th century. Algebraic formulas sometimes produced square roots of negative numbers, even when + final answers were real. +

+

+ Mathematicians like Cardano, Bombelli, and later + Euler developed rules for these numbers. What began as a formal trick became a + major mathematical system used in engineering, physics, and signal processing. +

+ +

Derivation

+

Why the conjugate removes \(i\) in denominators

+

+ For \(c+di\): + \[ + (c+di)(c-di)=c^2-d^2i^2=c^2+d^2, + \] + which is real and positive (unless \(c=d=0\)). This is why multiplying by conjugates converts + complex division into standard real-number division. +

+ + +

+ For \(z=a+bi\): + \[ + z\overline{z}=(a+bi)(a-bi)=a^2+b^2=|z|^2. + \] + So modulus is directly linked to conjugation and the Pythagorean distance in the Argand plane. +

+ +

Checkpoints

+

+ Pause and reason before continuing. Discuss with a classmate or write your reasoning in a + notebook. +

+ +
+

Checkpoint

+

+ Simplify \(i^{23}\) using the 4-step power cycle. +

+
+ +
+

Checkpoint

+

+ Compute \((4-3i)+(2+5i)\) and \((4-3i)-(2+5i)\). +

+
+ +
+

Checkpoint

+

+ Expand and simplify \((1+2i)(3-i)\) into \(a+bi\) form. +

+
+ +
+

Checkpoint

+

+ Find \(\overline{z}\) and \(|z|\) when \(z=-5+12i\). +

+
+ +
+

Checkpoint

+

+ Write \(\dfrac{2-i}{1+3i}\) in \(a+bi\) form. +

+
+ +
+

Checkpoint

+

+ Solve \(x^2-6x+13=0\). Why are the roots complex? +

+
+ +

Applications

+

AC circuits and impedance

+

+ Electrical engineers model alternating-current circuits with complex numbers because amplitude + and phase are naturally represented together as one complex quantity. +

+ +

Waves and signals

+

+ Sound, radio, and image-processing systems use complex numbers to describe oscillations and + frequency content efficiently (e.g., Fourier methods). +

+ +

Geometry and rotations

+

+ Multiplying by certain complex numbers corresponds to rotating and scaling points in the plane, + making complex numbers useful in geometry and computer graphics. +

+ +

References

+ +
diff --git a/content/math/complex-numbers/core.html b/content/math/complex-numbers/core.html new file mode 100644 index 0000000..5e69379 --- /dev/null +++ b/content/math/complex-numbers/core.html @@ -0,0 +1,109 @@ +
+

+ Complex numbers extend the real number system so equations like + \(x^2+1=0\) can be solved. In high school, you usually write a complex number in + Cartesian form: + \[ + z = a + bi, + \] + where \(a,b\in\mathbb{R}\) and \(i^2=-1\). +

+ +

The imaginary unit \(i\)

+
+

Definition

+

\[ i^2 = -1 \]

+
+

+ Useful cycle: + \[ + i^1=i,\quad i^2=-1,\quad i^3=-i,\quad i^4=1, + \] + and then the pattern repeats every 4 powers. +

+ +

Real and imaginary parts

+

+ For \(z=a+bi\): +

+ +

Example. If \(z=3-4i\), then \(\Re(z)=3\), \(\Im(z)=-4\).

+ +

Basic operations

+

+ Add/subtract by combining like terms: +

+

+ \[ + (a+bi)\pm(c+di)=(a\pm c)+(b\pm d)i. + \] +

+

+ Multiply using expansion and \(i^2=-1\): +

+

+ \[ + (a+bi)(c+di)=ac+adi+bci+bd\,i^2=(ac-bd)+(ad+bc)i. + \] +

+

Example. \((2+3i)(1-4i)=2-8i+3i-12i^2=14-5i.\)

+ +

Conjugate and modulus

+

+ The conjugate of \(z=a+bi\) is + \[ + \overline{z}=a-bi. + \] + Multiplying by conjugates removes imaginary parts: + \[ + z\overline{z}=(a+bi)(a-bi)=a^2+b^2. + \] +

+

+ The modulus (distance from origin in Argand plane) is: + \[ + |z|=\sqrt{a^2+b^2}. + \] +

+

Example. For \(z=3-4i\), \(\overline{z}=3+4i\), \(|z|=5\).

+ +

Division in Cartesian form

+

+ To divide by \(c+di\), multiply top and bottom by \(c-di\): +

+

+ \[ + \frac{a+bi}{c+di} + =\frac{(a+bi)(c-di)}{(c+di)(c-di)} + =\frac{(a+bi)(c-di)}{c^2+d^2}. + \] +

+

Example. \(\dfrac{1+2i}{3-i}\):

+

+ \[ + \frac{1+2i}{3-i}\cdot\frac{3+i}{3+i} + =\frac{(1+2i)(3+i)}{10} + =\frac{1+7i}{10} + =\frac{1}{10}+\frac{7}{10}i. + \] +

+ +

Argand plane (graph view)

+

+ Plot \(z=a+bi\) as the point \((a,b)\): horizontal axis is real part, vertical axis is + imaginary part. This lets you interpret \(|z|\) as geometric distance. +

+ +

Why this matters: solving quadratics

+

+ If \(x^2+4=0\), then \(x^2=-4\), so + \[ + x=\pm 2i. + \] + Complex numbers ensure every quadratic has two roots (counting multiplicity), and later this + extends to all polynomial equations. +

+
diff --git a/content/math/complex-numbers/supplement.html b/content/math/complex-numbers/supplement.html new file mode 100644 index 0000000..548d636 --- /dev/null +++ b/content/math/complex-numbers/supplement.html @@ -0,0 +1,107 @@ +
+

History

+

+ Complex numbers first appeared when mathematicians tried to solve cubic equations in the + 16th century. Algebraic formulas sometimes produced square roots of negative numbers, even when + final answers were real. +

+

+ Mathematicians like Cardano, Bombelli, and later + Euler developed rules for these numbers. What began as a formal trick became a + major mathematical system used in engineering, physics, and signal processing. +

+ +

Derivation

+

Why the conjugate removes \(i\) in denominators

+

+ For \(c+di\): + \[ + (c+di)(c-di)=c^2-d^2i^2=c^2+d^2, + \] + which is real and positive (unless \(c=d=0\)). This is why multiplying by conjugates converts + complex division into standard real-number division. +

+ + +

+ For \(z=a+bi\): + \[ + z\overline{z}=(a+bi)(a-bi)=a^2+b^2=|z|^2. + \] + So modulus is directly linked to conjugation and the Pythagorean distance in the Argand plane. +

+ +

Checkpoints

+

+ Pause and reason before continuing. Discuss with a classmate or write your reasoning in a + notebook. +

+ +
+

Checkpoint

+

+ Simplify \(i^{23}\) using the 4-step power cycle. +

+
+ +
+

Checkpoint

+

+ Compute \((4-3i)+(2+5i)\) and \((4-3i)-(2+5i)\). +

+
+ +
+

Checkpoint

+

+ Expand and simplify \((1+2i)(3-i)\) into \(a+bi\) form. +

+
+ +
+

Checkpoint

+

+ Find \(\overline{z}\) and \(|z|\) when \(z=-5+12i\). +

+
+ +
+

Checkpoint

+

+ Write \(\dfrac{2-i}{1+3i}\) in \(a+bi\) form. +

+
+ +
+

Checkpoint

+

+ Solve \(x^2-6x+13=0\). Why are the roots complex? +

+
+ +

Applications

+

AC circuits and impedance

+

+ Electrical engineers model alternating-current circuits with complex numbers because amplitude + and phase are naturally represented together as one complex quantity. +

+ +

Waves and signals

+

+ Sound, radio, and image-processing systems use complex numbers to describe oscillations and + frequency content efficiently (e.g., Fourier methods). +

+ +

Geometry and rotations

+

+ Multiplying by certain complex numbers corresponds to rotating and scaling points in the plane, + making complex numbers useful in geometry and computer graphics. +

+ +

References

+ +
diff --git a/content/math/exponential-logarithmic/_index.md b/content/math/exponential-logarithmic/_index.md new file mode 100644 index 0000000..c25de8a --- /dev/null +++ b/content/math/exponential-logarithmic/_index.md @@ -0,0 +1,262 @@ ++++ +title = "Exponential & logarithmic functions" +description = "Use exponential and logarithmic models, apply log laws, and solve growth and decay equations." +template = "chapter.html" +weight = 16 +[extra] +subject = "math" +chapter_id = "exponential-logarithmic" +strand = "Number & Algebra" ++++ + +
+

+ Exponential and logarithmic functions are inverse ideas. They model fast growth, rapid decay, + and scale changes that linear models cannot describe well. +

+ +

Exponential basics

+

+ An exponential function has variable in the exponent: + \[ + y=a^x,\quad a>0,\ a\ne1. + \] +

+

+ If \(a>1\), the function grows as \(x\) increases. If \(0<a<1\), it decays. +

+
+

Example

+

\[ + 2^x \text{ grows},\qquad \left(\frac12\right)^x \text{ decays}. + \]

+
+ +

What is a logarithm?

+

+ A logarithm asks for the exponent: + \[ + \log_a b = c \iff a^c=b. + \] +

+

+ So \(\log_2 8=3\) because \(2^3=8\). Also, \(\log_{10}100=2\). +

+ +

Domain and range

+ +

+ These two graphs are reflections of each other in the line \(y=x\). +

+ +

Index laws review

+

+ Exponential solving often uses: +

+

+ \[ + a^m a^n=a^{m+n},\quad + \frac{a^m}{a^n}=a^{m-n},\quad + (a^m)^n=a^{mn}. + \] +

+ +

Logarithm laws

+

+ For \(M,N>0\): +

+

+ \[ + \log_a(MN)=\log_a M+\log_a N, + \] + \[ + \log_a\!\left(\frac{M}{N}\right)=\log_a M-\log_a N, + \] + \[ + \log_a(M^k)=k\log_a M. + \] +

+

Common mistakes: \(\log(M+N)\ne \log M+\log N\).

+ +

Change of base

+

+ To evaluate logs with calculator: + \[ + \log_a b = \frac{\log b}{\log a} = \frac{\ln b}{\ln a}. + \] +

+

+ Here \(\log\) usually means base 10 and \(\ln\) means base \(e\). +

+ +

Solving exponential equations

+

Case 1: same base.

+

\[ + 3^{2x-1}=3^5 \Rightarrow 2x-1=5 \Rightarrow x=3. + \]

+ +

Case 2: take logs.

+

\[ + 5^x=17 \Rightarrow x=\log_5 17=\frac{\log 17}{\log 5}\approx 1.760. + \]

+ +

Solving logarithmic equations

+

Example 1. \(\log_2(x-1)=4\)

+

+ Convert to exponential: \(x-1=2^4=16\), so \(x=17\). Domain check: \(x>1\), valid. +

+

Example 2. \(\log_{10}(x+3)+\log_{10}(x-1)=1\)

+

+ \[ + \log_{10}\big((x+3)(x-1)\big)=1 + \Rightarrow (x+3)(x-1)=10. + \] + \[ + x^2+2x-3=10 \Rightarrow x^2+2x-13=0. + \] + \[ + x=-1\pm\sqrt{14}. + \] + Domain requires \(x>1\), so \(x=-1+\sqrt{14}\) only. +

+ +

Growth and decay models

+

+ A common model: + \[ + A(t)=A_0(1+r)^t + \] + for growth (\(r>0\)) or decay (\(r<0\), with \(1+r>0\)). +

+

+ Continuous model: + \[ + A(t)=A_0e^{kt}, + \] + where \(k>0\) gives growth and \(k<0\) gives decay. +

+ +

Exam strategy

+ +
+ +
+

History

+

+ Logarithms were developed in the early 17th century (notably by John Napier) to simplify long + multiplication and division into addition and subtraction. Before electronic calculators, this was + a major speed boost for astronomy, navigation, and engineering. +

+

+ Exponential functions became central in science through models of population growth, radioactive + decay, and continuously changing quantities. +

+ +

Derivation and reasoning

+

Why log product law works

+

+ Let \(\log_a M=p\) and \(\log_a N=q\). Then \(M=a^p\), \(N=a^q\), so + \[ + MN=a^{p+q}. + \] + Taking \(\log_a\) gives: + \[ + \log_a(MN)=p+q=\log_a M+\log_a N. + \] +

+ +

Inverse relationship view

+

+ If \(y=a^x\), swapping \(x,y\) gives \(x=a^y\), so \(y=\log_a x\). That is why exponential and + logarithmic graphs are mirror images across \(y=x\). +

+ +

Checkpoints

+
+ + Evaluate \(\log_3 81\) and \(\log_{10}0.01\). + +
+

Answer: \(\log_3 81=4\), \(\log_{10}0.01=-2\).

+
+
+ +
+ + Expand: \(\log_2(8x^3)\). + +
+

Answer: \(\log_2 8 + \log_2 x^3 = 3 + 3\log_2 x\).

+
+
+ +
+ + Solve \(2^{x+1}=7\). + +
+

Answer: \(x+1=\log_2 7\), so \(x=\log_2 7-1 \approx 1.807\).

+
+
+ +
+ + Solve \(\log_5(x-4)=2\) and state domain condition. + +
+

Domain: \(x-4>0\Rightarrow x>4\).

+

Answer: \(x-4=25\Rightarrow x=29\), valid.

+
+
+ +
+ + A population starts at 500 and grows 6% per year. Write the model and find \(A(4)\). + +
+

Model: \(A(t)=500(1.06)^t\).

+

Value: \(A(4)=500(1.06)^4\approx 631.24\), about 631.

+
+
+ +
+ + A substance follows \(A(t)=120e^{-0.18t}\). Is this growth or decay? Why? + +
+

Answer: Decay, because exponent coefficient is negative (\(k=-0.18\)).

+
+
+ +

Applications

+

Compound interest

+

+ Savings and loans often follow exponential rules. Logarithms are used to solve for unknown time + or interest rate. +

+ +

Half-life and decay

+

+ Radioactive substances and medicine concentration in the body are modeled with exponential decay. +

+ +

Logarithmic scales

+

+ pH, decibels, and Richter magnitude use logarithmic scales to represent very large ratio ranges + in manageable numbers. +

+ +

References

+ +
diff --git a/content/math/exponential-logarithmic/core.html b/content/math/exponential-logarithmic/core.html new file mode 100644 index 0000000..1b5609b --- /dev/null +++ b/content/math/exponential-logarithmic/core.html @@ -0,0 +1,138 @@ +
+

+ Exponential and logarithmic functions are inverse ideas. They model fast growth, rapid decay, + and scale changes that linear models cannot describe well. +

+ +

Exponential basics

+

+ An exponential function has variable in the exponent: + \[ + y=a^x,\quad a>0,\ a\ne1. + \] +

+

+ If \(a>1\), the function grows as \(x\) increases. If \(0<a<1\), it decays. +

+
+

Example

+

\[ + 2^x \text{ grows},\qquad \left(\frac12\right)^x \text{ decays}. + \]

+
+ +

What is a logarithm?

+

+ A logarithm asks for the exponent: + \[ + \log_a b = c \iff a^c=b. + \] +

+

+ So \(\log_2 8=3\) because \(2^3=8\). Also, \(\log_{10}100=2\). +

+ +

Domain and range

+ +

+ These two graphs are reflections of each other in the line \(y=x\). +

+ +

Index laws review

+

+ Exponential solving often uses: +

+

+ \[ + a^m a^n=a^{m+n},\quad + \frac{a^m}{a^n}=a^{m-n},\quad + (a^m)^n=a^{mn}. + \] +

+ +

Logarithm laws

+

+ For \(M,N>0\): +

+

+ \[ + \log_a(MN)=\log_a M+\log_a N, + \] + \[ + \log_a\!\left(\frac{M}{N}\right)=\log_a M-\log_a N, + \] + \[ + \log_a(M^k)=k\log_a M. + \] +

+

Common mistakes: \(\log(M+N)\ne \log M+\log N\).

+ +

Change of base

+

+ To evaluate logs with calculator: + \[ + \log_a b = \frac{\log b}{\log a} = \frac{\ln b}{\ln a}. + \] +

+

+ Here \(\log\) usually means base 10 and \(\ln\) means base \(e\). +

+ +

Solving exponential equations

+

Case 1: same base.

+

\[ + 3^{2x-1}=3^5 \Rightarrow 2x-1=5 \Rightarrow x=3. + \]

+ +

Case 2: take logs.

+

\[ + 5^x=17 \Rightarrow x=\log_5 17=\frac{\log 17}{\log 5}\approx 1.760. + \]

+ +

Solving logarithmic equations

+

Example 1. \(\log_2(x-1)=4\)

+

+ Convert to exponential: \(x-1=2^4=16\), so \(x=17\). Domain check: \(x>1\), valid. +

+

Example 2. \(\log_{10}(x+3)+\log_{10}(x-1)=1\)

+

+ \[ + \log_{10}\big((x+3)(x-1)\big)=1 + \Rightarrow (x+3)(x-1)=10. + \] + \[ + x^2+2x-3=10 \Rightarrow x^2+2x-13=0. + \] + \[ + x=-1\pm\sqrt{14}. + \] + Domain requires \(x>1\), so \(x=-1+\sqrt{14}\) only. +

+ +

Growth and decay models

+

+ A common model: + \[ + A(t)=A_0(1+r)^t + \] + for growth (\(r>0\)) or decay (\(r<0\), with \(1+r>0\)). +

+

+ Continuous model: + \[ + A(t)=A_0e^{kt}, + \] + where \(k>0\) gives growth and \(k<0\) gives decay. +

+ +

Exam strategy

+ +
diff --git a/content/math/exponential-logarithmic/supplement.html b/content/math/exponential-logarithmic/supplement.html new file mode 100644 index 0000000..16de7a1 --- /dev/null +++ b/content/math/exponential-logarithmic/supplement.html @@ -0,0 +1,112 @@ +
+

History

+

+ Logarithms were developed in the early 17th century (notably by John Napier) to simplify long + multiplication and division into addition and subtraction. Before electronic calculators, this was + a major speed boost for astronomy, navigation, and engineering. +

+

+ Exponential functions became central in science through models of population growth, radioactive + decay, and continuously changing quantities. +

+ +

Derivation and reasoning

+

Why log product law works

+

+ Let \(\log_a M=p\) and \(\log_a N=q\). Then \(M=a^p\), \(N=a^q\), so + \[ + MN=a^{p+q}. + \] + Taking \(\log_a\) gives: + \[ + \log_a(MN)=p+q=\log_a M+\log_a N. + \] +

+ +

Inverse relationship view

+

+ If \(y=a^x\), swapping \(x,y\) gives \(x=a^y\), so \(y=\log_a x\). That is why exponential and + logarithmic graphs are mirror images across \(y=x\). +

+ +

Checkpoints

+
+ + Evaluate \(\log_3 81\) and \(\log_{10}0.01\). + +
+

Answer: \(\log_3 81=4\), \(\log_{10}0.01=-2\).

+
+
+ +
+ + Expand: \(\log_2(8x^3)\). + +
+

Answer: \(\log_2 8 + \log_2 x^3 = 3 + 3\log_2 x\).

+
+
+ +
+ + Solve \(2^{x+1}=7\). + +
+

Answer: \(x+1=\log_2 7\), so \(x=\log_2 7-1 \approx 1.807\).

+
+
+ +
+ + Solve \(\log_5(x-4)=2\) and state domain condition. + +
+

Domain: \(x-4>0\Rightarrow x>4\).

+

Answer: \(x-4=25\Rightarrow x=29\), valid.

+
+
+ +
+ + A population starts at 500 and grows 6% per year. Write the model and find \(A(4)\). + +
+

Model: \(A(t)=500(1.06)^t\).

+

Value: \(A(4)=500(1.06)^4\approx 631.24\), about 631.

+
+
+ +
+ + A substance follows \(A(t)=120e^{-0.18t}\). Is this growth or decay? Why? + +
+

Answer: Decay, because exponent coefficient is negative (\(k=-0.18\)).

+
+
+ +

Applications

+

Compound interest

+

+ Savings and loans often follow exponential rules. Logarithms are used to solve for unknown time + or interest rate. +

+ +

Half-life and decay

+

+ Radioactive substances and medicine concentration in the body are modeled with exponential decay. +

+ +

Logarithmic scales

+

+ pH, decibels, and Richter magnitude use logarithmic scales to represent very large ratio ranges + in manageable numbers. +

+ +

References

+ +
diff --git a/content/math/factor-remainder-theorems/_index.md b/content/math/factor-remainder-theorems/_index.md new file mode 100644 index 0000000..095fe6b --- /dev/null +++ b/content/math/factor-remainder-theorems/_index.md @@ -0,0 +1,226 @@ ++++ +title = "Factor & remainder theorems" +description = "Use the factor and remainder theorems to factorise higher-degree polynomials and solve related equations." +template = "chapter.html" +weight = 13 +[extra] +subject = "math" +chapter_id = "factor-remainder-theorems" +strand = "Number & Algebra" ++++ + +
+

+ This chapter introduces two connected ideas for polynomial division: + Remainder Theorem and Factor Theorem. + They help you test factors quickly, find roots, and break a cubic (or higher) polynomial into + simpler factors. +

+ +

Quick recap

+

+ A polynomial in \(x\) is an expression like + \(P(x)=2x^3-3x^2+5x-7\). If you divide \(P(x)\) by \((x-a)\), you get: +

+

+ \[ + P(x) = (x-a)Q(x) + R, + \] +

+

+ where \(Q(x)\) is the quotient and \(R\) is a constant remainder. +

+ +

Remainder Theorem

+
+

Remainder Theorem

+

+ \[ + \text{When } P(x)\text{ is divided by }(x-a),\ \text{remainder}=P(a). + \] +

+
+ +

Example 1. Find the remainder when \(P(x)=x^3-4x+1\) is divided by \((x-2)\).

+

+ By the theorem, remainder \(=P(2)=2^3-4(2)+1=8-8+1=1\). +

+ +

Example 2. Find the remainder when \(2x^3+x^2-5\) is divided by \((x+1)\).

+

+ \((x+1)=(x-(-1))\), so use \(a=-1\): + \(P(-1)=2(-1)^3+(-1)^2-5=-2+1-5=-6\). +

+ +

Factor Theorem

+
+

Factor Theorem

+

+ \[ + (x-a)\text{ is a factor of }P(x)\iff P(a)=0. + \] +

+
+ +

+ This is a direct consequence of the Remainder Theorem: factor means remainder \(0\). +

+ +

Example 3. Is \((x-3)\) a factor of \(P(x)=x^3-4x^2-3x+18\)?

+

+ \(P(3)=27-36-9+18=0\), so yes, \((x-3)\) is a factor. +

+ +

Finding factors and roots (high-school workflow)

+
    +
  1. List possible rational roots using factors of constant term (and leading coefficient).
  2. +
  3. Test candidates with \(P(a)\).
  4. +
  5. When \(P(a)=0\), divide by \((x-a)\) to reduce degree.
  6. +
  7. Factor the smaller polynomial and solve for all roots.
  8. +
+ +

Example 4. Solve \(x^3-6x^2+11x-6=0\).

+

+ Try integer candidates \(\pm1,\pm2,\pm3,\pm6\). We get \(P(1)=0\), so \((x-1)\) is a factor. + Dividing gives \(x^2-5x+6\), which factorises to \((x-2)(x-3)\). + Hence: +

+

+ \[ + x^3-6x^2+11x-6=(x-1)(x-2)(x-3), + \] +

+

so roots are \(x=1,2,3\).

+ +

Synthetic division (quick table method)

+

+ Synthetic division is a compact way to divide by \((x-a)\). It is fast for checking many + candidates in exam settings. +

+

Example 5. Divide \(x^3-6x^2+11x-6\) by \((x-1)\):

+

+ \[ + \begin{array}{r|rrrr} + 1 & 1 & -6 & 11 & -6\\ + & & 1 & -5 & 6\\ \hline + & 1 & -5 & 6 & 0 + \end{array} + \] +

+

Quotient is \(x^2-5x+6\), remainder \(0\).

+ +

Exam tips

+ +
+ +
+

History

+

+ Polynomial equations became central in algebra from the Renaissance onward, when mathematicians + studied systematic methods for solving cubic and quartic equations. As symbolic algebra matured, + methods for division and factor testing became standard tools. +

+

+ What we now call the factor and remainder theorems are part of the broader + polynomial division framework developed in 18th–19th century algebra texts. + They remain important in modern high-school courses because they connect substitution, + division, and root-finding in one clear structure. +

+ +

Derivation

+

From the polynomial division algorithm

+

+ For any polynomial \(P(x)\), dividing by \((x-a)\) gives: + \[ + P(x)=(x-a)Q(x)+R. + \] + Now substitute \(x=a\): + \[ + P(a)=(a-a)Q(a)+R=R. + \] + So the remainder equals \(P(a)\), proving the Remainder Theorem. +

+

+ If \((x-a)\) is a factor, remainder \(R=0\), so \(P(a)=0\). Conversely, if \(P(a)=0\), then + remainder is zero, so \((x-a)\) divides \(P(x)\). This proves the Factor Theorem. +

+ +

Checkpoints

+

+ Pause and reason before continuing. Discuss with a classmate or write your reasoning in a + notebook. +

+ +
+

Checkpoint

+

+ Find the remainder when \(P(x)=3x^3-2x+7\) is divided by \((x-2)\). +

+
+ +
+

Checkpoint

+

+ Is \((x+2)\) a factor of \(x^3+4x^2+5x+2\)? Show the one-line test. +

+
+ +
+

Checkpoint

+

+ Given \(P(x)=2x^3+kx^2-8x-4\), if \((x-2)\) is a factor, find \(k\). +

+
+ +
+

Checkpoint

+

+ A polynomial leaves remainder \(5\) when divided by \((x-1)\). What is \(P(1)\)? +

+
+ +
+

Checkpoint

+

+ If \(P(3)=0\) and \(P(-1)=0\) for a cubic \(P(x)\), what two linear factors must appear? +

+
+ +
+

Checkpoint

+

+ Why is synthetic division especially useful after you already know one root? +

+
+ +

Applications

+

Graph intercepts and curve sketching

+

+ Solving \(P(x)=0\) gives x-intercepts of polynomial graphs. Factor Theorem helps find those + intercepts quickly, then sketch end behavior and turning points more accurately. +

+ +

Constraint values in models

+

+ In applied models, a condition like “output is zero at \(x=a\)” means \(P(a)=0\), so + \((x-a)\) must be a factor. This appears in physics calibration, optimization constraints, and + coding of polynomial approximations. +

+ +

Gateway to numerical methods

+

+ Understanding factor tests and polynomial reduction supports later methods such as Newton’s + method and polynomial interpolation, where roots and remainders are central ideas. +

+ +

References

+ +
diff --git a/content/math/factor-remainder-theorems/core.html b/content/math/factor-remainder-theorems/core.html new file mode 100644 index 0000000..6873fff --- /dev/null +++ b/content/math/factor-remainder-theorems/core.html @@ -0,0 +1,108 @@ +
+

+ This chapter introduces two connected ideas for polynomial division: + Remainder Theorem and Factor Theorem. + They help you test factors quickly, find roots, and break a cubic (or higher) polynomial into + simpler factors. +

+ +

Quick recap

+

+ A polynomial in \(x\) is an expression like + \(P(x)=2x^3-3x^2+5x-7\). If you divide \(P(x)\) by \((x-a)\), you get: +

+

+ \[ + P(x) = (x-a)Q(x) + R, + \] +

+

+ where \(Q(x)\) is the quotient and \(R\) is a constant remainder. +

+ +

Remainder Theorem

+
+

Remainder Theorem

+

+ \[ + \text{When } P(x)\text{ is divided by }(x-a),\ \text{remainder}=P(a). + \] +

+
+ +

Example 1. Find the remainder when \(P(x)=x^3-4x+1\) is divided by \((x-2)\).

+

+ By the theorem, remainder \(=P(2)=2^3-4(2)+1=8-8+1=1\). +

+ +

Example 2. Find the remainder when \(2x^3+x^2-5\) is divided by \((x+1)\).

+

+ \((x+1)=(x-(-1))\), so use \(a=-1\): + \(P(-1)=2(-1)^3+(-1)^2-5=-2+1-5=-6\). +

+ +

Factor Theorem

+
+

Factor Theorem

+

+ \[ + (x-a)\text{ is a factor of }P(x)\iff P(a)=0. + \] +

+
+ +

+ This is a direct consequence of the Remainder Theorem: factor means remainder \(0\). +

+ +

Example 3. Is \((x-3)\) a factor of \(P(x)=x^3-4x^2-3x+18\)?

+

+ \(P(3)=27-36-9+18=0\), so yes, \((x-3)\) is a factor. +

+ +

Finding factors and roots (high-school workflow)

+
    +
  1. List possible rational roots using factors of constant term (and leading coefficient).
  2. +
  3. Test candidates with \(P(a)\).
  4. +
  5. When \(P(a)=0\), divide by \((x-a)\) to reduce degree.
  6. +
  7. Factor the smaller polynomial and solve for all roots.
  8. +
+ +

Example 4. Solve \(x^3-6x^2+11x-6=0\).

+

+ Try integer candidates \(\pm1,\pm2,\pm3,\pm6\). We get \(P(1)=0\), so \((x-1)\) is a factor. + Dividing gives \(x^2-5x+6\), which factorises to \((x-2)(x-3)\). + Hence: +

+

+ \[ + x^3-6x^2+11x-6=(x-1)(x-2)(x-3), + \] +

+

so roots are \(x=1,2,3\).

+ +

Synthetic division (quick table method)

+

+ Synthetic division is a compact way to divide by \((x-a)\). It is fast for checking many + candidates in exam settings. +

+

Example 5. Divide \(x^3-6x^2+11x-6\) by \((x-1)\):

+

+ \[ + \begin{array}{r|rrrr} + 1 & 1 & -6 & 11 & -6\\ + & & 1 & -5 & 6\\ \hline + & 1 & -5 & 6 & 0 + \end{array} + \] +

+

Quotient is \(x^2-5x+6\), remainder \(0\).

+ +

Exam tips

+ +
diff --git a/content/math/factor-remainder-theorems/supplement.html b/content/math/factor-remainder-theorems/supplement.html new file mode 100644 index 0000000..0c6a27d --- /dev/null +++ b/content/math/factor-remainder-theorems/supplement.html @@ -0,0 +1,106 @@ +
+

History

+

+ Polynomial equations became central in algebra from the Renaissance onward, when mathematicians + studied systematic methods for solving cubic and quartic equations. As symbolic algebra matured, + methods for division and factor testing became standard tools. +

+

+ What we now call the factor and remainder theorems are part of the broader + polynomial division framework developed in 18th–19th century algebra texts. + They remain important in modern high-school courses because they connect substitution, + division, and root-finding in one clear structure. +

+ +

Derivation

+

From the polynomial division algorithm

+

+ For any polynomial \(P(x)\), dividing by \((x-a)\) gives: + \[ + P(x)=(x-a)Q(x)+R. + \] + Now substitute \(x=a\): + \[ + P(a)=(a-a)Q(a)+R=R. + \] + So the remainder equals \(P(a)\), proving the Remainder Theorem. +

+

+ If \((x-a)\) is a factor, remainder \(R=0\), so \(P(a)=0\). Conversely, if \(P(a)=0\), then + remainder is zero, so \((x-a)\) divides \(P(x)\). This proves the Factor Theorem. +

+ +

Checkpoints

+

+ Pause and reason before continuing. Discuss with a classmate or write your reasoning in a + notebook. +

+ +
+

Checkpoint

+

+ Find the remainder when \(P(x)=3x^3-2x+7\) is divided by \((x-2)\). +

+
+ +
+

Checkpoint

+

+ Is \((x+2)\) a factor of \(x^3+4x^2+5x+2\)? Show the one-line test. +

+
+ +
+

Checkpoint

+

+ Given \(P(x)=2x^3+kx^2-8x-4\), if \((x-2)\) is a factor, find \(k\). +

+
+ +
+

Checkpoint

+

+ A polynomial leaves remainder \(5\) when divided by \((x-1)\). What is \(P(1)\)? +

+
+ +
+

Checkpoint

+

+ If \(P(3)=0\) and \(P(-1)=0\) for a cubic \(P(x)\), what two linear factors must appear? +

+
+ +
+

Checkpoint

+

+ Why is synthetic division especially useful after you already know one root? +

+
+ +

Applications

+

Graph intercepts and curve sketching

+

+ Solving \(P(x)=0\) gives x-intercepts of polynomial graphs. Factor Theorem helps find those + intercepts quickly, then sketch end behavior and turning points more accurately. +

+ +

Constraint values in models

+

+ In applied models, a condition like “output is zero at \(x=a\)” means \(P(a)=0\), so + \((x-a)\) must be a factor. This appears in physics calibration, optimization constraints, and + coding of polynomial approximations. +

+ +

Gateway to numerical methods

+

+ Understanding factor tests and polynomial reduction supports later methods such as Newton’s + method and polynomial interpolation, where roots and remainders are central ideas. +

+ +

References

+ +
diff --git a/content/math/functions-graphs/_index.md b/content/math/functions-graphs/_index.md new file mode 100644 index 0000000..3d9fae3 --- /dev/null +++ b/content/math/functions-graphs/_index.md @@ -0,0 +1,257 @@ ++++ +title = "Functions & graphs" +description = "Model input-output rules, work with domain and range, and sketch key function graphs and transformations." +template = "chapter.html" +weight = 15 +[extra] +subject = "math" +chapter_id = "functions-graphs" +strand = "Number & Algebra" ++++ + +
+

+ A function is a rule that assigns exactly one output to each allowed input. + In high school, functions help you connect equations, tables, and graphs. +

+ +

What is a function?

+

+ If \(f\) is a function, then \(f(x)\) means “the output when input is \(x\).” + Example: +

+

+ \[ + f(x)=2x+3. + \] +

+

+ Then \(f(1)=5\), \(f(4)=11\), and \(f(-2)=-1\). +

+
+

Key idea

+

+ \[ + \text{One input} \rightarrow \text{one output}. + \] +

+
+ +

Domain and range

+

+ The domain is the set of allowed inputs. The range is the set of + outputs produced from that domain. +

+

Example 1. \(f(x)=\frac{1}{x-2}\)

+ +

Example 2. \(g(x)=\sqrt{x+1}\)

+ + +

Function vs relation

+

+ Not every relation is a function. If one input gives two outputs, it is not a function. +

+

+ On a graph, use the vertical line test: if any vertical line crosses the curve + more than once, it is not a function. +

+ +

Graph basics

+

+ To sketch a graph: +

+
    +
  1. Choose key \(x\)-values and make a value table.
  2. +
  3. Plot points \((x,f(x))\) on labeled axes.
  4. +
  5. Connect appropriately (line, curve, or separate branches).
  6. +
  7. Identify intercepts and turning features.
  8. +
+ +

Important function families

+

Linear: \(y=mx+c\)

+

+ Straight line with slope \(m\) and \(y\)-intercept \(c\). A larger \(|m|\) means steeper line. +

+ +

Quadratic: \(y=ax^2+bx+c\)

+

+ Parabola. If \(a>0\), opens upward; if \(a<0\), opens downward. +

+ +

Absolute value: \(y=|x|\)

+

+ V-shaped graph with vertex at the origin before transformations. +

+ +

Rational: \(y=\frac{1}{x}\)

+

+ Hyperbola with asymptotes \(x=0\) and \(y=0\). Graph has two separate branches. +

+ +

Transformations

+

+ Start from \(y=f(x)\): +

+ +

Example. From \(y=x^2\) to \(y=(x-3)^2+2\): move right 3, up 2.

+ +

Intercepts and meaning

+ +

+ In applications, intercepts often represent starting value and break-even/zero-output points. +

+ +

Piecewise functions

+

+ Some rules change in different intervals. Example: +

+

+ \[ + f(x)= + \begin{cases} + x+2, & x<1\\ + 3, & x\ge 1 + \end{cases} + \] +

+

+ Graph each rule only on its stated interval, and mark endpoints correctly (open/closed points). +

+ +

Exam strategy

+ +
+ +
+

History

+

+ The modern idea of a function developed over centuries. Early algebra connected formulas to + unknown quantities, while analytic geometry (Descartes) linked equations to curves on coordinate + axes. +

+

+ Later, Euler and others formalized function notation such as \(f(x)\). Today, function thinking + is central in mathematics, science, economics, and computing because it models how one quantity + depends on another. +

+ +

Derivation and reasoning

+

From two points to line equation

+

+ If a line passes through \((x_1,y_1)\) and \((x_2,y_2)\), slope is: + \[ + m=\frac{y_2-y_1}{x_2-x_1}. + \] + Then use \(y=mx+c\) and substitute one point to find \(c\). +

+ +

Why vertex form helps for quadratics

+

+ Writing \(y=a(x-h)^2+k\) shows the turning point immediately: vertex \((h,k)\). This is why + completing the square is useful for sketching and transformations. +

+ +

Checkpoints

+
+ + For \(f(x)=3x-2\), find \(f(5)\) and \(f(-1)\). + +
+

Answer: \(f(5)=13\), \(f(-1)=-5\).

+
+
+ +
+ + State domain and range of \(g(x)=\sqrt{x-4}\). + +
+

Answer: Domain \(x\ge 4\), range \(y\ge 0\).

+
+
+ +
+ + Is \(x=y^2\) a function of \(x\)? Use the vertical line test idea. + +
+

Answer: No.

+

+ For a positive \(x\), there are two \(y\)-values (\(+\sqrt{x}\) and \(-\sqrt{x}\)), so one + \(x\) maps to two outputs. +

+
+
+ +
+ + For \(y=(x+1)^2-3\), state the transformation from \(y=x^2\). + +
+

Answer: Shift left 1 and down 3.

+
+
+ +
+ + Find intercepts of \(y=x^2-4x+3\). + +
+

Answer: \(y\)-intercept: \((0,3)\).

+

Answer: \(x\)-intercepts: solve \(x^2-4x+3=0\Rightarrow(x-1)(x-3)=0\), so \((1,0)\), \((3,0)\).

+
+
+ +
+ + Sketch idea: \(f(x)=\frac{1}{x-2}+1\). What are its asymptotes? + +
+

Answer: Vertical asymptote \(x=2\), horizontal asymptote \(y=1\).

+
+
+ +

Applications

+

Finance and budgeting

+

+ Linear functions model plans with fixed charges plus per-unit costs, such as phone plans or + transport fares. +

+ +

Motion and science

+

+ Position-time or velocity-time graphs are function graphs. Intercepts, gradients, and curvature + describe physical behavior. +

+ +

Data modeling

+

+ Exponential, quadratic, and rational models are used to approximate trends, optimize designs, + and make predictions from measured data. +

+ +

References

+ +
diff --git a/content/math/functions-graphs/core.html b/content/math/functions-graphs/core.html new file mode 100644 index 0000000..a545cfb --- /dev/null +++ b/content/math/functions-graphs/core.html @@ -0,0 +1,131 @@ +
+

+ A function is a rule that assigns exactly one output to each allowed input. + In high school, functions help you connect equations, tables, and graphs. +

+ +

What is a function?

+

+ If \(f\) is a function, then \(f(x)\) means “the output when input is \(x\).” + Example: +

+

+ \[ + f(x)=2x+3. + \] +

+

+ Then \(f(1)=5\), \(f(4)=11\), and \(f(-2)=-1\). +

+
+

Key idea

+

+ \[ + \text{One input} \rightarrow \text{one output}. + \] +

+
+ +

Domain and range

+

+ The domain is the set of allowed inputs. The range is the set of + outputs produced from that domain. +

+

Example 1. \(f(x)=\frac{1}{x-2}\)

+ +

Example 2. \(g(x)=\sqrt{x+1}\)

+ + +

Function vs relation

+

+ Not every relation is a function. If one input gives two outputs, it is not a function. +

+

+ On a graph, use the vertical line test: if any vertical line crosses the curve + more than once, it is not a function. +

+ +

Graph basics

+

+ To sketch a graph: +

+
    +
  1. Choose key \(x\)-values and make a value table.
  2. +
  3. Plot points \((x,f(x))\) on labeled axes.
  4. +
  5. Connect appropriately (line, curve, or separate branches).
  6. +
  7. Identify intercepts and turning features.
  8. +
+ +

Important function families

+

Linear: \(y=mx+c\)

+

+ Straight line with slope \(m\) and \(y\)-intercept \(c\). A larger \(|m|\) means steeper line. +

+ +

Quadratic: \(y=ax^2+bx+c\)

+

+ Parabola. If \(a>0\), opens upward; if \(a<0\), opens downward. +

+ +

Absolute value: \(y=|x|\)

+

+ V-shaped graph with vertex at the origin before transformations. +

+ +

Rational: \(y=\frac{1}{x}\)

+

+ Hyperbola with asymptotes \(x=0\) and \(y=0\). Graph has two separate branches. +

+ +

Transformations

+

+ Start from \(y=f(x)\): +

+ +

Example. From \(y=x^2\) to \(y=(x-3)^2+2\): move right 3, up 2.

+ +

Intercepts and meaning

+ +

+ In applications, intercepts often represent starting value and break-even/zero-output points. +

+ +

Piecewise functions

+

+ Some rules change in different intervals. Example: +

+

+ \[ + f(x)= + \begin{cases} + x+2, & x<1\\ + 3, & x\ge 1 + \end{cases} + \] +

+

+ Graph each rule only on its stated interval, and mark endpoints correctly (open/closed points). +

+ +

Exam strategy

+ +
diff --git a/content/math/functions-graphs/supplement.html b/content/math/functions-graphs/supplement.html new file mode 100644 index 0000000..e02a755 --- /dev/null +++ b/content/math/functions-graphs/supplement.html @@ -0,0 +1,114 @@ +
+

History

+

+ The modern idea of a function developed over centuries. Early algebra connected formulas to + unknown quantities, while analytic geometry (Descartes) linked equations to curves on coordinate + axes. +

+

+ Later, Euler and others formalized function notation such as \(f(x)\). Today, function thinking + is central in mathematics, science, economics, and computing because it models how one quantity + depends on another. +

+ +

Derivation and reasoning

+

From two points to line equation

+

+ If a line passes through \((x_1,y_1)\) and \((x_2,y_2)\), slope is: + \[ + m=\frac{y_2-y_1}{x_2-x_1}. + \] + Then use \(y=mx+c\) and substitute one point to find \(c\). +

+ +

Why vertex form helps for quadratics

+

+ Writing \(y=a(x-h)^2+k\) shows the turning point immediately: vertex \((h,k)\). This is why + completing the square is useful for sketching and transformations. +

+ +

Checkpoints

+
+ + For \(f(x)=3x-2\), find \(f(5)\) and \(f(-1)\). + +
+

Answer: \(f(5)=13\), \(f(-1)=-5\).

+
+
+ +
+ + State domain and range of \(g(x)=\sqrt{x-4}\). + +
+

Answer: Domain \(x\ge 4\), range \(y\ge 0\).

+
+
+ +
+ + Is \(x=y^2\) a function of \(x\)? Use the vertical line test idea. + +
+

Answer: No.

+

+ For a positive \(x\), there are two \(y\)-values (\(+\sqrt{x}\) and \(-\sqrt{x}\)), so one + \(x\) maps to two outputs. +

+
+
+ +
+ + For \(y=(x+1)^2-3\), state the transformation from \(y=x^2\). + +
+

Answer: Shift left 1 and down 3.

+
+
+ +
+ + Find intercepts of \(y=x^2-4x+3\). + +
+

Answer: \(y\)-intercept: \((0,3)\).

+

Answer: \(x\)-intercepts: solve \(x^2-4x+3=0\Rightarrow(x-1)(x-3)=0\), so \((1,0)\), \((3,0)\).

+
+
+ +
+ + Sketch idea: \(f(x)=\frac{1}{x-2}+1\). What are its asymptotes? + +
+

Answer: Vertical asymptote \(x=2\), horizontal asymptote \(y=1\).

+
+
+ +

Applications

+

Finance and budgeting

+

+ Linear functions model plans with fixed charges plus per-unit costs, such as phone plans or + transport fares. +

+ +

Motion and science

+

+ Position-time or velocity-time graphs are function graphs. Intercepts, gradients, and curvature + describe physical behavior. +

+ +

Data modeling

+

+ Exponential, quadratic, and rational models are used to approximate trends, optimize designs, + and make predictions from measured data. +

+ +

References

+ +
diff --git a/content/math/linear-equations-two-unknowns/widgets/simultaneous-graph-explorer.tsx b/content/math/linear-equations-two-unknowns/widgets/simultaneous-graph-explorer.tsx index 1bd2c07..f1de055 100644 --- a/content/math/linear-equations-two-unknowns/widgets/simultaneous-graph-explorer.tsx +++ b/content/math/linear-equations-two-unknowns/widgets/simultaneous-graph-explorer.tsx @@ -5,6 +5,7 @@ const VIEW_SIZE = 400; const UNIT = 20; const ORIGIN = VIEW_SIZE / 2; const X_RANGE = 10; +const AXIS_LABEL_STEP = 2; const LINE_SAMPLE_STEP = 0.12; const INTERSECTION_HIT_SCREEN = 28; const LINE_HIT_SCREEN = 14; @@ -268,6 +269,69 @@ function drawGraph( ctx.lineTo(VIEW_SIZE, ORIGIN); ctx.stroke(); + // Axis arrowheads + const arrowSize = 8; + ctx.fillStyle = colors.axis; + // +x arrow + ctx.beginPath(); + ctx.moveTo(VIEW_SIZE - 2, ORIGIN); + ctx.lineTo(VIEW_SIZE - arrowSize - 2, ORIGIN - 4); + ctx.lineTo(VIEW_SIZE - arrowSize - 2, ORIGIN + 4); + ctx.closePath(); + ctx.fill(); + // +y arrow + ctx.beginPath(); + ctx.moveTo(ORIGIN, 2); + ctx.lineTo(ORIGIN - 4, arrowSize + 2); + ctx.lineTo(ORIGIN + 4, arrowSize + 2); + ctx.closePath(); + ctx.fill(); + + // Graduations (ticks + labels) + ctx.strokeStyle = colors.axis; + ctx.fillStyle = colors.axis; + ctx.lineWidth = 1; + ctx.font = "11px IBM Plex Mono, monospace"; + ctx.textAlign = "center"; + ctx.textBaseline = "top"; + for (let i = -X_RANGE; i <= X_RANGE; i++) { + const px = toCanvasX(i); + const py = toCanvasY(i); + if (i !== 0) { + // x-axis ticks + ctx.beginPath(); + ctx.moveTo(px, ORIGIN - 4); + ctx.lineTo(px, ORIGIN + 4); + ctx.stroke(); + if (i % AXIS_LABEL_STEP === 0) { + ctx.fillText(String(i), px, ORIGIN + 8); + } + + // y-axis ticks + ctx.beginPath(); + ctx.moveTo(ORIGIN - 4, py); + ctx.lineTo(ORIGIN + 4, py); + ctx.stroke(); + if (i % AXIS_LABEL_STEP === 0) { + ctx.textAlign = "right"; + ctx.textBaseline = "middle"; + ctx.fillText(String(i), ORIGIN - 8, py); + ctx.textAlign = "center"; + ctx.textBaseline = "top"; + } + } + } + + // Axis labels + ctx.fillStyle = colors.axis; + ctx.font = "12px IBM Plex Mono, monospace"; + ctx.textAlign = "right"; + ctx.textBaseline = "bottom"; + ctx.fillText("x", VIEW_SIZE - 8, ORIGIN - 6); + ctx.textAlign = "left"; + ctx.textBaseline = "top"; + ctx.fillText("y", ORIGIN + 6, 6); + const drawLine = ( m: number, c: number, diff --git a/content/math/linear-programming/_index.md b/content/math/linear-programming/_index.md new file mode 100644 index 0000000..77d70e9 --- /dev/null +++ b/content/math/linear-programming/_index.md @@ -0,0 +1,174 @@ ++++ +title = "Linear programming" +description = "Graph linear inequalities, identify feasible regions, and optimise objective functions in two variables." +template = "chapter.html" +weight = 19 +[extra] +subject = "math" +chapter_id = "linear-programming" +strand = "Number & Algebra" ++++ + +
+

+ Linear programming finds the best value (maximum or minimum) of a linear objective under linear + constraints. In high school, we solve two-variable problems graphically. +

+ +

Core idea

+

+ Optimize an objective like + \[ + P=ax+by + \] + subject to inequalities such as \(x+y\le 12\), \(x\ge0\), \(y\ge0\). +

+ +

Modeling from context

+

+ Typical setup: +

+
    +
  1. Define variables (\(x,y\)).
  2. +
  3. Write constraints from limits/resources.
  4. +
  5. Write objective function (profit, cost, time, etc.).
  6. +
  7. Graph constraints and find feasible region.
  8. +
+ +

Graphing constraints

+

+ For each inequality: +

+ +

+ Include non-negativity constraints \(x\ge0,y\ge0\) unless problem states otherwise. +

+ +

Feasible region

+

+ The feasible region is where all constraints hold at once. In school-level cases, it is usually a + polygon (possibly unbounded). +

+ +

Corner-point principle

+

+ If an optimum exists for a bounded feasible region, it occurs at a vertex (corner point). +

+

+ So compute all feasible vertices, then evaluate objective at each. +

+ +

Worked example

+

+ Maximize \(P=3x+2y\) subject to: +

+

\[ + x+y\le 8,\quad x+3y\le 12,\quad x\ge0,\ y\ge0. + \]

+

+ Vertices are \((0,0)\), \((8,0)\), \((0,4)\), and intersection of + \(x+y=8\) with \(x+3y=12\), which is \((6,2)\). +

+

+ Evaluate: +

+ +

+ Maximum is \(24\) at \((8,0)\). +

+ +

Special cases

+ + +

Exam strategy

+ +
+ +
+

History

+

+ Linear programming developed in the 20th century for resource allocation and planning. George + Dantzig's simplex method made large optimization problems practical in economics and operations + research. +

+ +

Derivation and reasoning

+

Why corner points matter

+

+ Objective lines \(ax+by=c\) are parallel for different \(c\). Sliding this line across a polygonal + feasible region reaches the last contact at a vertex (or an entire edge in tie cases). +

+ +

Checkpoints

+
+ + Plot \(x+y\le6,\ x\ge0,\ y\ge0\). List feasible vertices. + +
+

Answer: Vertices: \((0,0)\), \((6,0)\), \((0,6)\).

+
+
+
+ + Maximize \(P=2x+y\) on vertices \((0,0)\), \((4,0)\), \((1,3)\), \((0,3)\). + +
+

Answer: Values \(0,8,5,3\). Maximum \(8\) at \((4,0)\).

+
+
+
+ + Minimize \(C=5x+3y\) with feasible vertices \((0,2)\), \((2,1)\), \((3,4)\). + +
+

Answer: \(C=6,13,27\). Minimum \(6\) at \((0,2)\).

+
+
+
+ + In a model, why are \(x\ge0,\ y\ge0\) often included? + +
+

Answer: Quantities like items, time, or material cannot be negative.

+
+
+
+ + How can you detect possible multiple optimal solutions graphically? + +
+

Answer: Objective line is parallel to a boundary edge where both edge endpoints give the same optimum value.

+
+
+ +

Applications

+ + +

References

+ +
diff --git a/content/math/linear-programming/core.html b/content/math/linear-programming/core.html new file mode 100644 index 0000000..c1d90f3 --- /dev/null +++ b/content/math/linear-programming/core.html @@ -0,0 +1,92 @@ +
+

+ Linear programming finds the best value (maximum or minimum) of a linear objective under linear + constraints. In high school, we solve two-variable problems graphically. +

+ +

Core idea

+

+ Optimize an objective like + \[ + P=ax+by + \] + subject to inequalities such as \(x+y\le 12\), \(x\ge0\), \(y\ge0\). +

+ +

Modeling from context

+

+ Typical setup: +

+
    +
  1. Define variables (\(x,y\)).
  2. +
  3. Write constraints from limits/resources.
  4. +
  5. Write objective function (profit, cost, time, etc.).
  6. +
  7. Graph constraints and find feasible region.
  8. +
+ +

Graphing constraints

+

+ For each inequality: +

+ +

+ Include non-negativity constraints \(x\ge0,y\ge0\) unless problem states otherwise. +

+ +

Feasible region

+

+ The feasible region is where all constraints hold at once. In school-level cases, it is usually a + polygon (possibly unbounded). +

+ +

Corner-point principle

+

+ If an optimum exists for a bounded feasible region, it occurs at a vertex (corner point). +

+

+ So compute all feasible vertices, then evaluate objective at each. +

+ +

Worked example

+

+ Maximize \(P=3x+2y\) subject to: +

+

\[ + x+y\le 8,\quad x+3y\le 12,\quad x\ge0,\ y\ge0. + \]

+

+ Vertices are \((0,0)\), \((8,0)\), \((0,4)\), and intersection of + \(x+y=8\) with \(x+3y=12\), which is \((6,2)\). +

+

+ Evaluate: +

+ +

+ Maximum is \(24\) at \((8,0)\). +

+ +

Special cases

+ + +

Exam strategy

+ +
diff --git a/content/math/linear-programming/supplement.html b/content/math/linear-programming/supplement.html new file mode 100644 index 0000000..7a08866 --- /dev/null +++ b/content/math/linear-programming/supplement.html @@ -0,0 +1,70 @@ +
+

History

+

+ Linear programming developed in the 20th century for resource allocation and planning. George + Dantzig's simplex method made large optimization problems practical in economics and operations + research. +

+ +

Derivation and reasoning

+

Why corner points matter

+

+ Objective lines \(ax+by=c\) are parallel for different \(c\). Sliding this line across a polygonal + feasible region reaches the last contact at a vertex (or an entire edge in tie cases). +

+ +

Checkpoints

+
+ + Plot \(x+y\le6,\ x\ge0,\ y\ge0\). List feasible vertices. + +
+

Answer: Vertices: \((0,0)\), \((6,0)\), \((0,6)\).

+
+
+
+ + Maximize \(P=2x+y\) on vertices \((0,0)\), \((4,0)\), \((1,3)\), \((0,3)\). + +
+

Answer: Values \(0,8,5,3\). Maximum \(8\) at \((4,0)\).

+
+
+
+ + Minimize \(C=5x+3y\) with feasible vertices \((0,2)\), \((2,1)\), \((3,4)\). + +
+

Answer: \(C=6,13,27\). Minimum \(6\) at \((0,2)\).

+
+
+
+ + In a model, why are \(x\ge0,\ y\ge0\) often included? + +
+

Answer: Quantities like items, time, or material cannot be negative.

+
+
+
+ + How can you detect possible multiple optimal solutions graphically? + +
+

Answer: Objective line is parallel to a boundary edge where both edge endpoints give the same optimum value.

+
+
+ +

Applications

+ + +

References

+ +
diff --git a/content/math/sequences-series/_index.md b/content/math/sequences-series/_index.md new file mode 100644 index 0000000..3690424 --- /dev/null +++ b/content/math/sequences-series/_index.md @@ -0,0 +1,169 @@ ++++ +title = "Sequences & series" +description = "Work with arithmetic and geometric sequences, sigma notation, and finite summation formulas." +template = "chapter.html" +weight = 17 +[extra] +subject = "math" +chapter_id = "sequences-series" +strand = "Number & Algebra" ++++ + +
+

+ A sequence is an ordered list of numbers. A series is the sum of + terms in a sequence. These ideas are key in algebra, finance, and modeling. +

+ +

Sequence notation

+

+ Terms are often written \(u_1,u_2,u_3,\dots\) where \(u_n\) is the \(n\)-th term. +

+

Example: \(2,5,8,11,\dots\) has \(u_1=2\), \(u_2=5\), \(u_3=8\).

+ +

Arithmetic sequences

+

+ Difference between consecutive terms is constant \(d\). +

+

\[ + u_n=a+(n-1)d + \]

+

+ where \(a\) is first term. +

+

Example: \(a=4,d=3\Rightarrow u_n=4+3(n-1)=3n+1\).

+ +

Arithmetic series

+

+ Sum of first \(n\) terms: +

+

\[ + S_n=\frac{n}{2}\big(2a+(n-1)d\big)=\frac{n}{2}(a+l) + \]

+

+ where \(l\) is the \(n\)-th term. +

+ +

Geometric sequences

+

+ Ratio between consecutive terms is constant \(r\). +

+

\[ + u_n=ar^{n-1} + \]

+

Example: \(3,6,12,24,\dots\) has \(a=3,r=2\).

+ +

Geometric series

+

+ For \(r\ne1\), sum of first \(n\) terms: +

+

\[ + S_n=a\frac{1-r^n}{1-r} + \]

+

+ Equivalent form: \(S_n=a\frac{r^n-1}{r-1}\). +

+ +

Infinite geometric series

+

+ If \(|r|<1\), the sum to infinity exists: +

+

\[ + S_\infty=\frac{a}{1-r}. + \]

+

+ If \(|r|\ge1\), no finite sum to infinity. +

+ +

Sigma notation

+

+ \[ + \sum_{k=1}^{n} f(k) + \] + means add values of \(f(k)\) from \(k=1\) to \(k=n\). +

+

Example: \(\sum_{k=1}^{4}(2k+1)=3+5+7+9=24.\)

+ +

Typical problem-solving workflow

+
    +
  1. Identify arithmetic or geometric behavior.
  2. +
  3. Find key parameters (\(a,d\) or \(a,r\)).
  4. +
  5. Use \(u_n\) for term questions, \(S_n\) for sum questions.
  6. +
  7. Check reasonableness (growth/decay, sign, size).
  8. +
+ +

Exam strategy

+ +
+ +
+

History

+

+ Sequences and sums appear in ancient mathematics, including arithmetic progressions used for + counting and trade. Later, geometric series became central in finance and calculus. +

+ +

Derivation and reasoning

+

Why the arithmetic sum formula works

+

+ Write \(S_n=a+(a+d)+\dots+l\) and reverse it. Adding line-by-line gives \(2S_n=n(a+l)\), so + \(S_n=\frac{n}{2}(a+l)\). +

+

Why the geometric sum formula works

+

+ Let \(S_n=a+ar+\dots+ar^{n-1}\). Multiply by \(r\), subtract, and simplify: + \[ + (1-r)S_n=a(1-r^n). + \] +

+ +

Checkpoints

+
+ Find the 20th term of \(5,8,11,\dots\). +
+

Answer: \(u_{20}=5+19(3)=62\).

+
+
+
+ Find \(S_{30}\) for \(2,5,8,\dots\). +
+

Answer: \(a=2,d=3\Rightarrow S_{30}=\frac{30}{2}[2(2)+29(3)]=1365\).

+
+
+
+ For \(3,6,12,\dots\), find the 8th term. +
+

Answer: \(u_8=3\cdot2^7=384\).

+
+
+
+ Compute \(1+\frac12+\frac14+\frac18+\dots\). +
+

Answer: \(a=1,r=\frac12\Rightarrow S_\infty=\frac{1}{1-1/2}=2\).

+
+
+
+ Evaluate \(\sum_{k=1}^{5}(k+2)\). +
+

Answer: \(3+4+5+6+7=25\).

+
+
+ +

Applications

+ + +

References

+ +
diff --git a/content/math/sequences-series/core.html b/content/math/sequences-series/core.html new file mode 100644 index 0000000..01332c6 --- /dev/null +++ b/content/math/sequences-series/core.html @@ -0,0 +1,91 @@ +
+

+ A sequence is an ordered list of numbers. A series is the sum of + terms in a sequence. These ideas are key in algebra, finance, and modeling. +

+ +

Sequence notation

+

+ Terms are often written \(u_1,u_2,u_3,\dots\) where \(u_n\) is the \(n\)-th term. +

+

Example: \(2,5,8,11,\dots\) has \(u_1=2\), \(u_2=5\), \(u_3=8\).

+ +

Arithmetic sequences

+

+ Difference between consecutive terms is constant \(d\). +

+

\[ + u_n=a+(n-1)d + \]

+

+ where \(a\) is first term. +

+

Example: \(a=4,d=3\Rightarrow u_n=4+3(n-1)=3n+1\).

+ +

Arithmetic series

+

+ Sum of first \(n\) terms: +

+

\[ + S_n=\frac{n}{2}\big(2a+(n-1)d\big)=\frac{n}{2}(a+l) + \]

+

+ where \(l\) is the \(n\)-th term. +

+ +

Geometric sequences

+

+ Ratio between consecutive terms is constant \(r\). +

+

\[ + u_n=ar^{n-1} + \]

+

Example: \(3,6,12,24,\dots\) has \(a=3,r=2\).

+ +

Geometric series

+

+ For \(r\ne1\), sum of first \(n\) terms: +

+

\[ + S_n=a\frac{1-r^n}{1-r} + \]

+

+ Equivalent form: \(S_n=a\frac{r^n-1}{r-1}\). +

+ +

Infinite geometric series

+

+ If \(|r|<1\), the sum to infinity exists: +

+

\[ + S_\infty=\frac{a}{1-r}. + \]

+

+ If \(|r|\ge1\), no finite sum to infinity. +

+ +

Sigma notation

+

+ \[ + \sum_{k=1}^{n} f(k) + \] + means add values of \(f(k)\) from \(k=1\) to \(k=n\). +

+

Example: \(\sum_{k=1}^{4}(2k+1)=3+5+7+9=24.\)

+ +

Typical problem-solving workflow

+
    +
  1. Identify arithmetic or geometric behavior.
  2. +
  3. Find key parameters (\(a,d\) or \(a,r\)).
  4. +
  5. Use \(u_n\) for term questions, \(S_n\) for sum questions.
  6. +
  7. Check reasonableness (growth/decay, sign, size).
  8. +
+ +

Exam strategy

+ +
diff --git a/content/math/sequences-series/supplement.html b/content/math/sequences-series/supplement.html new file mode 100644 index 0000000..028498a --- /dev/null +++ b/content/math/sequences-series/supplement.html @@ -0,0 +1,66 @@ +
+

History

+

+ Sequences and sums appear in ancient mathematics, including arithmetic progressions used for + counting and trade. Later, geometric series became central in finance and calculus. +

+ +

Derivation and reasoning

+

Why the arithmetic sum formula works

+

+ Write \(S_n=a+(a+d)+\dots+l\) and reverse it. Adding line-by-line gives \(2S_n=n(a+l)\), so + \(S_n=\frac{n}{2}(a+l)\). +

+

Why the geometric sum formula works

+

+ Let \(S_n=a+ar+\dots+ar^{n-1}\). Multiply by \(r\), subtract, and simplify: + \[ + (1-r)S_n=a(1-r^n). + \] +

+ +

Checkpoints

+
+ Find the 20th term of \(5,8,11,\dots\). +
+

Answer: \(u_{20}=5+19(3)=62\).

+
+
+
+ Find \(S_{30}\) for \(2,5,8,\dots\). +
+

Answer: \(a=2,d=3\Rightarrow S_{30}=\frac{30}{2}[2(2)+29(3)]=1365\).

+
+
+
+ For \(3,6,12,\dots\), find the 8th term. +
+

Answer: \(u_8=3\cdot2^7=384\).

+
+
+
+ Compute \(1+\frac12+\frac14+\frac18+\dots\). +
+

Answer: \(a=1,r=\frac12\Rightarrow S_\infty=\frac{1}{1-1/2}=2\).

+
+
+
+ Evaluate \(\sum_{k=1}^{5}(k+2)\). +
+

Answer: \(3+4+5+6+7=25\).

+
+
+ +

Applications

+ + +

References

+ +
diff --git a/content/math/variations/_index.md b/content/math/variations/_index.md new file mode 100644 index 0000000..d1ebc45 --- /dev/null +++ b/content/math/variations/_index.md @@ -0,0 +1,152 @@ ++++ +title = "Variations" +description = "Model direct, inverse, joint, and partial variation and solve combined variation problems." +template = "chapter.html" +weight = 18 +[extra] +subject = "math" +chapter_id = "variations" +strand = "Number & Algebra" ++++ + +
+

+ Variation describes how one quantity changes with another. It turns word statements into useful + algebraic models. +

+ +

Direct variation

+

+ \(y\) varies directly as \(x\): + \[ + y\propto x \quad\Rightarrow\quad y=kx + \] + where \(k\) is the constant of variation. +

+

Example: If \(y=18\) when \(x=6\), then \(k=3\), so \(y=3x\).

+ +

Inverse variation

+

+ \(y\) varies inversely as \(x\): + \[ + y\propto\frac1x \quad\Rightarrow\quad y=\frac{k}{x}. + \] +

+

Example: If \(y=5\) when \(x=4\), then \(k=20\), so \(y=\frac{20}{x}\).

+ +

Variation with powers

+

+ You may see statements like: +

+ + +

Joint variation

+

+ If \(y\) varies jointly as \(x\) and \(z\): + \[ + y\propto xz \Rightarrow y=kxz. + \] +

+

Example: \(y=24\) when \(x=2,z=3\Rightarrow k=4\), so \(y=4xz\).

+ +

Partial variation

+

+ If \(y\) varies partly as \(x\), model has constant and variable part: + \[ + y=mx+c,\quad c\ne0. + \] +

+

+ This appears in pricing: fixed fee + per-unit charge. +

+ +

Solving workflow

+
    +
  1. Translate words into proportional equation with \(k\).
  2. +
  3. Use given data to find \(k\).
  4. +
  5. Substitute required values to answer question.
  6. +
  7. Check units and reasonableness.
  8. +
+ +

Common word-problem forms

+ + +

Exam strategy

+ +
+ +
+

History

+

+ Variation models grew from early physics and astronomy, where scientists needed formulas for how + one quantity depends on another. The language of proportionality became a bridge between algebra + and real measurements. +

+ +

Derivation and reasoning

+

Why we use a constant \(k\)

+

+ “Directly proportional” means ratio \(\frac{y}{x}\) stays constant, so \(\frac{y}{x}=k\) and + \(y=kx\). For inverse variation, product \(xy\) stays constant, so \(xy=k\). +

+ +

Checkpoints

+
+ If \(y\propto x\) and \(y=15\) when \(x=3\), find \(y\) when \(x=10\). +
+

Answer: \(k=5\Rightarrow y=5x\Rightarrow y=50\).

+
+
+
+ If \(y\propto \frac1x\) and \(y=8\) when \(x=5\), find \(y\) when \(x=20\). +
+

Answer: \(k=40\Rightarrow y=\frac{40}{x}\Rightarrow y=2\).

+
+
+
+ \(y\) varies as \(x^2\). If \(y=27\) when \(x=3\), find \(y\) when \(x=5\). +
+

Answer: \(y=kx^2,\ k=3\Rightarrow y=3(25)=75\).

+
+
+
+ \(y\) varies jointly as \(x\) and \(z\). If \(y=30\) when \(x=3,z=2\), find \(y\) when \(x=5,z=4\). +
+

Answer: \(y=kxz,\ k=5\Rightarrow y=5(5)(4)=100\).

+
+
+
+ A taxi fare \(F\) varies partly as distance \(d\): \(F=md+c\). If \(F=26\) at \(d=8\), and \(F=38\) at \(d=14\), find \(m,c\). +
+

Answer: Solve two equations: \(8m+c=26,\ 14m+c=38\).

+

\(6m=12\Rightarrow m=2,\ c=10\). So \(F=2d+10\).

+
+
+ +

Applications

+ + +

References

+ +
diff --git a/content/math/variations/core.html b/content/math/variations/core.html new file mode 100644 index 0000000..e9b226b --- /dev/null +++ b/content/math/variations/core.html @@ -0,0 +1,79 @@ +
+

+ Variation describes how one quantity changes with another. It turns word statements into useful + algebraic models. +

+ +

Direct variation

+

+ \(y\) varies directly as \(x\): + \[ + y\propto x \quad\Rightarrow\quad y=kx + \] + where \(k\) is the constant of variation. +

+

Example: If \(y=18\) when \(x=6\), then \(k=3\), so \(y=3x\).

+ +

Inverse variation

+

+ \(y\) varies inversely as \(x\): + \[ + y\propto\frac1x \quad\Rightarrow\quad y=\frac{k}{x}. + \] +

+

Example: If \(y=5\) when \(x=4\), then \(k=20\), so \(y=\frac{20}{x}\).

+ +

Variation with powers

+

+ You may see statements like: +

+ + +

Joint variation

+

+ If \(y\) varies jointly as \(x\) and \(z\): + \[ + y\propto xz \Rightarrow y=kxz. + \] +

+

Example: \(y=24\) when \(x=2,z=3\Rightarrow k=4\), so \(y=4xz\).

+ +

Partial variation

+

+ If \(y\) varies partly as \(x\), model has constant and variable part: + \[ + y=mx+c,\quad c\ne0. + \] +

+

+ This appears in pricing: fixed fee + per-unit charge. +

+ +

Solving workflow

+
    +
  1. Translate words into proportional equation with \(k\).
  2. +
  3. Use given data to find \(k\).
  4. +
  5. Substitute required values to answer question.
  6. +
  7. Check units and reasonableness.
  8. +
+ +

Common word-problem forms

+ + +

Exam strategy

+ +
diff --git a/content/math/variations/supplement.html b/content/math/variations/supplement.html new file mode 100644 index 0000000..b76e8ed --- /dev/null +++ b/content/math/variations/supplement.html @@ -0,0 +1,61 @@ +
+

History

+

+ Variation models grew from early physics and astronomy, where scientists needed formulas for how + one quantity depends on another. The language of proportionality became a bridge between algebra + and real measurements. +

+ +

Derivation and reasoning

+

Why we use a constant \(k\)

+

+ “Directly proportional” means ratio \(\frac{y}{x}\) stays constant, so \(\frac{y}{x}=k\) and + \(y=kx\). For inverse variation, product \(xy\) stays constant, so \(xy=k\). +

+ +

Checkpoints

+
+ If \(y\propto x\) and \(y=15\) when \(x=3\), find \(y\) when \(x=10\). +
+

Answer: \(k=5\Rightarrow y=5x\Rightarrow y=50\).

+
+
+
+ If \(y\propto \frac1x\) and \(y=8\) when \(x=5\), find \(y\) when \(x=20\). +
+

Answer: \(k=40\Rightarrow y=\frac{40}{x}\Rightarrow y=2\).

+
+
+
+ \(y\) varies as \(x^2\). If \(y=27\) when \(x=3\), find \(y\) when \(x=5\). +
+

Answer: \(y=kx^2,\ k=3\Rightarrow y=3(25)=75\).

+
+
+
+ \(y\) varies jointly as \(x\) and \(z\). If \(y=30\) when \(x=3,z=2\), find \(y\) when \(x=5,z=4\). +
+

Answer: \(y=kxz,\ k=5\Rightarrow y=5(5)(4)=100\).

+
+
+
+ A taxi fare \(F\) varies partly as distance \(d\): \(F=md+c\). If \(F=26\) at \(d=8\), and \(F=38\) at \(d=14\), find \(m,c\). +
+

Answer: Solve two equations: \(8m+c=26,\ 14m+c=38\).

+

\(6m=12\Rightarrow m=2,\ c=10\). So \(F=2d+10\).

+
+
+ +

Applications

+ + +

References

+ +
diff --git a/data/math-curriculum.json b/data/math-curriculum.json index 2756df1..2a29c5a 100644 --- a/data/math-curriculum.json +++ b/data/math-curriculum.json @@ -519,7 +519,7 @@ "slug": "factor-remainder-theorems", "title": "Factor & remainder theorems", "description": "Use the factor and remainder theorems to factorise higher-degree polynomials and solve related equations.", - "status": "planned", + "status": "live", "tier": "non-foundation", "curriculumCoverage": { "DSE": "extension", @@ -534,7 +534,7 @@ "slug": "complex-numbers", "title": "Complex numbers", "description": "Represent complex numbers in Cartesian form and perform operations including conjugates and division.", - "status": "planned", + "status": "live", "tier": "non-foundation", "curriculumCoverage": { "DSE": "extension", @@ -549,7 +549,7 @@ "slug": "functions-graphs", "title": "Functions & graphs", "description": "Study domains, ranges, transformations, and graphs of common functions including quadratics and rationals.", - "status": "planned", + "status": "live", "curriculumCoverage": { "DSE": "core", "IGCSE": "core", @@ -567,7 +567,7 @@ "slug": "exponential-logarithmic", "title": "Exponential & logarithmic functions", "description": "Explore laws of logarithms, exponential growth and decay, and sketch related graphs.", - "status": "planned", + "status": "live", "tier": "non-foundation", "curriculumCoverage": { "DSE": "extension", @@ -586,7 +586,7 @@ "slug": "sequences-series", "title": "Sequences & series", "description": "Work with arithmetic and geometric sequences, sigma notation, and finite summation formulas.", - "status": "planned", + "status": "live", "curriculumCoverage": { "DSE": "core", "IGCSE": "core", @@ -604,7 +604,7 @@ "slug": "variations", "title": "Variations", "description": "Model direct, inverse, joint, and partial variation and solve combined variation problems.", - "status": "planned", + "status": "live", "curriculumCoverage": { "DSE": "core", "IB": "related", @@ -618,7 +618,7 @@ "slug": "linear-programming", "title": "Linear programming", "description": "Graph linear inequalities, identify feasible regions, and optimise objective functions in two variables.", - "status": "planned", + "status": "live", "tier": "non-foundation", "curriculumCoverage": { "DSE": "extension", diff --git a/frontend/src/main.tsx b/frontend/src/main.tsx index 74203ce..f6fcd6d 100644 --- a/frontend/src/main.tsx +++ b/frontend/src/main.tsx @@ -38,6 +38,29 @@ function mountFooterYear() { } } +function localizeChapterLastModified() { + const times = document.querySelectorAll("time[data-localize-lastmod]"); + if (times.length === 0) return; + + const formatter = new Intl.DateTimeFormat(undefined, { + year: "numeric", + month: "short", + day: "2-digit", + hour: "2-digit", + minute: "2-digit", + timeZoneName: "short", + }); + + for (const timeEl of times) { + const iso = timeEl.getAttribute("datetime"); + if (!iso) continue; + + const date = new Date(iso); + if (Number.isNaN(date.getTime())) continue; + timeEl.textContent = formatter.format(date); + } +} + function scheduleBookMath() { void import("./lib/katex").then(({ renderBookMath }) => { requestAnimationFrame(() => renderBookMath()); @@ -150,6 +173,7 @@ function mountSubjectInit() { initBookMath(); mountSubjectInit(); mountChapterWidgets(); +localizeChapterLastModified(); const catalogRoot = document.getElementById("catalog-app"); if (catalogRoot) { diff --git a/scripts/generate-site-metadata.ts b/scripts/generate-site-metadata.ts index e8700bb..ee73ebf 100644 --- a/scripts/generate-site-metadata.ts +++ b/scripts/generate-site-metadata.ts @@ -30,12 +30,15 @@ type UrlEntry = { description: string; sourcePaths: string[]; lastmod: Date | null; + isChapter: boolean; + chapterKey: string | null; }; const ROOT = join(import.meta.dir, ".."); const CONTENT_DIR = join(ROOT, "content"); const DATA_DIR = join(ROOT, "data"); const STATIC_DIR = join(ROOT, "static"); +const CHAPTER_LASTMOD_PATH = join(DATA_DIR, "_generated", "chapter-lastmod.json"); const SITEMAP_PATH = join(STATIC_DIR, "sitemap.xml"); const FEED_PATH = join(STATIC_DIR, "feed.xml"); @@ -60,6 +63,15 @@ function normalizeBaseUrl(rawBaseUrl: string): string { return rawBaseUrl.replace(/\/+$/, ""); } +function formatLastmodDisplay(date: Date): string { + const year = date.getUTCFullYear(); + const month = String(date.getUTCMonth() + 1).padStart(2, "0"); + const day = String(date.getUTCDate()).padStart(2, "0"); + const hour = String(date.getUTCHours()).padStart(2, "0"); + const minute = String(date.getUTCMinutes()).padStart(2, "0"); + return `${year}-${month}-${day} ${hour}:${minute} UTC`; +} + function ensureTrailingSlash(path: string): string { return path.endsWith("/") ? path : `${path}/`; } @@ -214,6 +226,8 @@ async function buildEntries(): Promise { description: fm.description ?? fm.title ?? key.split("/")[1], sourcePaths, lastmod, + isChapter: true, + chapterKey: key, }); continue; } @@ -238,6 +252,8 @@ async function buildEntries(): Promise { description: fm.description ?? fm.title ?? fallbackTitle, sourcePaths, lastmod, + isChapter: false, + chapterKey: null, }); } @@ -304,19 +320,34 @@ function renderFeed(baseUrl: string, entries: UrlEntry[]): string { return lines.join("\n"); } +function buildChapterLastmodData(entries: UrlEntry[]): string { + const byKey: Record = {}; + for (const entry of entries) { + if (!entry.isChapter || !entry.chapterKey || !entry.lastmod) continue; + byKey[entry.chapterKey] = { + iso: entry.lastmod.toISOString(), + display: formatLastmodDisplay(entry.lastmod), + }; + } + return `${JSON.stringify({ byKey }, null, 2)}\n`; +} + async function main() { const baseUrl = await readBaseUrlFromConfig(); const entries = await buildEntries(); await mkdir(dirname(SITEMAP_PATH), { recursive: true }); + await mkdir(dirname(CHAPTER_LASTMOD_PATH), { recursive: true }); await writeFile(SITEMAP_PATH, renderSitemap(baseUrl, entries)); await writeFile(FEED_PATH, renderFeed(baseUrl, entries)); + await writeFile(CHAPTER_LASTMOD_PATH, buildChapterLastmodData(entries)); - if (!existsSync(SITEMAP_PATH) || !existsSync(FEED_PATH)) { - throw new Error("Failed to generate sitemap/feed outputs"); + if (!existsSync(SITEMAP_PATH) || !existsSync(FEED_PATH) || !existsSync(CHAPTER_LASTMOD_PATH)) { + throw new Error("Failed to generate site metadata outputs"); } console.log(`Generated ${toPosixPath(relative(ROOT, SITEMAP_PATH))} with ${entries.length} URL(s).`); console.log(`Generated ${toPosixPath(relative(ROOT, FEED_PATH))} with ${entries.length} item(s).`); + console.log(`Generated ${toPosixPath(relative(ROOT, CHAPTER_LASTMOD_PATH))}.`); } main(); diff --git a/static/feed.xml b/static/feed.xml index 040accf..5103b49 100644 --- a/static/feed.xml +++ b/static/feed.xml @@ -4,19 +4,68 @@ Open Free Books https://openfreebooks.org/ Recent updates to Open Free Books pages and live chapters. - Thu, 21 May 2026 06:54:29 GMT + Thu, 21 May 2026 07:32:39 GMT + + Linear programming + https://openfreebooks.org/math/linear-programming/ + https://openfreebooks.org/math/linear-programming/ + Thu, 21 May 2026 07:32:39 GMT + Graph linear inequalities, identify feasible regions, and optimise objective functions in two variables. + + + Factor & remainder theorems + https://openfreebooks.org/math/factor-remainder-theorems/ + https://openfreebooks.org/math/factor-remainder-theorems/ + Thu, 21 May 2026 07:32:39 GMT + Use the factor and remainder theorems to factorise higher-degree polynomials and solve related equations. + + + Exponential & logarithmic functions + https://openfreebooks.org/math/exponential-logarithmic/ + https://openfreebooks.org/math/exponential-logarithmic/ + Thu, 21 May 2026 07:32:39 GMT + Use exponential and logarithmic models, apply log laws, and solve growth and decay equations. + + + Complex numbers + https://openfreebooks.org/math/complex-numbers/ + https://openfreebooks.org/math/complex-numbers/ + Thu, 21 May 2026 07:32:39 GMT + Represent complex numbers in Cartesian form and perform operations including conjugates and division. + + + Functions & graphs + https://openfreebooks.org/math/functions-graphs/ + https://openfreebooks.org/math/functions-graphs/ + Thu, 21 May 2026 07:32:39 GMT + Model input-output rules, work with domain and range, and sketch key function graphs and transformations. + + + Sequences & series + https://openfreebooks.org/math/sequences-series/ + https://openfreebooks.org/math/sequences-series/ + Thu, 21 May 2026 07:32:39 GMT + Work with arithmetic and geometric sequences, sigma notation, and finite summation formulas. + + + Variations + https://openfreebooks.org/math/variations/ + https://openfreebooks.org/math/variations/ + Thu, 21 May 2026 07:32:39 GMT + Model direct, inverse, joint, and partial variation and solve combined variation problems. + Laws of indices https://openfreebooks.org/math/laws-of-indices/ https://openfreebooks.org/math/laws-of-indices/ - Thu, 21 May 2026 06:54:29 GMT + Thu, 21 May 2026 06:54:57 GMT Apply index laws to simplify expressions with integer and rational exponents. Linear inequalities in one unknown https://openfreebooks.org/math/linear-inequalities-one-unknown/ https://openfreebooks.org/math/linear-inequalities-one-unknown/ - Thu, 21 May 2026 06:33:43 GMT + Thu, 21 May 2026 06:54:57 GMT Solve, represent, and apply linear inequalities in one unknown using number lines and interval notation. diff --git a/static/sitemap.xml b/static/sitemap.xml index ed80bde..78f4c1a 100644 --- a/static/sitemap.xml +++ b/static/sitemap.xml @@ -44,6 +44,10 @@ https://openfreebooks.org/math/basic-math-notation/ 2026-05-21T01:07:39.000Z + + https://openfreebooks.org/math/complex-numbers/ + 2026-05-21T07:32:39.566Z + https://openfreebooks.org/math/counting-and-numbers/ 2026-05-21T05:05:38.000Z @@ -52,9 +56,21 @@ https://openfreebooks.org/math/directed-numbers-rates/ 2026-05-20T20:17:25.000Z + + https://openfreebooks.org/math/exponential-logarithmic/ + 2026-05-21T07:32:39.567Z + + + https://openfreebooks.org/math/factor-remainder-theorems/ + 2026-05-21T07:32:39.697Z + + + https://openfreebooks.org/math/functions-graphs/ + 2026-05-21T07:32:39.566Z + https://openfreebooks.org/math/laws-of-indices/ - 2026-05-21T06:54:29.553Z + 2026-05-21T06:54:57.000Z https://openfreebooks.org/math/linear-equations-two-unknowns/ @@ -62,7 +78,11 @@ https://openfreebooks.org/math/linear-inequalities-one-unknown/ - 2026-05-21T06:33:43.000Z + 2026-05-21T06:54:57.000Z + + + https://openfreebooks.org/math/linear-programming/ + 2026-05-21T07:32:39.831Z https://openfreebooks.org/math/polynomials-expansion-factorisation/ @@ -76,6 +96,14 @@ https://openfreebooks.org/math/quadratic-equations/ 2026-05-20T20:17:25.000Z + + https://openfreebooks.org/math/sequences-series/ + 2026-05-21T07:32:39.286Z + + + https://openfreebooks.org/math/variations/ + 2026-05-21T07:32:39.286Z + https://openfreebooks.org/math/written-calculation/ 2026-05-21T05:05:38.000Z diff --git a/themes/openfreebooks/sass/_book.scss b/themes/openfreebooks/sass/_book.scss index 54e9604..21340ea 100644 --- a/themes/openfreebooks/sass/_book.scss +++ b/themes/openfreebooks/sass/_book.scss @@ -457,6 +457,19 @@ a.book-chapter-link:focus-visible { margin: 0.75rem 0 0; } +.book-chapter__lastmod { + margin: 2.25rem 0 0; + font-family: var(--mono); + font-size: 0.72rem; + letter-spacing: 0.06em; + text-transform: uppercase; + color: var(--muted); +} + +.book-chapter__lastmod time { + color: var(--soft-ink); +} + .ratio-demo__bars { display: flex; width: 100%; diff --git a/themes/openfreebooks/templates/chapter.html b/themes/openfreebooks/templates/chapter.html index 879cd24..8cccdce 100644 --- a/themes/openfreebooks/templates/chapter.html +++ b/themes/openfreebooks/templates/chapter.html @@ -16,12 +16,12 @@ {% set chapter_key = subject ~ "/" ~ slug %} {% set chapters_meta = load_data(path="data/_generated/chapters-meta.json", format="json") %} {% set subjects_meta = load_data(path="data/_generated/subjects-meta.json", format="json") %} -{% set chapter_meta = chapters_meta.chapters[chapter_key] %} +{% set chapter_meta = chapters_meta.chapters | get(key=chapter_key, default=false) %} {% set subject_meta = subjects_meta.subjects[subject] | default(value=false) %} {% if subject_meta and subject_meta.hasCss %} {% endif %} -{% if chapter_meta.hasCss %} +{% if chapter_meta and chapter_meta.hasCss %} {% endif %} {% endblock extra_head %} @@ -31,6 +31,8 @@ {% set slug = section.extra.chapter_id | default(value=section.slug) %} {% set chapter_key = subject ~ "/" ~ slug %} {% set subject_catalog = load_data(path="data/" ~ subject ~ "-curriculum.json", format="json") %} +{% set chapter_lastmod_data = load_data(path="data/_generated/chapter-lastmod.json", format="json") %} +{% set chapter_lastmod = chapter_lastmod_data.byKey[chapter_key] | default(value=false) %} {% set catalog_subject_url = get_url(path="/catalog/") ~ "?subject=" ~ subject %}
@@ -62,6 +64,16 @@
{{ section.content | safe }} + {% if chapter_lastmod %} +

+ Last modified: + +

+ {% endif %} {% include "partials/chapter-footer-nav.html" %}
diff --git a/themes/openfreebooks/templates/index.html b/themes/openfreebooks/templates/index.html index 5d73bef..ac15041 100644 --- a/themes/openfreebooks/templates/index.html +++ b/themes/openfreebooks/templates/index.html @@ -100,7 +100,7 @@

For Every Learner

-

The next generation is the future.

+

The next generation is our future.

Let's provide good, free education that anyone can read, share, and improve.