reserve x,a,b,c for Real,
  n for Nat,
  Z for open Subset of REAL,
  f, f1,f2 for PartFunc of REAL,REAL;

theorem
  Z c= dom (( #Z n)*cosec) & 1<=n implies ( #Z n)*cosec
is_differentiable_on Z & for x st x in Z holds ((( #Z n)*cosec)`|Z).x = -n*cos.
  x/(sin.x) #Z (n+1)
proof
  assume that
A1: Z c= dom (( #Z n)*cosec) and
A2: 1<=n;
  dom (( #Z n)*cosec) c= dom cosec by RELAT_1:25;
  then
A3: Z c= dom cosec by A1,XBOOLE_1:1;
A4: for x st x in Z holds sin.x<>0
  proof
    let x;
    assume x in Z;
    then x in dom cosec by A1,FUNCT_1:11;
    hence thesis by RFUNCT_1:3;
  end;
A5: for x st x in Z holds ( #Z n)*cosec is_differentiable_in x
  proof
    let x;
    assume x in Z;
    then sin.x<>0 by A4;
    then cosec is_differentiable_in x by Th2;
    hence thesis by TAYLOR_1:3;
  end;
  then
A6: ( #Z n)*cosec is_differentiable_on Z by A1,FDIFF_1:9;
  for x st x in Z holds ((( #Z n)*cosec)`|Z).x = -n*cos.x/(sin.x) #Z (n+1 )
  proof
    set m = n-1;
    let x;
A7: ex m being Nat st n = m + 1 by A2,NAT_1:6;
    assume
A8: x in Z;
    then
A9: sin.x<>0 by A4;
    then
A10: cosec is_differentiable_in x by Th2;
    ((( #Z n)*cosec)`|Z).x=diff(( #Z n)*cosec,x) by A6,A8,FDIFF_1:def 7
      .=n*(cosec.x) #Z (n-1) * diff(cosec,x) by A10,TAYLOR_1:3
      .=n*(cosec.x) #Z (n-1) *(-cos.x/(sin.x)^2) by A9,Th2
      .=n*(1/sin.x) #Z (n-1) *(-cos.x/(sin.x)^2) by A3,A8,RFUNCT_1:def 2
      .=n*(1/(sin.x) #Z m) *(-cos.x/(sin.x)^2) by A7,Th3
      .=(n/(sin.x) #Z (n-1))*((-cos.x)/(sin.x)^2)
      .=(n*(-cos.x))/((sin.x) #Z (n-1)*(sin.x)^2) by XCMPLX_1:76
      .=(n*(-cos.x))/((sin.x) #Z (n-1)*(sin.x) #Z 2) by FDIFF_7:1
      .=(n*(-cos.x))/((sin.x) #Z (n-1+2)) by A4,A8,PREPOWER:44
      .=n*(-cos.x)/(sin.x) #Z (n+1);
    hence thesis;
  end;
  hence thesis by A1,A5,FDIFF_1:9;
end;
