question 1

f(t):=a*t^3+b*t^2+c*t+d;

I:(b-a)*1/6*(f(a)+4*f((a+b)/2)+f(b));

ratsimp(I);

S:integrate(f(t),t,a,b);

ratsimp(I-S);

question 2

f(t):=1/(1+t^2);

define(g(t),diff(f(t),t,4));

wxplot2d([g(t)],[t,0,1/2]);

question 3

s:ode2('diff(y,t,2)+k*'diff(y,t,1)+omega02*y=A*cos(omega*t),y,t);

ic2(s,t=0,y=x0,'diff(y,t)=0);