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 Th46:
  Z c= dom ((1/n)(#)(( #Z n)*cos)) & n>0 implies (1/n)(#)(( #Z n)*
cos) is_differentiable_on Z & for x st x in Z holds (((1/n)(#)(( #Z n)*cos))`|Z
  ).x =-(cos.x) #Z (n-1)*sin.x
proof
  assume that
A1: Z c= dom ((1/n)(#)(( #Z n)*cos)) and
A2: n>0;
A3: now
    let x;
    assume x in Z;
    cos is_differentiable_in x by SIN_COS:63;
    hence ( #Z n)*cos is_differentiable_in x by TAYLOR_1:3;
  end;
  Z c= dom (( #Z n)*cos) by A1,VALUED_1:def 5;
  then
A4: ( #Z n)*cos is_differentiable_on Z by A3,FDIFF_1:9;
  for x st x in Z holds (((1/n)(#)(( #Z n)*cos))`|Z).x =-(cos.x) #Z (n-1)
  *sin.x
  proof
    let x;
A5: cos is_differentiable_in x by SIN_COS:63;
    assume x in Z;
    then
    (((1/n)(#)(( #Z n)*cos))`|Z).x =(1/n)*diff((( #Z n)*cos),x) by A1,A4,
FDIFF_1:20
      .=(1/n)*(n*( (cos.x) #Z (n-1)) * diff(cos,x)) by A5,TAYLOR_1:3
      .=(1/n)*(n*( (cos.x) #Z (n-1)) *(-sin.x)) by SIN_COS:63
      .=((1/n)*n)*( (cos.x) #Z (n-1)) *(-sin.x)
      .=((n")*n)*( (cos.x) #Z (n-1)) *(-sin.x) by XCMPLX_1:215
      .=1*( (cos.x) #Z (n-1)) *(-sin.x) by A2,XCMPLX_0:def 7
      .=-(cos.x) #Z (n-1) *sin.x;
    hence thesis;
  end;
  hence thesis by A1,A4,FDIFF_1:20;
end;
