Let $f(x)$ be an expression in $x$. For example, $f(x)=3x+2$ or $f(x)=8x^{2}-\sqrt{x}+5$. Where the graph of the equation $y=f(x)$ crosses the $y$-axis is called the $y$-intercepts and where it crosses the $x$-axis is called the $x$-intercept.

To find the $x$-intercept of the graph of $y=f(x)$, we set $y=0$ and solve for $x$. Therefore, the $x$-intercepts of the graph of $y=f(x)$ are solutions to $f(x)=0$ (also called the roots of $f$).

Similarly to find the $y$-intercept, we substitute $x=0$ in the equation $y=f(x)$ and solve for $y$.

Linear equations

An equations that can be written of the form
\[ax+b=0,\qquad(a\neq0)\] where $a$ and $b$ are (fixed) real numbers and $x$ is the variable (or the unknown) is called a linear equation. To solve the equation, move $b$ to the other side
\[ax=-b\] and then move the coefficient $a$ to the denominator of $b$; that is,
\[x=-\frac{b}{a}.\] (In fact we subtract $b$ from both sides and then divide both sides of the resulting equation by $a$).

  •  The solution of $ax+b=0$ is the $x$-intercept of the straight line
    $y=ax+b$ (the $x$-intercept is where the graph intersects the $x$-axis).
Example 1
Solve each equation:

(a) $5x+9=8x+12$

(b) $\dfrac{3x+7}{4}=1+\dfrac{1-x}{3}$

Solution
We first simplify and then rewrite the equations of the form that all terms containing the variable $x$ are on one side and the constant terms are on the other side.
(a) The given equation is 
\[5x+9=8x+12\] Subtract $8x$ from both sides:
\begin{align*} 
5x+9-8x & =8x-8x+12\\
-3x+9 & =\cancel{0x}+12\\
-3x+9-9 & =12-9\\
-3x & =3
\end{align*}
Now if we divide both sides by $-3$, we get \[x=-1.\]

(b) The given equation is
\[\frac{3x+7}{4} =1+\frac{1-x}{3}\] Because the least common divisor or LCD (the least common multiple of 3 and 4) is 12, we multiply both sides by 12 and get  
\[12\cdot\frac{3x+7}{4}  =12\cdot\left(1+\frac{1-x}{3}\right)\] Now let’s simply
\begin{align*}
9x+21 & =12+4-4x\\
9x+4x & =12+4-21\\
13x & =-5\\
x & =-\frac{5}{13}
\end{align*}

Power equations

Consider an equation of the form
\[x^{n}=a\] where $a$ is a fixed number and $n$ is an integer. Then the solution(s) of the above the equation are:
\[x=\begin{cases}
\sqrt[n]{a} & \text{$n$ is odd)}\\
\pm\sqrt[n]{a} & \text{ $n$ is even and $a>0$}\\
\text{no real solution} & \text {$n$ is even and $a<0$}
\end{cases}\]

Example 2
Solve $(x-5)^{4}=81$.
Solution

To solve, take the $4$th root of both sides:
\begin{align*}
x-5 & =\pm\sqrt[4]{81}\\
x-5 & =\pm\sqrt[4]{3^{4}}\\
x-5 & =\pm3\\
x & =5\pm3
\end{align*}

Therefore, the solutions are $x=8$ and $x=2$.

Quadratic equations

The general form of quadratic equations (or a second-degree equation) is
\[ax^{2}+bx+c=0,\quad(a\neq0)\tag{i}\] For example,
\[3x^{2}-5x+2=0\] is a quadratic equation. In this example, $a=3,b=-5$, and $c=2$.

  •  The solutions (also called roots or zeros) of $ax^{2}+bx+c=0$ are the $x$-intercepts of the graph $y=ax^{2}+bx+c$. The graph of $y=ax^{2}+bx+c$ opens upward if $a>0$ and downward if $a<0$.

 

Quadratic formula

 

The solutions (or roots) of the quadratic equation $ax^2+bx+c=0$ can always be found using the following general formula, called the quadratic formula:

