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

A1: for x being Real st x in Z holds
cos is_differentiable_in x by SIN_COS:63;
assume A2: Z c= dom (cos (#) (tan - cot)) ; :: thesis: ( cos (#) (tan - cot) is_differentiable_on Z & ( for x being Real st x in Z holds
((cos (#) (tan - cot)) `| Z) . x = (- ((sin . x) * ((tan . x) - (cot . x)))) + ((cos . x) * ((1 / ((cos . x) ^2)) + (1 / ((sin . x) ^2)))) ) )

then A3: Z c= (dom (tan - cot)) /\ (dom cos) by VALUED_1:def 4;
then A4: Z c= dom (tan - cot) by XBOOLE_1:18;
then A5: tan - cot is_differentiable_on Z by Th5;
Z c= dom cos by A3, XBOOLE_1:18;
then A6: cos is_differentiable_on Z by A1, FDIFF_1:9;
for x being Real st x in Z holds
((cos (#) (tan - cot)) `| Z) . x = (- ((sin . x) * ((tan . x) - (cot . x)))) + ((cos . x) * ((1 / ((cos . x) ^2)) + (1 / ((sin . x) ^2))))
proof
let x be Real; :: thesis: ( x in Z implies ((cos (#) (tan - cot)) `| Z) . x = (- ((sin . x) * ((tan . x) - (cot . x)))) + ((cos . x) * ((1 / ((cos . x) ^2)) + (1 / ((sin . x) ^2)))) )
assume A7: x in Z ; :: thesis: ((cos (#) (tan - cot)) `| Z) . x = (- ((sin . x) * ((tan . x) - (cot . x)))) + ((cos . x) * ((1 / ((cos . x) ^2)) + (1 / ((sin . x) ^2))))
then ((cos (#) (tan - cot)) `| Z) . x = (((tan - cot) . x) * (diff (cos,x))) + ((cos . x) * (diff ((tan - cot),x))) by A2, A5, A6, FDIFF_1:21
.= (((tan . x) - (cot . x)) * (diff (cos,x))) + ((cos . x) * (diff ((tan - cot),x))) by A4, A7, VALUED_1:13
.= (((tan . x) - (cot . x)) * (- (sin . x))) + ((cos . x) * (diff ((tan - cot),x))) by SIN_COS:63
.= (((tan . x) - (cot . x)) * (- (sin . x))) + ((cos . x) * (((tan - cot) `| Z) . x)) by A5, A7, FDIFF_1:def 7
.= (((tan . x) - (cot . x)) * (- (sin . x))) + ((cos . x) * ((1 / ((cos . x) ^2)) + (1 / ((sin . x) ^2)))) by A4, A7, Th5 ;
hence ((cos (#) (tan - cot)) `| Z) . x = (- ((sin . x) * ((tan . x) - (cot . x)))) + ((cos . x) * ((1 / ((cos . x) ^2)) + (1 / ((sin . x) ^2)))) ; :: thesis: verum
end;
hence ( cos (#) (tan - cot) is_differentiable_on Z & ( for x being Real st x in Z holds
((cos (#) (tan - cot)) `| Z) . x = (- ((sin . x) * ((tan . x) - (cot . x)))) + ((cos . x) * ((1 / ((cos . x) ^2)) + (1 / ((sin . x) ^2)))) ) ) by A2, A5, A6, FDIFF_1:21; :: thesis: verum