Sam Steingold wrote:
> Richard Fateman wrote:
>> There is no method available in Maxima's solve program for this equation.
>> If you know of a way to solve it, perhaps you can describe it and it can
>> be added to Maxima.
>>
>>> (%i1) solve(A*sin(x)+B*cos(x)=C,x);
>>> cos(x) B - C
>>> (%o1) [sin(x) = - ------------]
>>> A
>
> the method to solve this equation:
> let D=sqrt(A^2+B^2) and let E be such that
> cos(E) = A/D
> sin(E) = B/D
> then the original eq can be rewritten as sin(x+Z)=C/D.
while this method works just fine in this specific case,
there is a more general way, using the universal substitution,
to convert a trigonometric eq to an algebraic one:
let t=tan(x/2) then
sin(x) = 2t/(1+t^2)
cos(x) = (1-t^2)/(1+t^2)
and the equation becomes
A*t+B-B*t^2=C+C*t^2
which is a quadratic equation in t.