Equations

This page contains information about plenty of math equations, both supported and not supported by the graphing calculator


Usage Guidelines

Certain features may not work completely. Please visit the GitHub repository and create an issue so we can fix it.
Graphing calculator is still being built, so not all features of a typical graphing calculator exist.


Supported Equations

1. Algebraic Equations & Functions

Graphy supports standard algebraic equations in the graphing calculator.
This is achieved through the Marching Squares algorithm, but at a very basic level.
Examples (of supported equations):

x2 + 4⁢y = 0 y = 10 ⁢ x + 15 y = x 2 + 3

2. Straight straight lines

Graphy supports very straight straight lines. hehe.
Examples:

x = 3 y = 10

3. Trignometric Identities

The following trignometric identities are supported:

sin(x) cos(x) tan(x) = sin(x) cos(x) csc(x) = 1 sin(x) sec(x) = 1 cos(x) cot(x) = 1 tan(x)

The support of these identies is established through the Math.JS library, delivered to the HTML file via a CDN.

4. Circle Equations

Circle equations are very interesting, and these equations CAN be plotted onto Graphy!

x2 + y2 = radius2

Above is the format for circle equations
Examples:

x 2 + ( y + 5 ) 2 = 5


Interesting concepts

This section includes both unsupported equations and equations that are interesting.
This is one place to see all equations you may ever need. It might or might not be used in Graphy.


1. Summation

Summation is a concept usually taught in higher grades of schools but this is a very basic example. It will likely be added once we finish with more common needs.
But basically is the addition of a sequence of numbers, functions, vectors, or other mathematical objects to find their total sum.

∑ i = 1 n x i

The Sigma Symbol (yes Sigma) - ∑; - tells you to add them all together.
The part i=1 tells us to start from the first element
The n tells us to stop at the last item, where n is the total count of items.
Finally, the xi represents the placeholder for each individual value in the list.

Here is an example of the answer from the Summation equation above, assuming n = 4

We have the following items in a list:

x 1 = 8 x 2 = 10 x 3 = 7 x 4 = 9

Expanding our summation ∑i=1nxi we get:

x 1 + x 2 + x 3 + x 4 = 8 + 10 + 7 + 9 = 34

2. Combinatorics

Combinatorics is a part of math focused on the study, counting, arrangement, and selection of elements within systems (number systems).


2.1 Factorial

Factorials are the simplest and easiest part of combinatorics. After factorial it only goes down haha.
A factorial is the product of all positive integers less than or equal to a given number n, written as n!

It is used for calculating how many ways distinct objects can be ordered or arranged.

Examples:

n ! = n × ( n − 1 ) × ( n − 2 ) × ( n − 3 ) × ... × 3 × 2 × 1

Now there are some special cases like: both 0! and 1! = 1. And thats all for factorials! (for now)


2.2 Permutations

A permutation is an arrangement of items in a specific order. There are always rules to permutations.
If you have n distinct items, the number of ways to arrange them is n!

But this isn't the permutations you will be using the most in high school. It is partial permutations that is more common.
In partial permutations you pick k items out of n.

Heres the formula for Partial permutation: n!(n−k)!

Take a look at the example:

You are hosting a race with 5 runners (Alice, Bob, Charlie, David and Emma). You want to know how many different ways the Gold, Silver and Bronze medals can be awarded.

P k n = P 3 5 = 5! ( 5 − 3 ) ! = 5 × 4 × 3 × 2 × 1 2 × 1 = 120 2 = 60 ways

This calculation shows us that there are 60 ways to choose the first 3 places!!


2.3 Combinations

The man, the myth, the legend has arrived. We are FINALLY doing exactly what the name of this concept says - combinations!

A combination is a selection of items from a larger set where the order of selection does not matter.

If you pick items A, B,and C it is the same combination as picking C, A, B. This is what differentiates it from a permutation, where order does matter.

Here is the formula for Combination: C ( n , k ) = n ! k ! ( n − k ) !

Take a look at the example:

Imagine you have 5 fruits (Apple, Banana, Cherry, Date, Elderberry) and you want to choose 3 of them for a fruit salad.

Does order matter in a fruit salad? No. Apple-Banana-Cherry is the same salad as Cherry-Apple-Banana

Lets use the formula

C ( 5, 3 ) = 5 ! 3 ! ( 5 − 3 ) ! = 5 × 4 × 3 × 2 × 1 3 × 2 × 1 × 2 × 1 = 5 × 4 2 × 1 = 10 ways

With combination we found that there is only 10 UNIQUE ways to organise the given items into a salad! This number would have been much much higher if it was permutation, as ABC and CBA are different to permutation.


2.4 Binomial Theorem

