O'Reilly logo

Numerical C: Applied Computational Programming with Case Studies by Philip Joyce

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

© Philip Joyce 2019
P. JoyceNumerical Chttps://doi.org/10.1007/978-1-4842-5064-8_2

2. Solving Equations

Philip Joyce1 
(1)
Goostrey, UK
 

The first mathematical application which we will write a C program for is solving quadratic equations. We will then write some programs to solve equations of higher powers.

Quadratic Equations

Quadratic equations are equations which have a squared variable as their highest power.

So x2 + 2x + 1 = 0, 2x2 – 6x + 7 = 0, and –x2 + 2x –15 = 0 are all quadratic equations, but x3 + 2x2 – 3x + 7 = 0, 2x5 –3x = 0, and 3x – 2 = 0 are not quadratic equations.

The normal analytical methods for solving quadratics are
  • Factorizing

  • Completing the square

  • Using the quadratic formula

Factorizing

Factors of any ordinary whole numbers are just ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required