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

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

then Z c= (dom sin ) /\ (dom cot ) by VALUED_1:def 4;
then A2: ( Z c= dom sin & Z c= dom cot ) by XBOOLE_1:18;
for x being Real st x in Z holds
cot is_differentiable_in x
proof end;
then A3: cot is_differentiable_on Z by A2, FDIFF_1:16;
for x being Real st x in Z holds
sin is_differentiable_in x by SIN_COS:69;
then A4: sin is_differentiable_on Z by A2, FDIFF_1:16;
A5: for x being Real st x in Z holds
diff cot ,x = - (1 / ((sin . x) ^2 ))
proof
let x be Real; :: thesis: ( x in Z implies diff cot ,x = - (1 / ((sin . x) ^2 )) )
assume x in Z ; :: thesis: diff cot ,x = - (1 / ((sin . x) ^2 ))
then sin . x <> 0 by A2, FDIFF_8:2;
hence diff cot ,x = - (1 / ((sin . x) ^2 )) by FDIFF_7:47; :: thesis: verum
end;
for x being Real st x in Z holds
((sin (#) cot ) `| Z) . x = ((cos . x) * (cot . x)) - (1 / (sin . x))
proof
let x be Real; :: thesis: ( x in Z implies ((sin (#) cot ) `| Z) . x = ((cos . x) * (cot . x)) - (1 / (sin . x)) )
assume A6: x in Z ; :: thesis: ((sin (#) cot ) `| Z) . x = ((cos . x) * (cot . x)) - (1 / (sin . x))
then ((sin (#) cot ) `| Z) . x = ((diff sin ,x) * (cot . x)) + ((sin . x) * (diff cot ,x)) by A1, A3, A4, FDIFF_1:29
.= ((cos . x) * (cot . x)) + ((sin . x) * (diff cot ,x)) by SIN_COS:69
.= ((cos . x) * (cot . x)) + ((sin . x) * (- (1 / ((sin . x) ^2 )))) by A5, A6
.= ((cos . x) * (cot . x)) - ((sin . x) / ((sin . x) ^2 ))
.= ((cos . x) * (cot . x)) - (((sin . x) / (sin . x)) / (sin . x)) by XCMPLX_1:79
.= ((cos . x) * (cot . x)) - (1 / (sin . x)) by A2, A6, FDIFF_8:2, XCMPLX_1:60 ;
hence ((sin (#) cot ) `| Z) . x = ((cos . x) * (cot . x)) - (1 / (sin . x)) ; :: thesis: verum
end;
hence ( sin (#) cot is_differentiable_on Z & ( for x being Real st x in Z holds
((sin (#) cot ) `| Z) . x = ((cos . x) * (cot . x)) - (1 / (sin . x)) ) ) by A1, A3, A4, FDIFF_1:29; :: thesis: verum