% Session p. 189
format long

function y=df2(t,n)  % n-th derivative of f2
   global alfa
   z=t+i*t.*(2-t); dz=1+2i*(1-t); f=log(z)+i./(2-z);
   y=-i*exp(alfa*f).*dz;
   for k=1:n, y=f.*y; end
   y=real(y);
end
global alfa; alfa=pi/4;
h=1/16; t=-5.3:h:4.2;
x=2./(1+exp(2*(exp(-t)-t)));
w=h*sech(t-exp(-t)).^2.*(1+exp(-t));
for n=0:2, wf=w.*df2(x,n); q=sum(wf), sum(abs(wf)>eps*abs(q)), end