© 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 ...

Get Numerical C: Applied Computational Programming with Case Studies now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.