diff --git a/.husky/pre-commit b/.husky/pre-commit index cf03b66..f8fb83c 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -2,5 +2,4 @@ . "$(dirname "$0")/_/husky.sh" npx pretty-quick --staged -.husky/scripts/pdfToPng.sh git add . diff --git a/.husky/scripts/pdfToPng.sh b/.husky/scripts/pdfToPng.sh deleted file mode 100755 index 3a2a04d..0000000 --- a/.husky/scripts/pdfToPng.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/bash -find . -print0 | while IFS= read -r -d '' file -do - if [ -f "$file" ]; then - if [[ $file == *pdf ]]; then - mkdir temp - gm convert "$file" +adjoin temp/temp%02d.png - - for temp in ./temp/*.png - do - gm convert "$temp" -fuzz 80% -trim +repage -bordercolor white -border 50x25 "$temp" - done - - readarray -d . -t arr <<< $file - - gm convert -append ./temp/*.png "${arr[1]:1}.png" - - rm -rf temp - rm "$file" "${arr[1]:1}.synctex.gz" - fi -fi -done diff --git a/.vscode/extensions.json b/.vscode/extensions.json deleted file mode 100644 index b1b5201..0000000 --- a/.vscode/extensions.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "recommendations": ["James-Yu.latex-workshop"] -} diff --git a/.vscode/settings.json b/.vscode/settings.json index c4050b2..dcd343e 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -12,7 +12,6 @@ "commitlint.config.js": true, "**/pnpm-lock.yaml": true }, - "C_Cpp.errorSquiggles": "Disabled", "files.associations": { "*.tcc": "cpp", "complex": "cpp", @@ -33,7 +32,5 @@ "ostream": "cpp", "ratio": "cpp", "streambuf": "cpp" - }, - "latex-workshop.latex.autoBuild.run": "onSave", - "latex-workshop.latex.autoClean.run": "onBuilt" + } } diff --git a/maths/halley's method.png b/maths/halley's method.png deleted file mode 100644 index bec432b..0000000 Binary files a/maths/halley's method.png and /dev/null differ diff --git a/maths/halley's method.tex b/maths/halley's method.tex deleted file mode 100644 index 4aa714a..0000000 --- a/maths/halley's method.tex +++ /dev/null @@ -1,53 +0,0 @@ -\documentclass{style} -\usepackage{amsmath} -\usepackage{breqn} -\usepackage{mathtools} - -\begin{document} -\begin{center} - Suppose we have an $n$th degree polynomial, such that $f(x) = c_{n}x^{n} + c_{n-1}x^{n-1} + c_{n-2}x^{n-2} + ... + c_{0} = \sum_{i=0}^{n}c_{n-i}x^{n-i}$ - - \hfill - - By the power rule of differentiation, we can conclude that the first derivative of $f(x)$ is as follows - - \begin{dmath*} - f'(x) = nc_{n}x^{n-1} + (n-1)c_{n-1}x^{n-2} + (n-2)c_{n-2}x^{n-3} + ... + c_{1} = \sum_{i=0}^{n-1}(n-i)c_{n-i}x^{n-i-1} - \end{dmath*} - - And the second derivative is - - \begin{dmath*} - f''(x) = n(n-1)c_{n}x^{n-2} + (n-1)(n-2)c_{n-1}x^{n-3} + (n-2)(n-3)c_{n-2}x^{n-4} + ...+ c_{2} = \sum_{i=0}^{n-2}(i-n)(i-n+1)a_{n-i}x^{n-i-2} - \end{dmath*} - - After starting with an initial guess, the next iteration of Halley's method is given by $x_k - \frac{2f(x_k)f'(x_k)}{2[f'(x_k)]^2 - f(x_k)f''(x_k)}$. - - This means that we must first find $f(x)f'(x)$, $[f'(x)]^2$, and $f(x)f''(x)$. These all consist of the multiplication of two series - there is a nice general form to this problem stated below - - \begin{dmath*} - (\sum_{i=0}^{n}x_{i})(\sum_{j=0}^{m}y_{j}) = \sum_{i=0}^{n}\sum_{j=0}^{m}x_iy_j - \end{dmath*} - - \newpage - From this, we can conclude that: - - \begin{dmath*} - f(x)f'(x) = (\sum_{i=0}^{n}c_{n-i}x^{n-i})(\sum_{i=0}^{n-1}(n-i)c_{n-i}x^{n-i-1}) = \sum_{i=0}^{n}\sum_{j=0}^{n-1}(n-j)c_{n-i}c_{n-j}x^{2n-i-j-1} - \end{dmath*} - - \begin{dmath*} - [f'(x)]^2 = (\sum_{i=0}^{n-1}(n-i)c_{n-i}x^{n-i-1})(\sum_{i=0}^{n-1}(n-i)c_{n-i}x^{n-i-1}) = \sum_{i=0}^{n-1}\sum_{j=0}^{n-1}(n-i)(n-j)c_{n-i}c_{n-j}x^{2(n-1)-i-j} - \end{dmath*} - - \begin{dmath*} - f(x)f''(x) = (\sum_{i=0}^{n}c_{n-i}x^{n-i})(\sum_{i=0}^{n-2}(i-n)(i-n+1)a_{n-i}x^{n-i-2}) = \sum_{i=0}^{n}\sum_{j=0}^{n-2}(j-n)(j-n+1)c_{n-i}c_{n-j}x^{2(n-1)-i-j} - \end{dmath*} - - And all that is left to do is to plug it into the formula for Halley's method, leaving us with the following: - - \begin{align*} - x_{k+1} = x_{k} - \dfrac{2\sum_{i=0}^{n}\sum_{j=0}^{n-1}(n-j)c_{n-i}c_{n-j}x^{2n-i-j-1}}{\splitdfrac{2\sum_{i=0}^{n-1}\sum_{j=0}^{n-1}(n-i)(n-j)c_{n-i}c_{n-j}x^{2(n-1)-i-j}}{- \sum_{i=0}^{n}\sum_{j=0}^{n-2}(j-n)(j-n+1)c_{n-i}c_{n-j}x^{2(n-1)-i-j}}} - \end{align*} -\end{center} -\end{document} diff --git a/maths/nth root.png b/maths/nth root.png deleted file mode 100644 index 72b7276..0000000 Binary files a/maths/nth root.png and /dev/null differ diff --git a/maths/nth root.tex b/maths/nth root.tex deleted file mode 100644 index e0a1634..0000000 --- a/maths/nth root.tex +++ /dev/null @@ -1,12 +0,0 @@ -\documentclass{style} -\usepackage{amsmath} -\begin{document} -\begin{gather*} - f(x) = x^k - s \\ - f'(x) = kx^{k - 1} -\end{gather*} - -\begin{gather*} - x_{n + 1} = x_n - \frac{x_n^k - s}{kx_n^{k - 1}} = \frac{x_n(k - 1) + sx_n^{1 - k}}{k} -\end{gather*} -\end{document} diff --git a/maths/style.cls b/maths/style.cls deleted file mode 100644 index 7d8f991..0000000 --- a/maths/style.cls +++ /dev/null @@ -1,11 +0,0 @@ -\LoadClass[17pt]{extarticle} -\pagenumbering{gobble} - -\usepackage{geometry} -\geometry{a4paper, portrait, margin=1in} - -\newcommand{\euler}{\begin{gather*} - \text{By Euler's formula:} \\ - e^{i\theta} = cos(\theta) + i\sin(\theta) \\ - e^{-i\theta} = cos(\theta) - i\sin(\theta) -\end{gather*}} diff --git a/maths/trigometric functions/cos.png b/maths/trigometric functions/cos.png deleted file mode 100644 index 08cb715..0000000 Binary files a/maths/trigometric functions/cos.png and /dev/null differ diff --git a/maths/trigometric functions/cos.tex b/maths/trigometric functions/cos.tex deleted file mode 100644 index a16e6e7..0000000 --- a/maths/trigometric functions/cos.tex +++ /dev/null @@ -1,27 +0,0 @@ -\documentclass{../style} -\usepackage{amsmath} -\usepackage{amssymb} -\begin{document} -\euler - -\begin{gather*} - \therefore \cos(\theta) = \frac{e^{i\theta} + e^{-i\theta}}{2} -\end{gather*} - -\begin{gather*} - \text{let} \quad \cos(\theta) = x \\ - 2x = e^{i\theta} + e^{-i\theta} \\ - 2xe^{i\theta} = (e^{i\theta})^2 + 1 \\ - (e^{i\theta})^2 + (-2x)e^{i\theta} + 1 = 0 -\end{gather*} - -\begin{gather*} - e^{i\theta} = \frac{-(-2x) \pm \sqrt{(-2x)^2 - 4}}{2} = x \pm \sqrt{x^2 - 1} \\ - i\theta = \ln(x \pm \sqrt{x^2 - 1}) \\ - \theta = -i\ln(x \pm \sqrt{x^2 - 1}) -\end{gather*} - -\begin{gather*} - \therefore \arccos(\theta) = -i\ln(\theta \pm \sqrt{\theta^2 - 1}) -\end{gather*} -\end{document} diff --git a/maths/trigometric functions/cot.png b/maths/trigometric functions/cot.png deleted file mode 100644 index 24e5ef0..0000000 Binary files a/maths/trigometric functions/cot.png and /dev/null differ diff --git a/maths/trigometric functions/cot.tex b/maths/trigometric functions/cot.tex deleted file mode 100644 index 6ca9479..0000000 --- a/maths/trigometric functions/cot.tex +++ /dev/null @@ -1,29 +0,0 @@ -\documentclass{../style} -\usepackage{amsmath} -\usepackage{amssymb} -\begin{document} -\euler - -\begin{gather*} - \therefore \sin(\theta) = \frac{e^{i\theta} - e^{-i\theta}}{2i} \\ - \cos(\theta) = \frac{e^{i\theta} + e^{-i\theta}}{2} \\ - \tan(\theta) = \frac{\sin(\theta)}{\cos{\theta}} = -\frac{i(-1 + e^{2i\theta})}{1 + e^{2i\theta}} \\ - \cot(\theta) = \frac{1}{\tan(\theta)} = -\frac{1 + e^{2i\theta}}{i(-1 + e^{2i\theta})} -\end{gather*} - -\begin{gather*} - \text{let} \quad \cot(\theta) = x \\ - x(i + ie^{2i\theta}) = -1(1 + e^{2i\theta}) \\ - ix + ixe^{2i\theta} = -e^{2i\theta} - 1 \\ - ixe^{2i\theta} + e^{2i\theta} = -1 - ix \\ - (ix + 1)e^{2i\theta} = -1 - ix \\ - e^{2i\theta} = -\frac{1 - ix}{1 + ix} \\ - 2i\theta = \ln(\frac{x + i}{x - i}) \\ - i\theta = \frac{1}{2}\ln(\frac{x + i}{x - i}) \\ - \theta = -\frac{i}{2}\ln(\frac{x + i}{x - i}) -\end{gather*} - -\begin{gather*} - \therefore \text{arccot}(\theta) = -\frac{i}{2}\ln(\frac{\theta + i}{\theta - i}) -\end{gather*} -\end{document} diff --git a/maths/trigometric functions/csc.png b/maths/trigometric functions/csc.png deleted file mode 100644 index 42d3774..0000000 Binary files a/maths/trigometric functions/csc.png and /dev/null differ diff --git a/maths/trigometric functions/csc.tex b/maths/trigometric functions/csc.tex deleted file mode 100644 index 4a2c240..0000000 --- a/maths/trigometric functions/csc.tex +++ /dev/null @@ -1,28 +0,0 @@ -\documentclass{../style} -\usepackage{amsmath} -\usepackage{amssymb} -\begin{document} -\euler - -\begin{gather*} - \therefore \sin(\theta) = \frac{e^{i\theta} - e^{-i\theta}}{2i} \\ - \csc(\theta) = \frac{1}{\sin(\theta)} = \frac{2i}{e^{i\theta} - e^{-i\theta}} -\end{gather*} - -\begin{gather*} - \text{let} \quad \csc(\theta) = x \\ - \frac{2i}{x} = e^{i\theta} - e^{-i\theta} \\ - \frac{2i}{x}e^{i\theta} = (e^{i\theta})^2 - 1 \\ - (e^{i\theta})^2 + (-\frac{2i}{x})e^{i\theta} - 1 = 0 -\end{gather*} - -\begin{gather*} - e^{i\theta} = \frac{-(\frac{2i}{x}) \pm \sqrt{(\frac{2i}{x})^2 - 4(-1)}}{2} = x^{-1}i \pm \sqrt{1 - x^2} \\ - i\theta = \ln(x^{-1}i \pm \sqrt{1 - x^2}) \\ - \theta = -i\ln(x^{-1}i \pm \sqrt{1 - x^2}) -\end{gather*} - -\begin{gather*} - \therefore \text{arccsc}(\theta) = -i\ln(i\theta^{-1} \pm \sqrt{1 -\theta^2}) -\end{gather*} -\end{document} diff --git a/maths/trigometric functions/sec.png b/maths/trigometric functions/sec.png deleted file mode 100644 index 75793b7..0000000 Binary files a/maths/trigometric functions/sec.png and /dev/null differ diff --git a/maths/trigometric functions/sec.tex b/maths/trigometric functions/sec.tex deleted file mode 100644 index 4b5d5b2..0000000 --- a/maths/trigometric functions/sec.tex +++ /dev/null @@ -1,29 +0,0 @@ -\documentclass{../style} -\usepackage{amsmath} -\usepackage{amssymb} -\begin{document} -\euler - -\begin{gather*} - \therefore \cos(\theta) = \frac{e^{i\theta} + e^{-i\theta}}{2} \\ - \sec(\theta) = \frac{1}{\cos(\theta)} = \frac{2}{e^{i\theta} + e^{-i\theta}} -\end{gather*} - -\begin{gather*} - \text{let} \quad \sec(\theta) = x \\ - x(e^{i\theta} + e^{-i\theta}) = 2 \\ - e^{i\theta} + e^{-i\theta} = \frac{2}{x} \\ - (e^{i\theta})^2 + 1 = \frac{2}{x}e^{i\theta} \\ - (e^{i\theta})^2 + (-\frac{2}{x})e^{i\theta} + 1 = 0 -\end{gather*} - -\begin{gather*} - e^{i\theta} = \frac{-(-\frac{2}{x}) \pm \sqrt{(-\frac{2}{x})^2 - 4}}{2} = x^{-1} \pm \sqrt{x^{-2} - 1} \\ - i\theta = \ln(x^{-1} \pm \sqrt{x^{-2} - 1}) \\ - \theta = -i\ln(x^{-1} \pm \sqrt{x^{-2} - 1}) -\end{gather*} - -\begin{gather*} - \therefore \text{arcsec}(\theta) = -i\ln(\theta^{-1} \pm \sqrt{\theta^{-2} - 1}) -\end{gather*} -\end{document} diff --git a/maths/trigometric functions/sin.png b/maths/trigometric functions/sin.png deleted file mode 100644 index a9f8b47..0000000 Binary files a/maths/trigometric functions/sin.png and /dev/null differ diff --git a/maths/trigometric functions/sin.tex b/maths/trigometric functions/sin.tex deleted file mode 100644 index 7724d8b..0000000 --- a/maths/trigometric functions/sin.tex +++ /dev/null @@ -1,27 +0,0 @@ -\documentclass{../style} -\usepackage{amsmath} -\usepackage{amssymb} -\begin{document} -\euler - -\begin{gather*} - \therefore \sin(\theta) = \frac{e^{i\theta} - e^{-i\theta}}{2i} -\end{gather*} - -\begin{gather*} - \text{let} \quad \sin(\theta) = x \\ - 2ix = e^{i\theta} - e^{-i\theta} \\ - 2ixe^{i\theta} = (e^{i\theta})^2 - 1 \\ - (e^{i\theta})^2 + (-2ix)e^{i\theta} - 1 = 0 -\end{gather*} - -\begin{gather*} - e^{i\theta} = \frac{-(-2ix) \pm \sqrt{(-2ix)^2 - 4(-1)}}{2} = ix \pm \sqrt{1 - x^2} \\ - i\theta = \ln(ix \pm \sqrt{1 - x^2}) \\ - \theta = -i\ln(ix \pm \sqrt{1 - x^2}) -\end{gather*} - -\begin{gather*} - \therefore \arcsin(\theta) = -i\ln(i\theta \pm \sqrt{1 -\theta^2}) -\end{gather*} -\end{document} diff --git a/maths/trigometric functions/tan.png b/maths/trigometric functions/tan.png deleted file mode 100644 index 1165f85..0000000 Binary files a/maths/trigometric functions/tan.png and /dev/null differ diff --git a/maths/trigometric functions/tan.tex b/maths/trigometric functions/tan.tex deleted file mode 100644 index a1324fa..0000000 --- a/maths/trigometric functions/tan.tex +++ /dev/null @@ -1,28 +0,0 @@ -\documentclass{../style} -\usepackage{amsmath} -\usepackage{amssymb} -\begin{document} -\euler - -\begin{gather*} - \therefore \sin(\theta) = \frac{e^{i\theta} - e^{-i\theta}}{2i} \\ - \cos(\theta) = \frac{e^{i\theta} + e^{-i\theta}}{2} \\ - \tan(\theta) = \frac{\sin(\theta)}{\cos{\theta}} = -\frac{i(-1 + e^{2i\theta})}{1 + e^{2i\theta}} -\end{gather*} - -\begin{gather*} - \text{let} \quad \tan(\theta) = x \\ - x(1 + e^{2i\theta}) = -i(-1 + e^{2i\theta}) \\ - x + xe^{2i\theta} = i - ie^{2i\theta} \\ - xe^{2i\theta} + ie^{2i\theta} = i - x \\ - e^{2i\theta}(i + x) = i - x \\ - e^{2i\theta} = \frac{i - x}{i + x} \\ - 2i\theta = \ln(\frac{i - x}{i + x}) \\ - i\theta = \frac{1}{2}\ln(\frac{i - x}{i + x}) \\ - \theta = -\frac{i}{2}\ln(\frac{i - x}{i + x}) -\end{gather*} - -\begin{gather*} - \therefore \arctan(\theta) = -\frac{i}{2}\ln(\frac{i - \theta}{i + \theta}) -\end{gather*} -\end{document}