diff --git a/cave-update-ore-analysis/index.html b/cave-update-ore-analysis/index.html index a6b48d0..bdf0a4b 100644 --- a/cave-update-ore-analysis/index.html +++ b/cave-update-ore-analysis/index.html @@ -1,34 +1,95 @@ -πŸ”— Back to home page


+πŸ”— Back to home page


-These graphs are interactive - scroll controls the zoom (alternatively, hover over the bottom-left corner and use the magnifying glass to select an area). Use the home icon to reset the view. +These graphs are interactive - scroll controls the zoom (alternatively, hover +over the bottom-left corner and use the magnifying glass to select an area). Use +the home icon to reset the view. -
-

Absolute frequency

-
- *Note that unfortunately the ore per chunk layer doesn't appear on the right y-axis. You can add the right axis by using the formula: y/(2*512/16)**2

-
-

Relative frequency

- -

-

-This text was copy-pasted from the github repo at https://github.com/peter-tanner/minecraft-ore-analysis +
+

Absolute frequency

+
+ *Note that unfortunately the ore per chunk layer doesn't appear on the right + y-axis. You can add the right axis by using the formula: y/(2*512/16)**2

+
+

Relative frequency

+ +
+
+
+
+This text was copy-pasted from the github repo at +https://github.com/peter-tanner/minecraft-ore-analysis

Minecraft ore analysis

-

Let's see how the new cave update ore generation compares to the old!

-

Go to https://peter-tanner.github.io/cave-update-ore-analysis for interactive graphs!

-

Both tests performed with seed 0 and single biome mode enabled (Extreme hills biome only, to include emerald ore statistics). Size of 1024*1024 scanned.

-

Original world files used for research are located at https://drive.google.com/drive/folders/1RsmfDp4nl5KaFWfCpL5sanK6cGUp45TO?usp=sharing

+

+ Let's see how the new cave update ore generation compares to the old! +

+

+ Go to + https://peter-tanner.github.io/cave-update-ore-analysis + for interactive graphs! +

+

+ Both tests performed with seed 0 and single biome mode enabled (Extreme hills + biome only, to include emerald ore statistics). Size of 1024*1024 scanned. +

+

+ Original world files used for research are located at + https://drive.google.com/drive/folders/1RsmfDp4nl5KaFWfCpL5sanK6cGUp45TO?usp=sharing +

#

-

The scripts I've created take advantage of a slightly modified PyAnvilEditor to parse the region files.

-

I've replaced the code in the 276 (and everything else under def close(self):) of the world class of PyAnvilEditor with true - this is because I'm not writing to the world file, I only intend to read from it. This saves a large amount of time spent writing that would go to waste.

-

To generate the graphs I've used Matplotlib and I use mpld3 to convert these graphs into interactive html files for use on my website.

-

We load a large section of the world into memory - ideally, you want to set the block size to the maximum as this is quicker than loading small sections of the world repeatedly. Then we iterate through each coordinate in the block - this takes about 90 seconds with a block radius of 128. At each coordinate we iterate each count for a tile in a particular layer. Once a whole block has been processed, we add it to the total.

-

The 'sum' represents the total amount of a particular ore block within the whole sample (A 1024*1024 square meter area). The relative frequency represents the proportion of the total amount of a particular ore that occurs at a particular y-level.

-

This sample size can be improved on but it would obviously take longer given that my RAM is limited.

+

+ The scripts I've created take advantage of a slightly modified + PyAnvilEditor to parse + the region files. +

+

+ I've replaced the code in the 276 (and everything else under + def close(self):) of the world class of + PyAnvilEditor with true - this is because I'm not writing to + the world file, I only intend to read from it. This saves a large amount of + time spent writing that would go to waste. +

+

+ To generate the graphs I've used Matplotlib and I use mpld3 to convert + these graphs into interactive html files for use on my website. +

+

+ We load a large section of the world into memory - ideally, you want to set + the block size to the maximum as this is quicker than loading small sections + of the world repeatedly. Then we iterate through each coordinate in the block + - this takes about 90 seconds with a block radius of 128. At each + coordinate we iterate each count for a tile in a particular layer. Once a + whole block has been processed, we add it to the total. +

+

+ The 'sum' represents the total amount of a particular ore block within + the whole sample (A 1024*1024 square meter area). The relative frequency + represents the proportion of the total amount of a particular ore that occurs + at a particular y-level. +

+

+ This sample size can be improved on but it would obviously take longer given + that my RAM is limited. +

diff --git a/index.html b/index.html index e091af7..b0760de 100644 --- a/index.html +++ b/index.html @@ -15,11 +15,11 @@ made. Stupid methane / thanos joke:
- https://peter-tanner.github.io/methanos
+ https://peter-tanner.github.io/methanos

EAifier - EAntEAr any tEAxt and have it EAmphasizEAd!
- https://peter-tanner.github.io/ea
- https://peter-tanner.github.io/moneyfier
+ https://peter-tanner.github.io/ea
+ https://peter-tanner.github.io/moneyfier

WACE Stage 3/ATAR past papers archive - the most comprehensive archive of past papers (I think... :D )
https://atar-wace-archive.github.io/
@@ -28,14 +28,14 @@ https://classpad.github.io/

Maths page - specialist and methods ramblings
- https://peter-tanner.github.io/maths
+ https://peter-tanner.github.io/maths

Programming ramblings - do not expect clean code here!
- https://peter-tanner.github.io/code
+ https://peter-tanner.github.io/code

Graphs/analysis showing differences in ore generation between 1.16.5 and cave update snapshots.
https://peter-tanner.github.io/cave-update-ore-analysis
+ href="https://peter-tanner.github.io/legacy_site/cave-update-ore-analysis">https://peter-tanner.github.io/cave-update-ore-analysis



diff --git a/maths/2.5d rotations.html b/maths/2.5d rotations.html index 1c0f972..6f2b2b6 100644 --- a/maths/2.5d rotations.html +++ b/maths/2.5d rotations.html @@ -1,157 +1,201 @@ - - + + πŸ“ 2.5d rotations wtih shear transformation - - + + MathJax example - - - - - - - - + + + + + + + - - +
-

2.5d rotations with matrix transformations

-

(WACE) Mathematics Specialist ATAR**

+

2.5d rotations with matrix transformations

+

+ (WACE) Mathematics Specialist ATAR** +

-
-

⚠WARNING⚠

-
At this point this article is probably outside of the curriculum. The transformations are in the curriculum, but most of this article is on a real math problem I've experienced which of course requires a bit of programming.
-
+
+
+

⚠WARNING⚠

+
+
+ At this point this article is probably outside of the curriculum. The + transformations are in the curriculum, but most of this article is on + a real math problem I've experienced which of course requires a bit of + programming. +
+
- - πŸ”— Back to MATHS home page
- πŸ”— Back to home page
- Warning: This page requires javascript to render the math. This website runs better on a chromium browser. Untested on Firefox. TikZ graphics may not render on other platforms! + πŸ”— Back to MATHS home page
+ πŸ”— Back to home page
-

+ Warning: This page requires javascript to render the math. This website runs + better on a chromium browser. Untested on Firefox. + TikZ graphics may not render on other platforms! + +
+
-
-
Introduction - What is '2.5d'?
- '2.5d' is not an actual dimension, but refers to techniques in computer graphics which aim to create the presence of 3d depth, but in a 2d level or environment.

