Answer to Question #283853 in Quantitative Methods for Ar-Ar

Question #283853

Use the composite trapezoidal rule to find approximations to 𝐼 = ∫ 𝐬𝐒𝐧𝒙 𝒅𝒙 𝝅


𝟎


with n = 1, 2, 4, and 8. Then perform Romberg extrapolation on the results.

1
Expert's answer
2022-01-03T14:52:12-0500

"f(x)=xsinx"


for n = 1:


"I=\\pi(\\frac{f(0)+f(\\pi)}{2})=0"


for n = 2:


"I=\\frac{\\pi}{2}(\\frac{f(0)+f(\\pi\/2)}{2}+\\frac{f(\\pi\/2)+f(\\pi)}{2})=\\frac{\\pi^2}{4}=2.465"


for n = 4:


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


"=\\frac{\\pi}{4}(\\pi sin(\\pi\/4)\/4+\\pi \/2+3\\pi sin(3\\pi\/4)\/4)=2.975"


for n = 8:


"I=\\frac{\\pi}{8}(f(\\pi\/8)+f(\\pi\/4)+f(3\\pi\/8)+f(\\pi\/2)+f(5\\pi\/8)+f(3\\pi\/4)+f(7\\pi\/8))="


"=1.232(0.048+0.177+0.346+0.5+0.578+0.530+0.336)=3.098"


Romberg extrapolation:

"R_{j,k}=R_{j,k-1}+\\frac{R_{j,k-1}-R_{j-1,k-1}}{4^{k-1}-1}"


for n = 1:

"R_{1,1}=\\pi(\\frac{f(0)+f(\\pi)}{2})=0"


for n = 2:

"R_{2,1}=\\frac{\\pi}{2}(\\frac{f(0)+f(\\pi\/2)}{2}+\\frac{f(\\pi\/2)+f(\\pi)}{2})=2.465"


"R_{2,2}=R_{2,1}+\\frac{R_{2,1}-R_{1,1}}{3}=3.287"


for n = 4:

"R_{3,1}=\\frac{\\pi}{4}(\\frac{f(0)+f(\\pi\/4)}{2}+\\frac{f(\\pi\/4)+f(\\pi\/2)}{2}+\\frac{f(\\pi\/2)+f(3\\pi\/4)}{2}+\\frac{f(3\\pi\/4)+f(\\pi)}{2})=2.975"


"R_{3,2}=R_{3,1}+\\frac{R_{3,1}-R_{2,1}}{3}=3.145"


"R_{3,3}=R_{3,2}+\\frac{R_{3,2}-R_{2,2}}{15}=3.136"


for n = 8:


"R_{4,1}=\\frac{\\pi}{8}(f(\\pi\/8)+f(\\pi\/4)+f(3\\pi\/8)+f(\\pi\/2)+f(5\\pi\/8)+f(3\\pi\/4)+"

"+f(7\\pi\/8))=3.098"


"R_{4,2}=R_{4,1}+\\frac{R_{4,1}-R_{3,1}}{3}=3.139"


"R_{4,3}=R_{4,2}+\\frac{R_{4,2}-R_{3,2}}{15}=3.139"


"I=R_{4,4}=R_{4,3}+\\frac{R_{4,3}-R_{3,3}}{63}=3.139"


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!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS