Question: Computintinal methods using excel Question (1): The roots of quadratic equation: ax + bx + c = 0 can be determined with the quadratic formula,
Question (1): The roots of quadratic equation: ax + bx + c = 0 can be determined with the quadratic formula, -b I V 16 - 4ac| ....... .(1) X1 X2 2a Develop an algorithm that does the following: Using Excel VBA software Step 1: Prompts the user for the coefficients, a, b, and c. Step 2: Implements the quadratic formula, guarding against all eventualities (for example, avoiding division by zero and allowing for complex roots). Step 3: Displays the solution, that is, the values for x Step 4: Allows the user the option to return to step 1 and repeat the process, If a = 0, an immediate problem arises because of division by zero. In fact, close inspection of Equation 1 indicates that two different cases can arise. That is, If b = 0, the equation reduces to a linear equation with one real root, -c/b. If b = 0, then no solution exists. That is, the problem is trivial. If a = 0, two possible cases occur depending on the value of the discriminant, d = b2 - 4ac. That is, If d 20. two real roots occur. If d
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
