Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

Help with this please. Hardcore struggling For the equations: f1(x) = -452.736 - 180.389 x + 188.285 x^2 + 12.4001x^3 - 12.28 x^4 + x^5

image text in transcribedHelp with this please. Hardcore struggling

For the equations: f1(x) = -452.736 - 180.389 x + 188.285 x^2 + 12.4001x^3 - 12.28 x^4 + x^5 f2(x) = x - Cos(2 x/pi) + 2 exp(-x/3) - (x/10)^2 1. Create anonymous functions for each of f1, f2. 2. Plot the equations over the interval [0, 100). This will enable you to get good starting guesses to find the roots. 3. Find the first positive root of each equation above using 1. A bisection function of your own. 2. A false position function of your own. Note that if you get the bisection routine running, you only need one line to change it to a false position routine. 3. The matlab function fzero(). 4. For the first two of these (bisection, false position), compare how many iterations it takes to find the root to a stopping criterion of le-6, using the same starting guesses for each method (but different guesses for each equation f1, f2). Comment on this. Unbound Methods For the functions: f(t) = tan (t) - t[with x0 = 7] g(t) = exp (t) - sqrt(t + 9) [with x0 = 2] 1. Write a function to use the Newton method (with analytic derivative) to obtain the root, where xo is the starting guess. YOU MUST FIRST ATTEMPT THE STARTING GUESSES I PROVIDE. Print each iterate (xi) and its accompanying function value (f(xi)), then print the converged root (x) value. Require an error of less than 1e-6. If the starting guesses I give diverge (wink, wink), then choose a new starting guess (x0 = 7.65 for the first one) and find the true root near the starting point. Explain what happened (why it diverged). 2. Rewrite your Newton function to use the Secant method. Use this method to find the roots again, using starting values of your choice. Note that again, when you have the Newton method running, you should only need to change a couple lines to make it into the Secant method

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions