1. Consider a function f(x) = ln x. Find the fifth order Taylor polynomial about the point x0 = 2. Then determine the minimum number of terms (i.e. n) that would guarantee an absolute error of no more than 10⁻³ in the Taylor approximation for f(x) for all x in the interval [1,2].

4. Type the following Matlab function
function fixed(g, x0, tol, Nmax)
iter = 0;
u = feval(g, x0);
err = abs(u - x0);
disp(' iter      x g(x)    |x_(n+1)-x_n|')
fprintf('%2.0f %12.6f %12.6f\n', iter, x0, u)
while(err > tol) & (iter <= Nmax)
x1 = u;
err = abs(x1 - x0);
x0 = x1;
u = eval(g, x0);
iter = iter + 1;
fprintf('%2.0f %12.6f %12.6f\ %12.8f \n', iter, x0, u, err)
if(iter > n)
disp('Method failed to converge')

Include comments on each line of code to explain the purpose. Use this code to find the rooot of f(x) = 5/x² + 2, using x0 = 2.5, tol = 10⁻⁴ and Nmax = 100. Change Nmax if it does not converge.

Solution PreviewSolution Preview

This material may consist of step-by-step explanations on how to solve a problem or examples of proper writing, including the use of citations, references, bibliographies, and formatting. This material is made available for the sole purpose of studying and learning - misuse is strictly forbidden.

Numerical Analysis Problems
    $13.00 for this solution

    PayPal, G Pay, ApplePay, Amazon Pay, and all major credit cards accepted.

    Find A Tutor

    View available Mathematics - Other Tutors

    Get College Homework Help.

    Are you sure you don't want to upload any files?

    Fast tutor response requires as much info as possible.

    Upload a file
    Continue without uploading

    We couldn't find that subject.
    Please select the best match from the list below.

    We'll send you an email right away. If it's not in your inbox, check your spam folder.

    • 1
    • 2
    • 3
    Live Chats