The Binomial Theorem is a concept in algebra along with combinatrics that provides a formula to expand a formula to expand any binomial express raised to a non-negative integer power, into a sum of individual terms

( a + b ) 2 = ( n 0 ) a n b 0 + ( n 1 ) a n − 1 b 1 + ( n 2 ) a n − 2 b 2 + ... + ( n n ) a 0 b n

This is the formula for the binomial theorem, at least the expanded one. Here's the summation formula

( a + b ) = ∑ k = 0 n ( n k ) a n − k b k

Let's take a look at a example:

( x + 2 ) = ( 3 0 ) x 3 2 0 + ( 3 1 ) x 2 2 1 + ( 3 2 ) x 1 2 2 + ( 3 3 ) x 0 2 3

Collect the efficients (all the numbers on top of each other) and simplify, i.e.: ( 3 0 ) = 1 , ( 3 1 ) = 3 , ( 3 2 ) = 3 , ( 3 3 ) = 1 .

And now simplify the terms with the coefficients:

( x + 2 ) 3 = ( 1 ⋅ x 3 ⋅ 1 ) + ( 3 ⋅ x 2 ⋅ 2 ) + ( 3 ⋅ x ⋅ 4 ) + ( 1 ⋅ 1 ⋅ 8 )

Simplify that big expression!

( x + 2 ) 3 = x 3 + 6 x 2 + 12 x + 8

Tada! We got the expanded and simplified answer of this equation!

Now I know this is a rather easy expression and we actually don't need the binomial theorem, but for the sake of this example (and my fingers) we used a small value.

Binomial Theorem can be used to expand for example an expression to the power of 5 without breaking your brain!

And alas, you finally have a good understanding of the basics of Combinatorics!


3. Sequences

Sequences and series are a concept of maths useful when theres repeating patterns or numbers and you are asked to find the relationship between them or to find the value of the Nth Term.

A sequence is a set of numbers or terms arranged in a specific logical order.

There are two types of series - finite and infinite

Take a look at the examples of sequences:

Finite:

2, 4, 6, 8, 10

Infinite:

2, 4, 6, 8, 10, ...

Notice there isn't a big difference in how they both are presented other than the ellipses(...) at the end of the infinite sequence.

Let us take a look at the different types of sequences

3.1 Arithmetic Sequences

Each term in an arithmetic sequence increases or decreases by a constant term.

This term is called the common differnence

Example:

3, 7, 11, 15, ...

Here you can see we add 4 to go from one term to the next each time.

The formula for getting the value of any term in an arithmetic sequence is:

a n = a 1 ( n − 1 ) d

Well you see all these letters, what do they mean?

an = the nth term you want to find

a1 = the value of the first term

n = the position of the term (e.g. n = 10 for the 10th term)

d = the common difference

Lets try using this in an example?

Find the 20th term of: 3, 7, 11, 15, ...

a 20 = 3 + ( 20 − 1 ) 4 = 3 + ( 19 × 4 ) = 79

Now the sum formulas, to find the sum of X number of terms

You can use these formulas to add up the first N terms of an arithmetic sequence quickly.

Option A: When you know the first and last terms

S n = n 2 ( a 1 + a n )

Or Option B: When you don't know the last term

S n = n 2 [ 2 a 1 + ( n &minus 1 ) d ]

Heres the breakdown of the stuff inside these 2 formulas:

Sn = the sum of the first n terms

an = the last term in the series

And now you know the Sum formulas and the Nth Term Formulas

Lets use the formula inside an example:

Find the sum of the first 10 terms of 3, 7, 11, 15

S 10 = 10 2 [ 2 ( 3 ) + ( 10 − 1 ) 4 ] = 5 [ 6 + 36 ] = 5 × 42 = 210

Now lets move on to geometric sequences

3.2 Geometric Sequences

In a geometric sequence each term is either multiplied or divided by a constant non-zero number

Example: 2, 6, 18, 54; where we are multiplying by 3 each time

The constant non-zero-number is often referred to as the common ratio

a n = a 1 ⋅ r n − 1

Wow more letters... what do they even mean?

an = the nth term you want to find

a1 = the very first term in the sequence

n = the position of the term

r = the common ratio (the number multiplied between terms)

Lets try out an example

a 6 = 2 ⋅ 3 ( 6 − 1 ) = 2 ⋅ 3 5 = 2 ⋅ 242 = 486

Ta-da! Its that simple!

Now for the sum formula for geometric

S n = a 1 ( 1 − r n ) 1 − r

There is just 1 condition for this formula. r ≠ 1 (r can never be 1, as that would just be the same number repeating again and again).

Lets try using the sum formula in an example:

Find the sum of the first 5 terms of 2, 6, 18, 54, ...

