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 Th5:
  Z c= dom f & f=ln*((f1+f2)/(f1-f2)) & f2=#Z 2 & (for x st x in Z
  holds f1.x=a^2 & (f1-f2).x>0 & a<>0) implies f is_differentiable_on Z & for x
  st x in Z holds (f`|Z).x =4*a^2*x/(a|^4-x|^4)
proof
  assume that
A1: Z c= dom f and
A2: f=ln*((f1+f2)/(f1-f2)) and
A3: f2=#Z 2 and
A4: for x st x in Z holds f1.x=a^2 & (f1-f2).x>0 & a<>0;
  for y being object
st y in Z holds y in dom ((f1+f2)/(f1-f2)) by A1,A2,FUNCT_1:11;
  then
A5: Z c= dom ((f1+f2)/(f1-f2)) by TARSKI:def 3;
  then
A6: Z c=dom (f1+f2) /\ (dom (f1-f2) \ (f1-f2)"{0}) by RFUNCT_1:def 1;
  then
A7: Z c= dom (f1-f2) by XBOOLE_1:1;
A8: for x st x in Z holds f1.x=a^2 & (f1-f2).x<>0 by A4;
  then
A9: (f1+f2)/(f1-f2) is_differentiable_on Z by A3,A5,Th4;
A10: Z c= dom (f1+f2) by A6,XBOOLE_1:18;
A11: for x st x in Z holds ((f1+f2)/(f1-f2)).x >0
  proof
    let x;
A12: f2.x=x #Z 2 by A3,TAYLOR_1:def 1
      .=x |^2 by PREPOWER:36;
    assume
A13: x in Z;
    then
A14: (f1-f2).x>0 by A4;
    a<>0 by A4,A13;
    then
A15: a^2>0 by SQUARE_1:12;
    x |^2 = x^2 by NEWTON:81;
    then
A16: a^2+x |^2>0+0 by A15,XREAL_1:8,63;
A17: ((f1+f2)/(f1-f2)).x =(f1+f2).x * ((f1-f2).x)" by A5,A13,RFUNCT_1:def 1
      .=(f1+f2).x / (f1-f2).x by XCMPLX_0:def 9;
    (f1+f2).x=f1.x+f2.x by A10,A13,VALUED_1:def 1
      .=a^2+x |^2 by A4,A13,A12;
    hence thesis by A14,A16,A17,XREAL_1:139;
  end;
A18: for x st x in Z holds ln*((f1+f2)/(f1-f2)) is_differentiable_in x
  proof
    let x;
    assume x in Z;
    then (f1+f2)/(f1-f2) is_differentiable_in x & ((f1+f2)/(f1-f2)).x >0 by A9
,A11,FDIFF_1:9;
    hence thesis by TAYLOR_1:20;
  end;
  then
A19: f is_differentiable_on Z by A1,A2,FDIFF_1:9;
  for x st x in Z holds (f`|Z).x = 4*a^2*x/(a|^4-x|^4)
  proof
    let x;
A20: (a^2)^2=(a|^2)*(a^2) by NEWTON:81
      .=(a|^2)*(a|^2) by NEWTON:81
      .=(a|^2)|^2 by WSIERP_1:1
      .=a|^(2*2) by NEWTON:9
      .=a|^4;
A21: (x |^2)^2=(x |^2)|^2 by WSIERP_1:1
      .=x|^(2*2) by NEWTON:9
      .=x|^4;
A22: f2.x=x #Z 2 by A3,TAYLOR_1:def 1
      .=x |^2 by PREPOWER:36;
    assume
A23: x in Z;
    then
A24: (f1+f2).x=f1.x+f2.x by A10,VALUED_1:def 1
      .=a^2+x |^2 by A4,A23,A22;
A25: (f1-f2).x=f1.x-f2.x by A7,A23,VALUED_1:13
      .=a^2-x |^2 by A4,A23,A22;
    then
A26: a^2-x |^2>0 by A4,A23;
A27: ((f1+f2)/(f1-f2)).x =(f1+f2).x * ((f1-f2).x)" by A5,A23,RFUNCT_1:def 1
      .=(a^2+x |^2)/(a^2-x |^2) by A24,A25,XCMPLX_0:def 9;
    (f1+f2)/(f1-f2) is_differentiable_in x & ((f1+f2)/(f1-f2)).x >0 by A9,A11
,A23,FDIFF_1:9;
    then
    diff(ln*((f1+f2)/(f1-f2)),x) =diff(((f1+f2)/(f1-f2)),x)/(((f1+f2)/(f1
    -f2)).x) by TAYLOR_1:20
      .=(((f1+f2)/(f1-f2))`|Z).x/(((f1+f2)/(f1-f2)).x) by A9,A23,FDIFF_1:def 7
      .= (4*a^2*x/(a^2-x|^2)^2)/((a^2+x |^2)/(a^2-x |^2)) by A3,A5,A8,A23,A27
,Th4
      .=(4*a^2*x/(a^2-x|^2)/(a^2-x|^2))/((a^2+x |^2)/(a^2-x |^2)) by
XCMPLX_1:78
      .=(4*a^2*x/(a^2-x|^2))/((a^2+x |^2)/(a^2-x |^2))/(a^2-x|^2) by
XCMPLX_1:48
      .=(4*a^2*x)/(a^2+x |^2)/(a^2-x|^2) by A26,XCMPLX_1:55
      .=(4*a^2*x)/((a^2+x |^2)*(a^2-x|^2)) by XCMPLX_1:78
      .=4*a^2*x/(a|^4-x|^4) by A20,A21;
    hence thesis by A2,A19,A23,FDIFF_1:def 7;
  end;
  hence thesis by A1,A2,A18,FDIFF_1:9;
end;
