(%i1) solve(csc(x) = cot(x));
(%o1) [x = 0]
(%i2) csc(0);
csc: argument 0 isn't in the domain of csc.
-- an error. To debug this try: debugmode(true);
(%i3) cot(0);
cot: argument 0 isn't in the domain of cot.
-- an error. To debug this try: debugmode(true);
solveworks on a numerator.trig-substcanonicalizescsc(x)to1/sin(x)andcot(x)tocos(x)/sin(x), thenmrat-numerkeeps the numerator1-cos(x)and drops the denominatorsin(x).1-cos(x)really does vanish atx = 0, but the equation does not, because the denominator vanishes there too.For an ordinary rational function this does not happen:
ratfcancels the common factor first, sosolve((x-1)/(x-1)^2, x)is[]. It happens for trigonometric equations because the rational package treatssin(x)andcos(x)as unrelated kernels and cannot see that1-cos(x)andsin(x)share a zero - that identity issin^2 + cos^2 = 1, which it does not know.src/solve.lisphas known about this for decades, in the comment aboveeasy-cases:Whoever wrote this never made good on his promise, though.
Last edit: David Scherfgen 5 days ago
This is an interesting one. Although
csc(x)andcot(x)are undefined at x=0,csc(x)-cot(x)is 0 by analytic continuation at x=0. Maxima generally ignores isolated singularities like this, for example it simplifiesx/xto1. So it's unclear whether this is a bug.BTW,
%solve(csc(x)-cot(x),x) => %union([x = 2 %pi %z874])