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 Th102:
  Z c= dom ((1/2)(#)(ln*(f1+f2))) & f2=#Z 2 & (for x st x in Z
holds f1.x=1 ) implies ((1/2)(#)(ln*(f1+f2))) is_differentiable_on Z & for x st
  x in Z holds (((1/2)(#)(ln*(f1+f2)))`|Z).x = x/(1+x^2)
proof
  assume that
A1: Z c= dom ((1/2)(#)(ln*(f1+f2))) and
A2: f2=#Z 2 and
A3: for x st x in Z holds f1.x=1;
A4: Z c= dom (ln*(f1+f2)) by A1,VALUED_1:def 5;
  then for y being object st y in Z holds y in dom (f1+f2) by FUNCT_1:11;
  then
A5: Z c= dom (f1+f2);
  then
A6: f1+f2 is_differentiable_on Z by A2,A3,Th101;
  for x st x in Z holds ln*(f1+f2) is_differentiable_in x
  proof
    let x;
    assume
A7: x in Z;
    then (f1+f2).x = f1.x+f2.x by A5,VALUED_1:def 1
      .= 1+f2.x by A3,A7
      .= 1+(x #Z (1+1)) by A2,TAYLOR_1:def 1
      .= 1+(x #Z 1)*(x #Z 1) by TAYLOR_1:1
      .= 1+x*(x #Z 1) by PREPOWER:35
      .= 1+x*x by PREPOWER:35;
    then
A8: (f1+f2).x > 0 by XREAL_1:34,63;
    (f1+f2) is_differentiable_in x by A6,A7,FDIFF_1:9;
    hence thesis by A8,TAYLOR_1:20;
  end;
  then
A9: ln*(f1+f2) is_differentiable_on Z by A4,FDIFF_1:9;
  for x st x in Z holds (((1/2)(#)(ln*(f1+f2)))`|Z).x = x/(1+x^2)
  proof
    let x;
    assume
A10: x in Z;
    then
A11: (f1+f2) is_differentiable_in x by A6,FDIFF_1:9;
A12: (f1+f2).x = f1.x+f2.x by A5,A10,VALUED_1:def 1
      .= 1+f2.x by A3,A10
      .= 1+(x #Z (1+1)) by A2,TAYLOR_1:def 1
      .= 1+(x #Z 1)*(x #Z 1) by TAYLOR_1:1
      .= 1+x*(x #Z 1) by PREPOWER:35
      .= 1+x*x by PREPOWER:35;
    then (f1+f2).x > 0 by XREAL_1:34,63;
    then diff(ln*(f1+f2),x) = diff((f1+f2),x)/((f1+f2).x) by A11,TAYLOR_1:20
      .= ((f1+f2)`|Z).x/((f1+f2).x) by A6,A10,FDIFF_1:def 7
      .= (2*x)/(1+x^2) by A2,A3,A5,A10,A12,Th101;
    hence (((1/2)(#)(ln*(f1+f2)))`|Z).x = (1/2)*((2*x)/(1+x^2)) by A1,A9,A10,
FDIFF_1:20
      .= x/(1+x^2);
  end;
  hence thesis by A1,A9,FDIFF_1:20;
end;