-
- -
- This box is a simplified example of 2.5d graphics.
- The gray on the front-facing side and the white top side is an example of shading, and creates the illusion of a 3d environment as a result of basic lighting. The camera is placed at a 45 degree angle, as we see equal proportions of the top and front faces of the box
- However, this is not real 3d graphics, as we're representing this box within a 2d space with only 2d position vectors.
- Therefore, this is 2.5d graphics. -
+ \node [label=left:{[-2.5, 0]}] at (-2.5,0) {\textbullet}; + \node [label=right:{[2.5, 0]}] at (2.5,0) {\textbullet}; + \node [label=right:{[2.5, 3]}] at (2.5,3) {\textbullet}; + \node [label=right:{[2.5, -3]}] at (2.5,-3) {\textbullet}; + \node [label=left:{[-2.5, 3]}] at (-2.5,3) {\textbullet}; + \node [label=left:{[-2.5, -3]}] at (-2.5,-3) {\textbullet}; + \end{tikzpicture} + + + This box is a simplified example of 2.5d graphics.
+ The gray on the front-facing side and the white top side is an example + of shading, and creates the illusion of a 3d environment as a result of + basic lighting. The camera is placed at a 45 degree angle, as we see + equal proportions of the top and front faces of the box
+ However, this is not real 3d graphics, as we're representing this box + within a 2d space with only 2d position vectors.
+ Therefore, this is 2.5d graphics. +
-
+
-
-
The problem
- I was making a mod for a game that added in rockets. The rockets took a ballistic trajectory to reach a target point
- Of course, because this is a 2.5d game I couldn't simply model the flight with the actual equations, because there is no concept of 'height' or 'altitude' in the game
-
-
- -
- This parabola works fine for targets on the same \(\vec{j}\) as the silo
- What if we want a trajectory like this? -
- -
- We can try rotating the parabola, but that results in a trajectory which looks very unrealistic. -
- -
- The blue dashed parabola represents the pre-transformed trajectory (we are only given the distance \(d\) from target \(\mathbf{T}\) to silo \(\mathbf{S}\))
+
+
The problem
+ I was making a mod for a game that added in rockets. The rockets took a + ballistic trajectory to reach a target point
+ Of course, because this is a 2.5d game I couldn't simply model the + flight with the actual equations, because there is no concept of + 'height' or 'altitude' in the game
+
+
+ +
+ This parabola works fine for targets on the same \(\vec{j}\) as the + silo
+ What if we want a trajectory like this? +
+ +
+ We can try rotating the parabola, but that results in a trajectory which + looks very unrealistic. +
+ +
+ The blue dashed parabola represents the pre-transformed trajectory (we + are only given the distance \(d\) from target \(\mathbf{T}\) to silo + \(\mathbf{S}\))
- +
-
- +
+
-
-
Shear matrices
- \begin{align} - \text{Parallel to the y-axis, Vertical shear}\quad - \mathbf{X'} &= \begin{bmatrix} - 1 & 0\\ - m & 1 - \end{bmatrix}\mathbf{X}\\ - &= \begin{bmatrix} - x\\ - mx+y - \end{bmatrix} \\\\ - \text{Parallel to the x-axis, Horizontal shear}\quad - \mathbf{X'} &= \begin{bmatrix} - 1 & m\\ - 0 & 1 - \end{bmatrix}\mathbf{X} \\ - &= \begin{bmatrix} - x+my\\ - y - \end{bmatrix}\\\\ - \text{Where}\quad\mathbf{X} &= \begin{bmatrix} - x\\ - y - \end{bmatrix}\\ - \end{align} -
+
+
Shear matrices
+ \begin{align} \text{Parallel to the y-axis, Vertical shear}\quad + \mathbf{X'} &= \begin{bmatrix} 1 & 0\\ m & 1 \end{bmatrix}\mathbf{X}\\ + &= \begin{bmatrix} x\\ mx+y \end{bmatrix} \\\\ \text{Parallel to the + x-axis, Horizontal shear}\quad \mathbf{X'} &= \begin{bmatrix} 1 & m\\ 0 + & 1 \end{bmatrix}\mathbf{X} \\ &= \begin{bmatrix} x+my\\ y + \end{bmatrix}\\\\ \text{Where}\quad\mathbf{X} &= \begin{bmatrix} x\\ y + \end{bmatrix}\\ \end{align} +
-


+
+
+
-
-
-
The solution: shear matrices

