Algebra/Solving equations

From Wikibooks, open books for an open world
Jump to: navigation, search
Algebra

Quadratic equations[edit]

Up to now you have only dealt with equations and expressions involving just x; in this section we'll move onto solving things which have x^2 in them.

All quadratic equations can be arranged in the form ax^2+bx+c=0\ (a \ne 0), and a,b,c are all constants. Now let's look at some examples:

Examples: Rearrange the following equations in the form ax^2+bx+c=0 \qquad:



(1)\qquad x(x-3)=3-5x; \qquad


Solution for (1):

 x^2 - 3x = 3 - 5x \qquad
 x^2 + 2x = 3      \qquad
 x^2 + 2x - 3 =0   \qquad


Note that in the first step you distributed the x on the left side of the equation. The second step was obtained by adding a 5x to both sides of the equation and subsequently subtracting a 3 from both sides of the equation.



(2)\qquad 2x+1=(x^2+2)\sqrt{3}


Solution for (2):


\begin{matrix}
2x+1&=&x^2\sqrt{3}+2\sqrt{3}\\
-x^2\sqrt{3}+2x+1-2\sqrt{3}&=&0\\
x^2\sqrt{3}-2x-1+2\sqrt{3}&=&0
\end{matrix}
Note that in the last step, both sides are multiplied by -1, to make the term -x^2\sqrt{3} positive, so that the solving of the equation would be easier.

Factorization[edit]

Factorization is the most common way to solve quadratic equations. Let us consider again the first example above: 
x(x-3)=3-5x
We have already simplified the equation into


x^2+2x-3=0

Now, we want to factorize the equation - that is to say, get it into a form such as:


(x+''\text{something}'')(x+''\text{something else}'')=0

Look at the number term c. In this example, it is -3. Now, if we are lucky, the numbers "something" and "something else" will turn out to be nice whole numbers, so let's think of two numbers that will multiply together to give -3. Either 3 and -1, or -3 and 1. But we also need to get the x term correct (here, b=2). In fact, we need our two factors of c to add together to make b. And (3)+(-1)=2. So, we have found our 'somethings': they are 3 and -1. Let's fill them in.


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

Just to check, we can multiply out the brackets to check we have what we started with:


\begin{matrix}
(x+3)(x-1)=0\\
x^2 +3x -1x -3=0\\
x^2 +2x -3=0
\end{matrix}

Now, we know that in an equation the left side is always equal to the right side. And in this case the right side of the equation is 0, so from that we can conclude the term (x+3)(x-1) must equal to zero as well. And that means that either (x+3) or (x-1) must equal zero. (Not convinced? Remember (x+3) and (x-1) are just numbers. Can you find two non-zero numbers which multiply to make zero?)

Let's write that algebraically:


\begin{matrix}
x^2 +2x -3=0\\
x+3=0 \qquad \mbox{or} \qquad x-1=0\\
x=-3 \qquad \mbox{or} \qquad x=1
\end{matrix}

Thus, there are two different solutions to the same equation! This is the case for all quadratic equations. We say that this quadratic equation has two distinct and real roots.

With practice, you will often be able to write down the equation in factorised form almost immediately. Here is another example, in this case the x easily factorises out:


\begin{matrix}
2x^2&=9x\\
2x^2-9x&=0\\
x(2x-9)&=0\\
x=0&\qquad \mbox{or} \qquad x=\frac{9}{2}
\end{matrix}

Completing the square[edit]

Sometimes the roots (solutions) of a quadratic equation cannot be easily obtained by factorisation. In such cases, we have to solve the equation by completing the square, or using the quadratic formula (see below).

In order to complete the square, we need to rewrite the given equation in the form (x+a)^2=b. Now here is an example:


\begin{matrix}
x^2+8x+9&=&0\\
x^2+8x&=&-9\\
x^2+8x+4^2&=&4^2-9\\
(x+4)^2&=&7\\
&x+4=\sqrt{7}& \quad \mbox{or} \quad x+4=-\sqrt{7}\\
&x=-4+\sqrt{7}& \quad \mbox{or} \quad x=-4-\sqrt{7}\\
&x=-1.35& \quad \mbox{or} \quad x=-6.65
\end{matrix}

In general, we get


x^2+kx+\left({k \over 2}\right)^2=\left(x+{k \over 2}\right)^2

Note that when we reach the stage of taking the square root of both sides of the equation, we might have a negative left-hand side. In this case, the roots will be complex. If you have not yet learned about complex numbers, it is possible to simply state that the equation "has no real roots".

Quadratic Formula[edit]

The quadratic formula is a special generalization of completing the square that allows the two roots of a quadratic equation to be obtained by simple substitution. It can be used to solve any quadratic equation and is very quick to work out on a calculator.


