 reserve a,x for Real;
 reserve n for Element of NAT;
 reserve A for non empty closed_interval Subset of REAL;
 reserve f,h,f1,f2 for PartFunc of REAL,REAL;
 reserve Z for open Subset of REAL;

theorem Th40:
  Z c= dom (( #Z n)*arccot) & Z c= ]. -1,1 .[ implies
  -( #Z n)*arccot is_differentiable_on Z & for x st x in Z holds
  ((-( #Z n)*arccot)`|Z).x = n*(arccot.x) #Z (n-1) / (1+x^2)
proof
    assume
A1:Z c= dom (( #Z n)*arccot) & Z c= ]. -1,1 .[;
then A2:Z c= dom (-( #Z n)*arccot) by VALUED_1:8;
A3:( #Z n)*(arccot) is_differentiable_on Z by A1,SIN_COS9:92;
then A4:(-1)(#)(( #Z n)*(arccot)) is_differentiable_on Z by A2,FDIFF_1:20;
 for x st x in Z holds ((-( #Z n)*arccot)`|Z).x
                         = n*(arccot.x) #Z (n-1) / (1+x^2)
   proof
      let x;
      assume
A5:x in Z;then
A6:-1 < x & x < 1 by A1,XXREAL_1:4;
arccot is_differentiable_on Z by A1,SIN_COS9:82;
then A7:arccot is_differentiable_in x by A5,FDIFF_1:9;
A8:( #Z n)*(arccot) is_differentiable_in x by A3,A5,FDIFF_1:9;
  ((-( #Z n)*arccot)`|Z).x=diff(-( #Z n)*arccot,x) by A4,A5,FDIFF_1:def 7
     .=(-1)*(diff(( #Z n)*arccot,x)) by A8,FDIFF_1:15
     .=(-1)*((n*((arccot.x) #Z (n-1))) * diff(arccot,x)) by A7,TAYLOR_1:3
     .=(-1)*((n*((arccot.x) #Z (n-1))) * (-1/(1+x^2))) by A6,SIN_COS9:76
     .=n*(arccot.x) #Z (n-1) / (1+x^2);
    hence thesis;
   end;
   hence thesis by A2,A3,FDIFF_1:20;
end;
