Skip to content
Related Articles
Get the best out of our app
GFG App
Open App
geeksforgeeks
Browser
Continue

Related Articles

Quadratic Equations

Improve Article
Save Article
Like Article
Improve Article
Save Article
Like Article

Polynomials are of different types out of which degree two polynomials are in the form ax2 + bx + c, a ≠ 0. When we equate this polynomial to zero, we get a quadratic equation. These kinds of equations come up in a lot of real-life situations. Let’s study these kinds of equations, how to solve them and how to formulate them in real-life situations. 

For example, a school board decides to make a football ground for their students. They’ve decided that the area of the football ground will be 1000m2. Coach instructs that the length of the ground must be 50 meters more than twice the breadth of ground. We need to find what should the length and breadth of the ground be. 

Let’s say the breadth of the ground is “x”. Then the length of the ground will be “2x + 50”. We know that the area must be 1000m2. So, 

x(2x + 50)  = 1000 

⇒2x2 + 50x  = 1000

⇒2x2 + 50x – 1000 = 0

Here we get a quadratic equation. Let’s define the quadratic equation formally. 

Quadratic Equation

A quadratic equation in variable “x” is an equation of the form, 

ax2 + bx + c = 0

Where, a, b, c are real numbers and constants and a ≠ 0.

Example: 4x2 – 5x = 0, 5x2 + 16x + 5 = 0

In general, any second-degree polynomial P(x), when put like P(x) = 0 represents a quadratic equation. 

Question 1: Rahul and Ravi together have 45 candies. Both of them lost 5 candies each. The product of the number of candies both of them have now is 124. We are asked to find out the number of candies each one had in the beginning. Formulate a quadratic equation for this problem. 

Solution:

Let’s say Rahul had “x” candies. Then Ravi must have “45 – x” candies because both of them had 45 candies. 

Now after losing the candies, we are given that product of the number of candies they have is 124. That is, 

x(45 – x) = 124

⇒ 45x – x2 = 124 

⇒ 0 = x2 – 45x + 124

Question 2: Check whether the following equation is a quadratic equation or not. 

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

Solution:

We know that a quadratic equation must be of degree 2. 

Let’s simplify and check the given equation. 

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

⇒ x2 + x – 2x – 2 = x2 + 3x – x – 3

⇒ x2 – x – 2 = x2 + 2x – 3

⇒ -x – 2 = 2x – 3 

⇒ -3x + 1 = 0  

This equation is of degree 1. Thus, it cannot be a quadratic equation. 

Solving a Quadratic Equation

Let’s assume a quadratic equation P(x) = 0. The points which satisfy this equation are called solutions or zeros of this quadratic equation. There are three types of methods to find the solution of a quadratic equation: 

  1. Factorization Method
  2. Completing the Squares Method
  3. Shree Dharacharya or Quadratic Formula

Let’s look at all three of these methods one by one through examples. 

Factorization Method

A quadratic equation can be considered a factor of two terms. Like ax2 + bx + c = 0 can be written as (x – x1)(x – x2) = 0 where x1 and x2 are roots of quadratic equation.

Steps to Solve:

  1. Find two numbers such that the product of the numbers is ‘ac’ and the sum is ‘b’.
  2. Then write x coefficient as the sum of these two numbers and split them such that you get two terms for x.
  3. Factor the first two as a group and the last two terms as another group.
  4. Take common factors from these and on equating the two expressions with zero after taking common factors and rearranging the equation we get the roots.

Question 1: Find out the solutions of the given quadratic equation using the factorization method. 

2x2 – 3x + 1 = 0

Solution:

2x2 – 3x + 1 = 0

⇒ 2x2 – 2x – x + 1 = 0

⇒ 2x(x – 1) – 1(x -1) = 0

⇒ (2x – 1)(x-1) = 0

Now this equation will be zero when either of these two terms of both of these terms are zero

So, putting 2x – 1 = 0, we get x = \frac{1}{2}

