Math: How to Find the Roots of a Quadratic Function

Updated on July 7, 2020
profile image

I studied applied mathematics, in which I did both a bachelor's and a master's degree.

Quadratic Function
Quadratic Function | Source

Quadratic Functions

A quadratic function is a polynomial of degree two. That means it is of the form ax^2 + bx +c. Here, a, b and c can be any number. When you draw a quadratic function, you get a parabola as you can see in the picture above. When a is negative, this parabola will be upside down.

What Are Roots?

The roots of a function are the points on which the value of the function is equal to zero. These correspond to the points where the graph crosses the x-axis. So when you want to find the roots of a function you have to set the function equal to zero. For a simple linear function, this is very easy. For example:

f(x) = x +3

Then the root is x = -3, since -3 + 3 = 0. Linear functions only have one root. Quadratic functions may have zero, one or two roots. An easy example is the following:

f(x) = x^2 - 1

When setting x^2-1 = 0, we see that x^2 = 1. This is the case for both x = 1 and x = -1.

An example of a quadratic function with only one root is the function x^2. This is only equal to zero when x is equal to zero. It might also happen that here are no roots. This is, for example, the case for the function x^2+3. Then, to find the root we have to have an x for which x^2 = -3. This is not possible, unless you use complex numbers. In most practical situations, the use of complex numbers does make sense, so we say there is no solution.

Ways to Find the Roots of a Quadratic Function

Factorization

The most common way people learn how to determine the the roots of a quadratic function is by factorizing. For a lot of quadratic functions this is the easiest way, but it also might be very difficult to see what to do. We have a quadratic function ax^2 + bx + c, but since we are going to set it equal to zero, we can divide all terms by a if a is not equal to zero. Then we have an equation of the form:

x^2 + px + q = 0.

Now we try to find factors s and t such that:

(x-s)(x-t) = x^2 + px + q

If we succeed we know that x^2 + px + q = 0 is true if and only if (x-s)(x-t) = 0 is true. (x-s)(x-t) = 0 means that either (x-s) = 0 or (x-t)=0. This means that x = s and x = t are both solutions, and hence they are the roots.

If (x-s)(x-t) = x^2 + px + q, then it holds that s*t = q and - s - t = p.

Numerical Example

x^2 + 8x + 15

Then we have to find s and t such that s*t = 15 and - s - t = 8. So if we choose s = -3 and t = -5 we get:

x^2 + 8x + 15 = (x+3)(x+5) = 0.

Hence, x = -3 or x = -5. Let's check these values: (-3)^2 +8*-3 +15 = 9 - 24 + 15 = 0 and (-5)^2 + 8*-5 +15 = 25 - 40 + 15 = 0. So indeed these are the roots.

It might however be very difficult to find such a factorization. For example:

x^2 -6x + 7

Then the roots are 3 - sqrt 2 and 3 + sqrt 2. These are not so easy to find.

The ABC Formula

Another way to find the roots of a quadratic function. This is an easy method that anyone can use. It is just a formula you can fill in that gives you roots. The formula is as follows for a quadratic function ax^2 + bx + c:

(-b + sqrt(b^2 -4ac))/2a and (-b - sqrt(b^2 -4ac))/2a

This formulas give both roots. When only one root exists both formulas will give the same answer. If no roots exist, then b^2 -4ac will be smaller than zero. Therefore the square root does not exist and there is no answer to the formula. The number b^2 -4ac is called the discriminant.

Numeric example

Let's try the formula on the same function we used for the example on factorizing:

x^2 + 8x + 15

Then a = 1, b = 8 and c = 15. Therefore:

(-b + sqrt(b^2 -4ac))/2a = (-8+sqrt(64-4*1*15))/2*1 = (-8+sqrt(4))/2 = -6/2 = -3

(-b - sqrt(b^2 -4ac))/2a = (-8-sqrt(64-4*1*15))/2*1 = (-8-sqrt(4))/2 = -10/2 = -5

So indeed, the formula gives the same roots.

Quadratic Function
Quadratic Function | Source

Completing the Square

The ABC Formula is made by using the completing the square method. The idea of completing the square is as follows. We have ax^2 + bx + c. We assume a = 1. If this would not be the case, we could divide by a and we get new values for b and c. The other side of the equation is zero, so if we divide that by a, it stays zero. Then we do the following:

x^2 + bx + c = (x+b/2)^2 -(b^2/4) + c = 0.

Then (x+b/2)^2 = (b^2/4) - c.

Therefore x+b/2 = sqrt((b^2/4) - c) or x+b/2 = - sqrt((b^2/4) - c).

This implies x = b/2+sqrt((b^2/4) - c) or x = b/2 - sqrt((b^2/4) - c).

This is equal to the ABC-Formula for a = 1. However, this is easier to calculate.

Numerical Example

We take again x^2 + 8x + 15. Then:

x^2 + 8x + 15 = (x+4)^2 -16+15 = (x+4)^2 -1 = 0.

Then x = -4 + sqrt 1 = -3 or x = -4 - sqrt 1 = -5.

So indeed, this gives the same solution as the other methods.

Which Method Has Your Preference?

See results

Summary

