reserve x,x0, r, s, h for Real,

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

  f, f1, f2 for PartFunc of REAL,REAL;

theorem
  Z c= dom ((id Z)(#)((arccot)*f)+(r/2)(#)(ln*(f1+f2))) & r <> 0 & (for
x st x in Z holds f.x=x/r & f.x > -1 & f.x < 1) & (for x st x in Z holds f1.x=1
) & f2=( #Z 2)*f & (for x st x in Z holds f.x=x/r) implies (id Z)(#)((arccot)*f
)+(r/2)(#)(ln*(f1+f2)) is_differentiable_on Z & for x st x in Z holds (((id Z)
  (#)((arccot)*f)+(r/2)(#)(ln*(f1+f2)))`|Z).x = arccot.(x/r)
proof
  assume that
A1: Z c= dom ((id Z)(#)((arccot)*f)+(r/2)(#)(ln*(f1+f2))) and
A2: r <> 0 and
A3: for x st x in Z holds f.x=x/r & f.x > -1 & f.x < 1 and
A4: for x st x in Z holds f1.x=1 and
A5: f2=( #Z 2)*f and
A6: for x st x in Z holds f.x=x/r;
A7: Z c= dom ((id Z)(#)((arccot)*f)) /\ dom ((r/2)(#)(ln*(f1+f2))) by A1,
VALUED_1:def 1;
  then
A8: Z c= dom ((r/2)(#)(ln*(f1+f2))) by XBOOLE_1:18;
  then
A9: (r/2)(#)(ln*(f1+f2)) is_differentiable_on Z by A2,A4,A5,A6,Th108;
A10: Z c= dom ((id Z)(#)((arccot)*f)) by A7,XBOOLE_1:18;
  then
A11: (id Z)(#)((arccot)*f) is_differentiable_on Z by A3,Th106;
  for x st x in Z holds (((id Z)(#)((arccot)*f)+(r/2)(#)(ln*(f1+f2)))`|Z)
  .x = arccot.(x/r)
  proof
    let x;
    assume
A12: x in Z;
    hence
    (((id Z)(#)((arccot)*f)+(r/2)(#)(ln*(f1+f2)))`|Z).x = diff((id Z)(#)(
    (arccot)*f),x)+diff((r/2)(#)(ln*(f1+f2)),x) by A1,A11,A9,FDIFF_1:18
      .= (((id Z)(#)((arccot)*f))`|Z).x+diff((r/2)(#)(ln*(f1+f2)),x) by A11,A12
,FDIFF_1:def 7
      .= (((id Z)(#)((arccot)*f))`|Z).x+(((r/2)(#)(ln*(f1+f2)))`|Z).x by A9,A12
,FDIFF_1:def 7
      .= arccot.(x/r)-x/(r*(1+(x/r)^2))+(((r/2)(#)(ln*(f1+f2)))`|Z).x by A3,A10
,A12,Th106
      .= arccot.(x/r)-x/(r*(1+(x/r)^2))+x/(r*(1+(x/r)^2)) by A2,A4,A5,A6,A8,A12
,Th108
      .= arccot.(x/r);
  end;
  hence thesis by A1,A11,A9,FDIFF_1:18;
end;
