let c, a, b be Real; :: thesis: for Z being open Subset of REAL
for f1, f2 being PartFunc of REAL ,REAL st Z c= dom (cosec * (f1 + (c (#) f2))) & f2 = #Z 2 & ( for x being Real st x in Z holds
f1 . x = a + (b * x) ) holds
( cosec * (f1 + (c (#) f2)) is_differentiable_on Z & ( for x being Real st x in Z holds
((cosec * (f1 + (c (#) f2))) `| Z) . x = - (((b + ((2 * c) * x)) * (cos . ((a + (b * x)) + (c * (x ^2 ))))) / ((sin . ((a + (b * x)) + (c * (x ^2 )))) ^2 )) ) )

let Z be open Subset of REAL ; :: thesis: for f1, f2 being PartFunc of REAL ,REAL st Z c= dom (cosec * (f1 + (c (#) f2))) & f2 = #Z 2 & ( for x being Real st x in Z holds
f1 . x = a + (b * x) ) holds
( cosec * (f1 + (c (#) f2)) is_differentiable_on Z & ( for x being Real st x in Z holds
((cosec * (f1 + (c (#) f2))) `| Z) . x = - (((b + ((2 * c) * x)) * (cos . ((a + (b * x)) + (c * (x ^2 ))))) / ((sin . ((a + (b * x)) + (c * (x ^2 )))) ^2 )) ) )

let f1, f2 be PartFunc of REAL ,REAL ; :: thesis: ( Z c= dom (cosec * (f1 + (c (#) f2))) & f2 = #Z 2 & ( for x being Real st x in Z holds
f1 . x = a + (b * x) ) implies ( cosec * (f1 + (c (#) f2)) is_differentiable_on Z & ( for x being Real st x in Z holds
((cosec * (f1 + (c (#) f2))) `| Z) . x = - (((b + ((2 * c) * x)) * (cos . ((a + (b * x)) + (c * (x ^2 ))))) / ((sin . ((a + (b * x)) + (c * (x ^2 )))) ^2 )) ) ) )

assume that
A1: ( Z c= dom (cosec * (f1 + (c (#) f2))) & f2 = #Z 2 ) and
A2: for x being Real st x in Z holds
f1 . x = a + (b * x) ; :: thesis: ( cosec * (f1 + (c (#) f2)) is_differentiable_on Z & ( for x being Real st x in Z holds
((cosec * (f1 + (c (#) f2))) `| Z) . x = - (((b + ((2 * c) * x)) * (cos . ((a + (b * x)) + (c * (x ^2 ))))) / ((sin . ((a + (b * x)) + (c * (x ^2 )))) ^2 )) ) )

dom (cosec * (f1 + (c (#) f2))) c= dom (f1 + (c (#) f2)) by RELAT_1:44;
then A3: Z c= dom (f1 + (c (#) f2)) by A1, XBOOLE_1:1;
then Z c= (dom f1) /\ (dom (c (#) f2)) by VALUED_1:def 1;
then A4: ( Z c= dom f1 & Z c= dom (c (#) f2) ) by XBOOLE_1:18;
A5: ( f1 + (c (#) f2) is_differentiable_on Z & ( for x being Real st x in Z holds
((f1 + (c (#) f2)) `| Z) . x = b + ((2 * c) * x) ) ) by A1, A2, A3, FDIFF_4:12;
A6: for x being Real st x in Z holds
sin . ((f1 + (c (#) f2)) . x) <> 0
proof
let x be Real; :: thesis: ( x in Z implies sin . ((f1 + (c (#) f2)) . x) <> 0 )
assume x in Z ; :: thesis: sin . ((f1 + (c (#) f2)) . x) <> 0
then (f1 + (c (#) f2)) . x in dom cosec by A1, FUNCT_1:21;
hence sin . ((f1 + (c (#) f2)) . x) <> 0 by RFUNCT_1:13; :: thesis: verum
end;
A7: for x being Real st x in Z holds
cosec * (f1 + (c (#) f2)) is_differentiable_in x
proof
let x be Real; :: thesis: ( x in Z implies cosec * (f1 + (c (#) f2)) is_differentiable_in x )
assume A8: x in Z ; :: thesis: cosec * (f1 + (c (#) f2)) is_differentiable_in x
then A9: f1 + (c (#) f2) is_differentiable_in x by A5, FDIFF_1:16;
sin . ((f1 + (c (#) f2)) . x) <> 0 by A6, A8;
then cosec is_differentiable_in (f1 + (c (#) f2)) . x by Th2;
hence cosec * (f1 + (c (#) f2)) is_differentiable_in x by A9, FDIFF_2:13; :: thesis: verum
end;
then A10: cosec * (f1 + (c (#) f2)) is_differentiable_on Z by A1, FDIFF_1:16;
for x being Real st x in Z holds
((cosec * (f1 + (c (#) f2))) `| Z) . x = - (((b + ((2 * c) * x)) * (cos . ((a + (b * x)) + (c * (x ^2 ))))) / ((sin . ((a + (b * x)) + (c * (x ^2 )))) ^2 ))
proof
let x be Real; :: thesis: ( x in Z implies ((cosec * (f1 + (c (#) f2))) `| Z) . x = - (((b + ((2 * c) * x)) * (cos . ((a + (b * x)) + (c * (x ^2 ))))) / ((sin . ((a + (b * x)) + (c * (x ^2 )))) ^2 )) )
assume A11: x in Z ; :: thesis: ((cosec * (f1 + (c (#) f2))) `| Z) . x = - (((b + ((2 * c) * x)) * (cos . ((a + (b * x)) + (c * (x ^2 ))))) / ((sin . ((a + (b * x)) + (c * (x ^2 )))) ^2 ))
then A12: f1 + (c (#) f2) is_differentiable_in x by A5, FDIFF_1:16;
A13: (f1 + (c (#) f2)) . x = (f1 . x) + ((c (#) f2) . x) by A3, A11, VALUED_1:def 1
.= (f1 . x) + (c * (f2 . x)) by A4, A11, VALUED_1:def 5
.= (a + (b * x)) + (c * (f2 . x)) by A2, A11
.= (a + (b * x)) + (c * (x #Z 2)) by A1, TAYLOR_1:def 1
.= (a + (b * x)) + (c * (x |^ 2)) by PREPOWER:46
.= (a + (b * x)) + (c * (x ^2 )) by NEWTON:100 ;
A14: sin . ((f1 + (c (#) f2)) . x) <> 0 by A6, A11;
then cosec is_differentiable_in (f1 + (c (#) f2)) . x by Th2;
then diff (cosec * (f1 + (c (#) f2))),x = (diff cosec ,((f1 + (c (#) f2)) . x)) * (diff (f1 + (c (#) f2)),x) by A12, FDIFF_2:13
.= (- ((cos . ((f1 + (c (#) f2)) . x)) / ((sin . ((f1 + (c (#) f2)) . x)) ^2 ))) * (diff (f1 + (c (#) f2)),x) by A14, Th2
.= (((f1 + (c (#) f2)) `| Z) . x) * (- ((cos . ((a + (b * x)) + (c * (x ^2 )))) / ((sin . ((a + (b * x)) + (c * (x ^2 )))) ^2 ))) by A5, A11, A13, FDIFF_1:def 8
.= (b + ((2 * c) * x)) * (- ((cos . ((a + (b * x)) + (c * (x ^2 )))) / ((sin . ((a + (b * x)) + (c * (x ^2 )))) ^2 ))) by A1, A2, A3, A11, FDIFF_4:12 ;
hence ((cosec * (f1 + (c (#) f2))) `| Z) . x = - (((b + ((2 * c) * x)) * (cos . ((a + (b * x)) + (c * (x ^2 ))))) / ((sin . ((a + (b * x)) + (c * (x ^2 )))) ^2 )) by A10, A11, FDIFF_1:def 8; :: thesis: verum
end;
hence ( cosec * (f1 + (c (#) f2)) is_differentiable_on Z & ( for x being Real st x in Z holds
((cosec * (f1 + (c (#) f2))) `| Z) . x = - (((b + ((2 * c) * x)) * (cos . ((a + (b * x)) + (c * (x ^2 ))))) / ((sin . ((a + (b * x)) + (c * (x ^2 )))) ^2 )) ) ) by A1, A7, FDIFF_1:16; :: thesis: verum