Trapezoidal Rule Calculator

 

 

 

Your input: approximate the integral 10sin3(x)+1−−−−−−−−−√ dx

01sin3(x)+1 dx

using n=5

n=5

trapezoids.

The trapezoidal rule states that baf(x)dxΔx2(f(x0)+2f(x1)+2f(x2)+...+2f(xn1)+f(xn))

abf(x)dxΔx2(f(x0)+2f(x1)+2f(x2)+...+2f(xn1)+f(xn))

, where Δx=ban

Δx=ban

.

We have that a=0

a=0

b=1

b=1

n=5

n=5

.

Therefore, Δx=105=15

Δx=105=15

.

Divide the interval [0,1]

[0,1]

into n=5

n=5

subintervals of length Δx=15

Δx=15

, with the following endpoints: a=0,15,25,35,45,1=b

a=0,15,25,35,45,1=b

.

Now, we just evaluate the function at these endpoints:

f(x0)=f(a)=f(0)=1=1

f(x0)=f(a)=f(0)=1=1

 

2f(x1)=2f(15)=2sin3(15)+1−−−−−−−−−−−√=2.00782606791279

2f(x1)=2f(15)=2sin3(15)+1=2.00782606791279

 

2f(x2)=2f(25)=2sin3(25)+1−−−−−−−−−−−√=2.05820697233265

2f(x2)=2f(25)=2sin3(25)+1=2.05820697233265

 

2f(x3)=2f(35)=2sin3(35)+1−−−−−−−−−−−√=2.17257446116512

2f(x3)=2f(35)=2sin3(35)+1=2.17257446116512

 

2f(x4)=2f(45)=2sin3(45)+1−−−−−−−−−−−√=2.34021475342487

2f(x4)=2f(45)=2sin3(45)+1=2.34021475342487

 

f(x5)=f(b)=f(1)=sin3(1)+1−−−−−−−−−√=1.26325897447473

f(x5)=f(b)=f(1)=sin3(1)+1=1.26325897447473

 

Answer: 1.08420812293102.

CC

https://conversioncalculator.org

Leave a Reply

Your email address will not be published. Required fields are marked *