#5.3.cprint"Funktion aus A 5.3"f=(x^3*e^x)/(sqrt(1-(2*x-5)^2))plot(f,2,3)print"exakter Integralwert"I23=integral(f,x,2,3)show(I23)print"Wert der Gewichtsfunktion auf [0,2]"I=integral(1/sqrt((1-x^2)),x,-1,1)show(I)a=2b=3#Transformationsfunktiont=(b-a)/2*x+(b+a)/2#k=1k=1i=0x0=t(cos((2*i+1)/(2*(k+1))*pi))print"x0 Stützstelle"x0.numerical_approx()y0=f(x0)print"g(x0)"y0.numerical_approx()i=1x0=t(cos((2*i+1)/(2*(k+1))*pi))print"x1 Stützstelle"x1.numerical_approx()y1=f(x1)print"g(x1)"y1.numerical_approx()#Integralwert auf [2,3]QI=(b-a)/2*pi*(1/2*y0+1/2*y1)print"Quadratur Ergebnis"QI.numerical_approx()print"Analytischer Integralwert"I23.numerical_approx()print"Unterschied"r=I23-QIr.numerical_approx()#k=2print"Nun k=2 Stützstelle"x0=t(cos((2*0+1)/(2*(2+1))*pi))print"x0 Stützstelle"x0.numerical_approx()y0=f(x0)print"g(x0)"y0.numerical_approx()x1=t(cos((2*1+1)/(2*(2+1))*pi))print"x1 Stützstelle"x1.numerical_approx()y1=f(x1)print"g(x1)"y1.numerical_approx()x2=t(cos((2*2+1)/(2*(2+1))*pi))print"x2 Stützstelle"x2.numerical_approx()y2=f(x2)print"g(x2)"y2.numerical_approx()#Integralwert auf [2,3] mit k =2QI2=(b-a)/2*pi*(1/3*y0+1/3*y1+1/3*y2)print"Quadratur Ergebnis"QI2.numerical_approx()print"Analytischer Integralwert"I23.numerical_approx()print"Unterschied"r=I23-QI2r.numerical_approx()