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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!