# Numerical integration?

• Aug 25th 2011, 09:22 AM
homeylova223
Numerical integration?
I am having difficulty integrating

square root((1+x^3)) from x=0 to x=2

when n=4

I know the widths are 0,1/2,1,3/2,2

But I am having trouble setting it up.
• Aug 25th 2011, 09:35 AM
Plato
Re: Numerical integration?
Quote:

Originally Posted by homeylova223
I am having difficulty integrating

square root((1+x^3)) from x=0 to x=2 when n=4

Let $f(x)=\sqrt{1+x^2}$ and $\Delta=0.5$.

Left hand sum $\sum\limits_{k = 0}^3 {f\left( {k\Delta } \right)\Delta }$.

Right hand sum $\sum\limits_{k = 1}^4 {f\left( {k\Delta } \right)\Delta }$.

Mid-point hand sum $\sum\limits_{k = 0}^3 {f\left( {\frac{2k\Delta+\Delta }{2} \right)\Delta }$.
• Aug 25th 2011, 09:44 AM
homeylova223
Re: Numerical integration?
I forgot to mention I have to use the trapezoid rule and I set it up like this.

((2/8)) times (1)(1+(0)^3)+(2)(1+(1/2)^3)+(2)(1+(1)^3)+(2)(1+(3/2)^3)+(1)(1+(2)^(3)
• Aug 25th 2011, 11:51 AM
Siron
Re: Numerical integration?
It looks fine if you don't forget to take the square root of the seperated terms because $f(x)=\sqrt{1+x^3}$.
• Aug 25th 2011, 01:52 PM
homeylova223
Re: Numerical integration?
Thanks now I see the error of my calculus.
• Aug 25th 2011, 02:00 PM
Siron
Re: Numerical integration?
You're welcome! :)