# Intersection Point between Linear and Sinusoidal Function

Problem

Looking to create calculator to solve for alpha in the equation:

Cid = 94.2sin(alpha)+phi*cos(alpha)

where Cid and phi are user inputs. Isolating alpha algebraically has proven difficult and it would be helpful to be able to find the intersection between the two lines using Excel.

Focus

This equation was reached while working with rotational matrices (I am new to the topic so there may be problems with my usage of them). I wanted to find the angle required to rotate a point at (-94.2, phi) about the origin so that it reached a height of Cid.

Going from the original matrix form, I isolated the new x and y values.

x'=xcos(alpha)+ysin(alpha) & y'=-xsin(alpha)+ycos(alpha)

I set y' equal to the goal height of Cid and substituted in my original point to find the equation in question. I saw this as an easy way to solve for the angle alpha, however isolating alpha has proven difficult using trig identities.

The ultimate goal of this is to make an Excel calculator so although graphing is a possible solution, it would not work for what I intend to use this for.

Any help or advice would be greatly appreciated!

Let $s = atan2(94.2, \phi)$, and $R = \sqrt{94.2^2 + \phi^2}$.
Then you have $$R \sin(S) = 94.2\\ R \cos(S) = \phi\\ C/R = \sin(s) \sin (\alpha) + \cos (s) \cos (\alpha) = \cos(\alpha-s)$$ so $$\alpha = s + \arccos(C/R)$$ is a solution. (In general, there are two solutions, the other being gotten by setting $C/R = \cos(s - \alpha).$)