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

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

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

A3: now :: thesis: for x being Real st x in Z holds
(#Z n) * cos is_differentiable_in x
end;
Z c= dom ((#Z n) * cos) by A1, VALUED_1:def 5;
then A4: (#Z n) * cos is_differentiable_on Z by A3, FDIFF_1:9;
for x being Real st x in Z holds
(((1 / n) (#) ((#Z n) * cos)) `| Z) . x = - (((cos . x) #Z (n - 1)) * (sin . x))
proof
let x be Real; :: thesis: ( x in Z implies (((1 / n) (#) ((#Z n) * cos)) `| Z) . x = - (((cos . x) #Z (n - 1)) * (sin . x)) )
A5: cos is_differentiable_in x by SIN_COS:63;
assume x in Z ; :: thesis: (((1 / n) (#) ((#Z n) * cos)) `| Z) . x = - (((cos . x) #Z (n - 1)) * (sin . x))
then (((1 / n) (#) ((#Z n) * cos)) `| Z) . x = (1 / n) * (diff (((#Z n) * cos),x)) by A1, A4, FDIFF_1:20
.= (1 / n) * ((n * ((cos . x) #Z (n - 1))) * (diff (cos,x))) by A5, TAYLOR_1:3
.= (1 / n) * ((n * ((cos . x) #Z (n - 1))) * (- (sin . x))) by SIN_COS:63
.= (((1 / n) * n) * ((cos . x) #Z (n - 1))) * (- (sin . x))
.= (((n ") * n) * ((cos . x) #Z (n - 1))) * (- (sin . x)) by XCMPLX_1:215
.= (1 * ((cos . x) #Z (n - 1))) * (- (sin . x)) by A2, XCMPLX_0:def 7
.= - (((cos . x) #Z (n - 1)) * (sin . x)) ;
hence (((1 / n) (#) ((#Z n) * cos)) `| Z) . x = - (((cos . x) #Z (n - 1)) * (sin . x)) ; :: thesis: verum
end;
hence ( (1 / n) (#) ((#Z n) * cos) is_differentiable_on Z & ( for x being Real st x in Z holds
(((1 / n) (#) ((#Z n) * cos)) `| Z) . x = - (((cos . x) #Z (n - 1)) * (sin . x)) ) ) by A1, A4, FDIFF_1:20; :: thesis: verum