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

theorem
  Z c= dom (exp_R*cos) implies exp_R*cos is_differentiable_on Z & for x
  st x in Z holds ((exp_R*cos)`|Z).x = -exp_R.(cos.x) * sin.x
proof
A1: for x st x in Z holds exp_R*cos is_differentiable_in x
  proof
    let x;
    assume x in Z;
    cos is_differentiable_in x & exp_R is_differentiable_in cos.x by SIN_COS:63
,65;
    hence thesis by FDIFF_2:13;
  end;
  assume
A2: Z c= dom (exp_R*cos);
  then
A3: exp_R*cos is_differentiable_on Z by A1,FDIFF_1:9;
  for x st x in Z holds ((exp_R*cos)`|Z).x =-exp_R.(cos.x) * sin.x
  proof
    let x;
    cos is_differentiable_in x & exp_R is_differentiable_in cos.x by SIN_COS:63
,65;
    then
A4: diff(exp_R*cos,x) = diff(exp_R,cos.x)*diff(cos,x) by FDIFF_2:13
      .=diff(exp_R,cos.x)*(-sin.x ) by SIN_COS:63
      .=exp_R.(cos.x)*(-sin.x ) by SIN_COS:65
      .=-exp_R.(cos.x) * sin.x;
    assume x in Z;
    hence thesis by A3,A4,FDIFF_1:def 7;
  end;
  hence thesis by A2,A1,FDIFF_1:9;
end;
