# Solve sum for theta

Is there any way to solve the following sum of trigonometric functions for theta without using a solver? $$25\sin(\theta)-1.5\cos(\theta)=20$$

-
– user2468 Sep 9 '12 at 2:45

$$25\sin\theta-1.5\cos\theta = \sqrt{25^2+1.5^2}\left( \frac{25}{\sqrt{25^2+1.5^2}}\sin\theta - \frac{1.5}{\sqrt{25^2+1.5^2}}\cos\theta \right)$$ $$= \sqrt{25^2+1.5^2}(\cos\varphi\sin\theta-\sin\varphi\cos\theta) = \sqrt{25^2+1.5^2} \sin(\varphi-\theta).$$ So you want $$\sin(\varphi-\theta)=\frac{20}{\sqrt{25^2+1.5^2}}.$$ Take arcsines.

-
+1. I just fixed the plus in the first set of parentheses. – Ayman Hourieh Sep 9 '12 at 10:21

If you're okay with a numeric solution, define a function $$f\left(\theta\right) = 25 \sin \theta - 1.5 \cos \theta - 20 = 0$$ and use a root finding algorithm.

-
I think OP was looking for a solution without using a solver – Daryl Sep 9 '12 at 2:41
Eric, but the closed form is readily available. Besides, it shows the multitude of solutions. This answer might attract down-votes, I am afraid. – Sasha Sep 9 '12 at 2:55
Then the OP should've asked for an analytic solution. To me, a "solver" is something like Mathematica. Besides, I qualified my answer with the phrase "if you're okay with a numeric solution." Finally, it's pretty clear that $f\left(\theta^*+2 \pi n\right) = 0$, where $\theta^*$ is a solution and $n$ is an integer. – Eric Angle Sep 9 '12 at 14:15

The solution to $A\sin(t) + B\cos(t) = C$ is $t = 2\left(\pi n + \arctan{(\frac{A \pm \sqrt{A^2+B^2-C^2}}{B+C})}\right)$

-
Nice. But it'd be more helpful for OP if you show some derivation steps, or a name of a reference. – user2468 Sep 9 '12 at 3:15