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?

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$