Similarly, x – 1 = 0, we get x = 1 

Thus, we get two roots x = 1 and \frac{1}{2}

Question 2: Find the roots of the following quadratic equation using the same method. 

2x2 – x – 6 = 0

Solution: 

2x2 – x – 6 = 0

⇒ 2x2 – 4x. +3x – 6 = 0

⇒ 2x (x – 2) +3(x – 2) = 0 

⇒ (2x + 3) (x – 2) = 0 

Now, 

2x + 3 = 0 

x = -\frac{3}{2}

x – 2 = 0 

x = 2

Thus, this equation has roots x = 2 and -\frac{3}{2}

Completing the Squares Method

Any equation ax2 + bx + c = 0 can be converted in the form (x + m)2 – n2 = 0. After this take the square roots and get the roots of the equation. Completing the square is just a way to readjust the given quadratic equation in such a way that they come in the form of complete squares. Let’s see this through an example.

Question 1: Find the root of the given equation through complete the square method. 

x2 + 4x – 5 = 0

Solution:

We are given, x2 + 4x – 5 = 0 

To solve it by completing the square method, we need to bring it in the above mentioned form. 

x2 + 4x – 5 = 0

⇒ x2 + 4x + 4 – 9 = 0

⇒ (x + 2)2 – 32 = 0

⇒ (x + 2)2 = 32

Taking square root both sides, 

x + 2 = 3 and x + 2 = -3 

This gives us x = 1, -5

Question 2: Find the root of the given equation through complete the square method. 

x2 + 6x + 9 = 0

Solution:

Given, x2 + 6x + 9 = 0

x2 + 6x + 9 = 0

⇒ x2 + 2(3x) + 32 = 0

⇒ (x + 3)2 = 0 

Taking square root, 

x + 3 = 0 

x = – 3

Thus, this equation has only one root with multiplicity of 2. 

x = -3,-3

Shree Dharacharya or Quadratic Formula 

This formula says, 

For a quadratic equation in general form, 

ax2 + bx + c = 0

If b2 – 4ac > 0, 

Then roots are given by \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}

Question 1: Find the roots of the equation 3x2 – 5x + 2 = 0.

Solution: 

For finding out the roots using Shree Dharacharya formula, 

We need to check If b2 – 4ac > 0,

In this particular equation, a = 3, b = -5 and c = 2. 

So, b2 – 4ac 

⇒ (-5)2 – 4(3)(2) 

⇒ 25 – 24 

⇒ 1 > 0 

Thus, roots are possible, 

Now let’s calculate the roots by plugging in the values in the formula mentioned above. 

\frac{-b \pm \sqrt{b^2 - 4ac}}{2a} = \frac{-5  \pm \sqrt{25 - 4(3)(2)}}{6} \\ = \frac{-5 \pm 1}{6} \\ = \frac{-4}{6}, \frac{-6}{-6} \\ = \frac{-2}{3}, -1

Question 2: Find the roots of the equation

 x + \frac{1}{x} = 3

Solution:

We need to first simplify this equation and bring it to the quadratic form so that we can apply Dharacharya Formula. 

 x + \frac{1}{x} = 3 \\ = x^2 + 1 = 3x \\ = x^2 -3x + 1 = 0

Now let’s check if b2 – 4ac > 0 first. 

Here a = 1, b = -3 and c = 1

b2 – 4ac 

⇒ 9. -4(1)(1) 

⇒ 5 > 0 

So we can apply the formula now, 

\frac{-b \pm \sqrt{b^2 - 4ac}}{2a} = \frac{-(-3)  \pm \sqrt{9 - 4(1)(1)}}{2} \\ = \frac{3 \pm \sqrt{5}}{2} \\ = \frac{3 + \sqrt{5}}{2}, \frac{3 - \sqrt{5}}{2} \\


My Personal Notes arrow_drop_up
Last Updated : 22 Feb, 2023
Like Article
Save Article
Similar Reads
Related Tutorials