Please plot the exact function on one figure for 0 < x < 2π. What do you think the function would look like if the summation was not stopped with 6 terms but rather had an infinite number of terms (just include a sketch)? Derive the exact first derivative and plot on a second figure. What do you think the first derivative of the function would look like if the summation was not stopped with 6 terms but rather had an infinite number of terms (sketch)? Use a three point central difference to approximate the first derivative for the given periodic function at x = π/8 with Δx = 0.04 and Δx = 0.02 and compare to the exact solution. What are the errors for both of these approximations? Any comments?
Correct me if I'm wrong, but shouldn't the error on 2.4 be fourth order due to symmetry? The a terms on the left hand side of the equation should cancel like the b terms did, causing the error to appear to be zero. The next column of the taylor table would then be used to find the error. By the same logic, wouldn't the expected order of the central difference w/ 5 points on 2.3 be fifth order?
Also, your equation for the central difference on 2.5 should have a 2*deltax on the bottom instead of just deltax. Everything else looks good though.
I double checked my maths on 2.3 and 2.4 and I think I did them right - can anyone else chime in what they got? If I'm wrong and the coefficients add up to zero, the error would be in the next column bumping up the order of the error.
Thanks for catching the error in 2.5 on the central difference. My calculations used the right formula - I just copied it wrong in the answer.