reserve x for Real,

  Z for open Subset of REAL;

theorem
  Z c= dom (sin (#) cos) implies (sin (#) cos) is_differentiable_on Z &
  for x st x in Z holds((sin (#) cos)`|Z).x =(cos.x)^2-(sin.x)^2
proof
A1: for x st x in Z holds sin is_differentiable_in x by SIN_COS:64;
A2: for x st x in Z holds cos is_differentiable_in x by SIN_COS:63;
  assume
A3: Z c= dom (sin (#) cos);
  then
A4: Z c= dom sin /\ dom cos by VALUED_1:def 4;
  then Z c= dom cos by XBOOLE_1:18;
  then
A5: cos is_differentiable_on Z by A2,FDIFF_1:9;
  Z c= dom sin by A4,XBOOLE_1:18;
  then
A6: sin is_differentiable_on Z by A1,FDIFF_1:9;
  for x st x in Z holds ((sin (#) cos)`|Z).x =(cos.x)^2-(sin.x)^2
  proof
    let x;
    assume x in Z;
    then
    ((sin (#) cos)`|Z).x = diff(sin,x)*cos.x + sin.x*diff(cos,x) by A3,A6,A5,
FDIFF_1:21
      .=cos.x*cos.x +sin.x*diff(cos,x) by SIN_COS:64
      .=cos.x*cos.x +sin.x*(-sin.x) by SIN_COS:63
      .=(cos.x)^2-(sin.x)^2;
    hence thesis;
  end;
  hence thesis by A3,A6,A5,FDIFF_1:21;
end;
