Question: Nonlinear solution-finding exercise: MATLAB PROBLEM The two real roots of a quadratic equation ax2 + bx + c = 0 (where a is nonzero) are
Nonlinear solution-finding exercise: MATLAB PROBLEM
The two real roots of a quadratic equation ax2 + bx + c = 0 (where a is nonzero) are given by: b D 2a where the discriminant D = b 2 4ac. Use fsolve in a loop to find the roots of a quadratic equation numerically. Create a function to calculate the value of the quadratic equation, and use an anonymous function to pass the values of a, b, and c to the optimiser. Identify a reliable way of generating good starting points for each root. Once you have obtained the roots numerically, compare them to those obtained using the function developed for exercise 2.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
