logo for matrixlab-examples.com
leftimage for matrixlab-examples.com

Quadratic Equation Solver

Basic Examples

Online Calculator

Downloadable Presentation

Basics

Below you can find a quadratic equation solver developed using a simple code in JavaScript. It uses the known formula to calculate the roots (real and complex) of a quadratic expression.

If you have

ax2 + bx + c = 0

you can solve for x using

quadratic formula

Example 1

 Example 2

 If you have coefficients:

 a = 1, b = 4 and c = 3

 you'll get:

 x1 = -1
 x2 = -3
  If you have coefficients:

  a = 3, b = 4 and c = 5

  you'll get:

  x1 = -0.6667 + 1.1055i
  x2 = -0.6667 - 1.1055i


Online Calculator

To be able to use the following calculator you have to allow the use of JavaScript codes on your navigator.


Bookmark and Share     

Enter the three coefficients of your quadratic equation...

a =
b =
c =

The solutions are:

x1 =
x2 =


Downloadable Presentation


 From 'Quadratic Equation Solver' to home

 From 'Quadratic Equation Solver' to Free Online Calculators
   
Top

How to code Quadratic Equations in Matlab





footer for matlab page