I think trigexpandtimes with csc is buggy:
(%i59) csc(3*x),trigexpand;
(%o59) (csc(x)^3*sec(x)^3)/(3*csc(x)*sec(x)^2-csc(x)
^3)
(%i60) %-csc(3*x);
(%o60) (csc(x)^3*sec(x)^3)/(3*csc(x)*sec(x)^2-csc(x)
^3)-csc(3*x)
(%i61) subst(x=0.3,%);
(%o61) -2.8853320239249447 <-- should be zero.
Barton
Logged In: YES
user_id=28849
In csc\Sec-times, the last lines says
If we swap f1 and f2 like so:
With this change:
(%i35) csc(3*x),trigexpand;
(%o35) csc(x)^3*sec(x)^3/(3*csc(x)^2*sec(x)-sec(x)^3)
(%i36) ev(%-csc(3*x),x=0.3);
(%o36) -6.661338147750939e-16
This looks better.
Logged In: YES
user_id=28849
Suggested fix applied.