Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

On Mathematica Exercises: 1. Consider the function f(x) = x2, we know that f has a root at zero. Suppose we select the seed to

On Mathematica
image text in transcribed
Exercises: 1. Consider the function f(x) = x2, we know that f has a root at zero. Suppose we select the seed to be 0.5 and the threshold to be 10-5. Execute a program in Mathematica to estimate the root. Since you already know the outcome, this sort of example is a good means to verify that your program is correct. 2. Plot the function f(z) ze-1-0.16064 a. Use FindRoot to locate a root near x= 3. b. Write a program in Mathematica implementing Newton's method Use your program to approximate the root near | = 3. Set the maximal number of iterations to 100 and the residual kickout threshold to 10-5 How many iterations does your program actually execute before it stops? c. Redo (b) with a kickout threshold set to 10-2. Using the result of (a) as the actual and this result as the computed, calculate the relative absolute error. 3. Figure 1.3.5 shows the graph of f(x-x/ point (1.5, f(1.5)) +1) together with the a. Use FindRoot to solve f()0 starting at 1.5. What happens? Why? b. Write your own program to execute Newton's method starting at x = 1.5. What is the output for the first 10 iterations? c. Plot f along with the tangent at the 4th iteration. Put both plots on the same axis. (Hint: Execute both plots separately and save the out- put in a variable. Then execute the Show statement. The syntax of these statements is exlained in the language help.) Exercises: 1. Consider the function f(x) = x2, we know that f has a root at zero. Suppose we select the seed to be 0.5 and the threshold to be 10-5. Execute a program in Mathematica to estimate the root. Since you already know the outcome, this sort of example is a good means to verify that your program is correct. 2. Plot the function f(z) ze-1-0.16064 a. Use FindRoot to locate a root near x= 3. b. Write a program in Mathematica implementing Newton's method Use your program to approximate the root near | = 3. Set the maximal number of iterations to 100 and the residual kickout threshold to 10-5 How many iterations does your program actually execute before it stops? c. Redo (b) with a kickout threshold set to 10-2. Using the result of (a) as the actual and this result as the computed, calculate the relative absolute error. 3. Figure 1.3.5 shows the graph of f(x-x/ point (1.5, f(1.5)) +1) together with the a. Use FindRoot to solve f()0 starting at 1.5. What happens? Why? b. Write your own program to execute Newton's method starting at x = 1.5. What is the output for the first 10 iterations? c. Plot f along with the tangent at the 4th iteration. Put both plots on the same axis. (Hint: Execute both plots separately and save the out- put in a variable. Then execute the Show statement. The syntax of these statements is exlained in the language help.)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored 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

Recommended Textbook for

Oracle RMAN For Absolute Beginners

Authors: Darl Kuhn

1st Edition

1484207637, 9781484207635

More Books

Students also viewed these Databases questions