Twerpy 12 Posted March 12, 2009 Share Posted March 12, 2009 I'm trying to numerically integrate the function [math]f(x) = |x| + |x|^3, x\in[-1,1][/math] using Simpsons rule and analyse the error. I've been trying to analyse the rate of convergence of the error but can't seem to get anywhere. Experimentally I've got that it's about [math]O(J^-2)[/math] (I think) but I can't show it mathematically. I tried using the approach of splitting up the function into subintervals, then using the formula [math]|E_2,J| = \frac{-1}{2880} (b-a)h^4 |f^{(4)} (x)|[/math] but this fails as [math]|f^{(4)}(x)|\equiv 0, \forall x\in \Re^+ [/math] Any hints? Link to post Share on other sites

timo 578 Posted March 12, 2009 Share Posted March 12, 2009 The only subinterval that contributes to the error is the one where you pass x=0. Link to post Share on other sites

Twerpy 12 Posted March 12, 2009 Author Share Posted March 12, 2009 but the derivative at [math]x=0[/math] is undefined? Link to post Share on other sites

timo 578 Posted March 12, 2009 Share Posted March 12, 2009 Sure. I am not exactly sure what you want to do and why? But for a start, explicitly calculating the correct integral in the interval containing x=0 and the value that the numerical integration would give is easy. Link to post Share on other sites

Bignose 946 Posted March 12, 2009 Share Posted March 12, 2009 Why not break up the integral into two parts? The integral from -1 to 0 of -x-x^3, and the integral from 0 to 1 of x+x^3, and the benefit is that both of those function do have a derivative at x=0. Link to post Share on other sites

## Recommended Posts

## Create an account or sign in to comment

You need to be a member in order to leave a comment

## Create an account

Sign up for a new account in our community. It's easy!

Register a new account## Sign in

Already have an account? Sign in here.

Sign In Now