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 (sec*arctan) & Z c= ].-1,1.[ implies sec*arctan
  is_differentiable_on Z & for x st x in Z holds ((sec*arctan)`|Z).x = sin.(
  arctan.x)/((cos.(arctan.x))^2*(1+x^2))
proof
  assume that
A1: Z c= dom (sec*arctan) and
A2: Z c= ].-1,1.[;
A3: for x st x in Z holds cos.(arctan.x) <> 0
  proof
    let x;
    assume x in Z;
    then arctan.x in dom sec by A1,FUNCT_1:11;
    hence thesis by RFUNCT_1:3;
  end;
A4: for x st x in Z holds sec*arctan is_differentiable_in x
  proof
    let x;
    assume
A5: x in Z;
    then cos.(arctan.x) <> 0 by A3;
    then
A6: sec is_differentiable_in arctan.x by FDIFF_9:1;
    arctan is_differentiable_on Z by A2,SIN_COS9:81;
    then arctan is_differentiable_in x by A5,FDIFF_1:9;
    hence thesis by A6,FDIFF_2:13;
  end;
  then
A7: sec*arctan is_differentiable_on Z by A1,FDIFF_1:9;
  for x st x in Z holds ((sec*arctan)`|Z).x = sin.(arctan.x)/((cos.(
  arctan.x))^2*(1+x^2))
  proof
    let x;
    assume
A8: x in Z;
    then
A9: cos.(arctan.x) <> 0 by A3;
    cos.(arctan.x) <> 0 by A3,A8;
    then
A10: sec is_differentiable_in arctan.x by FDIFF_9:1;
A11: arctan is_differentiable_on Z by A2,SIN_COS9:81;
    then
A12: arctan is_differentiable_in x by A8,FDIFF_1:9;
    ((sec*arctan)`|Z).x = diff(sec*arctan,x) by A7,A8,FDIFF_1:def 7
      .= diff(sec,arctan.x)*diff(arctan,x) by A12,A10,FDIFF_2:13
      .= (sin.(arctan.x)/(cos.(arctan.x))^2)*diff(arctan,x) by A9,FDIFF_9:1
      .= (sin.(arctan.x)/(cos.(arctan.x))^2)*((arctan)`|Z).x by A8,A11,
FDIFF_1:def 7
      .= (sin.(arctan.x)/(cos.(arctan.x))^2)*(1/(1+x^2)) by A2,A8,SIN_COS9:81
      .= (sin.(arctan.x)*1)/((cos.(arctan.x))^2*(1+x^2)) by XCMPLX_1:76
      .= sin.(arctan.x)/((cos.(arctan.x))^2*(1+x^2));
    hence thesis;
  end;
  hence thesis by A1,A4,FDIFF_1:9;
end;
