reserve x for Real,

  Z for open Subset of REAL;

theorem
  Z c= dom (exp_R*(tan+cot)) implies exp_R*(tan+cot)
is_differentiable_on Z & for x st x in Z holds (exp_R*(tan+cot)`|Z).x = exp_R.(
  tan.x+cot.x)*(1/(cos.x)^2-1/(sin.x)^2)
proof
  assume that
A1: Z c= dom (exp_R*(tan+cot));
  dom (exp_R*(tan+cot)) c= dom (tan+cot) by RELAT_1:25;
  then
A2: Z c=dom(tan+cot) by A1,XBOOLE_1:1;
  then
A3: tan + cot is_differentiable_on Z by Th6;
A4: for x st x in Z holds exp_R*(tan + cot) is_differentiable_in x
  proof
    let x;
    assume x in Z;
    then
A5: (tan + cot) is_differentiable_in x by A3,FDIFF_1:9;
    exp_R is_differentiable_in (tan+cot).x by SIN_COS:65;
    hence thesis by A5,FDIFF_2:13;
  end;
  then
A6: exp_R*(tan + cot) is_differentiable_on Z by A1,FDIFF_1:9;
  for x st x in Z holds (exp_R*(tan+cot)`|Z).x = exp_R.(tan.x+cot.x)*(1/(
  cos.x)^2-1/(sin.x)^2)
  proof
    let x;
A7: exp_R is_differentiable_in (tan+cot).x by SIN_COS:65;
    assume
A8: x in Z;
    then tan + cot is_differentiable_in x by A3,FDIFF_1:9;
    then
    diff(exp_R*(tan +cot),x) = diff(exp_R, (tan+cot).x)*diff((tan+cot),x)
    by A7,FDIFF_2:13
      .=exp_R.((tan+cot).x)*diff((tan+cot),x) by SIN_COS:65
      .=exp_R.((tan+cot).x)*((tan+cot)`|Z).x by A3,A8,FDIFF_1:def 7
      .=exp_R.((tan+cot).x)*(1/(cos.x)^2-1/(sin.x)^2) by A2,A8,Th6
      .=exp_R.(tan.x+cot.x)*(1/(cos.x)^2-1/(sin.x)^2) by A2,A8,VALUED_1:def 1;
    hence thesis by A6,A8,FDIFF_1:def 7;
  end;
  hence thesis by A1,A4,FDIFF_1:9;
end;
