// Question 2
X=[0:0.01:3*%pi]

scf(0)
clf()

plot2d(X,f(X))

// Calcul exacte de int_0^{3*pi} sin(t) e^(cos(t)) dt = e-1/e = 2.3504024

intappr = calculint(f,0,3*%pi,1000)
// intappr  =   2.3504138


// Question 3
T=[]

for n=6:50
    T=[T,abs(%e-1/%e - calculint(f,0,3*%pi,n))]
end

scf(1)
clf()

X=[6:50]
plot2d(X,T)


// Question 4
X=[1:0.01:5]
T=primitive(g,1,X)


scf(2)
clf()

plot2d(X,T)
//plot2d(X,log(X))