We have seen three different methods to find the roots of a quadratic function of the form ax^2 + bx + c. The first was factorizing where we try to write the function as (x-s)(x-t). Then we know the solutions are s and t. The second method we saw was the ABC Formula. Here you just have to fill in a, b and c to get the solutions. Lastly, we had the completing the squares method where we try to write the function as (x-p)^2 + q.

Higher Degree Functions

Determining the roots of a function of a degree higher than two is a more difficult task. For third-degree functions—functions of the form ax^3+bx^2+cx+d—there is a formula, just like the ABC Formula. This formula is pretty long and not so easy to use. For functions of degree four and higher, there is a proof that such a formula doesn't exist.

This means that finding the roots of a function of degree three is doable, but not easy by hand. For functions of degree four and higher, it becomes very difficult and therefore it can better be done by a computer.

Comments

    0 of 8192 characters used
    Post Comment
    • Eyssant profile image

      Eyssant 

      3 months ago

      A nice article.

    working

    This website uses cookies

    As a user in the EEA, your approval is needed on a few things. To provide a better website experience, owlcation.com uses cookies (and other similar technologies) and may collect, process, and share personal data. Please choose which areas of our service you consent to our doing so.

    For more information on managing or withdrawing consents and how we handle data, visit our Privacy Policy at: https://maven.io/company/pages/privacy

    Show Details
    Necessary
    HubPages Device IDThis is used to identify particular browsers or devices when the access the service, and is used for security reasons.
    LoginThis is necessary to sign in to the HubPages Service.
    Google RecaptchaThis is used to prevent bots and spam. (Privacy Policy)
    AkismetThis is used to detect comment spam. (Privacy Policy)
    HubPages Google AnalyticsThis is used to provide data on traffic to our website, all personally identifyable data is anonymized. (Privacy Policy)
    HubPages Traffic PixelThis is used to collect data on traffic to articles and other pages on our site. Unless you are signed in to a HubPages account, all personally identifiable information is anonymized.
    Amazon Web ServicesThis is a cloud services platform that we used to host our service. (Privacy Policy)
    CloudflareThis is a cloud CDN service that we use to efficiently deliver files required for our service to operate such as javascript, cascading style sheets, images, and videos. (Privacy Policy)
    Google Hosted LibrariesJavascript software libraries such as jQuery are loaded at endpoints on the googleapis.com or gstatic.com domains, for performance and efficiency reasons. (Privacy Policy)
    Features
    Google Custom SearchThis is feature allows you to search the site. (Privacy Policy)
    Google MapsSome articles have Google Maps embedded in them. (Privacy Policy)
    Google ChartsThis is used to display charts and graphs on articles and the author center. (Privacy Policy)
    Google AdSense Host APIThis service allows you to sign up for or associate a Google AdSense account with HubPages, so that you can earn money from ads on your articles. No data is shared unless you engage with this feature. (Privacy Policy)
    Google YouTubeSome articles have YouTube videos embedded in them. (Privacy Policy)
    VimeoSome articles have Vimeo videos embedded in them. (Privacy Policy)
    PaypalThis is used for a registered author who enrolls in the HubPages Earnings program and requests to be paid via PayPal. No data is shared with Paypal unless you engage with this feature. (Privacy Policy)
    Facebook LoginYou can use this to streamline signing up for, or signing in to your Hubpages account. No data is shared with Facebook unless you engage with this feature. (Privacy Policy)
    MavenThis supports the Maven widget and search functionality. (Privacy Policy)
    Marketing
    Google AdSenseThis is an ad network. (Privacy Policy)
    Google DoubleClickGoogle provides ad serving technology and runs an ad network. (Privacy Policy)
    Index ExchangeThis is an ad network. (Privacy Policy)
    SovrnThis is an ad network. (Privacy Policy)
    Facebook AdsThis is an ad network. (Privacy Policy)
    Amazon Unified Ad MarketplaceThis is an ad network. (Privacy Policy)
    AppNexusThis is an ad network. (Privacy Policy)
    OpenxThis is an ad network. (Privacy Policy)
    Rubicon ProjectThis is an ad network. (Privacy Policy)
    TripleLiftThis is an ad network. (Privacy Policy)
    Say MediaWe partner with Say Media to deliver ad campaigns on our sites. (Privacy Policy)
    Remarketing PixelsWe may use remarketing pixels from advertising networks such as Google AdWords, Bing Ads, and Facebook in order to advertise the HubPages Service to people that have visited our sites.
    Conversion Tracking PixelsWe may use conversion tracking pixels from advertising networks such as Google AdWords, Bing Ads, and Facebook in order to identify when an advertisement has successfully resulted in the desired action, such as signing up for the HubPages Service or publishing an article on the HubPages Service.
    Statistics
    Author Google AnalyticsThis is used to provide traffic data and reports to the authors of articles on the HubPages Service. (Privacy Policy)
    ComscoreComScore is a media measurement and analytics company providing marketing data and analytics to enterprises, media and advertising agencies, and publishers. Non-consent will result in ComScore only processing obfuscated personal data. (Privacy Policy)
    Amazon Tracking PixelSome articles display amazon products as part of the Amazon Affiliate program, this pixel provides traffic statistics for those products (Privacy Policy)
    ClickscoThis is a data management platform studying reader behavior (Privacy Policy)