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 Th47:
  sin.x<>0 implies cos/sin is_differentiable_in x & diff(cos/sin,
  x)=-1/(sin.x)^2
proof
  assume
A1: sin.x<>0;
A2: sin is_differentiable_in x & cos is_differentiable_in x by SIN_COS:63,64;
  then
  diff(cos/sin,x) = (diff(cos,x) * sin.x - diff(sin,x)*cos.x)/(sin.x)^2 by A1,
FDIFF_2:14
    .=((-sin.x)*sin.x - diff(sin,x)*cos.x)/(sin.x)^2 by SIN_COS:63
    .=(-(sin.x)*(sin.x)-(cos.x)*(cos.x))/(sin.x)^2 by SIN_COS:64
    .=(-((cos.x)^2 + (sin.x)*(sin.x)))/(sin.x)^2
    .=-((cos.x)^2 + (sin.x)^2)/(sin.x)^2by XCMPLX_1:187
    .=-1/(sin.x)^2 by SIN_COS:28;
  hence thesis by A2,A1,FDIFF_2:14;
end;
