reserve x,x0, r, s, h for Real,

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

  f, f1, f2 for PartFunc of REAL,REAL;

theorem
  Z c= dom (arccot*ln) & (for x st x in Z holds ln.x > -1 & ln.x < 1)
implies arccot*ln is_differentiable_on Z & for x st x in Z holds ((arccot*ln)`|
  Z).x = -1/(x*(1+(ln.x)^2))
proof
A1: right_open_halfline 0 = {g where g is Real: 0 < g} by XXREAL_1:230;
  assume that
A2: Z c= dom (arccot*ln) and
A3: for x st x in Z holds ln.x > -1 & ln.x < 1;
  dom (arccot*ln) c= dom ln by RELAT_1:25;
  then
A4: Z c= dom ln by A2;
A5: for x st x in Z holds x > 0
  proof
    let x;
    assume x in Z;
    then x in right_open_halfline(0) by A4,TAYLOR_1:18;
    then ex g being Real st x = g & 0 < g by A1;
    hence thesis;
  end;
A6: for x st x in Z holds arccot*ln is_differentiable_in x
  proof
    let x;
    assume
A7: x in Z;
    then
A8: ln.x > -1 by A3;
A9: ln.x < 1 by A3,A7;
    ln is_differentiable_in x by A5,A7,TAYLOR_1:18;
    hence thesis by A8,A9,Th86;
  end;
  then
A10: arccot*ln is_differentiable_on Z by A2,FDIFF_1:9;
  for x st x in Z holds ((arccot*ln)`|Z).x = -1/(x*(1+(ln.x)^2))
  proof
    let x;
    assume
A11: x in Z;
    then
A12: ln is_differentiable_in x by A5,TAYLOR_1:18;
A13: ln.x < 1 by A3,A11;
A14: ln.x > -1 by A3,A11;
    x > 0 by A5,A11;
    then
A15: x in right_open_halfline(0) by A1;
    ((arccot*ln)`|Z).x = diff(arccot*ln,x) by A10,A11,FDIFF_1:def 7
      .= -diff(ln,x)/(1+(ln.x)^2) by A12,A14,A13,Th86
      .= -(1/x)/(1+(ln.x)^2) by A15,TAYLOR_1:18
      .= -1/(x*(1+(ln.x)^2)) by XCMPLX_1:78;
    hence thesis;
  end;
  hence thesis by A2,A6,FDIFF_1:9;
end;
