Calculating $\int_{-1}^{1} e^{\sin(\frac{\pi}{2}t+\frac{\pi}{2})}dx$ by using gauss method

97 Views Asked by At

Today I had an exam , I’m reviewing my answers so I calculated one of the questions with maple after my exam and the answer is not anything near my answer And also i don’t know what I’m doing wrong,i cannot find the flaw in my handcalculated answer

The question is : Find the approximate integral using gauss method on two points $$\int_{0}^{\pi} e^{\sin x} dx$$

What I did on paper :

$x=\frac{\pi}{2}t+\frac{\pi}{2}$

$\int_{-1}^{1} e^{\sin(\frac{\pi}{2}t+\frac{\pi}{2})}dt = f(\frac{-\sqrt{3}}{3})+ f(\frac{\sqrt{3}}{3}) $

$e^{\sin(\frac{\pi}{2} \frac{-\sqrt{3}}{3} +\frac{\pi}{2})} + e^{\sin(\frac{\pi}{2}\frac{\sqrt{3}}{3} +\frac{\pi}{2})} $

Then by expanding $\sin(a+b)$ we get

$\int_{-1}^{1} e^{\sin(\frac{\pi}{2}t+\frac{\pi}{2})}dx = 2.e^{\cos(\frac{-\sqrt 3}{6}\pi)}=3.70.... $

And by calculating it with maple it have to be somwhere around 6.2 which is absolutely not

Any help?

2

There are 2 best solutions below

3
On

The problem is that you changed the variable in the function to integrate, but still have $dx$. That's not right. You need to replace $$dx=\frac{\pi}2 dt$$Then the answer will be approximately $\frac\pi 23.70=5.81$

2
On

The result you got $2 e^{\cos \left(\frac{\pi }{2 \sqrt{3}}\right)}\approx 3.7$ is fine since the Mathematica exact result is $3.95262$.

Furthermore in the image below it can be seen that the rectangle approximates pretty well the desired integral.

enter image description here