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= dom (cosec(#)arccot) & Z c= ].-1,1.[ implies (cosec(#)arccot)
is_differentiable_on Z & for x st x in Z holds ((cosec(#)arccot)`|Z).x = -(cos.
  x*arccot.x)/(sin.x)^2-1/(sin.x*(1+x^2))
proof
  assume that
A1: Z c= dom (cosec(#)arccot) and
A2: Z c= ].-1,1.[;
A3: arccot is_differentiable_on Z by A2,SIN_COS9:82;
  Z c= dom cosec /\ dom arccot by A1,VALUED_1:def 4;
  then
A4: Z c= dom cosec by XBOOLE_1:18;
  for x st x in Z holds cosec is_differentiable_in x
  proof
    let x;
    assume x in Z;
    then sin.x <> 0 by A4,RFUNCT_1:3;
    hence thesis by FDIFF_9:2;
  end;
  then
A5: cosec is_differentiable_on Z by A4,FDIFF_1:9;
  for x st x in Z holds ((cosec(#)arccot)`|Z).x = -(cos.x*arccot.x)/(sin.
  x)^2-1/(sin.x*(1+x^2))
  proof
    let x;
    assume
A6: x in Z;
    then
A7: sin.x <> 0 by A4,RFUNCT_1:3;
    ((cosec(#)arccot)`|Z).x = (arccot.x)*diff(cosec,x)+(cosec.x)*diff(
    arccot,x) by A1,A5,A3,A6,FDIFF_1:21
      .= (arccot.x)*(-cos.x/(sin.x)^2)+(cosec.x)*diff(arccot,x) by A7,FDIFF_9:2
      .= -(cos.x*arccot.x)/(sin.x)^2+(cosec.x)*((arccot)`|Z).x by A3,A6,
FDIFF_1:def 7
      .= -(cos.x*arccot.x)/(sin.x)^2+(cosec.x)*(-1/(1+x^2)) by A2,A6,
SIN_COS9:82
      .= -(cos.x*arccot.x)/(sin.x)^2-(cosec.x)*(1/(1+x^2))
      .= -(cos.x*arccot.x)/(sin.x)^2-(1/sin.x)*(1/(1+x^2)) by A4,A6,
RFUNCT_1:def 2
      .= -(cos.x*arccot.x)/(sin.x)^2-1/(sin.x*(1+x^2)) by XCMPLX_1:102;
    hence thesis;
  end;
  hence thesis by A1,A5,A3,FDIFF_1:21;
end;
