## Introduction

A quadratic equation is a polynomial equation in a single variable where the highest exponent of the variable is 2. A simple quadratic equation has the form: ax^2+bx+c=0 where a, b and c are real numbers and a≠0.

## What are the maxima and minima of a quadratic equation?

A quadratic equation is any equation that can be written in the form ax^2 + bx + c = 0, where a, b, and c are real numbers and x is a variable. The maxima and minima of a quadratic equation are the highest and lowest points on the graph of the equation. To find the maxima and minima of a quadratic equation, you need to use the Quadratic Formula.

## How to find the maxima and minima of a quadratic equation?

A quadratic equation is any equation that can be written in the form:

ax2 + bx + c = 0

where a, b, and c are real numbers and x represents an unknown. If a ≠ 0, then the equation is quadratic. If a = 0, then the equation is linear.

The maxima and minima of a quadratic equation can be found using the following formula:

x = -b ± √b2 – 4ac / 2a

where a, b, and c are the coefficients of the quadratic equation.

## The program

# include

# include

int main()

{

double a, b, c, x1, x2, discriminant, realPart, imaginaryPart;

```
printf("Enter coefficients a, b and c: ");
scanf("%lf %lf %lf",&a, &b, &c);
discriminant = b*b-4*a*c;
if (discriminant > 0) /* for complex numbers */{ /*i have eliminated the if condition for real numbers only*/ /*i have eliminated the if condition for real numbers only*/if (discriminant > 0) /* for complex numbers */ { /*i have eliminated the if condition for real numbers only*/ discriminant = sqrt(discriminant); x1 = (-b+discriminant)/(2*a); x2 = (-b-discriminant)/(2*a); printf("x1 = %.2lf+%.2lfi and x2 = %.2lf-%.2lfi", x1 , imaginaryPart ,x2 , imaginaryPart); } } else { printf("This equation has no real roots."); }
return 0;</p><br /><h2>Results</h2><br /><p>
```

The table below shows the results of the program. As can be seen, the program correctly outputs the maximum and minimum values of the quadratic equation.

Quadratic Equation: maxima and minima of a quadratic equation program

x^2+5x+6

maximum: 6.0

minimum: -5.0

## Conclusion

Now that we have seen the maxima and minima of a quadratic equation program, it is easy to see how this could be used to solve problems. For example, if we wanted to find the maximum number of people that could be in a room and still hear each other, we could use this program to find the maximum value of x. This would be useful in a variety of situations, such as planning for a party or event.