clc
clear all
syms a b c X;
eq1=tan(a)*tan(a)-tan(a+b)*tan(a+b)-c==0;
[solx, params, conds] = solve(eq1, a, 'ReturnConditions', true)
输出:
solx =
atan(z1) + pi*k
params =
[ k, z1]
conds =
tan(b) ~= 0 & c + 2*z1^3*tan(b) + tan(b)^2 + 2*z1*tan(b) + c*z1^2*tan(b)^2 ~= z1^4*tan(b)^2 + 2*c*z1*tan(b) & ~in((atan(z1) - atan(1/tan(b)) + pi*k)/pi, 'integer') & in(k, 'integer') & (z1 == root(z^4*tan(b)^2 - 2*z^3*tan(b) - c*z^2*tan(b)^2 + 2*c*z*tan(b) - 2*z*tan(b) - c - tan(b)^2, z, 1) | z1 == root(z^4*tan(b)^2 - 2*z^3*tan(b) - c*z^2*tan(b)^2 + 2*c*z*tan(b) - 2*z*tan(b) - c - tan(b)^2, z, 2) | z1 == root(z^4*tan(b)^2 - 2*z^3*tan(b) - c*z^2*tan(b)^2 + 2*c*z*tan(b) - 2*z*tan(b) - c - tan(b)^2, z, 3) | z1 == root(z^4*tan(b)^2 - 2*z^3*tan(b) - c*z^2*tan(b)^2 + 2*c*z*tan(b) - 2*z*tan(b) - c - tan(b)^2, z, 4))
>>