r = 6 2 = 3
S 5 = 2 ( 1 − 3 5 ) 1 − 3 = 2 ( 1 − 243 ) -2 = 2 ( 242 ) -2 = 242

And now you know how to find the sum of geometric sequence!

And thats all for sequences!


4. Trigonometry

Trigonometry is built on the relationships betwen the angles and sides of a triangle. For a right-angled triangle with reference angle θ:

Hypotenuse(H): The longest side, opposite the 90° angle

Opposite(O): The side directly across from angle θ

Adjacent(A): The side next to angle θ (that isn't the hypotenuse).

Take a look at the core ratios:

sin ( x ) = Opposite Hypotenuse cos ( x ) = Adjacent Hypotenuse tan ( x ) = Opposite Adjacent

Trig Ratios aren't limited to these, as these are functions, there are mathematical inverses of the core ratios.

csc ( x ) = 1 sin ( x ) = Hypotenuse Opposite sec ( x ) = 1 cos ( x ) = Hypotenuse Adjacent cot ( x ) = 1 tan ( x ) = Adjacent Opposite

These ratios are very useful when it comes to finding length of missing sides when given an angle and 2 sides or 1 side, or when there are complex trignometric expressions and you need to simplify them.

Lets take a look into the formulas/identities used to simplify complex trignometric expressions.

sin 2 ( θ ) + cos 2 ( θ ) = 1 1 + tan 2 ( θ ) = sec 2 ( θ ) 1 + cot 2 ( θ ) = csc 2 ( θ )

And there that is the identities to simplify complex angles.

Now for special angle cheatsheet. Use this to solve trig equations when you don't have a calculator.

Angle sin cos tan 0° 0 1 0 30° 1 2 3 2 1 3 45° 1 2 1 2 1 60° 3 2 1 2 3 90° 1 0 Undefined

If you are a school student, its advised to know these values so its easier for your exams.

Going through examples for this concept is rather complicated for HTML, so I'd suggest you lookup some examples. All information here is mathematically correct.


5. Differentiation

Differentiation is the process of finding the derivative, which represents the instantaneous rate of change (gradient of a curve at one point) or the slope of tangent at any point of curve.

If the function to be differentiated is y = f(x) derivate is written as dy/dx or f'(x)

There are some fundamental rules you should know.

Power Rule:

Bring the power to the front and multiply, then subtract 1 from the power.

d dx ( x n ) = n x n − 1

Constant rule

The derivate of any flat, constant number is always zero.

d dx ( c ) = 0

Constant Multiple Rule:

Pull out constants before differentiatiing

d dx [ c ⋅ f ( x ) ] = c ⋅ f ' ( x )

Differentiation of Special Functions

Function f(x) Derivative f'(x) sin ( x ) cos ( x ) tan ( x ) sec 2 ( x ) e x e x e a x a e a x ln ( x ) 1 x a ln ( x ) a x

Now you know 3 important rules and some special function differentiation.

There is just a few more rules you ought to know: The Quotient Rule:

d dx ( u x ) = v du dx − u dv dx v 2

I know it looks weird, with so many fractions inside a fraction.

Heres another way to remember it.

d dx ( u v ) = u ' v − u v ' v 2

The tiny line next to u and v in the numerator can be pronounced dash, so the way to memorize this can be:

u dash v minus u v dash over v squared

You need not use the pronounciation to remember the quotient rule, its just an example!

The quotient rule can be used when there are 2 algebraic expressions as a fraction and you need to differentiate them to get your answer.



Now for the product rule, quite similar to quotient rule actually.

d dx ( u v ) = u dv dx + v du dx

Another way to say this is:

d dx ( u v ) = u ' v + u v '

And heres a pronounced way to remember this:

u dash v + u v dash

These are 2 very important rules to help you use differentiation to find gradients and normals when you are given a curve

But what are tangents and normals?

5.1 Tangents and Normals

A tangent line touches a curve at a single point without crossing it, representing the exact slope of the curve at that moment.

A normal line is a perpendicular line that crosses the curve at that same exact point, meeting the tangent at a 90° angle.

5.1.1 Tangents

The tangent gives you the instantaneous direction & speed of curve at one specific point

To find the gradient of the tangent at that point, take the first derivative (differentiate once) of the function.

Then plug in the value of x at that point into the derivative. You now have the gradient of tangent at the point.

Use the point-slope formula to write the final line equation:

y − y 1 = m ( x − x 1 )

5.1.2 The Normal

Perpendicular lines have gradients that multiply to -1, so to get the gradient of the normal from the tangent's gradient, use the tangent gradient's NEGATIVE RECIPROCAL

m n = − 1 m t

Then use the same point-slope formula.

y − y 1 = m n ( x − x 1 )

Since we've covered tangents and normals lets try this question:

Find the equations of the tangent and normal to the curve y = x2 at the point (2, 4)

Find Derivative: dy dx = 2 x
Find the tangent slope (mt) at x = 2 m t = 2 ( 2 ) = 4
Find the normal slope (mn) m n = − 1 4
Write the tangent equation: y − 4 = − 1 4 ( x − 2 ) ⇒ y = 4 x − 4
Write the Normal Equation y − 4 = − 1 4 ( x − 2 ) ⇒ y = − 1 4 x + 9 2

And tada, we've used differentiation to find both equations of tangent and normal for this question!


6. Integration

Now that we have learnt differentiation, now's the time to learn integration!

Integration is basically the reverse of differentiation.

If you think graphically, integration calculates area under a curve between two points.

Now as always lets take a look at the fundamental rules of differentiation.

Power rule

Add 1 to the power then divide by the new power, but this only works for all powers except n = -1

∫ x n d x = x n + 1 n + 1 + C

Constant Rule

Integrating a flat number adds the variable to it.

∫ k d x = k x + C

Constant Multiple Rule:

Take out the constant and then integrate.

∫ k ⋅ f ( x ) d x = k ∫ f ( x ) d x

Ta-da! You have the basic understanding of integration!


7. Logarithms

A logarithm is the inverse operation of an exponent.

Basically it answers the question "To what power must I raise a base to get this number?"

log b ( x ) = y

You see the letter b? That is the base! Basically thats the number you would raise to y to get x!

∴ A log can have any positive base, but there are 2 specific bases that dominate mathematics and calculus.

The following is a common logarithm, or a log with base 10. If no base is written for a log in a question, it is assumbed to be of base 10.

log ( x ) = log 10 ( x )

Then there is a natural logarithm, with uses a base of Euler's number or e (≈ 2.718). It is written as ln

ln ( x ) = log e ( x )

Theres some core log laws you ought to know.
These operations laws allows you to expand comples expressions into a single term or vice versa.

Product Rule:

Logs turn multiplication into additions

log b ( x y ) = log b ( x ) + log b ( y )

Quotient Rule

log b ( x y ) = log b ( x ) − log a ( x )

Ta-da! You've learnt the 3 core log laws.

Essential Identity Rules time!

Identity Rule Natural Log Equivalent Why it works? log b ( 1 ) = 0 ln ( 1 ) Any base raised to the power of 0 is 1. log b ( b ) = 1 ln ( e ) = 1 Any base raised to the power of 1 is itself. log b ( b x ) = x ln ( e x ) = x The log and the exponent cancel each other out. b log b ( x ) = x e ln ( x ) = x The exponent base and log base cancel each other out.

Change of Base Formula

log b ( x ) = log c ( x ) log c ( b )

8. Statistics

Statistics is the sciene of collecting, organizing, analyzing, interpreting, and presenting data.

Here are some formulas for statistics:

Mean = Sum of all Numbers Number of Numbers
Median : If you have an ODD amount of numbers ⇒ Pick the exact middle number
Median : If you have an EVEN amount of numbers ⇒ Add two middle numbers together 2
Mode : The number that appears the most times
Range = Largest Number − Smallest Number

Lower Quartile (Q1)

This is the 25% percentile mark. It cuts off the bottom 25% of data

Positon of Q 1 = Total Count of Numbers + 1 4

Upper Quartile (Q3)

This is the 75th percentile mark. It cuts off the top of 25% of data.

Position of Q 3 = 3 × ( Total Count of Numbers + 1 ) 4

Interquartile Range

Once you have both quartiles, you can find the IQR, which tells you how spread out the middle 50% of your data is:

IQR = Q 3 Q 1

Now lets take a look at the example:

Imagine a cafe tracks the number of coffees ordered by 7 customers in a week. Calculate the mean, median and IQR

Data Set: 14, 5, 2, 8, 14, 11, 9

Step 1: Arrange the data

You must always do this before working with statistics

Sorted: 2, 5, 8, 9, 11, 14, 14

Step 2: Calculate the mean

2 + 5 + 8 + 9 + 11 + 14 + 14 7 = 63 7 = 9

The Mean is 9!

Now for the median!

Since there are 7 numbers, the middle value is the 4th position

From 2,5,8,9,11,14,14 the median is 9

And finally the IQR

Position of Q 1 = 8 4 = 2;

So we know the Q1 value is at the 2nd position, which in our list is 5

Postion of Q 3 = 3 × ( 8 ) 4 = 24 4 = 6

This means the 6th number in the sortesd list is the Q3 which is 14

Now we can calculate IQR

IQR = 14 − 5 = 9

This means our IQR is 9!! Tada!