We all know the definition of the factorial ! as but there are even more definitions of factorials that mathematicians have invented.
Double Factorial
The double factorial looks like this . It can be used to easily denote the product of the odd or even numbers less than or equal to n
Subfactorial
The subfactorial has a really intuitive practical application. Imagine you have n tokens in defined positions in an array. You take all the tokens out and want to place every token back into the array so that none of the tokens end up in the position they were just in. This is called derangement.
For instance, , You can arrange this set in the following ways: .
Only two of these sets satisfies the above criteria, and
Therefore we say
Primorial
The Primorial is denoted and is the product of primes less than and equal to n.
Primorials are used in the search for large prime numbers. Each primorial has more distinct prime factors than any number smaller than it.
Superfactorial (Sloane)
The more common definition of the Superfactorial. It is defined as such:
For example:
You can look at it another way by expanding the factorials:
And so:
Superfactorial (Pickover)
Another definition of the Superfactorial uses tetration.
It grows insanely fast.
Exponential Factorial
Annoyingly also denoted
the exponential factorial is like a normal factorial but exponentiated instead of multiplied:
Hyperfactorial
Finally the hyperfactorial is defined like this:
Or:
And hence is very similar to the Sloane definition of the superfactorial:
A differential equation is an equation which contains the derivative of one or more of the variables.
They are incredibly useful because they allow models to describe the rate of change of values rather than the size of the values.
First order Differential Equations
Some first order differential equations can simply be solved by separating variables and integrating. This is a normal maths technique so I will be skipping over it.
Linear first order differential equations are in the form:
To solve these, you can observe how an application of the product rule would have produced the expression on the left side.
For instance, take the linear first order differential equation:
Observe that by applying the product rule to the expression
Gives the same expression as on the left of the above equation, taking into account the need for implicit differentiation.
After spotting this, integrating both sides with respect to x will yield a solution, but don’t forget a + c on one of the sides!
DONE! Don’t forget to apply the division of x to the c as well.
Integration Factor
Sometimes the equation will not immediately be susceptible to the reversed product rule attack, but we can change the equation to force it to.
First, a particular expression must be found called the Integrating Factor (IF). This can be found using the formula:
Multiply the entire equation by this expression and the trick described earlier will always work.
Second Order Differential Equations
Second order differential equations are differential equations which contain a second derivative.
Homogeneous
Here is how to solve differential equations in the form:
This is called a homogeneous equation because it is equal to zero.
The first step in solving these equations is to form the Auxiliary Equation(A.E).
There are three scenarios to follow depending on the solutions to this quadratic:
Scenario 1: Distinct Real Solutions
In the case where the quadratic has two distinct real solutions, use the equation:
Scenario 2: Repeated Real Solution
Scenario 3: Imaginary Solutions
Where the roots are the form of:
These expressions are called the Complementary Function (C.F.).
Select the correct equation and sub in the roots and you have the General Solution (G.S).
Non-homogeneous
You need to add an extra step if the differential equation is not equal to 0, rather a function of x.
The first step is to get the Complementary Function like usual.
You then have to find the Particular Integral (P.I.) which satisfies the differential equation. First, observe the form of the function of x on the right side of the equation. Depending on it’s form, select on of the following forms of expression.
Form of f(x)
Form of P.I.
k
λ
ax+b
λx + μ
ax2 + bx + c
λx2 + μx + ν
mcos(ωx)
λsin(ωx) + μcos(ωx)
msin(ωx)
λsin(ωx) + μcos(ωx)
msin(ωx) + ncos(ωx)
λsin(ωx) + μcos(ωx)
Once one of these equations has been found, set it equal to y and find the first and second derivative.
Then sub these three expression into the formula. Compare coefficients to find the values of the unknowns.
You have now found the Particular Integral! Simply add this to the Complimentary Function to find the complete general solution!
The inverse of a function can be found by swapping x and ys in an equation (and then rearrange back to terms of x). This has the effect of reflecting the original function in the line y = x, as you are essentially just swapping the x and y axis.
Some mates and I sat down a few weeks ago and tried to ask the question: how do we reflect in a different line, not y = x. We set out to construct a robust description of reflection, so we could get the equation of any a reflection of any function, in any other function!
We decided that we would need to find an equation to get the gradient of a line based on two other lines: one the reflectant (which can be imagined as the incident ray) and the reflector (the mirror or boundary). I set out to find this formula and here is what I found:
Variation 1
This is the second version of the formula for the gradient of reflection (the first being a method similar to this but with an unnecessary step, making it less simplified).
The aim is to have two equations:
Reflectant: y=m1x
Reflector: y=m2x
And we want to find the gradient of the line which is formed when the reflectant is reflected in the reflector. We know from physics that the angle of incidence (the angle the reflectant makes with the normal at the point of collision with the reflector) is equal to the angle of reflection:
Angle of Incidence = Angle of Reflection
Now we’ve got that essential aspect out of the way, let me explain how I derived the formula:
First know that we can represent a line as a complex number, 1 + im, where m is the gradient of the line we want to convert to this complex representation. So for example the line y=x can be represented as the complex number 1 + i, and the line y = -3x can be represented like 1-3i.
This works when there is 1 on the real axis, as then the y value is equal to the gradient.
Now, consider this example:
The reflector line is x = 0 (lets ignore that this is not possible in the form I said the lines would be in earlier), and the reflectant is y = -x.
Imagining the reflector line as the complex number (1-i), to get the reflected line we must get it’s complex conjugate, and then convert it back into the equation of a line. So (1-i) goes to (1+i), which is the complex number which represent the line y = x, giving us our reflected line.
Okay, so lets add getting the complex conjugate to our list of things we need to do.
Second consider the setup: Reflector: y = x, Reflectant: x=0.
From now on, the mirror line will be coloured black and the light ray will be coloured yellow.
Imagining again the reflectant line as the complex number (0-i) and the reflector (1+i), lets call (0-i) z1 and (1+i) z2. When you multiply together two complex numbers, you can imagine it as two properties of the complex numbers interacting:
The Argument of a complex number is the angle the line between the point and origin makes with the positive part of the real axis.
The Modulus of a complex number can be described as the distance from the number to the origin.
When you multiply two complex numbers, the resulting complex number will have a modulus that is the product of the two original numbers, and a argument that is the sum of the two original numbers.
A way of looking at complex multiplication
Going back to our original scenario, observe that the modulus of z2 is π/4 (45⁰) and the modulus of z1 is -π/2 (-90⁰). The line we want to get is going to be y = 0, represented by the number 1 + 0i. So to get this, we need to multiply z1 by z2TWO TIMES, to get a number with an argument of 0 (-90 + 2 * 45 = 0).
Okay, so lets add multiplying by z2 two times as another one of the things we need to do.
This gives us the formula:
M1 and M2 are defined above.
Okay, lets expand this:
We now have this complex number, but its not useful to us yet, as the real part is not equal to 1.
So if we multiply the complex number by 1 / Re (z) we will scale the entire thing so the real part is 1 and the imaginary part is whatever it lines up with. Also at this point we can do a special trick, removing the i. Treat the imaginary part as the “y” and the real part as the “x”. This way the equation can be generalised to the Cartesian plane.
This gives us the final form of the equation:
The first version of the gradient of reflection formula
Variation 2
There is more that can be done – a slightly different approach…
A complex number can be written in the form
Where r is the modulus of the complex number and θ is the argument of the complex number.
So if we convert our formula at the earliest step, we get this:
We can simplify this by changing the arg functions to arctan(m1 or m2) (as the real part of z1 and z2 are just 1 and the imaginary part is simply the gradient of the lines those numbers represent). We can also use indices laws to first put the power of two into the second e’s exponent, and then add the exponents of both e factors, as they have the same base. We now get this:
It has been slightly rearranged so the negative term comes second
To go further, we must figure out how to get this formula to work on the cartesian plane, and thus must convert the formula into a complex number in the form a + bi.
To do this, we can use the mod-arg form of a complex number, so:
First, factor out i:
And see that now:
So now sub theta into the mod-arg form of the complex number:
And now we can just do what we did in the prior variation of this formula. Imagine we are scaling up the real part to 1, dragging the imaginary part along so it is the gradient of the new line. Do this by multiplying the imaginary part by 1 over the real part (dividing by real). Lets drop the i now as well:
Now you will see that this can be simplified by the trig identity tan = sin over cos, and we get the final formula!
A vector is a quantity with both direction and magnitude
Oh yeah!!!
2d vector
3d vector
Vectors can also be denoted (xi + yj + zk) and the vector variable can be called
The way you use a vector depends on if you are treating that vector as a position vector or a direction vector.
A vector is a position vector if the vector is describing a point relative to the origin. For instance, the vector 2i +3j on it’s own only contains information about a movement of +2 in the x dimension and +3 in the y dimension. If you go onto say this is a position vector, this number now represents an absolute position on the plane, 2 on the x and 3 on the y (and is essentially a coordinate). If it is not specified that a vector is a position vector, it is not right to link it to the corresponding coordinate on a plane.
A position vector can be denoted where O represents the origin and A is a vector.
Essential vector properties / operations
Magnitude of vector
One of the most important things to know about a vector is it’s length. Use Pythagoras.
3D Pythag!
Find unit vector
Equation for unit vector
The unit vector essentially tells you the fundamental information about spatial direction. 2D spatial directions are numerically equivalent to points on the unit circle and spatial directions in 3D are equivalent to a point on the unit sphere.
Parallel vectors
Vectors are parallel if they are scalar multiples of each other.
Parallel vectors
Vector between two vectors
To get the difference in position between two vectors, do the following:
Go back down the A and along the B!
Visual representation of B->A
Scalar Product
The scalar/dot product of two vectors is the sum of the products of their corresponding components.
How to calculate dot product
If the dot product of two vectors equal 0, the two vectors are at 90º to each other.
The Line
Line properties
In 2D, lines are parallel or intersect. To check if lines intersect, check if they are not parallel. To check if lines are parallel, look at the direction vector for both lines, if they are linear multiples of one another, they are parallel.
In 3D, lines can be parallel, they can intersect, and can also be skew. Skew lines are when the lines do not intersect and they are not parallel. To check if lines are parallel, see if the direction vectors are linear multiples of each other. To check if lines intersect, set the lines equal to each other, and rearrange to get two equations with two unknowns. Then plug the values of λ and μ into the z row of the original equation, if this equation is true, the lines intersect. If this z equation is false (ie the LHS and RHS are different), the lines are skew.
Vector equation of a line
The straight line r in vector line notation: λ is a variable marking that the b vector is variable in magnitude, and therefore sets the direction of the line.
a is a position vector whose purpose it is to move the line away from the origin.
Straight line r
The vector OD sets the direction and point A sets the position
Cartesian equation of a line
A line in vector equation form as such:
Essentially 3 different equations
Can be rewritten as:
This uses the aspect of the vector equation of the line secretly being 3 separate equations, and rearranges them to make λ the subject.
Angle between two lines / vectors
To get the angle between two lines, use the following formula.
Make sure to only use the direction vectors in the lines, as they are what define the direction of the line, and therefore the angle between the lines.
Angle between two vectors a and b
If the is negative, the result will be the obtuse angle between the two vectors. So if you want the acute angle, do 180 – θ.
Negative dot product means you are getting the blue angle
The Plane
Vector equation of a plane
The vector equation of a plane looks similar to the vector equation of a line, but has another variable and another direction vector.
Plane Π is made of one position vector and two direction vectors
b and c must not be parallel.
This creates a infinite plane of values, achieved by varying lambda and mu.
Cartesian equation of a plane
The cartesian equation of a plane harnesses the normal vector – the vector that is perpendicular to the plane.
Cartesian equation of the plane
Where
Is the normal vector to the plane.
The scalar product equation of a plane
The scalar product equation of a plane is just like the cartesian equation, but folded up a bit.
The vector with the ns is the normal vector to the plane.
Angle between line and plane
Use the direction vector of the line and the normal vector of the plane, but note that some extra stuff has to happen once you’ve got the angle:
If you have the yellow angle, do 90 – the angle to get the acute angle between the line and the plane (purple).
If you have the blue angle, do the angle – 90 to get the acute angle between the line and the plane.
Intersect line and plane
This is the super easy one. Simply get the x, y and z formulae from the line equation, and plug those expressions into the Cartesian equation of the plane to get a value of λ.
Then plug this value into the line equation to get the position vector of the point of intersection.