7. Most engineering systems have redundancy. That is, an engineering system has more than is required to accomplish its
Posted: Wed Mar 30, 2022 9:29 am
= = 8. Let Q(x) be the quadratic equation Q(x) = ax? + bx + c for some scalar values a, b, and c. A root of Q(x) is an r such that Q(r) = 0. The two roots of a quadratic equation can be described by the quadratic formula, which is -b + V62 – 4ac 2a A quadratic equation has either two real roots (i.e., b> 4ac), two imaginary roots (i.e., b2 < 4ac), or one root, r = b 2a Write a function my_n_roots(a,b,c), where a, b, and c are the coefficients of the quadratic Q(x), the function should return two values: n_roots and r. n_roots is 2 if Q has two real roots, 1 if Q has one root, -2 if Q has two imaginary roots, and ris an array containing the roots of Q.