- A shear matrix is better explained visually. -
- In this case we applied a vertical shear (parallel to the y-axis). Our x-values are the same, but our y-values have been transformed in a way that they match the line \(y'=mx+y\) (see the matrix representation).
- It has almost all of the properties required for our 2.5d rotation - we're only distorting the matrix on one axis and preserving the other. The only issue is that our transformed object will appear longer.
-
- In my case, I do not need to know the angle - I can use the gradient between the silo \(\mathbf{S}\) and target \(\mathbf{T}\). - \[m=\frac{\mathbf{S}_y-\mathbf{T}_y}{\mathbf{S}_x-\mathbf{T}_x}\] - \(m\) can also be obtained with a trig ratio, yielding the following shear transformation that involve angles rather than gradients. - \begin{align} - \text{Parallel to the y-axis, Vertical shear}\quad - \mathbf{X'} &= \begin{bmatrix} - 1 & 0\\ - \sin(\theta) & 1 - \end{bmatrix}\mathbf{X}\\\\ - \text{Parallel to the x-axis, Horizontal shear}\quad - \mathbf{X'} &= \begin{bmatrix} - 1 & \sin(\theta)\\ - 0 & 1 - \end{bmatrix}\mathbf{X}\\\\ - \end{align} - To resolve our issue with the transformed object being 'lengthened', we need to scale it back.
-
- - Let's choose two points, \(\mathbf{P_1}\) and \(\mathbf{P_2}\).
- We obtain the original distance, \(d\) and the transformed distance, \(d'\) - \begin{align} - d &= \|\mathbf{P_1}-\mathbf{P_2}\| \\ - &= \sqrt{(\mathbf{P_1}_x-\mathbf{P_2}_x)^2+(\mathbf{P_1}_y-\mathbf{P_2}_y)^2} \\ - d' &= \|\mathbf{P'_1}-\mathbf{P'_2}\| \\ - &= \sqrt{(\mathbf{P'_1}_x-\mathbf{P'_2}_x)^2+(\mathbf{P'_1}_y-\mathbf{P'_2}_y)^2}\\\\ - \text{ where }\quad\mathbf{P'_1},\mathbf{P'_2} &= \begin{bmatrix} - 1 & 0\\ - \frac{\mathbf{S}_y-\mathbf{T}_y}{\mathbf{S}_x-\mathbf{T}_x} & 1 - \end{bmatrix}\mathbf{P_1},\mathbf{P_2}\\ - &= \begin{bmatrix} - 1 & 0\\ - \sin(\theta) & 1 - \end{bmatrix}\mathbf{P_1},\mathbf{P_2}\\ +
+
The solution: shear matrices
+
+ A shear matrix is better explained visually. +
+ +
+ In this case we applied a vertical shear (parallel to the y-axis). Our + x-values are the same, but our y-values have been transformed in a way + that they match the line \(y'=mx+y\) (see the matrix representation).
+ It has almost all of the properties required for our 2.5d rotation - + we're only distorting the matrix on one axis and preserving the other. + The only issue is that our transformed object will appear longer.
+
+ In my case, I do not need to know the angle - I can use the gradient + between the silo \(\mathbf{S}\) and target \(\mathbf{T}\). + \[m=\frac{\mathbf{S}_y-\mathbf{T}_y}{\mathbf{S}_x-\mathbf{T}_x}\] \(m\) + can also be obtained with a trig ratio, yielding the following shear + transformation that involve angles rather than gradients. \begin{align} + \text{Parallel to the y-axis, Vertical shear}\quad \mathbf{X'} &= + \begin{bmatrix} 1 & 0\\ \sin(\theta) & 1 \end{bmatrix}\mathbf{X}\\\\ + \text{Parallel to the x-axis, Horizontal shear}\quad \mathbf{X'} &= + \begin{bmatrix} 1 & \sin(\theta)\\ 0 & 1 \end{bmatrix}\mathbf{X}\\\\ + \end{align} To resolve our issue with the transformed object being + 'lengthened', we need to scale it back.
+
+ +
- \node [label=below:{$\mathbf{P'_1}$}] at (2,1) {\textbullet}; - \node [label=right:{$\mathbf{P'_2}$}] at (6,3) {\textbullet}; - \end{tikzpicture} -
-
- The limitation of this technique is that we need to perform the rotation about \(\begin{bmatrix}0\\0\end{bmatrix}\), the origin. After this we can translate the rotated matrix to match the silo and target location.
- You can use homogeneous coordinates to achieve this (see the yellow box earlier), or programatically do it.
-
- We also have to solve one last issue with this method: it only works within the domain \(\left(\frac{\pi}{2}, -\frac{\pi}{2}\right)\).
- This is because the gradient can only describe so much information.
- For instance, the line \(f(x)=1\cdot x\).
- We cannot tell if the line is going from the top-right to bottom-left, or bottom-left to top-right because it describes both situations.
- We need to adjust the signs on the shear matrix according to the quadrant our target is in. -
import math
+            \node [label=below:{$\mathbf{P_1}$}] at (-6,1) {\textbullet};
+            \node [label=below:{$\mathbf{P_2}$}] at (-2,1) {\textbullet};
+
+            \node [label=below:{$\mathbf{P'_1}$}] at (2,1) {\textbullet};
+            \node [label=right:{$\mathbf{P'_2}$}] at (6,3) {\textbullet};
+            \end{tikzpicture}
+          
+        
+        
+
+ +
+ The limitation of this technique is that we need to perform the rotation + about \(\begin{bmatrix}0\\0\end{bmatrix}\), the origin. After this we + can translate the rotated matrix to match the silo and target + location.
+ You can use homogeneous coordinates to achieve this (see the yellow box + earlier), or programatically do it.
+
+ We also have to solve one last issue with this method: it only works + within the domain \(\left(\frac{\pi}{2}, -\frac{\pi}{2}\right)\).
+ This is because the gradient can only describe so much information.
+ For instance, the line \(f(x)=1\cdot x\).
+ We cannot tell if the line is going from the top-right to bottom-left, + or bottom-left to top-right because it describes both situations.
+ We need to adjust the signs on the shear matrix according to the + quadrant our target is in. +
import math
 import numpy as np
 
 def quad(A,B):  #A is our origin/fix point, B is our other point.
@@ -414,9 +448,20 @@ X_ = s * np.matmul(SHEAR, X) + S    # shear, then scale every point by s.
 # 'visually correct' and will be functionally correct in that it
 # starts at silo S and ends at target T.
             
-
+
-
- πŸ”— Back to MATHS home page
- πŸ”— Back to home page
- \ No newline at end of file +
+ πŸ”— Back to MATHS home page
+ πŸ”— Back to home page
+ + diff --git a/maths/cis notation rant.html b/maths/cis notation rant.html index 0bbf412..ab39d09 100644 --- a/maths/cis notation rant.html +++ b/maths/cis notation rant.html @@ -1,121 +1,168 @@ - - + + πŸ“ Maths! - - + + MathJax example - - - - + + + + - - +
-

A little rant on cis notation

+

A little rant on cis notation

- - πŸ”— Back to MATHS home page
- πŸ”— Back to home page
+ + πŸ”— Back to MATHS home page
+ πŸ”— Back to home page
Warning: This page requires javascript to render the math. -

- This is a rant on why I think \(e^{\pi\theta}\) should have been the standard in WA specialist. All opinions are my own, and yes, this is an incredibly nitpicky topic. And no, I don't expect any changes but if it occurs I'll be pleasantly surprised.
- - To many readers, this wouldn't be a debate because you'd be there going, "what the heck is \(\cis\)?"
- This is the first downside of \(\cis\) notation: it is less known and sparsely used compared to Euler's formula. \(\cis\) is the mathematical equivalent of the imperial system.
- To answer the question, \(\cis\) is an abbreviation for "\(\cos\) plus \(i\sin\)". This is actually one big thing I like about \(\cis\) notation, in that it's an abbreviation which is easy to remember. In comparison, euler's formula doesn't really make that much sense, you just have to accept that it represents "\(\cos\) plus \(i\sin\)".
- This pro becomes less significant when you realize that a complex number can be expressed as a vector, and we all know that from the unit circle that \(\cos\) goes on the \(x\) axis, and \(\sin\) on the \(y\) axis. Likewise, \(\cos\) goes on the real axis and \(\sin\) on the imaginary axis. -
-
-
\(\cis\) notation of a complex number, \(z\)
- \[\boxed{\|z\|\cdot \cis(\theta) = \|z\|\cdot\left[\cos(\theta)+i\sin(\theta)\right]}\]
-
Euler's formula
- \[\boxed{\|z\|\cdot e^{i\theta} = \|z\|\cdot\left[\cos(\theta)+i\sin(\theta)\right]}\] -
-
- My real issue with \(\cis\) notation is that it's not as obvious what certain operations do. You can't use previous knowledge acquired from index laws. By using \(\cis\), you are restricting yourself and you lose a lot of the complexity (Haha get it? complex? okay...) that is possible with the polar form.
-
-
-
Question 1: Express \(i^i\) in the form \(\alpha+\beta i\)
- For any method, the first step is to turn this into polar form. - \begin{align} - \text{Define }z&=i\\ - \implies&{\|z\| = 1}\\ - \implies&{\theta = \frac{\pi}{2}} - \end{align} - Now we want to evaluate \(z^z\)
- Let's try get somewhere with \(\cis\). - \begin{align} - z &= 1\cdot\cis\left(\frac{\pi}{2}\right)\\ - &= \cis\left(\frac{\pi}{2}\right)\\ - z^z &= \cis\left(\frac{\pi}{2}\right)^{\cis\left(\frac{\pi}{2}\right)}\\ - &= \cis\left(\frac{\pi}{2}\right)^i\\ - &= \cis\left(i\frac{\pi}{2}\right)\\ - &= ? - \end{align} +
+
+ This is a rant on why I think \(e^{\pi\theta}\) should have been the + standard in WA specialist. All opinions are my own, and yes, this is an + incredibly nitpicky topic. And no, I don't expect any changes but if it + occurs I'll be pleasantly surprised.
- Now what? We have an \(i\) in the phase.
- It would be much easier if this was a complex exponential! - - \begin{align} - z &= 1\cdot e^{i\frac{\pi}{2}}\\ - &= e^{i\frac{\pi}{2}}\\ - z^z &= {\left[e^{i\frac{\pi}{2}}\right]}^{e^{i\frac{\pi}{2}}}\\ - &= {\left[e^{i\frac{\pi}{2}}\right]}^{i}\\ - &= {\left[e^{i\cdot i\frac{\pi}{2}}\right]}\\ - &= e^{-\frac{\pi}{2}} - \end{align} - Wow! And it's neatly packaged as an exponent! -
-
- I understand the use of \(\cis\) to represent a complex number as a polar coordinate if your curriculum doesn't understand the concept of calculus when the concept of complex numbers is being taught
- But \(e\) (Euler's number) is a concept taught in year 12 methods. And year 12 methods is a prerequisite for year 12 specialist. So students should be familiar with \(e\) and calculus, so why isn't it being used?

- My argument isn't really that strong, I recognise that. Just wanted to go on a 3am MathRantβ„’ :)

+ To many readers, this wouldn't be a debate because you'd be there going, + "what the heck is \(\cis\)?"
+ This is the first downside of \(\cis\) notation: it is less known and + sparsely used compared to Euler's formula. \(\cis\) is the mathematical + equivalent of the imperial system.
+ To answer the question, \(\cis\) is an abbreviation for "\(\cos\) plus + \(i\sin\)". This is actually one big thing I like about \(\cis\) notation, + in that it's an abbreviation which is easy to remember. In comparison, + euler's formula doesn't really make that much sense, you just have to accept + that it represents "\(\cos\) plus \(i\sin\)".
+ This pro becomes less significant when you realize that a complex number can + be expressed as a vector, and we all know that from the unit circle that + \(\cos\) goes on the \(x\) axis, and \(\sin\) on the \(y\) axis. Likewise, + \(\cos\) goes on the real axis and \(\sin\) on the imaginary axis.
-
-
Bonus Math Tip: Derive the double angle identities.
- No need for Euler's formula here, use \(\cis\) for this trick if you want.
- Not sure why you'd need to know this - sure, in methods these identities aren't given on the formula sheet but they are in specialist. Methods seems to stick to the basic identities such as the 2As and pythagorean, but you're expected to remember them. I always just put these identities on my notes.
- Use this trick to derive any set of angle identities (triple, quadruple, etc.). Have fun expanding brackets though.

- Let the first angle be \(A\) and the second angle \(B\). - \begin{align} - e^{\pi A}\cdot e^{\pi B} &= \left[\cos(A)+i\sin(A)\right]\cdot\left[\cos(B)+i\sin(B)\right]\\ - e^{\pi (A+B)} &= \cos(A)\cos(B) + i\cos(A)\sin(B) + i\sin(A)\cos(B) + i^2\sin(A)\sin(B)\\ - \cos(A+B) + i\sin(A+B) &= \left[\cos(A)\cos(B) - \sin(A)\sin(B)\right] + i\cdot\left[\cos(A)\sin(B) + \sin(A)\cos(B) \right] - \end{align} - Consider the real and complex components of this equation to get the two identities. - \begin{cases} - \text{Real:}&\cos(A+B) = \cos(A)\cos(B) - \sin(A)\sin(B)\\ - \text{Imaginary:}&\sin(A+B) = \cos(A)\sin(B) + \sin(A)\cos(B) - \end{cases} - And you can repeat this all again for negative second angle. - \begin{align} - e^{\pi A}\cdot e^{\pi (-B)} &= \left[\cos(A)+i\sin(A)\right]\cdot\left[\cos(-B)+i\sin(-B)\right]\\ - &= \left[\cos(A)+i\sin(A)\right]\cdot\left[\cos(B)-i\sin(B)\right]\\ - e^{\pi (A-B)} &= \cos(A)\cos(B)-i\cos(A)\sin(B)+i\sin(A)\cos(B)-i^2\sin(A)\sin(B)\\ - \cos(A-B) + i\sin(A-B) &= \left[\cos(A)\cos(B) + \sin(A)\sin(B)\right] + i\cdot\left[\sin(A)\cos(B)-\cos(A)\sin(B)\right] - \end{align} - \begin{cases} - \text{Real:}&\cos(A-B) = \cos(A)\cos(B) + \sin(A)\sin(B)\\ - \text{Imaginary:}&\sin(A-B) = \sin(A)\cos(B)-\cos(A)\sin(B) - \end{cases} -
+
+
\(\cis\) notation of a complex number, \(z\)
+ \[\boxed{\|z\|\cdot \cis(\theta) = + \|z\|\cdot\left[\cos(\theta)+i\sin(\theta)\right]}\]
+
Euler's formula
+ \[\boxed{\|z\|\cdot e^{i\theta} = + \|z\|\cdot\left[\cos(\theta)+i\sin(\theta)\right]}\] +
+
+ My real issue with \(\cis\) notation is that it's not as obvious what + certain operations do. You can't use previous knowledge acquired from index + laws. By using \(\cis\), you are restricting yourself and you lose a lot of + the complexity (Haha get it? complex? okay...) that is possible with the + polar form.
+
+
+
+ Question 1: Express \(i^i\) in the form \(\alpha+\beta i\) +
+ For any method, the first step is to turn this into polar form. + \begin{align} \text{Define }z&=i\\ \implies&{\|z\| = 1}\\ + \implies&{\theta = \frac{\pi}{2}} \end{align} Now we want to evaluate + \(z^z\)
+ Let's try get somewhere with \(\cis\). \begin{align} z &= + 1\cdot\cis\left(\frac{\pi}{2}\right)\\ &= + \cis\left(\frac{\pi}{2}\right)\\ z^z &= + \cis\left(\frac{\pi}{2}\right)^{\cis\left(\frac{\pi}{2}\right)}\\ &= + \cis\left(\frac{\pi}{2}\right)^i\\ &= \cis\left(i\frac{\pi}{2}\right)\\ + &= ? \end{align} Now what? We have an \(i\) in the phase.
+ It would be much easier if this was a complex exponential! \begin{align} + z &= 1\cdot e^{i\frac{\pi}{2}}\\ &= e^{i\frac{\pi}{2}}\\ z^z &= + {\left[e^{i\frac{\pi}{2}}\right]}^{e^{i\frac{\pi}{2}}}\\ &= + {\left[e^{i\frac{\pi}{2}}\right]}^{i}\\ &= {\left[e^{i\cdot + i\frac{\pi}{2}}\right]}\\ &= e^{-\frac{\pi}{2}} \end{align} Wow! And + it's neatly packaged as an exponent! +
+
+ I understand the use of \(\cis\) to represent a complex number as a polar + coordinate if your curriculum doesn't understand the concept of calculus + when the concept of complex numbers is being taught
+ But \(e\) (Euler's number) is a concept taught in year 12 methods. And year + 12 methods is a prerequisite for year 12 specialist. So students should be + familiar with \(e\) and calculus, so why isn't it being used?

+ My argument isn't really that strong, I recognise that. Just wanted to go on + a 3am MathRantβ„’ :)

+
+
+
+ Bonus Math Tip: Derive the double angle identities. +
+ No need for Euler's formula here, use \(\cis\) for this trick if you + want.
+ Not sure why you'd need to know this - sure, in methods these identities + aren't given on the formula sheet but they are in specialist. Methods + seems to stick to the basic identities such as the 2As and pythagorean, + but you're expected to remember them. I always just put these identities + on my notes.
+ Use this trick to derive any set of angle identities (triple, quadruple, + etc.). Have fun expanding brackets though.

+ Let the first angle be \(A\) and the second angle \(B\). \begin{align} + e^{\pi A}\cdot e^{\pi B} &= + \left[\cos(A)+i\sin(A)\right]\cdot\left[\cos(B)+i\sin(B)\right]\\ e^{\pi + (A+B)} &= \cos(A)\cos(B) + i\cos(A)\sin(B) + i\sin(A)\cos(B) + + i^2\sin(A)\sin(B)\\ \cos(A+B) + i\sin(A+B) &= \left[\cos(A)\cos(B) - + \sin(A)\sin(B)\right] + i\cdot\left[\cos(A)\sin(B) + \sin(A)\cos(B) + \right] \end{align} Consider the real and complex components of this + equation to get the two identities. \begin{cases} \text{Real:}&\cos(A+B) + = \cos(A)\cos(B) - \sin(A)\sin(B)\\ \text{Imaginary:}&\sin(A+B) = + \cos(A)\sin(B) + \sin(A)\cos(B) \end{cases} And you can repeat this all + again for negative second angle. \begin{align} e^{\pi A}\cdot e^{\pi + (-B)} &= + \left[\cos(A)+i\sin(A)\right]\cdot\left[\cos(-B)+i\sin(-B)\right]\\ &= + \left[\cos(A)+i\sin(A)\right]\cdot\left[\cos(B)-i\sin(B)\right]\\ e^{\pi + (A-B)} &= + \cos(A)\cos(B)-i\cos(A)\sin(B)+i\sin(A)\cos(B)-i^2\sin(A)\sin(B)\\ + \cos(A-B) + i\sin(A-B) &= \left[\cos(A)\cos(B) + \sin(A)\sin(B)\right] + + i\cdot\left[\sin(A)\cos(B)-\cos(A)\sin(B)\right] \end{align} + \begin{cases} \text{Real:}&\cos(A-B) = \cos(A)\cos(B) + \sin(A)\sin(B)\\ + \text{Imaginary:}&\sin(A-B) = \sin(A)\cos(B)-\cos(A)\sin(B) \end{cases} +
-
- πŸ”— Back to MATHS home page
- πŸ”— Back to home page
- \ No newline at end of file +
+ πŸ”— Back to MATHS home page
+ πŸ”— Back to home page
+ + diff --git a/maths/de moivre theorem.html b/maths/de moivre theorem.html index 10fe05f..d88cbfb 100644 --- a/maths/de moivre theorem.html +++ b/maths/de moivre theorem.html @@ -1,240 +1,337 @@ - - + + πŸ“ De Moivre's theorem - - + + MathJax example - - - - + + + + - - +
-

Polar form and De Moivre's identity

-

(WACE) Mathematics Specialist ATAR

+

Polar form and De Moivre's identity

+

(WACE) Mathematics Specialist ATAR

- - πŸ”— Back to MATHS home page
- πŸ”— Back to home page
+ + πŸ”— Back to MATHS home page
+ πŸ”— Back to home page
Warning: This page requires javascript to render the math. -

+
+
-
-
De Moivre's identity
- \[\boxed{\left[r\cdot \cis(\theta)\right]^n = r^n\cdot\cis(\theta\cdot n)}\] - where \(\cis(\theta) = \cos(\theta) + i\cdot\sin(\theta)\)
-
+
+
De Moivre's identity
+ \[\boxed{\left[r\cdot \cis(\theta)\right]^n = r^n\cdot\cis(\theta\cdot + n)}\] where \(\cis(\theta) = \cos(\theta) + i\cdot\sin(\theta)\)
+

- The identity is more obvious when we use Euler's formula, \(\boxed{e^{i\theta} = \cos(\theta) + i\cdot\sin(\theta) = \cis(\theta)}\)
- This formula doesn't appear to be taught in the WA curriculum. - \begin{align} - \left[r\cdot e^{i\theta}\right]^n &= r^n\cdot\left[e^{i\theta}\right]^n\\ - &= r^n\cdot e^{i(\theta n)} \\ - &= r^n\cdot\cis(\theta\cdot n) \\ - \end{align} + The identity is more obvious when we use Euler's formula, + \(\boxed{e^{i\theta} = \cos(\theta) + i\cdot\sin(\theta) = + \cis(\theta)}\)
+ This formula doesn't appear to be taught in the WA curriculum. + \begin{align} \left[r\cdot e^{i\theta}\right]^n &= + r^n\cdot\left[e^{i\theta}\right]^n\\ &= r^n\cdot e^{i(\theta n)} \\ &= + r^n\cdot\cis(\theta\cdot n) \\ \end{align}

-
-
Polar form rules: they're on the formula sheet so don't put them on your notes!
- \begin{align} - z_1\cdot z_2 &= r_1\cdot r_2 \cdot \cis(\theta_1 + \theta_2) \\ - \frac{z_1}{z_2} &= \frac{r_1}{r_2} \cdot \cis(\theta_1 - \theta_2)\\ - \cis(\theta_1 + \theta_2) &= \cis(\theta_1)\cdot\cis(\theta_2) \\ - \cis(-\theta) &= \frac{1}{\cis(\theta)} \\ - \overline{\cis(\theta)} &= \cis(-\theta) - \end{align} -
+
+
+ Polar form rules: they're on the formula sheet so + don't put them on your notes! +
+ \begin{align} z_1\cdot z_2 &= r_1\cdot r_2 \cdot \cis(\theta_1 + + \theta_2) \\ \frac{z_1}{z_2} &= \frac{r_1}{r_2} \cdot \cis(\theta_1 - + \theta_2)\\ \cis(\theta_1 + \theta_2) &= + \cis(\theta_1)\cdot\cis(\theta_2) \\ \cis(-\theta) &= + \frac{1}{\cis(\theta)} \\ \overline{\cis(\theta)} &= \cis(-\theta) + \end{align} +
-
+
Question 1
-
+
The polar form of a complex number is useful because of its properties.
- Simplify \(\boxed{\frac{(i+1)^{2020}}{(i-1)^{2020}}}\)   (no calculator) + Simplify + \(\boxed{\frac{(i+1)^{2020}}{(i-1)^{2020}}}\)   (no + calculator)
- Some defining may be useful right now. - \begin{align} - z_0&=i+1 \\ - z_1&=i-1 \\ - \end{align} - First steps to convert to polar form is always to obtain the modulus and argument of the complex number - \begin{align} - \lvert z_0 \rvert &= \sqrt{1^2 + 1^2} = \sqrt{2} \\ - \lvert z_1 \rvert &= \sqrt{1^2 + 1^2} = \sqrt{2} \\ - \arg(z_0) &= \arctan\left(\frac{1}{1}\right) = \frac{\pi}{2} \\ - \arg(z_1) &= \arctan\left(\frac{-1}{1}\right) = -\frac{\pi}{2} \\ - \therefore z_0 &= \sqrt{2}\cdot\cis\left(\frac{\pi}{2}\right) \\ - z_1 &= \sqrt{2}\cdot\cis\left(-\frac{\pi}{2}\right) \\ - \end{align} - So our original equation becomes: - \begin{align} - \frac{(i+1)^{2020}}{(i-1)^{2020}} = \frac{z_0^{\phantom{0}2020}}{z_1^{\phantom{0}2020}} &= \frac{\left[\sqrt{2}\cdot\cis(\frac{\pi}{2})\right]^{2020}}{\left[\sqrt{2}\cdot\cis(-\frac{\pi}{2})\right]^{2020}} \\ - &= \frac{\sqrt{2}^{2020}}{\sqrt{2}^{2020}}\cdot\frac{\cis(\frac{\pi}{2})^{2020}}{\cis(-\frac{\pi}{2})^{2020}} \\ - &= \frac{\cis(\frac{\pi}{2})^{2020}}{\cis(-\frac{\pi}{2})^{2020}} \\ - \end{align} - Let's apply De Moivre's theorem. - \begin{align} - \frac{(i+1)^{2020}}{(i-1)^{2020}} = \frac{\cis(2020\cdot\frac{\pi}{2})}{\cis(-2020\cdot\frac{\pi}{2})} \\ - &= \frac{\cis(1010\cdot\pi)}{\cis(-1010\cdot\pi)} - \end{align} - - We have the useful formula, \(\boxed{\frac{\cis(\alpha)}{\cis(\beta)} = \cis(\alpha-\beta)}\). Let's apply it! - \begin{align} - \frac{(i+1)^{2020}}{(i-1)^{2020}} &= \cis\left[1010\cdot\pi-\left(-1010\cdot\pi\right)\right] \\ - &= \cis\left[1010\cdot\pi+1010\cdot\pi\right] \\ - &= \cis\left[2020\cdot\pi\right] \\ - &= \cis\left[1010\cdot2\pi\right] \\ - &= \cis\left[2\pi\right] \\ - &= 1 \\ - \end{align} - All simplified.
- This question forces you to use \(\cis\) due to the large power. If we had, say, \(\frac{(i+1)}{(i-1)}\), we could simply multiply the top and bottom by \((i+1)\), expand and split the fraction. -
+ Some defining may be useful right now. \begin{align} z_0&=i+1 \\ z_1&=i-1 \\ + \end{align} First steps to convert to polar form is always to obtain the + modulus and argument of the complex number \begin{align} \lvert z_0 \rvert + &= \sqrt{1^2 + 1^2} = \sqrt{2} \\ \lvert z_1 \rvert &= \sqrt{1^2 + 1^2} = + \sqrt{2} \\ \arg(z_0) &= \arctan\left(\frac{1}{1}\right) = \frac{\pi}{2} \\ + \arg(z_1) &= \arctan\left(\frac{-1}{1}\right) = -\frac{\pi}{2} \\ \therefore + z_0 &= \sqrt{2}\cdot\cis\left(\frac{\pi}{2}\right) \\ z_1 &= + \sqrt{2}\cdot\cis\left(-\frac{\pi}{2}\right) \\ \end{align} So our original + equation becomes: \begin{align} \frac{(i+1)^{2020}}{(i-1)^{2020}} = + \frac{z_0^{\phantom{0}2020}}{z_1^{\phantom{0}2020}} &= + \frac{\left[\sqrt{2}\cdot\cis(\frac{\pi}{2})\right]^{2020}}{\left[\sqrt{2}\cdot\cis(-\frac{\pi}{2})\right]^{2020}} + \\ &= + \frac{\sqrt{2}^{2020}}{\sqrt{2}^{2020}}\cdot\frac{\cis(\frac{\pi}{2})^{2020}}{\cis(-\frac{\pi}{2})^{2020}} + \\ &= \frac{\cis(\frac{\pi}{2})^{2020}}{\cis(-\frac{\pi}{2})^{2020}} \\ + \end{align} Let's apply De Moivre's theorem. \begin{align} + \frac{(i+1)^{2020}}{(i-1)^{2020}} = + \frac{\cis(2020\cdot\frac{\pi}{2})}{\cis(-2020\cdot\frac{\pi}{2})} \\ &= + \frac{\cis(1010\cdot\pi)}{\cis(-1010\cdot\pi)} \end{align} We have the + useful formula, \(\boxed{\frac{\cis(\alpha)}{\cis(\beta)} = + \cis(\alpha-\beta)}\). Let's apply it! \begin{align} + \frac{(i+1)^{2020}}{(i-1)^{2020}} &= + \cis\left[1010\cdot\pi-\left(-1010\cdot\pi\right)\right] \\ &= + \cis\left[1010\cdot\pi+1010\cdot\pi\right] \\ &= + \cis\left[2020\cdot\pi\right] \\ &= \cis\left[1010\cdot2\pi\right] \\ &= + \cis\left[2\pi\right] \\ &= 1 \\ \end{align} All simplified.
+ This question forces you to use \(\cis\) due to the large power. If we had, + say, \(\frac{(i+1)}{(i-1)}\), we could simply multiply the top and bottom by + \((i+1)\), expand and split the fraction. +
Question 2
-
+
Let's try something harder.

-

- Express \(\boxed{\prod_{n=1}^{2020}\left[n\cdot\cis\left(\frac{\pi}{2}\right)^n\right]}\) in the form \(\boxed{r\cdot\cis(\alpha)}\)   (no calculator) -
- What can we do? Firstly, we can expand the capital pi \(\Pi\) to reveal the terms. - \[\prod_{n=1}^{2020}\left[n\cdot\cis\left(\frac{\pi}{2}\right)^n\right] = \cis\left(\frac{\pi}{2}\right) \times 2\cis\left(\frac{\pi}{2}\right)^2 \times 3\cis\left(\frac{\pi}{2}\right)^3 \times [\dots] \times 2020\cis\left(\frac{\pi}{2}\right)^{2020}\] - Secondly, we can recognise that we can bring the coefficients together and use our identity to bring the power \(n\) into the angle - \[\prod_{n=1}^{2020}\left[n\cdot\cis\left(\frac{\pi}{2}\right)^n\right] = \left(1\times 2\times 3\times [\dots]\times 2020 \right)\times \cis\left(\frac{\pi}{2}\right) \times \cis\left(2\cdot\frac{\pi}{2}\right) \times \cis\left(3\cdot\frac{\pi}{2}\right) \times [\dots] \times \cis\left(2020\cdot\frac{\pi}{2}\right)\] - The coefficients together form a factorial! We can express this as: - \[\prod_{n=1}^{2020}\left[n\cdot\cis\left(\frac{\pi}{2}\right)^n\right] = 2020!\times \cis\left(\frac{\pi}{2}\right) \times \cis\left(2\cdot\frac{\pi}{2}\right) \times \cis\left(3\cdot\frac{\pi}{2}\right) \times [\dots] \times \cis\left(2020\cdot\frac{\pi}{2}\right)\] - OK, let's now bring the angles together. \(\cis(\alpha)\times\cis(\beta) = \cis(\alpha + \beta)\) - \begin{align} - \prod_{n=1}^{2020}\left[n\cdot\cis\left(\frac{\pi}{2}\right)^n\right] &= 2020!\times \cis\left(\frac{\pi}{2} + 2\cdot\frac{\pi}{2} + 3\cdot\frac{\pi}{2} + [\dots] + 2020\cdot\frac{\pi}{2}\right) \\ - &= 2020!\times \cis\left((1 + 2 + 3 + [\dots] + 2020)\cdot\frac{\pi}{2}\right) - \end{align} - Great! This is looking like the form we need. All that's left is to use our triangular number (sum) formula to calculate the sum of the coefficient of \(\frac{\pi}{2}\)
- The formula by the way is: \(\boxed{\sum_{k=1}^n k = \frac{n(n+1)}{2}}\) - \begin{align} - \prod_{n=1}^{2020}\left[n\cdot\cis\left(\frac{\pi}{2}\right)^n\right] &= 2020!\times \cis\left(\frac{2020(2020+1)}{2}\cdot\frac{\pi}{2}\right) \\ - &= 2020!\times \cis\left(1020605\pi\right) - \end{align} - By recognising that \(\cis\) is periodic, we can reduce the angle size to simplify further. Because \(1020605=2n+1\), where \(n\) is an integer, it is odd and we can reduce the angle to simply \(\pi\). - \[\prod_{n=1}^{2020}\left[n\cdot\cis\left(\frac{\pi}{2}\right)^n\right] = 2020!\times \cis\left(\pi\right)\] - OK, we got it in the form \(r\cdot\cis(\alpha)\) as required. \(2020!\), by the way is a very large number. Vsauce already has a video on \(52!\) which is already very large. +
+ Express + \(\boxed{\prod_{n=1}^{2020}\left[n\cdot\cis\left(\frac{\pi}{2}\right)^n\right]}\) + in the form \(\boxed{r\cdot\cis(\alpha)}\)   (no + calculator) +
+ What can we do? Firstly, we can expand the capital pi \(\Pi\) to reveal + the terms. + \[\prod_{n=1}^{2020}\left[n\cdot\cis\left(\frac{\pi}{2}\right)^n\right] = + \cis\left(\frac{\pi}{2}\right) \times 2\cis\left(\frac{\pi}{2}\right)^2 + \times 3\cis\left(\frac{\pi}{2}\right)^3 \times [\dots] \times + 2020\cis\left(\frac{\pi}{2}\right)^{2020}\] Secondly, we can recognise + that we can bring the coefficients together and use our identity to bring + the power \(n\) into the angle + \[\prod_{n=1}^{2020}\left[n\cdot\cis\left(\frac{\pi}{2}\right)^n\right] = + \left(1\times 2\times 3\times [\dots]\times 2020 \right)\times + \cis\left(\frac{\pi}{2}\right) \times \cis\left(2\cdot\frac{\pi}{2}\right) + \times \cis\left(3\cdot\frac{\pi}{2}\right) \times [\dots] \times + \cis\left(2020\cdot\frac{\pi}{2}\right)\] The coefficients together form a + factorial! We can express this as: + \[\prod_{n=1}^{2020}\left[n\cdot\cis\left(\frac{\pi}{2}\right)^n\right] = + 2020!\times \cis\left(\frac{\pi}{2}\right) \times + \cis\left(2\cdot\frac{\pi}{2}\right) \times + \cis\left(3\cdot\frac{\pi}{2}\right) \times [\dots] \times + \cis\left(2020\cdot\frac{\pi}{2}\right)\] OK, let's now bring the angles + together. \(\cis(\alpha)\times\cis(\beta) = \cis(\alpha + \beta)\) + \begin{align} + \prod_{n=1}^{2020}\left[n\cdot\cis\left(\frac{\pi}{2}\right)^n\right] &= + 2020!\times \cis\left(\frac{\pi}{2} + 2\cdot\frac{\pi}{2} + + 3\cdot\frac{\pi}{2} + [\dots] + 2020\cdot\frac{\pi}{2}\right) \\ &= + 2020!\times \cis\left((1 + 2 + 3 + [\dots] + + 2020)\cdot\frac{\pi}{2}\right) \end{align} Great! This is looking like the + form we need. All that's left is to use our triangular number (sum) + formula to calculate the sum of the coefficient of \(\frac{\pi}{2}\) +
+ The formula by the way is: \(\boxed{\sum_{k=1}^n k = \frac{n(n+1)}{2}}\) + \begin{align} + \prod_{n=1}^{2020}\left[n\cdot\cis\left(\frac{\pi}{2}\right)^n\right] &= + 2020!\times \cis\left(\frac{2020(2020+1)}{2}\cdot\frac{\pi}{2}\right) \\ + &= 2020!\times \cis\left(1020605\pi\right) \end{align} By recognising that + \(\cis\) is periodic, we can reduce the angle size to simplify further. + Because \(1020605=2n+1\), where \(n\) is an integer, it is odd and we can + reduce the angle to simply \(\pi\). + \[\prod_{n=1}^{2020}\left[n\cdot\cis\left(\frac{\pi}{2}\right)^n\right] = + 2020!\times \cis\left(\pi\right)\] OK, we got it in the form + \(r\cdot\cis(\alpha)\) as required. \(2020!\), by the way is a very large + number. Vsauce already has a video on \(52!\) which is already very large.

-
-
+
+
Question 3
-
+
Another math puzzle.

-

- Express \(\boxed{\sum_{n=1}^{2020}\left[n\cdot\cis\left(\frac{\pi}{2}\right)^n\right]}\) in the form \(\boxed{\alpha + \beta i}\)    (3 marks, no calculator) -

- Hold up, haven't we done this already? No. This uses the summation formula. Also we want it in rectangular form - not polar form!
- There are two mindsets to evaluate this expression: one which is 'local' and the other 'global'
- To be honest, I just skipped this question entirely. It was 3 marks and I was unprepared for this sort of question (I was close to a pattern, but the coefficients were not periodic and threw me off.)
- Method one: Local
- A 'local' approach aims to identify how the function or expression behaves at a small or local level.
- Let's define the part within the summation as \(f(x)\) - \[\text{Define: } f(x) = n\cdot\cis\left(\frac{\pi}{2}\right)^n\] - Let's see how the function behaves for a *few* values of \(x\).
- We're trying to see how the function within the summation of the original expression behaves at a local level, so we don't test all 2020 terms. The goal is to find a pattern that applies for the remaining terms. +
+ Express + \(\boxed{\sum_{n=1}^{2020}\left[n\cdot\cis\left(\frac{\pi}{2}\right)^n\right]}\) + in the form \(\boxed{\alpha + \beta i}\)    (3 + marks, no calculator) +
+
+ Hold up, haven't we done this already? No. This uses the summation + formula. Also we want it in rectangular form - not polar form!
+ There are two mindsets to evaluate this expression: one which is 'local' + and the other 'global'
+ To be honest, I just skipped this question entirely. It was 3 marks and I + was unprepared for this sort of question (I was close to a pattern, but + the coefficients were not periodic and threw me off.)
+ Method one: Local
+ A 'local' approach aims to identify how the function or expression behaves + at a small or local level.
+ Let's define the part within the summation as \(f(x)\) \[\text{Define: } + f(x) = n\cdot\cis\left(\frac{\pi}{2}\right)^n\] Let's see how the function + behaves for a *few* values of \(x\).
+ We're trying to see how the function within the summation of the original + expression behaves at a local level, so we don't test all 2020 terms. The + goal is to find a pattern that applies for the remaining terms. + \begin{align} f(1) &= 1\cdot\cis\left(\frac{\pi}{2}\right)^1 \\ f(2) &= + 2\cdot\cis\left(\frac{\pi}{2}\right)^2 \\ f(3) &= + 3\cdot\cis\left(\frac{\pi}{2}\right)^3 \\ f(4) &= + 4\cdot\cis\left(\frac{\pi}{2}\right)^4 \\ f(5) &= + 5\cdot\cis\left(\frac{\pi}{2}\right)^5 \\ f(6) &= + 6\cdot\cis\left(\frac{\pi}{2}\right)^6 \\ f(7) &= + 7\cdot\cis\left(\frac{\pi}{2}\right)^7 \\ f(8) &= + 8\cdot\cis\left(\frac{\pi}{2}\right)^8 \\ \end{align} Let's apply De + Moivre's theorem. \begin{alignat}{2} f(1) &= + 1\cdot\cis\left(\frac{\pi}{2}\right) &&= \cis\left(\frac{\pi}{2}\right) \\ + f(2) &= 2\cdot\cis\left(\frac{2\pi}{2}\right) &&= + 2\cdot\cis\left(\pi\right) \\ f(3) &= + 3\cdot\cis\left(\frac{3\pi}{2}\right) &&= + 3\cdot\cis\left(\frac{3\pi}{2}\right)\\ f(4) &= + 4\cdot\cis\left(\frac{4\pi}{2}\right) &&= 4\cdot\cis\left(2\pi\right) \\ + f(5) &= 5\cdot\cis\left(\frac{5\pi}{2}\right) &&= + 5\cdot\cis\left(\frac{\pi}{2}\right) \\ f(6) &= + 6\cdot\cis\left(\frac{6\pi}{2}\right) &&= 6\cdot\cis\left(\pi\right) \\ + f(7) &= 7\cdot\cis\left(\frac{7\pi}{2}\right) &&= + 7\cdot\cis\left(\frac{3\pi}{2}\right) \\ f(8) &= + 8\cdot\cis\left(\frac{8\pi}{2}\right) &&= 8\cdot\cis\left(2\pi\right) \\ + \end{alignat} At this point we seem to be close to a pattern (periodic + nature of \(\cis\)), but it doesn't quite seem like one due to the + coefficients which are not repeating.
+ If we try summing by the pattern that exists (the \(\cis\)), we may see a + pattern emerge \begin{align} \sum_{n=1}^{4}\left[f(n)\right] &= + f(1)+f(2)+f(3)+f(4) \\ &= i -2 -3i +4 \\ &= 2 - 2i \\ + \sum_{n=5}^{8}\left[f(n)\right] &= f(5)+f(6)+f(7)+f(8) \\ &= 5i -6 -7i +8 + \\ &= 2 - 2i \end{align} In fact we do see a pattern - this sort of local + behavior applies for the whole 2020 terms.
- \begin{align} - f(1) &= 1\cdot\cis\left(\frac{\pi}{2}\right)^1 \\ - f(2) &= 2\cdot\cis\left(\frac{\pi}{2}\right)^2 \\ - f(3) &= 3\cdot\cis\left(\frac{\pi}{2}\right)^3 \\ - f(4) &= 4\cdot\cis\left(\frac{\pi}{2}\right)^4 \\ - f(5) &= 5\cdot\cis\left(\frac{\pi}{2}\right)^5 \\ - f(6) &= 6\cdot\cis\left(\frac{\pi}{2}\right)^6 \\ - f(7) &= 7\cdot\cis\left(\frac{\pi}{2}\right)^7 \\ - f(8) &= 8\cdot\cis\left(\frac{\pi}{2}\right)^8 \\ - \end{align} + \begin{align} + \sum_{n=1}^{2020}\left[n\cdot\cis\left(\frac{\pi}{2}\right)^n\right] &= + \sum_{n=1}^{4}\left[f(n)\right] + \sum_{n=5}^{8}\left[f(n)\right] + + [\dots] + \sum_{n=2015}^{2020}\left[f(n)\right] \\ &= (2-2i) + (2-2i) + + [\dots] + (2-2i) \\ &= \frac{2020}{4}\cdot(2-2i) \\ &= 1010 - 1010i + \end{align} Hopefully this explains what I mean by 'local' : a bit of an + odd term but it differentiates this line of thinking from the next one I + will show.

+ The main downside to this mindset is that you may end up wasting time by + testing to find a pattern. For a 3 mark question, I didn't even consider + using this method (although this was the intended method, from what I can + see)
+ Compared to the global method it has some benefits. In this case it avoids + the use of a complicated summation formula. More generally, it also + requires smaller calculations as we're not looking at the large behavior - + this can minimize mistakes. - Let's apply De Moivre's theorem. +
+ Method two: Global
+ The 'global' approach observes how the function or expression behaves as a + whole.
+ Instantly, let's unpack the summation then, apply De Moivre's theorem. + \begin{align} + \sum_{n=1}^{2020}\left[n\cdot\cis\left(\frac{\pi}{2}\right)^n\right] &= + \cis\left(\frac{\pi}{2}\right) + 2\cis\left(\frac{\pi}{2}\right)^2 + + 3\cis\left(\frac{\pi}{2}\right)^3 + 4\cis\left(\frac{\pi}{2}\right)^4 + + 5\cis\left(\frac{\pi}{2}\right)^5 + 6\cis\left(\frac{\pi}{2}\right)^6 + + [\dots] + 2020\cis\left(\frac{\pi}{2}\right)^{2020} \\ &= + \cis\left(\frac{\pi}{2}\right) + 2\cis\left(\frac{\pi}{2}\cdot 2\right) + + 3\cis\left(\frac{\pi}{2}\cdot 3\right) + 4\cis\left(\frac{\pi}{2}\cdot + 4\right) + 5\cis\left(\frac{\pi}{2}\cdot 5\right) + + 6\cis\left(\frac{\pi}{2}\cdot 6\right) + [\dots] + + 2020\cis\left(\frac{\pi}{2}\cdot 2020\right) \end{align} What we have here + is essentially a series of rotating vectors. So that means we can expect + to simplify quite a few of the cis terms, as they repeat periodically.
+ For example, + \(\cis\left(\frac{\pi}{2}\right)=\cis\left(\frac{5\pi}{2}\right)=\cis\left(\frac{9\pi}{2}\right)=[\dots]=\cis\left(\frac{\pi}{2}+k\cdot + 2\pi\right)\) for integer \(k\) + \[\sum_{n=1}^{2020}\left[n\cdot\cis\left(\frac{\pi}{2}\right)^n\right] = + \cis\left(\frac{\pi}{2}\right) + 2\cis\left(\pi\right) + + 3\cis\left(\frac{3\pi}{2}\right) + 4\cis\left(2\pi\right) + + 5\cis\left(\frac{\pi}{2}\right) + 6\cis\left(\pi\right) + [\dots] + + 2020\cis\left(2\pi\right)\] Alright, let's collect the cis terms according + to their (simplified) angle. + \[\sum_{n=1}^{2020}\left[n\cdot\cis\left(\frac{\pi}{2}\right)^n\right] = + (1+5+9+13+[\dots])\times\cis\left(\frac{\pi}{2}\right) + + (2+6+10+14+[\dots])\times\cis\left(\pi\right) + + (3+7+11+15+[\dots])\times\cis\left(\frac{3\pi}{2}\right) + + (4+8+16+20+[\dots])\times\cis\left(2\pi\right)\] We need to use the + arithmetic progression sum formula, because we have a common difference + \(d\) of 4 between each number, not 1 like last time. Also for our terms, + we have different starting values, \(a_0\) + \[\boxed{\sum_{k=1}^{n-1}\left[a_0+k\cdot d\right] = + \frac{n}{2}\left[(n-1)\cdot d+2a_0\right]}\] Now, we have + \(\frac{2020}{4}\) terms for each unique angle for \(\cis\) because 2020 + is divisible by 4 (The number of \(\cis\) with unique angles) evenly. In + other scenarios this may not be the case and \(n\) may vary for each + sum.
+ Let's apply the series formula to bring these terms together. + \begin{align} + \sum_{n=1}^{2020}\left[n\cdot\cis\left(\frac{\pi}{2}\right)^n\right] &= + \frac{505}{2}\left[(505-1)\cdot + 4+2\cdot1\right]\times\cis\left(\frac{\pi}{2}\right) + + \frac{505}{2}\left[(505-1)\cdot 4+2\cdot + 2\right]\times\cis\left(\pi\right) + \frac{505}{2}\left[(505-1)\cdot + 4+2\cdot 3\right]\times\cis\left(\frac{3\pi}{2}\right) + + \frac{505}{2}\left[(505-1)\cdot 4+2\cdot + 4\right]\times\cis\left(2\pi\right) \\ &= + 509545\times\cis\left(\frac{\pi}{2}\right) + + 510050\times\cis\left(\pi\right) + + 510555\times\cis\left(\frac{3\pi}{2}\right) + + 511060\times\cis\left(2\pi\right) \\ &= 509545\times[0+i] + + 510050\times[-1+0i] + 510555\times[0-i] + 511060\times[1+0i] \\ &= 511060 + - 510050 + (509545 - 510555)i\\ + \sum_{n=1}^{2020}\left[n\cdot\cis\left(\frac{\pi}{2}\right)^n\right] &= + 1010 - 1010i \end{align} And there we have it!

+ The downside to this method is that you end up needing to handle large + numbers - which also wastes time and increases chances of making a + mistake.
+ For this particular question, there is also the downside of requiring + previous year content (the AP formula), which I certainly did not + remember.
- \begin{alignat}{2} - f(1) &= 1\cdot\cis\left(\frac{\pi}{2}\right) &&= \cis\left(\frac{\pi}{2}\right) \\ - f(2) &= 2\cdot\cis\left(\frac{2\pi}{2}\right) &&= 2\cdot\cis\left(\pi\right) \\ - f(3) &= 3\cdot\cis\left(\frac{3\pi}{2}\right) &&= 3\cdot\cis\left(\frac{3\pi}{2}\right)\\ - f(4) &= 4\cdot\cis\left(\frac{4\pi}{2}\right) &&= 4\cdot\cis\left(2\pi\right) \\ - f(5) &= 5\cdot\cis\left(\frac{5\pi}{2}\right) &&= 5\cdot\cis\left(\frac{\pi}{2}\right) \\ - f(6) &= 6\cdot\cis\left(\frac{6\pi}{2}\right) &&= 6\cdot\cis\left(\pi\right) \\ - f(7) &= 7\cdot\cis\left(\frac{7\pi}{2}\right) &&= 7\cdot\cis\left(\frac{3\pi}{2}\right) \\ - f(8) &= 8\cdot\cis\left(\frac{8\pi}{2}\right) &&= 8\cdot\cis\left(2\pi\right) \\ - \end{alignat} - - At this point we seem to be close to a pattern (periodic nature of \(\cis\)), but it doesn't quite seem like one due to the coefficients which are not repeating.
- If we try summing by the pattern that exists (the \(\cis\)), we may see a pattern emerge - - \begin{align} - \sum_{n=1}^{4}\left[f(n)\right] &= f(1)+f(2)+f(3)+f(4) \\ - &= i -2 -3i +4 \\ - &= 2 - 2i \\ - \sum_{n=5}^{8}\left[f(n)\right] &= f(5)+f(6)+f(7)+f(8) \\ - &= 5i -6 -7i +8 \\ - &= 2 - 2i - \end{align} - - In fact we do see a pattern - this sort of local behavior applies for the whole 2020 terms.
- - \begin{align} - \sum_{n=1}^{2020}\left[n\cdot\cis\left(\frac{\pi}{2}\right)^n\right] &= \sum_{n=1}^{4}\left[f(n)\right] + \sum_{n=5}^{8}\left[f(n)\right] + [\dots] + \sum_{n=2015}^{2020}\left[f(n)\right] \\ - &= (2-2i) + (2-2i) + [\dots] + (2-2i) \\ - &= \frac{2020}{4}\cdot(2-2i) \\ - &= 1010 - 1010i - \end{align} - - Hopefully this explains what I mean by 'local' : a bit of an odd term but it differentiates this line of thinking from the next one I will show.

- The main downside to this mindset is that you may end up wasting time by testing to find a pattern. For a 3 mark question, I didn't even consider using this method (although this was the intended method, from what I can see)
- Compared to the global method it has some benefits. In this case it avoids the use of a complicated summation formula. More generally, it also requires smaller calculations as we're not looking at the large behavior - this can minimize mistakes. - -
- Method two: Global
- The 'global' approach observes how the function or expression behaves as a whole.
- Instantly, let's unpack the summation then, apply De Moivre's theorem. - \begin{align} - \sum_{n=1}^{2020}\left[n\cdot\cis\left(\frac{\pi}{2}\right)^n\right] &= \cis\left(\frac{\pi}{2}\right) + 2\cis\left(\frac{\pi}{2}\right)^2 + 3\cis\left(\frac{\pi}{2}\right)^3 + 4\cis\left(\frac{\pi}{2}\right)^4 + 5\cis\left(\frac{\pi}{2}\right)^5 + 6\cis\left(\frac{\pi}{2}\right)^6 + [\dots] + 2020\cis\left(\frac{\pi}{2}\right)^{2020} \\ - &= \cis\left(\frac{\pi}{2}\right) + 2\cis\left(\frac{\pi}{2}\cdot 2\right) + 3\cis\left(\frac{\pi}{2}\cdot 3\right) + 4\cis\left(\frac{\pi}{2}\cdot 4\right) + 5\cis\left(\frac{\pi}{2}\cdot 5\right) + 6\cis\left(\frac{\pi}{2}\cdot 6\right) + [\dots] + 2020\cis\left(\frac{\pi}{2}\cdot 2020\right) - \end{align} - What we have here is essentially a series of rotating vectors. So that means we can expect to simplify quite a few of the cis terms, as they repeat periodically.
- For example, \(\cis\left(\frac{\pi}{2}\right)=\cis\left(\frac{5\pi}{2}\right)=\cis\left(\frac{9\pi}{2}\right)=[\dots]=\cis\left(\frac{\pi}{2}+k\cdot 2\pi\right)\) for integer \(k\) - \[\sum_{n=1}^{2020}\left[n\cdot\cis\left(\frac{\pi}{2}\right)^n\right] = \cis\left(\frac{\pi}{2}\right) + 2\cis\left(\pi\right) + 3\cis\left(\frac{3\pi}{2}\right) + 4\cis\left(2\pi\right) + 5\cis\left(\frac{\pi}{2}\right) + 6\cis\left(\pi\right) + [\dots] + 2020\cis\left(2\pi\right)\] - Alright, let's collect the cis terms according to their (simplified) angle. - \[\sum_{n=1}^{2020}\left[n\cdot\cis\left(\frac{\pi}{2}\right)^n\right] = (1+5+9+13+[\dots])\times\cis\left(\frac{\pi}{2}\right) + (2+6+10+14+[\dots])\times\cis\left(\pi\right) + (3+7+11+15+[\dots])\times\cis\left(\frac{3\pi}{2}\right) + (4+8+16+20+[\dots])\times\cis\left(2\pi\right)\] - We need to use the arithmetic progression sum formula, because we have a common difference \(d\) of 4 between each number, not 1 like last time. Also for our terms, we have different starting values, \(a_0\) - \[\boxed{\sum_{k=1}^{n-1}\left[a_0+k\cdot d\right] = \frac{n}{2}\left[(n-1)\cdot d+2a_0\right]}\] - Now, we have \(\frac{2020}{4}\) terms for each unique angle for \(\cis\) because 2020 is divisible by 4 (The number of \(\cis\) with unique angles) evenly. In other scenarios this may not be the case and \(n\) may vary for each sum.
- Let's apply the series formula to bring these terms together. - \begin{align} - \sum_{n=1}^{2020}\left[n\cdot\cis\left(\frac{\pi}{2}\right)^n\right] &= \frac{505}{2}\left[(505-1)\cdot 4+2\cdot1\right]\times\cis\left(\frac{\pi}{2}\right) + \frac{505}{2}\left[(505-1)\cdot 4+2\cdot 2\right]\times\cis\left(\pi\right) + \frac{505}{2}\left[(505-1)\cdot 4+2\cdot 3\right]\times\cis\left(\frac{3\pi}{2}\right) + \frac{505}{2}\left[(505-1)\cdot 4+2\cdot 4\right]\times\cis\left(2\pi\right) \\ - &= 509545\times\cis\left(\frac{\pi}{2}\right) + 510050\times\cis\left(\pi\right) + 510555\times\cis\left(\frac{3\pi}{2}\right) + 511060\times\cis\left(2\pi\right) \\ - &= 509545\times[0+i] + 510050\times[-1+0i] + 510555\times[0-i] + 511060\times[1+0i] \\ - &= 511060 - 510050 + (509545 - 510555)i\\ - \sum_{n=1}^{2020}\left[n\cdot\cis\left(\frac{\pi}{2}\right)^n\right] &= 1010 - 1010i - \end{align} - And there we have it!

- The downside to this method is that you end up needing to handle large numbers - which also wastes time and increases chances of making a mistake.
- For this particular question, there is also the downside of requiring previous year content (the AP formula), which I certainly did not remember.
- -
- To be completely honest, this question should be worth more than just three marks. In the exam, I decided that this was not worth my time. +
+ To be completely honest, this question should be worth more than just + three marks. In the exam, I decided that this was not worth my time.

- πŸ”— Back to MATHS home page
- πŸ”— Back to home page
- - \ No newline at end of file + πŸ”— Back to MATHS home page
+ πŸ”— Back to home page
+ + diff --git a/maths/index.html b/maths/index.html index 3e18da9..3ece878 100644 --- a/maths/index.html +++ b/maths/index.html @@ -1,51 +1,88 @@ - - + + πŸ“ Maths! - - + + - - - - + + + + - - - Welcome to my math page.
- Random content from my math adventures (Both from WACE and now uni)
+ + Welcome to my math page.
+ Random content from my math adventures (Both from WACE and now uni)
-
- Multivariable calc
- Scalar potential calculator \(\Psi(x,y,z)=?\)
- Sorry I got lazy and it's not finished... -
-

+
+ Multivariable calc
+ Scalar potential calculator \(\Psi(x,y,z)=?\) +
+ Sorry I got lazy and it's not finished... +
+
+
- - πŸ”— Back to home page
- \ No newline at end of file + πŸ”— Back to home page
+ +