ax^2 + bx = -c \Rightarrow x^2 + \frac {b}{a}x = \frac {-c}{a}

Complete the square:

x^2 + \frac {b}{a}x + \left(\frac {b}{2a}\right)^2 = \frac {-c}{a} + \left(\frac {b}{2a}\right)^2

Simplify:


Which equals 4y to the 19th power.

\left(x + \frac {b}{2a} \right )^2 = \frac {-c}{a} + \left(\frac {b}{2a}\right)^2
x + \frac {b}{2a} = \pm \sqrt {\frac {b^2}{4a^2} + \frac {-c}{a}}
x + \frac {b}{2a} = \pm \sqrt {\frac {b^2}{4a^2} + \frac {-4ac}{4a^2}}
x = \frac {-b}{2a} \pm \sqrt {\frac {b^2-4ac}{4a^2}}
x = \frac {-b}{2a} \pm \frac {\sqrt {b^2-4ac}}{2a}
x = \frac {-b \pm \sqrt {b^2-4ac}}{2a}

which is the desired form of the quadratic formula.

Hence, given that a quadratic is in the form ax^2+bx+c=0, the two roots are:

x={-b \pm \sqrt{b^2-4ac} \over 2a}

The quantity {b^2-4ac} in the equation, known as the discriminant, is an indication of the solubility and nature of the roots:

  • discriminant is positive -- soluble over R, real roots
  • discriminant is zero -- soluble over R, real repeated (single) roots
  • discriminant is negative -- insoluble over R (yet soluble over C), no real roots

Weda's Theorem[edit]

If the quadratic equation ax^2+bx+c=0\ (a\ne0) has two real roots x_1 and x_2, then


\left\{
\begin{matrix}
x_1+x_2&=&-\cfrac{b}{a}\\
x_1x_2&=&\cfrac{c}{a}
\end{matrix}
\right.

This is because x_1=\frac{-b+\sqrt{b^2-4ac}}{2a} and x_2=\frac{-b-\sqrt{b^2-4ac}}{2a}. By simply adding or multiplying the two roots we will get the above two equations. This is called Weda's Theorem.

Using Weda's Theorem we can find the second root of a given quadratic equation without solving the equation.

Example: Given that one of the real roots of the equation 4x^2-13x+10=0 is 2, find the other root without solving the equation.

Solution:


\begin{matrix}
x_1 \cdot x_2 &=& \cfrac c a \\
\Rightarrow x_1 \cdot 2 &=& \cfrac{10}{4}\\
x_1&=&\cfrac{5}{4}
\end{matrix}

We can also determine the signs of two roots by applying the following rules:

  1. the equation has two positive roots if \Delta\ge0,\ \frac{c}{a}>0,\ \mbox{and}\ \frac{b}{a}<0;
  2. the equation has two negative roots if \Delta\ge0,\ \frac{c}{a}>0,\ \mbox{and}\ \frac{b}{a}>0;
  3. the equation has two roots with different signs if \ \frac{c}{a}<0

(\Delta represents the discriminant of the equation.)

Another problem involving Weda's Theorem:

Example: For the equation 2x^2+ax+1=0, given that the sum of squares of roots is 7\frac{1}{4}, find the value of a.

Solution:


\begin{matrix}
(x_1+x_2)^2-2x_1x_2&=&x_1^2+x_2^2\\
\left(-\cfrac{a}{2}\right)^2-2\cdot\cfrac{1}{2}&=&7\cfrac{1}{4}\\
\cfrac{a^2}{4}&=&8\cfrac{1}{4}\\
a^2&=&33\\
a&=&\pm\sqrt{33}
\end{matrix}


Pythagorean Theorem ____________________


a^+b^=c^

Solving simultaneous linear and nonlinear equations[edit]

In previous chapters you have already learned how to solve simultaneous linear equations. Now we will learn how to solve a system of simultaneous linear and non-linear equations with two unknowns. It is usually done by substitution method.

Example: Solve the following simultaneous equations:


\left\{
\begin{matrix}
2x^2+y^2-5xy&=8 & \mbox{------ (1)}\\
y-x&=2 & \mbox{------ (2)}
\end{matrix}
\right.

Solution:


\begin{matrix}
\mbox{Rearrange (2):} & y=x+2 & \mbox{------ (3)}\\
\mbox{Substitute(3) into (1):} & 2x^2+(x+2)^2-5x(x+2)=8\\
& 2x^2+x^2+4x+4-5x^2-10x-8=0\\
& x^2+3x+2=0\\
& (x+2)(x+1)=0\\
& x=-2 \quad \mbox{or} \quad -1\\
\mbox{Substitute x=-2 back into (3):} & y=-2+2=0\\
\mbox{Substitute x=-1 back into (3):} & y=-1+2=1
\end{matrix}

∴ x=-1 and y=1, or x=-2 and y=0.