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

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

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

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

A4: for x being Real st x in Z holds
f . x = (n * x) + 0 by A3;
A5: Z c= (dom (cos * f)) /\ (dom ((#Z n) * cos)) by A1, VALUED_1:def 4;
then A6: Z c= dom (cos * f) by XBOOLE_1:18;
then for y being object st y in Z holds
y in dom f by FUNCT_1:11;
then A7: Z c= dom f ;
then A8: f is_differentiable_on Z by A4, FDIFF_1:23;
for x being Real st x in Z holds
cos * f is_differentiable_in x
proof end;
then A10: cos * f is_differentiable_on Z by A6, FDIFF_1:9;
A11: for x being Real st x in Z holds
((cos * f) `| Z) . x = - (n * (sin . (n * x)))
proof
let x be Real; :: thesis: ( x in Z implies ((cos * f) `| Z) . x = - (n * (sin . (n * x))) )
A12: cos is_differentiable_in f . x by SIN_COS:63;
assume A13: x in Z ; :: thesis: ((cos * f) `| Z) . x = - (n * (sin . (n * x)))
then f is_differentiable_in x by A8, FDIFF_1:9;
then diff ((cos * f),x) = (diff (cos,(f . x))) * (diff (f,x)) by A12, FDIFF_2:13
.= (- (sin . (f . x))) * (diff (f,x)) by SIN_COS:63
.= - ((sin . (f . x)) * (diff (f,x)))
.= - ((sin . (n * x)) * (diff (f,x))) by A3, A13
.= - ((sin . (n * x)) * ((f `| Z) . x)) by A8, A13, FDIFF_1:def 7
.= - (n * (sin . (n * x))) by A7, A4, A13, FDIFF_1:23 ;
hence ((cos * f) `| Z) . x = - (n * (sin . (n * x))) by A10, A13, FDIFF_1:def 7; :: thesis: verum
end;
A14: Z c= dom ((#Z n) * cos) by A5, XBOOLE_1:18;
now :: thesis: for x being Real st x in Z holds
(#Z n) * cos is_differentiable_in x
end;
then A15: (#Z n) * cos is_differentiable_on Z by A14, FDIFF_1:9;
A16: for x being Real st x in Z holds
(((#Z n) * cos) `| Z) . x = - ((n * ((cos . x) #Z (n - 1))) * (sin . x))
proof
let x be Real; :: thesis: ( x in Z implies (((#Z n) * cos) `| Z) . x = - ((n * ((cos . x) #Z (n - 1))) * (sin . x)) )
cos is_differentiable_in x by SIN_COS:63;
then A17: diff (((#Z n) * cos),x) = (n * ((cos . x) #Z (n - 1))) * (diff (cos,x)) by TAYLOR_1:3
.= (n * ((cos . x) #Z (n - 1))) * (- (sin . x)) by SIN_COS:63
.= - ((n * ((cos . x) #Z (n - 1))) * (sin . x)) ;
assume x in Z ; :: thesis: (((#Z n) * cos) `| Z) . x = - ((n * ((cos . x) #Z (n - 1))) * (sin . x))
hence (((#Z n) * cos) `| Z) . x = - ((n * ((cos . x) #Z (n - 1))) * (sin . x)) by A15, A17, FDIFF_1:def 7; :: thesis: verum
end;
now :: thesis: for x being Real st x in Z holds
(((cos * f) (#) ((#Z n) * cos)) `| Z) . x = - ((n * ((cos . x) #Z (n - 1))) * (sin . ((n + 1) * x)))
let x be Real; :: thesis: ( x in Z implies (((cos * f) (#) ((#Z n) * cos)) `| Z) . x = - ((n * ((cos . x) #Z (n - 1))) * (sin . ((n + 1) * x))) )
A18: n - 1 is Element of NAT by A2, NAT_1:21;
assume A19: x in Z ; :: thesis: (((cos * f) (#) ((#Z n) * cos)) `| Z) . x = - ((n * ((cos . x) #Z (n - 1))) * (sin . ((n + 1) * x)))
then (((cos * f) (#) ((#Z n) * cos)) `| Z) . x = ((((#Z n) * cos) . x) * (diff ((cos * f),x))) + (((cos * f) . x) * (diff (((#Z n) * cos),x))) by A1, A10, A15, FDIFF_1:21
.= (((#Z n) . (cos . x)) * (diff ((cos * f),x))) + (((cos * f) . x) * (diff (((#Z n) * cos),x))) by A14, A19, FUNCT_1:12
.= (((cos . x) #Z n) * (diff ((cos * f),x))) + (((cos * f) . x) * (diff (((#Z n) * cos),x))) by TAYLOR_1:def 1
.= (((cos . x) #Z n) * (((cos * f) `| Z) . x)) + (((cos * f) . x) * (diff (((#Z n) * cos),x))) by A10, A19, FDIFF_1:def 7
.= (((cos . x) #Z n) * (- (n * (sin . (n * x))))) + (((cos * f) . x) * (diff (((#Z n) * cos),x))) by A11, A19
.= (((cos . x) #Z n) * (- (n * (sin . (n * x))))) + ((cos . (f . x)) * (diff (((#Z n) * cos),x))) by A6, A19, FUNCT_1:12
.= (((cos . x) #Z n) * (- (n * (sin . (n * x))))) + ((cos . (n * x)) * (diff (((#Z n) * cos),x))) by A3, A19
.= (((cos . x) #Z n) * (- (n * (sin . (n * x))))) + ((cos . (n * x)) * ((((#Z n) * cos) `| Z) . x)) by A15, A19, FDIFF_1:def 7
.= (((cos . x) #Z ((n - 1) + 1)) * (- (n * (sin . (n * x))))) + ((cos . (n * x)) * (- ((n * ((cos . x) #Z (n - 1))) * (sin . x)))) by A16, A19
.= ((((cos . x) #Z (n - 1)) * ((cos . x) #Z 1)) * (- (n * (sin . (n * x))))) + ((cos . (n * x)) * (- ((n * ((cos . x) #Z (n - 1))) * (sin . x)))) by A18, TAYLOR_1:1
.= ((((cos . x) #Z (n - 1)) * (cos . x)) * (- (n * (sin . (n * x))))) + ((cos . (n * x)) * (- ((n * ((cos . x) #Z (n - 1))) * (sin . x)))) by PREPOWER:35
.= - ((n * ((cos . x) #Z (n - 1))) * (((sin . (n * x)) * (cos . x)) + ((cos . (n * x)) * (sin . x))))
.= - ((n * ((cos . x) #Z (n - 1))) * (sin . (x + (n * x)))) by SIN_COS:74
.= - ((n * ((cos . x) #Z (n - 1))) * (sin . ((n + 1) * x))) ;
hence (((cos * f) (#) ((#Z n) * cos)) `| Z) . x = - ((n * ((cos . x) #Z (n - 1))) * (sin . ((n + 1) * x))) ; :: thesis: verum
end;
hence ( (cos * f) (#) ((#Z n) * cos) is_differentiable_on Z & ( for x being Real st x in Z holds
(((cos * f) (#) ((#Z n) * cos)) `| Z) . x = - ((n * ((cos . x) #Z (n - 1))) * (sin . ((n + 1) * x))) ) ) by A1, A10, A15, FDIFF_1:21; :: thesis: verum