need help with sympy exercise with python for physics
Posted: Tue Apr 26, 2022 7:39 pm
need help with sympy exercise with python for physics
Problem 2 Let f(x) = 2x+ a) Find the area between a=1 and b=2 by evaluating ſi f(x) dx. b) Divide the area into N=4, h=0.25. Find the area using the Trapazoid formula: I(a, b) = h Eh [] f(a) + į f(b) + Ex=' f(a+kh)] + J: c)Use the results of problem 1 to calculate the exact error €4. Add the trapezoid area plus the exact error and show that it matches the exact integral in part a. ]: d) Compare the exact error €to the Euler-McClaurin formula: € = - = H (f' (a) – f'(b)) The Euler-McClaurin formula will overestimate the error because it assumes all orders of f(n)(x) are non zero. ]:
Problem 2 Let f(x) = 2x+ a) Find the area between a=1 and b=2 by evaluating ſi f(x) dx. b) Divide the area into N=4, h=0.25. Find the area using the Trapazoid formula: I(a, b) = h Eh [] f(a) + į f(b) + Ex=' f(a+kh)] + J: c)Use the results of problem 1 to calculate the exact error €4. Add the trapezoid area plus the exact error and show that it matches the exact integral in part a. ]: d) Compare the exact error €to the Euler-McClaurin formula: € = - = H (f' (a) – f'(b)) The Euler-McClaurin formula will overestimate the error because it assumes all orders of f(n)(x) are non zero. ]: