reserve x for Real,

  n for Element of NAT,
   y for set,
  Z for open Subset of REAL,

     g for PartFunc of REAL,REAL;

theorem
  Z c= dom (arctan*cos) & (for x st x in Z holds cos.x > -1 & cos.x < 1)
implies arctan*cos is_differentiable_on Z & for x st x in Z holds ((arctan*cos)
  `|Z).x = -sin.x/(1+(cos.x)^2)
proof
  assume that
A1: Z c= dom (arctan*cos) and
A2: for x st x in Z holds cos.x > -1 & cos.x < 1;
A3: for x st x in Z holds arctan*cos is_differentiable_in x
  proof
    let x;
    assume x in Z;
    then
A4: cos.x > -1 & cos.x < 1 by A2;
    cos is_differentiable_in x by SIN_COS:63;
    hence thesis by A4,SIN_COS9:85;
  end;
  then
A5: arctan*cos is_differentiable_on Z by A1,FDIFF_1:9;
  for x st x in Z holds ((arctan*cos)`|Z).x = -sin.x/(1+(cos.x)^2)
  proof
    let x;
A6: cos is_differentiable_in x by SIN_COS:63;
    assume
A7: x in Z;
    then
A8: cos.x > -1 & cos.x < 1 by A2;
    ((arctan*cos)`|Z).x = diff(arctan*cos,x) by A5,A7,FDIFF_1:def 7
      .= diff(cos,x)/(1+(cos.x)^2) by A6,A8,SIN_COS9:85
      .= (-sin.x)/(1+(cos.x)^2) by SIN_COS:63
      .= -sin.x/(1+(cos.x)^2);
    hence thesis;
  end;
  hence thesis by A1,A3,FDIFF_1:9;
end;
