Left hand side of this equation is known to admit A*sin(x) + B*cos(x) = R*cos(x-alpha) with R = sqrt(A^2+B^2) and alpha = arctan(b/a). and x can be solved using this identity.
(see http://www.mathcentre.ac.uk/resources/uploaded/mc-ty-rcostheta-alpha-2009-1.pdf for derivation).
However, MATLAB never finds the solution to x symbolically. It either looks for complex solutions (though I define everything to be real and positive) or returns really complicated expressions or returns an empty solution.
What's the best way to deal with these kind of equations?
——————————————————–
here is a sample code for the most general case:
syms a b c x real;S = solve(a*sin(x) + b*cos(x) == c, x);
This returns an empty solution
Best Answer