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
  not 0 in Z & Z c= dom (g(#)(arctan*((id Z)^))) & g=#Z 2 & (for x st x
  in Z holds ((id Z)^).x > -1 & ((id Z)^).x < 1) implies g(#)(arctan*((id Z)^))
is_differentiable_on Z & for x st x in Z holds ((g(#)(arctan*((id Z)^)))`|Z).x
  = 2*x*arctan.(1/x)-x^2/(1+x^2)
proof
  set f = id Z;
  assume that
A1: not 0 in Z and
A2: Z c= dom (g(#)(arctan*(f^))) and
A3: g=#Z 2 and
A4: for x st x in Z holds (f^).x > -1 & (f^).x < 1;
A5: for x st x in Z holds g is_differentiable_in x by A3,TAYLOR_1:2;
A6: Z c= dom g /\ dom (arctan*(f^)) by A2,VALUED_1:def 4;
  then
A7: Z c= dom (arctan*(f^)) by XBOOLE_1:18;
  then
A8: arctan*(f^) is_differentiable_on Z by A1,A4,SIN_COS9:111;
  Z c= dom g by A6,XBOOLE_1:18;
  then
A9: g is_differentiable_on Z by A5,FDIFF_1:9;
A10: for x st x in Z holds (g`|Z).x = 2*x
  proof
    let x;
    assume x in Z;
    then (g`|Z).x = diff(g,x) by A9,FDIFF_1:def 7
      .= 2*(x #Z (2-1)) by A3,TAYLOR_1:2
      .= 2*x by PREPOWER:35;
    hence thesis;
  end;
  for y being object st y in Z holds y in dom (f^) by A7,FUNCT_1:11;
  then
A11: Z c= dom (f^) by TARSKI:def 3;
  for x st x in Z holds ((g(#)(arctan*(f^)))`|Z).x = 2*x*arctan.(1/x)-x^2
  /(1+x^2)
  proof
    let x;
    assume
A12: x in Z;
    then ((g(#)(arctan*(f^)))`|Z).x = ((arctan*(f^)).x)*diff(g,x)+(g.x)*diff(
    arctan*(f^),x) by A2,A8,A9,FDIFF_1:21
      .= ((arctan*(f^)).x)*(g`|Z).x+(g.x)*diff(arctan*(f^),x) by A9,A12,
FDIFF_1:def 7
      .= ((arctan*(f^)).x)*(2*x)+(g.x)*diff(arctan*(f^),x) by A10,A12
      .= ((arctan*(f^)).x)*(2*x)+(x #Z 2)*diff(arctan*(f^),x) by A3,
TAYLOR_1:def 1
      .= ((arctan*(f^)).x)*(2*x)+(x #Z 2)*(((arctan*(f^))`|Z).x ) by A8,A12,
FDIFF_1:def 7
      .= ((arctan*(f^)).x)*(2*x)+(x #Z (1+1))*(-1/(1+x^2)) by A1,A4,A7,A12,
SIN_COS9:111
      .= ((arctan*(f^)).x)*(2*x)+((x #Z 1)*(x #Z 1))*(-1/(1+x^2)) by TAYLOR_1:1
      .= ((arctan*(f^)).x)*(2*x)+(x*(x #Z 1))*(-1/(1+x^2)) by PREPOWER:35
      .= ((arctan*(f^)).x)*(2*x)+x^2*(-1/(1+x^2)) by PREPOWER:35
      .= arctan.((f^).x)*(2*x)-x^2/(1+x^2) by A7,A12,FUNCT_1:12
      .= arctan.((f.x)")*(2*x)-x^2/(1+x^2) by A11,A12,RFUNCT_1:def 2
      .= 2*x*arctan.(1/x)-x^2/(1+x^2) by A12,FUNCT_1:18;
    hence thesis;
  end;
  hence thesis by A2,A8,A9,FDIFF_1:21;
end;
