reserve y for set,
  x,a for Real,
  n for Element of NAT,
  Z for open Subset of REAL,
  f,f1,f2 for PartFunc of REAL,REAL;

theorem
  Z c= dom f & f=ln*((( #Z 2)*(exp_R+f1))/exp_R) & (for x st x in Z
holds f1.x=1) implies f is_differentiable_on Z & for x st x in Z holds (f`|Z).x
  =(exp_R.x-1)/(exp_R.x+1)
proof
  assume that
A1: Z c= dom f and
A2: f=ln*((( #Z 2)*(exp_R+f1))/exp_R) and
A3: for x st x in Z holds f1.x=1;
  for y being object
st y in Z holds y in dom ((( #Z 2)*(exp_R+f1))/exp_R) by A1,A2,
FUNCT_1:11;
  then
A4: Z c= dom ((( #Z 2)*(exp_R+f1))/exp_R) by TARSKI:def 3;
  then Z c=dom (( #Z 2)*(exp_R+f1))/\(dom (exp_R)\(exp_R)"{0}) by
RFUNCT_1:def 1;
  then
A5: Z c= dom (( #Z 2)*(exp_R+f1)) by XBOOLE_1:18;
  then
A6: ( #Z 2)*(exp_R+f1) is_differentiable_on Z by A3,Th29;
  for y being object st y in Z holds y in dom (exp_R+f1) by A5,FUNCT_1:11;
  then
A7: Z c= dom (exp_R+f1) by TARSKI:def 3;
A8: for x st x in Z holds ((( #Z 2)*(exp_R+f1))/exp_R).x >0
  proof
    let x;
A9: exp_R.x>0 by SIN_COS:54;
    assume
A10: x in Z;
    then (exp_R+f1).x=exp_R.x + f1.x by A7,VALUED_1:def 1
      .=exp_R.x +1 by A3,A10;
    then (exp_R+f1).x>0 by SIN_COS:54,XREAL_1:34;
    then
A11: ((exp_R+f1).x) #Z 2>0 by PREPOWER:39;
    ((( #Z 2)*(exp_R+f1))/exp_R).x =(( #Z 2)*(exp_R+f1)).x*(exp_R.x)" by A4,A10
,RFUNCT_1:def 1
      .=(( #Z 2)*(exp_R+f1)).x*(1/exp_R.x) by XCMPLX_1:215
      .=(( #Z 2)*(exp_R+f1)).x/exp_R.x by XCMPLX_1:99
      .=( #Z 2).((exp_R+f1).x)/exp_R.x by A5,A10,FUNCT_1:12
      .=((exp_R+f1).x) #Z 2/exp_R.x by TAYLOR_1:def 1;
    hence thesis by A11,A9,XREAL_1:139;
  end;
  exp_R is_differentiable_on Z & for x st x in Z holds exp_R.x<>0 by FDIFF_1:26
,SIN_COS:54,TAYLOR_1:16;
  then
A12: (( #Z 2)*(exp_R+f1))/exp_R is_differentiable_on Z by A6,FDIFF_2:21;
A13: for x st x in Z holds ln*((( #Z 2)*(exp_R+f1))/exp_R)
  is_differentiable_in x
  proof
    let x;
    assume x in Z;
    then
    (( #Z 2)*(exp_R+f1))/exp_R is_differentiable_in x & ((( #Z 2)*(exp_R+
    f1))/ exp_R).x >0 by A12,A8,FDIFF_1:9;
    hence thesis by TAYLOR_1:20;
  end;
  then
A14: f is_differentiable_on Z by A1,A2,FDIFF_1:9;
  for x st x in Z holds (f`|Z).x =(exp_R.x-1)/(exp_R.x+1)
  proof
    let x;
A15: exp_R.x>0 by SIN_COS:54;
A16: exp_R is_differentiable_in x by SIN_COS:65;
A17: exp_R.x +1>0 by SIN_COS:54,XREAL_1:34;
    assume
A18: x in Z;
    then
A19: (exp_R+f1).x=exp_R.x + f1.x by A7,VALUED_1:def 1
      .=exp_R.x +1 by A3,A18;
A20: (( #Z 2)*(exp_R+f1)).x =( #Z 2).((exp_R+f1).x) by A5,A18,FUNCT_1:12
      .=(exp_R.x+1) #Z (1+1) by A19,TAYLOR_1:def 1
      .=(exp_R.x+1) #Z 1*(exp_R.x+1) #Z 1 by A17,PREPOWER:44
      .=(exp_R.x+1) *(exp_R.x+1) #Z 1 by PREPOWER:35
      .=(exp_R.x+1) *(exp_R.x+1) by PREPOWER:35;
A21: (( #Z 2)*(exp_R+f1))/exp_R is_differentiable_in x & ((( #Z 2)*(exp_R+
    f1))/ exp_R).x >0 by A12,A8,A18,FDIFF_1:9;
    ( #Z 2)*(exp_R+f1) is_differentiable_in x by A6,A18,FDIFF_1:9;
    then
A22: diff(((( #Z 2)*(exp_R+f1))/exp_R),x) =(diff((( #Z 2)*(exp_R+f1)),x)*
    exp_R.x-diff(exp_R,x)* (( #Z 2)*(exp_R+f1)).x)/(exp_R.x)^2 by A15,A16,
FDIFF_2:14
      .=(((( #Z 2)*(exp_R+f1))`|Z).x*exp_R.x-diff(exp_R,x)*(( #Z 2)* (exp_R+
    f1)).x)/(exp_R.x)^2 by A6,A18,FDIFF_1:def 7
      .=(2*exp_R.x*(exp_R.x+1)*exp_R.x-diff(exp_R,x)*(( #Z 2)* (exp_R+f1)).x
    )/(exp_R.x)^2 by A3,A5,A18,Th29
      .=(2*exp_R.x*(exp_R.x+1)*exp_R.x-exp_R.x*(( #Z 2)* (exp_R+f1)).x)/(
    exp_R.x)^2 by SIN_COS:65
      .=((2*exp_R.x*(exp_R.x+1)-(( #Z 2)*(exp_R+f1)).x)*exp_R.x)/ (exp_R.x*
    exp_R.x)
      .=(exp_R.x-1)*(exp_R.x+1)/exp_R.x by A15,A20,XCMPLX_1:91;
A23: ((( #Z 2)*(exp_R+f1))/exp_R).x =(( #Z 2)*(exp_R+f1)).x*(exp_R.x)" by A4
,A18,RFUNCT_1:def 1
      .=(( #Z 2)*(exp_R+f1)).x*(1/exp_R.x) by XCMPLX_1:215
      .=((exp_R.x+1) *(exp_R.x+1))/exp_R.x by A20,XCMPLX_1:99;
    (f`|Z).x =diff(ln*((( #Z 2)*(exp_R+f1))/exp_R),x) by A2,A14,A18,
FDIFF_1:def 7
      .=(((exp_R.x+1)*(exp_R.x-1))/exp_R.x)/(((exp_R.x+1) * (exp_R.x+1))/
    exp_R.x) by A21,A22,A23,TAYLOR_1:20
      .=((exp_R.x+1)*(exp_R.x-1))/((exp_R.x+1) *(exp_R.x+1)) by A15,XCMPLX_1:55
      .=(exp_R.x-1)/(exp_R.x+1) by A17,XCMPLX_1:91;
    hence thesis;
  end;
  hence thesis by A1,A2,A13,FDIFF_1:9;
end;
