let n be natural number ; :: thesis: for Z being open Subset of REAL st Z c= dom ((#Z n) * cot ) & 1 <= n holds
( (#Z n) * cot is_differentiable_on Z & ( for x being Real st x in Z holds
(((#Z n) * cot ) `| Z) . x = - ((n * ((cos . x) #Z (n - 1))) / ((sin . x) #Z (n + 1))) ) )

let Z be open Subset of REAL ; :: thesis: ( Z c= dom ((#Z n) * cot ) & 1 <= n implies ( (#Z n) * cot is_differentiable_on Z & ( for x being Real st x in Z holds
(((#Z n) * cot ) `| Z) . x = - ((n * ((cos . x) #Z (n - 1))) / ((sin . x) #Z (n + 1))) ) ) )

assume that
A1: Z c= dom ((#Z n) * cot ) and
A2: 1 <= n ; :: thesis: ( (#Z n) * cot is_differentiable_on Z & ( for x being Real st x in Z holds
(((#Z n) * cot ) `| Z) . x = - ((n * ((cos . x) #Z (n - 1))) / ((sin . x) #Z (n + 1))) ) )

A3: dom ((#Z n) * cot ) c= dom cot by RELAT_1:44;
A4: for x being Real st x in Z holds
sin . x <> 0
proof
let x be Real; :: thesis: ( x in Z implies sin . x <> 0 )
assume x in Z ; :: thesis: sin . x <> 0
then x in dom (cos / sin ) by A1, FUNCT_1:21;
hence sin . x <> 0 by Th2; :: thesis: verum
end;
A5: for x being Real st x in Z holds
(#Z n) * cot is_differentiable_in x
proof end;
then A6: (#Z n) * cot is_differentiable_on Z by A1, FDIFF_1:16;
for x being Real st x in Z holds
(((#Z n) * cot ) `| Z) . x = - ((n * ((cos . x) #Z (n - 1))) / ((sin . x) #Z (n + 1)))
proof
set m = n - 1;
let x be Real; :: thesis: ( x in Z implies (((#Z n) * cot ) `| Z) . x = - ((n * ((cos . x) #Z (n - 1))) / ((sin . x) #Z (n + 1))) )
A7: ex m being Nat st n = m + 1 by A2, NAT_1:6;
assume A8: x in Z ; :: thesis: (((#Z n) * cot ) `| Z) . x = - ((n * ((cos . x) #Z (n - 1))) / ((sin . x) #Z (n + 1)))
then A9: sin . x <> 0 by A4;
then A10: cot is_differentiable_in x by FDIFF_7:47;
(((#Z n) * cot ) `| Z) . x = diff ((#Z n) * cot ),x by A6, A8, FDIFF_1:def 8
.= (n * ((cot . x) #Z (n - 1))) * (diff cot ,x) by A10, TAYLOR_1:3
.= (n * ((cot . x) #Z (n - 1))) * (- (1 / ((sin . x) ^2 ))) by A9, FDIFF_7:47
.= - ((n * ((cot . x) #Z (n - 1))) / ((sin . x) ^2 ))
.= - ((n * (((cos . x) #Z (n - 1)) / ((sin . x) #Z (n - 1)))) / ((sin . x) ^2 )) by A1, A3, A8, A7, Th3, XBOOLE_1:1
.= - (((n * ((cos . x) #Z (n - 1))) / ((sin . x) #Z (n - 1))) / ((sin . x) ^2 ))
.= - ((n * ((cos . x) #Z (n - 1))) / (((sin . x) #Z (n - 1)) * ((sin . x) ^2 ))) by XCMPLX_1:79
.= - ((n * ((cos . x) #Z (n - 1))) / (((sin . x) #Z (n - 1)) * ((sin . x) #Z 2))) by FDIFF_7:1
.= - ((n * ((cos . x) #Z (n - 1))) / ((sin . x) #Z ((n - 1) + 2))) by A4, A8, PREPOWER:54
.= - ((n * ((cos . x) #Z (n - 1))) / ((sin . x) #Z (n + 1))) ;
hence (((#Z n) * cot ) `| Z) . x = - ((n * ((cos . x) #Z (n - 1))) / ((sin . x) #Z (n + 1))) ; :: thesis: verum
end;
hence ( (#Z n) * cot is_differentiable_on Z & ( for x being Real st x in Z holds
(((#Z n) * cot ) `| Z) . x = - ((n * ((cos . x) #Z (n - 1))) / ((sin . x) #Z (n + 1))) ) ) by A1, A5, FDIFF_1:16; :: thesis: verum