# HW2S - Homework 2 Solution 1 For the following function f(x...

This preview shows pages 1–2. Sign up to view the full content.

Homework 2 Solution 1. For the following function: f ( x ) = 6 x 2 + sin x (a) [1pt] Using the first forward finite divided difference method, compute the approximation of the first derivative of the above function at x i = 1 where the step size h = x i +1 - x i = 0 . 1. Repeat the process for h = 0 . 05. (b) [1pt] Find the true value of f 0 (1) analytically. (c) [1pt] Compute the true fractional relative errors for both cases (when h = 0 . 1 and h = 0 . 05) by using the analytical solution from (b). (d) [1pt] Using the second forward finite divided difference method, compute the approx- imation of the second derivative of the above function at x i = 1 where the step size h = x i +1 - x i = 0 . 1. Repeat the process for h = 0 . 05. (e) [1pt] Find the true value of f 00 (1) analytically. (f) [1pt] Compute the true fractional relative errors for both cases (when h = 0 . 1 and h = 0 . 05) by using the analytical solution from (e). Solution: (a) Approximation with first forward finite divided difference method h = 0 . 1 , f 0 (1) = f (1 . 1) - f (1) 0 . 1 = (8 . 1512 - 6 . 8415) / 0 . 1 = 13 . 0974 h = 0 . 05 , f 0 (1) = f (1 . 05) - f (1) 0 . 05 = 12 . 8190 (b) True value of f 0 (1) f 0 ( x ) = 12 x

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern