Integration Homework:

    p. 281, #1, but do it for all three methods; 2, 15
    p. 293, #1, 4a (I’m not sure about b!), 5

p. 281, #1

f[x_]:=1/x
a=1;
b=2.6;
h=(b-a)/2;
{Trap=.5*h*(f[a]+2f[a+h]+f[b]),
Mid=h*(f[a+h/2]+f[b-h/2]),
Simp=(2Mid+Trap)/3,
Integrate[f[x],{x,a,b}]}

If you took it to mean cutting this interval into two again, then it would be

f[x_]:=1/x
a=1;
b=2.6;
h=(b-a)/4;
{Trap=.5*h*(f[a]+2(f[a+h]+f[a+2h]+f[a+3h])+f[b]),
Mid=h*(f[a+h/2]+f[a+3h/2]+f[a+5h/2]+f[a+7h/2]),
Simp=(2Mid+Trap)/3,
Integrate[f[x],{x,a,b}]}

If you took it to mean not cutting this interval into two at all, then it would be

h=(b-a);
{Trap=.5*h*(f[a]+f[b]),
Mid=h*f[a+h/2],
Simp=(2Mid+Trap)/3,
Integrate[f[x],{x,a,b}]}

p. 281, #2

H[n_]:=Sum[1/k,{k,1,n}]
n=100
H[n]
N[%]
N[Log[2n+1]]

p. 281, #15

eh=0.034518
ehover2=0.013243
p=Log[eh/ehover2]/Log[2]

p. 293, #1, 4a (I’m not sure about b!), 5

#1: If it's a quadratic, it's exact:

Clear[a,b,c,x0,x1,midpoint,h]
f[x_]:=a x^2+b x + c
midpoint=(x0+x1)/2;
h=x1-x0;
trap=h*(f[x0]+2f[midpoint]+f[x1])/4
trap2=h*(f[x0]+f[x1])/2
Simplify[Integrate[f[x],{x,x0,x1}]]
Simplify[(4trap-trap2)/3]
a=1;
b=2;
c=3;
x0=0;
x1=1;
{trap,trap2,(4trap-trap2)/3,Integrate[f[x],{x,x0,x1}]}

#4a: the xi's aren't (necessarily) the same.

#5:

f[x_]:=1/(1+x^2)
f4th[x_]=D[f[x],{x,4}]
Plot[f4th[x],{x,0,1}]
a=0;
b=1;
h=(b-a)/2;
h^4/2880(b-a)*24