Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please write a ( MATLAB or C ) code for each of these questions Question 1: [20 points] Write a computer program that calculates the

Please write a ( MATLAB or C ) code for each of these questions

image text in transcribedimage text in transcribed

Question 1: [20 points] Write a computer program that calculates the approximate value of arctan(x) using the Maclaurin series approximation: 3 arctan x - x - up to 8 significant figures. Use ,-0.5x 102-n% in order to continue until the Ea falls below this criteria. Run your program for x-/4 and /6: tabulate the order of expansion, approximate values of arctan(x), the true and approximate percent relative errors for various terms that are taken for the series Question 2: [15 points] Consider the function, f(x)-e (3.2 sinx - 0.5 cosx) Write a computer program that uses Bisection Method, and calculates the root of the above function. Use the interval [34]. Continue the iterations until a falls below the pre-specified criteria of s-0.001%. The output table should show the following parameters for each iteration i: iteration number, values of xu and xl, value of functions at xu and xi, test value and true approximate percent relative errors. Ensure that the number of function evaluations are minimized and the assumptions of Bisection method are valid before each iteration, Note: See figure 5.11 for the pseudocode of Bisection Method. Question 1: [20 points] Write a computer program that calculates the approximate value of arctan(x) using the Maclaurin series approximation: 3 arctan x - x - up to 8 significant figures. Use ,-0.5x 102-n% in order to continue until the Ea falls below this criteria. Run your program for x-/4 and /6: tabulate the order of expansion, approximate values of arctan(x), the true and approximate percent relative errors for various terms that are taken for the series Question 2: [15 points] Consider the function, f(x)-e (3.2 sinx - 0.5 cosx) Write a computer program that uses Bisection Method, and calculates the root of the above function. Use the interval [34]. Continue the iterations until a falls below the pre-specified criteria of s-0.001%. The output table should show the following parameters for each iteration i: iteration number, values of xu and xl, value of functions at xu and xi, test value and true approximate percent relative errors. Ensure that the number of function evaluations are minimized and the assumptions of Bisection method are valid before each iteration, Note: See figure 5.11 for the pseudocode of Bisection Method

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

Filing And Computer Database Projects

Authors: Jeffrey Stewart

2nd Edition

007822781X, 9780078227813

More Books

Students also viewed these Databases questions