summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorthing1 <thing1@seacrossedlovers.xyz>2025-03-24 18:35:17 +0000
committerthing1 <thing1@seacrossedlovers.xyz>2025-03-24 18:35:17 +0000
commit590b61cdc1120315197f65dd780c919b6e13e385 (patch)
tree18781ed8c04668e16972a0baf36a83fd92b490fe
parentc509339286e7aac6d1b8557cf3a55326ce3e1d75 (diff)
maths and comp sci
-rw-r--r--comp/work/51/Makefile2
-rw-r--r--comp/work/51/vectors.ms193
-rw-r--r--maths/hw/eq17/Makefile4
-rw-r--r--maths/hw/eq17/eq17.ms90
-rw-r--r--maths/work/projectiles/1.ms11
-rw-r--r--maths/work/projectiles/Makefile4
-rw-r--r--maths/work/rev1/Makefile4
-rw-r--r--maths/work/rev1/parametrics.ms329
8 files changed, 637 insertions, 0 deletions
diff --git a/comp/work/51/Makefile b/comp/work/51/Makefile
new file mode 100644
index 0000000..ec0f613
--- /dev/null
+++ b/comp/work/51/Makefile
@@ -0,0 +1,2 @@
+all: vectors.ms
+ eqn vectors.ms | groff -Tps -ms | ps2pdf - > vectors.pdf
diff --git a/comp/work/51/vectors.ms b/comp/work/51/vectors.ms
new file mode 100644
index 0000000..37c89df
--- /dev/null
+++ b/comp/work/51/vectors.ms
@@ -0,0 +1,193 @@
+.TL
+Vectors in comp sci
+.AU
+Lucas Standen
+.AI
+QMC
+.2C
+
+.EQ
+delim @@
+.EN
+
+.EQ
+delim @#
+.EN
+
+.NH 1
+How to write them
+
+.LP
+To write a vector, like in maths we can use
+.EQ
+({i sub x, j sub y})
+.EN
+But they can also be written
+.EQ
+R sup 2
+.EN
+
+.EQ
+R sup 3
+.EN
+Where the power is the number of degrees available
+
+.NH 1
+Combining vectors
+.LP
+To combine vectors one can use the formula
+.EQ
+w = alpha u + beta v
+.EN
+Where w is the combined vector and
+.EQ
+alpha + beta = 1
+.EN
+
+.NH 2
+Example
+.EQ
+u = (2,2)
+.EN
+
+.EQ
+v = (6,-2)
+.EN
+
+We can then say that
+.EQ
+w = (4, 0)
+.EN
+By subtracting v from u
+
+Then using the formula
+.EQ
+2 alpha + 6 beta = 3
+.EN
+Where 3 is a point on the combined vector
+.EQ
+2 alpha + -2 beta = 1
+.EN
+
+We can then solve for @ beta # like so
+
+.EQ
+6 beta - 3 = -2 beta - 1
+.EN
+
+.EQ
+8 beta - 2 = 0
+.EN
+
+.EQ
+8 beta = 2
+.EN
+
+.EQ
+beta = 2 over 8
+.EN
+
+.EQ
+beta = 1 over 4
+.EN
+
+From this we can say
+.EQ
+alpha = 3 over 4
+.EN
+Because
+.EQ
+alpha + beta = 1
+.EN
+
+.NH 2
+Another example
+
+.EQ
+2 alpha + 6 beta = 2
+.EN
+
+.EQ
+2 alpha - 2 beta = 1
+.EN
+
+.EQ
+8 beta = 1
+.EN
+
+.EQ
+beta = 1 over 8
+.EN
+
+.EQ
+2 alpha - 2 ({1 over 8}) = 1
+.EN
+
+.EQ
+2 alpha = 5 over 4
+.EN
+
+.EQ
+alpha = 5 over 8
+.EN
+
+Since
+.EQ
+alpha + beta != 1
+.EN
+We can say that w does not lie on the vector uv
+
+And because it is greater than 1 it means it is inside the triangle created by u and v
+
+.NH 1
+The dot product
+
+.LP
+To solve use the following formula
+
+.EQ
+u.v = |u|.|v| cos( theta )
+.EN
+
+Where @ theta # is the angle between the 2 vectors and
+
+.EQ
+|u| = " magnitude of u, " sqrt {x sup 2 + y sup 2}
+.EN
+
+You can also use
+.EQ
+u.v = u sub 1 . v sub 1 + u sub 2 . v sub 2 + u sub n + v sub n ...
+.EN
+If you don't have the angle
+
+Don't be confused by the dot, it just means
+.EQ
+u sub 1 . v sub 1 = u sub 1 times v sub 1
+.EN
+
+.NH 2
+Exam question
+
+.LP
+1.1)
+.EQ
+|b| = 4
+.EN
+
+1.2)
+.EQ
+u.v = u sub 1 . v sub 1 + u sub 2 . v sub 2 + u sub n + v sub n ...
+.EN
+
+.EQ
+a.b = 4 . 4 + 3 . 0
+.EN
+
+.EQ
+a.b = 16 + 0
+.EN
+
+.EQ
+a.b = 16
+.EN
diff --git a/maths/hw/eq17/Makefile b/maths/hw/eq17/Makefile
new file mode 100644
index 0000000..6635264
--- /dev/null
+++ b/maths/hw/eq17/Makefile
@@ -0,0 +1,4 @@
+all: eq17
+
+eq17: eq17.ms
+ groff -ms -Tps -e eq17.ms | ps2pdf - > eq17.pdf
diff --git a/maths/hw/eq17/eq17.ms b/maths/hw/eq17/eq17.ms
new file mode 100644
index 0000000..850bbdc
--- /dev/null
+++ b/maths/hw/eq17/eq17.ms
@@ -0,0 +1,90 @@
+.TL
+Exam Questions 17
+.AU
+Lucas Standen
+.AI
+QMC
+
+.PP
+1)a)
+
+.EQ
+dx over dt = 2cos(t)
+.EN
+
+.EQ
+dy over dt = 2sin(2t)
+.EN
+
+.EQ
+dy over dx = 2cos(t) over 2sin(2t)
+.EN
+
+.EQ
+"when " t = pi over 6
+.EN
+
+.EQ
+dy over dx = {2cos({pi over 6})} over {2sin(2({pi over 6}))}
+.EN
+
+.EQ
+dy over dx = 1
+.EN
+
+.PP
+1)b)
+
+.EQ
+x = 2sin(t)
+.EN
+
+.EQ
+x over 2 = sin(t)
+.EN
+
+.EQ
+1 = cos(2t)
+.EN
+
+.EQ
+1 = 1 - cos sup 2 (t)
+.EN
+
+.EQ
+y = cos sup 2 (t)
+.EN
+
+.EQ
+({x over 2}) sup 2 + y sup 2 = 1
+.EN
+
+.EQ
+{x over 4} sup 2 + y sup 2 = 1
+.EN
+
+.EQ
+{x over 4} sup 2 - 1 = - y sup 2
+.EN
+
+.EQ
+- {x over 4} sup 2 + 1 = y sup 2
+.EN
+
+.EQ
+sqrt {- {x over 4} sup 2 + 1} = y sup 2
+.EN
+
+.EQ
+-2 <= x <= 2
+.EN
+
+.PP
+1)c)
+
+.EQ
+0 <= f(x) <= 1
+.EN
+
+
+
diff --git a/maths/work/projectiles/1.ms b/maths/work/projectiles/1.ms
new file mode 100644
index 0000000..5f5972e
--- /dev/null
+++ b/maths/work/projectiles/1.ms
@@ -0,0 +1,11 @@
+.TL
+Projectiles
+.AU
+Lucas Standen
+.AI
+QMC
+.CX
+
+.PP
+.EQ
+
diff --git a/maths/work/projectiles/Makefile b/maths/work/projectiles/Makefile
new file mode 100644
index 0000000..2338b2c
--- /dev/null
+++ b/maths/work/projectiles/Makefile
@@ -0,0 +1,4 @@
+all: 1.ms
+ eqn 1.ms | groff -Tps -ms | ps2pdf - > 1.pdf
+
+
diff --git a/maths/work/rev1/Makefile b/maths/work/rev1/Makefile
new file mode 100644
index 0000000..acac884
--- /dev/null
+++ b/maths/work/rev1/Makefile
@@ -0,0 +1,4 @@
+all: parametrics.ms
+ eqn parametrics.ms | groff -Tps -ms | ps2pdf - > parametrics.pdf
+
+
diff --git a/maths/work/rev1/parametrics.ms b/maths/work/rev1/parametrics.ms
new file mode 100644
index 0000000..e334ffa
--- /dev/null
+++ b/maths/work/rev1/parametrics.ms
@@ -0,0 +1,329 @@
+.TL
+Parametric equations
+.AU
+Lucas Standen
+.AI
+QMC
+
+.EQ
+delim @@
+.EN
+.EQ
+delim @#
+.EN
+
+.2C
+
+.NH 1
+What are they?
+
+.LP
+Parametric equations are two equations that are linked by a common variable usually @ t #
+
+They are written in the format
+.EQ
+x = at
+.EN
+.EQ
+y = bt
+.EN
+The can also include trig functions, exponents and other parts of maths
+
+You may be asked to, convert to Cartesian, find the range and domain, differentiate and finding points of intersection
+
+.NH 1
+Converting to Cartesian
+.LP
+
+You will often be asked to convert to a Cartesian equivalent equation. To do that you will need to rearrange one of the given equations to get it in terms of @ t #, then substitute that value into the other equation. You will most often find that rearranging @ x # is easier as this will result in an equation equal to @ y #.
+
+.NH 2
+Example
+.EQ
+x = 2t
+.EN
+
+.EQ
+y = t sup 2
+.EN
+
+.EQ
+t = x over 2
+.EN
+
+.EQ
+y = ({x over 2}) sup 2
+.EN
+
+.EQ
+y = x sup 2 over 4
+.EN
+
+.NH 1
+Finding the domain and range
+.LP
+The domain of the Cartesian equation is the range of the @ x # and the range of the Cartesian is the range of the @ y # equation.
+
+.NH 2
+Examples
+.LP
+.EQ
+x = t - 2
+.EN
+
+.EQ
+y = t sup 2 + 1
+.EN
+
+.EQ
+"where" -4 <= t <= 4
+.EN
+
+.EQ
+t = x + 2
+.EN
+
+.EQ
+y = (x + 2) sup 2 + 1
+.EN
+
+.EQ
+y = x sup 2 + 4x + 4 + 1
+.EN
+
+.EQ
+y = x sup 2 + 4x + 5
+.EN
+
+.EQ
+f(x) = x sup 2 + 4x + 5
+.EN
+
+.EQ
+domain = -6 <= x <= 2
+.EN
+
+.EQ
+range = 1 <= f(x) <= 16
+.EN
+
+.NH 1
+Differentiating Parametric equations
+.LP
+This process is relatively simple, and can be solved by viewing @ dy over dx # as fractions. As we can already find @ dx over dt # and @ dy over dt # we can say the following.
+
+.EQ
+dy over dx = {dy over dt} over {dx over dt}
+.EN
+
+This is because the @ dt # will cancel out on the top and bottom.
+
+.NH 2
+Examples
+.LP
+
+.EQ
+x = 2t
+.EN
+
+.EQ
+y = t sup 2 - 3t + 2
+.EN
+
+.EQ
+dx over dt = 2
+.EN
+
+.EQ
+dy over dt = 2t - 3
+.EN
+
+.EQ
+{dy over dt} over {dx over dt} = 2 over {2t -3}
+.EN
+
+.NH 1
+Points of intersection
+.LP
+EX 8D Q1a
+.EQ
+x = 5 + t
+.EN
+.EQ
+y = 6 - t
+.EN
+.EQ
+y = 6 - (x - 5)
+.EN
+.EQ
+y = 11 - x
+.EN
+.EQ
+0 = 11 - x
+.EN
+.EQ
+-11 = - x
+.EN
+
+.EQ
+11 = x
+.EN
+
+.LP
+EX 8D Q12a
+.EQ
+x = 6cos(t)
+.EN
+.EQ
+y = 4sin(2t) + 2
+.EN
+.EQ
+-{pi over 2} < t < {pi over 2}
+.EN
+
+.EQ
+x over 6 = cos(t)
+.EN
+
+.EQ
+y = 4(2sin(t)cos(t))
+.EN
+
+.EQ
+y = 8sin(t)cos(t)
+.EN
+
+.EQ
+y over 8cos(t) = sin(t)
+.EN
+
+Using the identity @ sin sup 2 x + cos sup 2 x = 1 #
+
+.EQ
+1 = {y over 8cos(t)} sup 2 + {x over 6} sup 2
+.EN
+
+.EQ
+1 = {y sup 2 over {64cos sup 2 (t)}} + {x sup 2 over 36}
+.EN
+
+.EQ
+1 = {0 over {64cos sup 2 (t)}} + {x sup 2 over 36}
+.EN
+
+.EQ
+1 = {x sup 2 over 36}
+.EN
+
+.EQ
+36 = x sup 2
+.EN
+
+.EQ
+x = 6, -6
+.EN
+
+.LP
+EX 8D 12b
+.EQ
+x = 6cos(t)
+.EN
+.EQ
+y = 4sin(2t) + 2
+.EN
+.EQ
+-{pi over 2} < t < {pi over 2}
+.EN
+
+.EQ
+4 = 4sin(2t) + 2
+.EN
+
+.EQ
+2 = 4sin(2t)
+.EN
+
+.EQ
+1 over 2 = sin(2t)
+.EN
+
+.EQ
+2t = arcsin({1 over 2})
+.EN
+
+.EQ
+2t = pi over 6, {5 pi} over 6
+.EN
+
+.EQ
+t = pi over 12, {5 pi} over 12
+.EN
+
+.LP
+EX 8D 12c
+
+.EQ
+x = 6cos(t)
+.EN
+
+.EQ
+x = 3 sqrt 3, - 3 sqrt 3
+.EN
+
+.EQ
+(3 sqrt 3, 4), (- 3 sqrt 3, 4)
+.EN
+
+.LP
+EX 8D 13
+
+.EQ
+x = 2t
+.EN
+.EQ
+y = 4t sup 2 - 4t
+.EN
+
+.EQ
+t = x over 2
+.EN
+
+.EQ
+y = 4({x over 2}) sup 2 - 4 ({x over 2})
+.EN
+
+.EQ
+y = 4({x sup 2 over 4}) - 4 ({x over 2})
+.EN
+
+.EQ
+y = x sup 2 - 4 ({x over 2})
+.EN
+
+.EQ
+y = x sup 2 - 2x
+.EN
+
+.EQ
+2x - 5 = x sup 2 - 2x
+.EN
+
+.EQ
+0 = x sup 2 - 4x + 5
+.EN
+
+.EQ
+sqrt {-4 sup 2 - 4 (1) (5) }
+.EN
+
+.EQ
+sqrt {16 - 20 }
+.EN
+
+.EQ
+sqrt {-4}
+.EN
+
+.EQ
+sqrt {-4} " has no real solutions!"
+.EN