Question #283851

Evaluate the following integral: 𝑰 = ∫ 𝒙𝐬𝐢𝐧(𝒙)𝒅𝒙 𝝅/𝟒



𝟎



(1) analytically, (2) using single application of the trapezoidal rule, (3) using composite



trapezoidal rule with n = 2 and 4. For the numerical estimates (2) and (3), determine the true



percent relative error based on (1).

1
Expert's answer
2022-01-02T16:23:56-0500

1)


0π/4xsinxdx=xcosx0π/4+0π/4cosxdx=\int^{\pi/4}_0 xsinx dx=-xcosx|^{\pi/4}_0+\int^{\pi/4}_0 cosx dx=


=xcosx0π/4+sinx0π/4=π42+12=0.152=-xcosx|^{\pi/4}_0+sinx|^{\pi/4}_0=-\frac{\pi}{4\sqrt 2}+\frac{1}{\sqrt 2}=0.152


2)

f(x)=xsinxf(x)=xsinx


I=(ba)f(a)+f(b)2=π4π242=0.436I=(b-a)\frac{f(a)+f(b)}{2}=\frac{\pi}{4}\frac{\pi}{2\cdot4\sqrt 2}=0.436


3)

for n = 2:


I=π8(f(0)+f(π/8)2+f(π/8)+f(π/4)2)=π8(πsin(π/8)/8+πsin(π/4)/8)=0.021I=\frac{\pi}{8}(\frac{f(0)+f(\pi/8)}{2}+\frac{f(\pi/8)+f(\pi/4)}{2})=\frac{\pi}{8}(\pi sin(\pi/8)/8+\pi sin(\pi/4)/8)=0.021


for n = 4:


I=π16(f(0)+f(π/16)2+f(π/16)+f(π/8)2+f(π/8)+f(3π/16)2+f(3π/16)+f(π/4)2)=I=\frac{\pi}{16}(\frac{f(0)+f(\pi/16)}{2}+\frac{f(\pi/16)+f(\pi/8)}{2}+\frac{f(\pi/8)+f(3\pi/16)}{2}+\frac{f(3\pi/16)+f(\pi/4)}{2})=


=π16(πsin(π/16)/16+πsin(π/8)/8+3πsin(3π/16)/16+πsin(π/4)/8)==\frac{\pi}{16}(\pi sin(\pi/16)/16+\pi sin(\pi/8)/8+3\pi sin(3\pi/16)/16+\pi sin(\pi/4)/8)=


=0.616(0.012+0.048+0.104+0.88)=0.155=0.616(0.012+0.048+0.104+0.88)=0.155


relative error:

for single application:

0.4360.1520.152=1.87=187%\frac{0.436-0.152}{0.152}=1.87=187\%


for n = 2:


0.1520.0210.152=0.86=86%\frac{0.152-0.021}{0.152}=0.86=86\%


for n = 4:


0.1550.1520.152=0.02=2%\frac{0.155-0.152}{0.152}=0.02=2\%



Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!
LATEST TUTORIALS
APPROVED BY CLIENTS