\[ \bbox[#F2F2F2,5px,border:2px solid black]{\large x=\frac{-b\pm\sqrt{b^{2}-4ac}}{2a}}\]

When we apply the general formula to the equation $3x^{2}-5x+2=0$ with $a=3,b=-5$, and $c=2$, we get:
\begin{align*}
x & =\frac{5\pm\sqrt{5^{2}-4\cdot3\cdot2}}{2\cdot3}\\
& =\frac{5\pm1}{6}\\
& =1\quad\text{or}\quad\frac{2}{3}
\end{align*}

The part of the quadratic formula that is under the square root, $D=b^{2}-4ac$, is called the discriminant of the equation $ax^{2}+bx+c=0$. There are three cases:

\[D=b^2-4ac\]

  • $D>0$      There are two distinct real roots
  • $D=0$      There is one real root (a double root)
  • $D<0$      There is no real root (there are two imaginary roots)

See the following figures.

(a) $D>0, a>0$, two real roots (b) $D>0, a<0$, two real roots
(c) $D=0, a>0$, double root (d) $D<0, a>0$, no real roots

 

  •  Factorization: When Equation (i) has two real roots $r_{1}$ and $r_{2}$, it factors as

    \[ \bbox[#F2F2F2,5px,border:2px solid black]{\large ax^{2}+bx+c=a(x-r_{1})(x-r_{2}).}\] For example, because the roots of $3x^{2}-5x+2$ are 1 and $2/3$, we have
    \begin{align*}
    3x^{2}-5x+2 & =3\left(x-1\right)\left(x-\frac{2}{3}\right)\\
    & =(x-1)(3x-2)
    \end{align*}

 

Example 3
Factor $12x^{2}-43x+35$
Solution
It may not easy to factor it by trial and error. So we find the roots
using the quadratic formula
\begin{align*}
r_{1,2} & =\frac{43\pm\sqrt{43^{2}-4\cdot12\cdot35}}{2\cdot12}\\
& =\frac{43\pm\sqrt{169}}{2\cdot12}\\
& =\frac{43\pm13}{2\cdot12}
\end{align*}
which gives $r_{1}=\frac{5}{4}$ and $r_{2}=\frac{7}{3}$. Therefore,
\begin{align*}
12x^{2}-43x+35 & =a(x-r_{1})(x-r_{2})\\
& =12\left(x-\frac{5}{4}\right)\left(x-\frac{7}{3}\right)\\
& =(4x-5)(3x-7).
\end{align*}
  • Sum and product of roots: If $r_{1}$ and $r_{2}$ are the roots of (i) then

    \[ \bbox[#F2F2F2,5px,border:2px solid black]{r_{1}+r_{2}=-\frac{b}{a},\qquad r_{1}r_{2}=\frac{c}{a}}\] Because if we expand $a(x-r_{1})(x-r_{2})$, we have
    \[a(x-r_{1})(x-r_{2})=ax^{2}-a(r_{1}+r_{2})x+ar_{1}r_{2}.\]
    So by comparing with $ax^{2}+bx+c$, we realize that $-a(r+r_{2})=b$ and $ar_{1}r_{2}=c$. 

For example, the roots of $3x^{2}-5x+2=0$ are $1$ and $2/3$ and
\[1+\frac{2}{3}=-\frac{b}{a}=-\left(-\frac{5}{3}\right),\qquad1\cdot\frac{2}{3}=\frac{c}{a}=\frac{2}{3}\]

  •  If $a+b+c=0$, then one of the roots is 1, because if we substitute 1 for $x$, we get
    \[a\times1^{2}+b\times1+c=a+b+c=0\]
  • If $a+c=b$, then one of the roots is $-1$, because if we substitute $-1$ for $x,$ we get
    \[a\cdot(-1)^{2}+b\cdot(-1)+c=a-b+c=b-b=0.\]

Completing the square

If we can rewrite the quadratic equation $ax^{2}+bx+c=0$ as
\[(x+A)^{2}=C,\] then we can easily solve it by taking the square roots of both sides (see here). The left-hand side is a perfect square— the square of $x+A$, and if we expand it, we get
\[ (x+A)^{2}=x^{2}+2Ax+A^{2}. \] So in a perfect square, the constant term is the square of half of the coefficient of $x$.

A binomial $x^{2}+bx$ becomes a perfect square if we add $\left(\frac{b}{2}\right)^{2}$ to it:
\[x^{2}+bx+\left(\frac{b}{2}\right)^{2}=\left(x+\frac{b}{2}\right)^{2} \] This method, which is called completing the square, has many applications in different parts of mathematics. One of these applications is in solving the quadratic equations and deriving the quadratic formula we have seen in this section.

Suppose $a=1$:

To solve
\[x^{2}+bx+c=0\] we add $(b/2)^{2}$ to both sides of the equation, so
\[ x^{2}+bx+\left(\frac{b}{2}\right)^{2}+c=\left(\frac{b}{2}\right)^{2} \] Therefore, the sum of the first three terms makes a perfect square

\begin{align*}
\left(x+\frac{b}{2}\right)^{2}+c & =\left(\frac{b}{2}\right)^{2}\\
\left(x+\frac{b}{2}\right)^{2} & =\left(\frac{b}{2}\right)^{2}-c
\end{align*}

Take the square roots of both sides:

\begin{align*}
x+\frac{b}{2} & =\pm\sqrt{\left(\frac{b}{2}\right)^2-c}
\end{align*}

Move $-b/2$ to the right hand side:

\begin{align*}
x & =-\frac{b}{2}\pm\sqrt{\left(\frac{b}{2}\right)^{2}-c}
\end{align*}

Show an example

For example, let us solve
\[x^{2}-6x-5=0.\] First, transpose 5; that is, add 5 to both sides
\[x^{2}-6x=5.\] If now we add $(-6/2)^{2}=9$ to both sides, the left hand side will be a perfect square
\[x^{2}-6x+9=14\]

The left hand side is a complete square:

\[(x-3)^{2}  =14\]

Take the square root of each side

\begin{align*}
x-3 & =\pm\sqrt{14}\\
x & =3\pm\sqrt{14}
\end{align*}

The solutions therefore are $3-\sqrt{14}$ and $3+\sqrt{14}$.

  •  If there is a constant $a$ multiplying the $x^{2}$ term, then we first factor out that constant and then complete the square, as illustrated in the following example.
Example 4
Solve $3x^{2}-8x+2=0$ by completing the square.
Solution
\begin{align*}
3x^{2}-8x+2 & =0\\
3x^{2}-8x & =-2\\
3\left(x^{2}-\frac{8}{3}x\right) & =-2\\
x^{2}-\frac{8}{3}x & =-\frac{2}{3}\\
x^{2}-\frac{8}{3}x+\left(\frac{8}{2\cdot3}\right)^{2} & =-\frac{2}{3}+\left(\frac{8}{2\cdot3}\right)^{2}\\
\left(x-\frac{8}{6}\right)^{2} & =-\frac{2}{3}+\frac{16}{9}=\frac{10}{9}
\end{align*}

Take the square roots:

\begin{align*}
x-\frac{4}{3} & =\pm\sqrt{\frac{10}{9}}\\
x & =\frac{4}{3}\pm\frac{\sqrt{10}}{3}=\frac{4\pm\sqrt{10}}{3}.
\end{align*}

In summary:

Completing the square: We can rewrite $ax^2+bx+c=0$ as $a(x+h)^2+k=0$, where 

\[h=\frac{b}{2a},\quad\text{and}\quad k=c-ah^2=c-\frac{b^2}{4c}\]

Transformation of the equations of circles to the standard form by completing the square

One of the applications of completing the square is in finding the center of a circle when its equation is expressed in the general form, as illustrated in the following equation.

Example 5
Find the center and radius of the circle with equation
\[x^{2}+y^{2}-12x+14y+69=0. \]
Solution
To easily find the center and the radius of the circle, we need to rewrite the equation of the circle of the form
\[(x-a)^{2}+(y-b)^{2}=r^{2}. \] In doing so, on the left side, we group the terms containing $x$ together, and the terms containing $y$ together, and move the constant
to the right side:
\[(x^{2}-12x)+(y+14y)=-69.\] Then we complete the square for each variable (do not forget to add the required constants for completing the squares on both sides of the equations).
\begin{align*}
(x-12x+(-6)^{2})-6^{2}+(y+14x+7^{2})-7^{2} & =-69
\end{align*}

Move constants to the right hand side:

\begin{align*}
(x-6)^{2}+(y+7)^{2} & =-69+36+49\\
(x-6)^{2}+(y+7)^{2} & =16\\
(x-6)+(y-(-7))^{2} & =4^{2}
\end{align*}
Comparing the above equation with the standard form of the equation of a circle reveals that the center is $(6,-7)$ and the radius is 4.

Finding the maximum or minimum value of a quadratic polynomial

 

By completing the square, we can find the maximum or minimum value of a quadratic polynomial.

  •  Recall that if $a>0$, the graph of $y=ax^{2}+bx+c$ opens upward and hence has a minimum, and if $a<0$, the graph opens downward and
    hence has a maximum.

Example 6
Complete the square and find the maximum value of $y=-\frac{1}{2}x^{2}+x+1$ and the value of $x$ for which the maximum occurs.
Solution
Complete the square
\begin{align*}
y & =-\frac{1}{2}x^{2}+x+1\\
& =-\frac{1}{2}\left[x^{2}-2x-2\right]\\
& =-\frac{1}{2}\left[x^{2}-2x+(-1)^{2}-1-2\right]\\
& =-\frac{1}{2}\left[\left(x-1\right)^{2}-1-2\right]\\
& =-\frac{1}{2}\left[\left(x-1\right)^{2}-3\right]\\
& =-\frac{1}{2}(x-1)^{2}+\frac{3}{2}
\end{align*}
Because $-\frac{1}{2}(x-1)^{2}$ can never be positive, and it is zero when $x=1$, $y$ has a maximum of $3/2$ when $x=1$. The graph of $y=-\frac{1}{2}x^{2}+x+1$ is sketched in the following figure.

Graph of $y=-\frac{1}{2}x^{2}+x+1$.