Write Matlab programs implementing the algorithms based on bisection,Newton, and secant method for numerical solution of scalar...

90.2K

Verified Solution

Question

Advance Math

Write Matlab programs implementing the algorithms based onbisection,Newton, and secant method for numerical solution ofscalar nonlinear equa-tions. Use these programs to computeapproximations to real roots of the

following equations:

exp(x)?3x^2=0, (1)

x^3=x^2+x+1, (2)

exp(x) =1/(0.1 +x^2), (3)

and

x= 1 + 0.3 cos(x). (4)

Use an error tolerance tol=10^(?12). Display the obtainedapproximations to the roots of these equations, and compare thenumber of iterations, starting with the same initial values x0 forbisection and Newton methods, and with x0 and x1, where x1 wascomputed by bisection starting with x0, for secant method.

Answer & Explanation Solved by verified expert
4.4 Ratings (743 Votes)
Matlab code for finding root using Newton Secant andBisection methodclear allclose allFunction for which root have to findfunx expx3x2funx x1 03cosxdisplaying the functionfprintfFor the functiondispfunRoot using Newton methodx04 Initial guessmaxit1000 maximum iterationrootnewtonmethodfunx0maxitfprintfRoot using Newton method for initial guess f is215fx0rootRoot using Secant methodx01 x14 Initial guessmaxit1000 maximum iterationrootsecantmethodfunx0x1maxitfprintfRoot using Secant method for initial guessff is215fx0x1rootRoot using Bisection methodx01 x14 Initial guessmaxit1000 maximum    See Answer
Get Answers to Unlimited Questions

Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!

Membership Benefits:
  • Unlimited Question Access with detailed Answers
  • Zin AI - 3 Million Words
  • 10 Dall-E 3 Images
  • 20 Plot Generations
  • Conversation with Dialogue Memory
  • No Ads, Ever!
  • Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!
Become a Member

Other questions asked by students