General methods for parametric solutions of quadratic and cubic equations explained using examples.
License: GPL3
Solving equations using geometry
Pythagoras' theorem states that
the sum of the squares of the sides of a right-angled triangle is the square of the hypotenuse More algebraically, if and denote the (lengths of the) sides of a right-angled triangle and denotes the (length of the) hypotenuse then we have the equation
Equally importantly, the converse is also true. If a triangle has sides of length , and that satisfy the above equation, then the corner of the triangle enclosed by and is a right-angle.
Practical Applications
One of the practical uses of this result is to make right-angles with a piece of rope. (Which can be used to mark out rectangular pieces of land.) Take a piece of circular rope of length 12 and mark off lengths of 3, 4 and 5 on it. If we stretch the rope by three people pulling at these three points, then the person who is at the corner of 3 and 4 is holding a right-angle. This works because
General Solution --- as "magic"!
One could ask how we can write down more such triples like . One can show that every triple is obtained from a triple of the form ; for example we get when we take . How does one come up with such a solution? It looks like magic to come up with it!
Algebra for the Solution
First of all, one can divide by (since, if , then and are 0 which is a "trivial" or pointless solution!) to get the equation which we recognise as a circle. Next, a circle has 1 dimension, so we look for a parametric solution in the form .
Now you may think (if you know too much!) that the natural solution in this form is , but those are complicated functions to define and calculate! A much easier solution is We check easily that by some simple algebra. Now, we put any fraction in place of to get the point on the circle. To get a solution of the original equation we "clear" denominators.
Geometry for the Solution
Of course, there is still some magic left.
How did one write the parametric solution ?
This is where geometry comes into play.
We have an "obvious" point on the circle given by . Take a line through it with slope , which is given by the equation . Now look at the points of intersection of this line with the circle. We already have one such point, which is . What are the co-ordinates of the other point?
We didn't need to use the computer to solve this! In any case, we see that the solution is the same as the one we got earlier except that has been replaced by .
Generalise
There is nothing special about the circle!
We can use this method to solve a quadratic equation in any number of variables, given one solution.
For example, consider which has the "obvious" solution .
A line through the point takes the form . Substituting this in the above equation gives a quadratic equation for :
In other words, the general parametric solution is given by This method allows us to find many solutions of quadratic equations once we have one solution.
All of it can be seen as a generalisation of the case of 1 variable!
Given a solution of the equation , the other solution is given by .
Higher degree equations
Euler proved that the equation has no solutions other than the obvious ones with one of the variables being replaced by 0. However, it is interesting to note that as we increase the number of variables, it is possible to write down non-trivial solutions.
For example, we consider the equation As usual we can put to get and look for solutions in fractions. There are a number of obvious solutions obtained by setting one of the variables to be 1 and the other two variables to be equal. How does one find non-trivial solutions such as solutions which give three positive fractions the sum of whose cubes is 1? Here is an apparently "magical" solution
Note that this is not just a large multiple of a solution!
How does one get solutions like this one? We outline a method below.
First of all we note that the line is contained in the solutions. (We work with the homogeneous system since Sage finds that easier.) We make a change of co-ordinates to to make this transparent.
We note that this contains the line .
We now calculate the tangent plane at the point on this line.
We now find the residual curve on this plane . (Note that is the equation of the line so we divide that out below.)
and note that the point lies on this curve.
We then find the other point of intersection of this curve with the line .
Take the numerator as and the denominator as .
Now substitute back to get .
Check that these satisfy the equation of the curve.
Now substitute back to get .
Check that the given satisfy the equation.
Substitute back to get and . Then is a parametric solution to the original equation.
Check that these satisfy the equation.
Now, we need to use these to find an actual solution with positive values for , , .
The naive method is to take a random integer upto some bound and choose values of and which are random fractions with this as denominator. If we find the required values we stop. Taking the bound to be 10 seems to work. (One could also use a for
loop but perhaps this random approach is faster!) We do the checks using floating point numbers for speed and use fractions at the end. This could case errors and yield negative solutions, but is unlikely to do so.
Clear denominators to get a solution of the original equation.
Check it!