reserve x for Real,

  n for Element of NAT,
   y for set,
  Z for open Subset of REAL,

     g for PartFunc of REAL,REAL;

theorem
  Z c= ].-1,1.[ implies arctan(#)arccot is_differentiable_on Z & for x
  st x in Z holds ((arctan(#)arccot)`|Z).x = (arccot.x-arctan.x)/(1+x^2)
proof
  assume
A1: Z c= ].-1,1.[;
  then
A2: arctan is_differentiable_on Z by SIN_COS9:81;
A3: ].-1,1.[ c= [.-1,1.] by XXREAL_1:25;
  then ].-1,1.[ c= dom arccot by SIN_COS9:24,XBOOLE_1:1;
  then
A4: Z c= dom arccot by A1,XBOOLE_1:1;
A5: arccot is_differentiable_on Z by A1,SIN_COS9:82;
  ].-1,1.[ c= dom arctan by A3,SIN_COS9:23,XBOOLE_1:1;
  then Z c= dom arctan by A1,XBOOLE_1:1;
  then Z c= dom arctan /\ dom arccot by A4,XBOOLE_1:19;
  then
A6: Z c= dom(arctan(#)arccot) by VALUED_1:def 4;
  for x st x in Z holds ((arctan(#)arccot)`|Z).x = (arccot.x-arctan.x)/(1 +x^2)
  proof
    let x;
    assume
A7: x in Z;
    then
    ((arctan(#)arccot)`|Z).x = (arccot.x)*diff(arctan,x)+(arctan.x)*diff(
    arccot,x) by A6,A2,A5,FDIFF_1:21
      .= arccot.x*((arctan)`|Z).x+arctan.x*diff(arccot,x) by A2,A7,
FDIFF_1:def 7
      .= arccot.x*(1/(1+x^2))+arctan.x*diff(arccot,x) by A1,A7,SIN_COS9:81
      .= arccot.x*(1/(1+x^2))+arctan.x*((arccot)`|Z).x by A5,A7,FDIFF_1:def 7
      .= arccot.x*(1/(1+x^2))+arctan.x*(-1/(1+x^2)) by A1,A7,SIN_COS9:82
      .= (arccot.x-arctan.x)/(1+x^2);
    hence thesis;
  end;
  hence thesis by A6,A2,A5,FDIFF_1:21;
end;
