Background
I'm a ninth grader from India. I was too bored to solve equations and check them all by myself. So I wrote this program
Knowledge of the quadratic formula (including imaginary
... [More]
roots) and synthetic division will help a lot.
Using the code
The method for solving linear equations in one variable is quite simple.
ax+b = 0 is the format for one variable equations. The variables a and b are determined and x is computed by -b/a
The method I have implemented for solving linear equations in two variables is a formula which can be derived by operating on both sets of the equation. The Formula for the equations is
Collapse
ax + by + c = 0
Collapse
dx + ey + f = 0
Collapse
x = (fb-ce)/(ae-db)
Collapse
y = (cd -fa)/(ae-db)
To solve quadratic equations, we use the quadratic formula :
Collapse
Root 1 = (-b + Sqrt(b2 - 4ac))/2a Root 2 = (-b - Sqrt(b2 - 4ac))/2a
b2-4ac is called the "Discriminant" which is generally denoted by D
If D >= 0, we will get Real roots.
Things get complicated when we get imaginary roots.
If D [Less]