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

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

then A2: Z c= dom (- (cot * ln)) by VALUED_1:8;
dom (cot * ln) c= dom ln by RELAT_1:44;
then A4: Z c= dom ln by A1, XBOOLE_1:1;
A5: for x being Real st x in Z holds
x > 0
proof
let x be Real; :: thesis: ( x in Z implies x > 0 )
assume x in Z ; :: thesis: x > 0
then x in right_open_halfline 0 by A4, TAYLOR_1:18;
then ex g being Real st
( x = g & 0 < g ) by Lm1;
hence x > 0 ; :: thesis: verum
end;
A6: for x being Real st x in Z holds
sin . (ln . x) <> 0
proof
let x be Real; :: thesis: ( x in Z implies sin . (ln . x) <> 0 )
assume x in Z ; :: thesis: sin . (ln . x) <> 0
then ln . x in dom (cos / sin) by A1, FUNCT_1:21;
hence sin . (ln . x) <> 0 by FDIFF_8:2; :: thesis: verum
end;
B: for x being Real st x in Z holds
diff (ln,x) = 1 / x
proof
let x be Real; :: thesis: ( x in Z implies diff (ln,x) = 1 / x )
assume x in Z ; :: thesis: diff (ln,x) = 1 / x
then x > 0 by A5;
then x in right_open_halfline 0 by Lm1;
hence diff (ln,x) = 1 / x by TAYLOR_1:18; :: thesis: verum
end;
A8: cot * ln is_differentiable_on Z by A1, FDIFF_8:15;
then A9: (- 1) (#) (cot * ln) is_differentiable_on Z by A2, FDIFF_1:28, A;
for x being Real st x in Z holds
((- (cot * ln)) `| Z) . x = 1 / (x * ((sin . (ln . x)) ^2))
proof
let x be Real; :: thesis: ( x in Z implies ((- (cot * ln)) `| Z) . x = 1 / (x * ((sin . (ln . x)) ^2)) )
assume A10: x in Z ; :: thesis: ((- (cot * ln)) `| Z) . x = 1 / (x * ((sin . (ln . x)) ^2))
then A11: ln is_differentiable_in x by A5, TAYLOR_1:18;
A12: ( x > 0 & sin . (ln . x) <> 0 ) by A5, A6, A10;
then A13: cot is_differentiable_in ln . x by FDIFF_7:47;
A14: cot * ln is_differentiable_in x by A8, A10, FDIFF_1:16;
((- (cot * ln)) `| Z) . x = diff ((- (cot * ln)),x) by A9, A10, FDIFF_1:def 8
.= (- 1) * (diff ((cot * ln),x)) by A14, FDIFF_1:23, A
.= (- 1) * ((diff (cot,(ln . x))) * (diff (ln,x))) by A11, A13, FDIFF_2:13
.= (- 1) * ((- (1 / ((sin . (ln . x)) ^2))) * (diff (ln,x))) by A12, FDIFF_7:47
.= (- 1) * (- ((diff (ln,x)) / ((sin . (ln . x)) ^2)))
.= (- 1) * (- ((1 / x) / ((sin . (ln . x)) ^2))) by B, A10
.= 1 / (x * ((sin . (ln . x)) ^2)) by XCMPLX_1:79 ;
hence ((- (cot * ln)) `| Z) . x = 1 / (x * ((sin . (ln . x)) ^2)) ; :: thesis: verum
end;
hence ( - (cot * ln) is_differentiable_on Z & ( for x being Real st x in Z holds
((- (cot * ln)) `| Z) . x = 1 / (x * ((sin . (ln . x)) ^2)) ) ) by A2, A8, FDIFF_1:28, A; :: thesis: verum