# Solving a system of equations which contain sin and cosine terms.

Hello my question is the following: Solve the given system of equations: $$E=\frac{l_{p}}{\pi}\sqrt{\sin^{2}\left(\frac{\pi y_{1}}{l_{p}}\right)+\sin^{2}\left(\frac{\pi y_{2}}{l_{p}}\right)+\sin^{2}\left(\frac{\pi y_{3}}{l_{p}}\right)+\sin^{2}\left(\frac{\pi y_{4}}{l_{p}}\right)};$$ $$\frac{t\cos\left(\frac{\pi y_{1}}{l_{p}}\right)\sin\left(\frac{\pi y_{1}}{l_{p}}\right)}{\sqrt{\sin^{2}\left(\frac{\pi y_{1}}{l_{p}}\right)+\sin^{2}\left(\frac{\pi y_{2}}{l_{p}}\right)+\sin^{2}\left(\frac{\pi y_{3}}{l_{p}}\right)+\sin^{2}\left(\frac{\pi y_{4}}{l_{p}}\right)}}=n_{1}l_{q} ;$$ $$\frac{t\cos\left(\frac{\pi y_{2}}{l_{p}}\right)\sin\left(\frac{\pi y_{2}}{l_{p}}\right)}{\sqrt{\sin^{2}\left(\frac{\pi y_{1}}{l_{p}}\right)+\sin^{2}\left(\frac{\pi y_{2}}{l_{p}}\right)+\sin^{2}\left(\frac{\pi y_{3}}{l_{p}}\right)+\sin^{2}\left(\frac{\pi y_{4}}{l_{p}}\right)}}=n_{2}l_{q} ;$$ $$\frac{t\cos\left(\frac{\pi y_{3}}{l_{p}}\right)\sin\left(\frac{\pi y_{3}}{l_{p}}\right)}{\sqrt{\sin^{2}\left(\frac{\pi y_{1}}{l_{p}}\right)+\sin^{2}\left(\frac{\pi y_{2}}{l_{p}}\right)+\sin^{2}\left(\frac{\pi y_{3}}{l_{p}}\right)+\sin^{2}\left(\frac{\pi y_{4}}{l_{p}}\right)}}=n_{3}l_{q} ;$$ $$\frac{t\cos\left(\frac{\pi y_{4}}{l_{p}}\right)\sin\left(\frac{\pi y_{4}}{l_{p}}\right)}{\sqrt{\sin^{2}\left(\frac{\pi y_{1}}{l_{p}}\right)+\sin^{2}\left(\frac{\pi y_{2}}{l_{p}}\right)+\sin^{2}\left(\frac{\pi y_{3}}{l_{p}}\right)+\sin^{2}\left(\frac{\pi y_{4}}{l_{p}}\right)}}=n_{4}l_{q};$$

for $y_{1} ,y_{2} ,y_{3} , y_{4},$ and $t$, where $n_{1}, n_{2}, n_{3}, n_{4}, l_{q}, l_{p},$ and $E$ are constants.

I have found two solutions $y_{i}=\frac{l_{p}}{\pi}\arcsin\left(\frac{\pm E\pi}{2l_{p}}\right)$, where $i=1,..,4$. Using $$\frac{t\left(\cos\left(\frac{\pi y_{1}}{l_{p}}\right)\sin\left(\frac{\pi y_{1}}{l_{p}}\right)+\cos\left(\frac{\pi y_{2}}{l_{p}}\right)\sin\left(\frac{\pi y_{2}}{l_{p}}\right)+\cos\left(\frac{\pi y_{3}}{l_{p}}\right)\sin\left(\frac{\pi y_{3}}{l_{p}}\right)+\cos\left(\frac{\pi y_{4}}{l_{p}}\right)\sin\left(\frac{\pi y_{4}}{l_{p}}\right)\right)}{\sqrt{\sin^{2}\left(\frac{\pi y_{1}}{l_{p}}\right)+\sin^{2}\left(\frac{\pi y_{2}}{l_{p}}\right)+\sin^{2}\left(\frac{\pi y_{3}}{l_{p}}\right)+\sin^{2}\left(\frac{\pi y_{4}}{l_{p}}\right)}}-l_{q}(n_{1}+n_{2}+n_{3}+n_{4})=0$$ for $t$, then substituting the values for $y_{i}$ into it, as well as using the $E\pi/l_{p}$ for the value of the square root, gives $t$.

This however is assuming that the $y_{i}$'s are equal, I'm struggling to find points where $y_{1}\neq y_{2}\neq y_{3}\neq y_{4}$. Any suggestions? I have also tried to solve it numerically, but want I solutions in a general form. I have also tried polar coordinates, but that didn't seem to help... Thanks guys.

Let's work on the first equation:

$$\dfrac{t\cos{ \left( \frac{\pi y_1}{l_p} \right) } \sin { \left( \frac{\pi y_1}{l_p} \right) } } {\sqrt{ \sin^2 { \left( \frac{\pi y_1}{l_p} \right) } + \sin^2 { \left( \frac{\pi y_1}{l_p} \right) } + \sin^2 { \left( \frac{\pi y_1}{l_p} \right) } +\sin^2 { \left( \frac{\pi y_1}{l_p} \right) } }} = \dfrac{\frac{t}{2} \sin { \left( \frac{2\pi y_1}{l_p} \right) } }{ \frac {E\pi}{l_p}} = n_1l_q$$

This gives the equation:

$$\sin { \left( \frac{2\pi y_1}{l_p} \right) } = \dfrac{2E\pi n_1l_q}{tl_p}$$

I used the fact that the whole denominator is a constant, from what you stated. This should give an equation for each $y_i$.

I hope I understood your question correctly. Can you continue from here?

Edit: I didn't. I missed out on the fact that $t$ is a variable. I have an idea though.

Look at this:

$$\cos 2x = 1 - 2\sin^2 x$$ $$\cos^2 2x = \left( 1 - 2\sin^2 x \right)^2$$ $$\sin^2 x = \dfrac{1-\sqrt{1-\sin^2 2x}}{2}$$

Threfore, we have:

$$\sin^2 \left( \frac{\pi y_1}{l_p} \right) = \dfrac{1-\sqrt{1-\sin^2 \left( \frac{2\pi y_1 }{l_p} \right)}}{2} = \dfrac{1-\sqrt{1-\dfrac{4E^2 \pi^2 n_1^2 l_q^2 }{t^2 l_p^2}}}{2}$$

Doing this for every sine and plugging in the first equation gives an equation for $t$:

$$E = \dfrac{l_p}{\pi} \sqrt{\dfrac{1-\sqrt{1-\dfrac{4E^2 \pi^2 n_1^2 l_q^2 }{t^2 l_p^2}}}{2} + \dfrac{1-\sqrt{1-\dfrac{4E^2 \pi^2 n_2^2 l_q^2 }{t^2 l_p^2}}}{2} + \dfrac{1-\sqrt{1-\dfrac{4E^2 \pi^2 n_3^2 l_q^2 }{t^2 l_p^2}}}{2} + \dfrac{1-\sqrt{1-\dfrac{4E^2 \pi^2 n_4^2 l_q^2 }{t^2 l_p^2}}}{2}}$$

It's quite ugly but it's an equation for $t$.

$$\dfrac{E^2 \pi^2}{l_p^2} = 2 - \sqrt{\dfrac{1}{4}-\dfrac{E^2 \pi^2 n_1^2 l_q^2 }{t^2 l_p^2}} - \sqrt{\dfrac{1}{4}-\dfrac{E^2 \pi^2 n_2^2 l_q^2 }{t^2 l_p^2}} - \sqrt{\dfrac{1}{4}-\dfrac{E^2 \pi^2 n_3^2 l_q^2 }{t^2 l_p^2}} - \sqrt{\dfrac{1}{4}-\dfrac{E^2 \pi^2 n_4^2 l_q^2 }{t^2 l_p^2}}$$

I don't see how to proceed from here though.

• you haven't really solved it though. You still have t in there and y1 unknown. Doing what you did reduces the system to solving 5 variables with 2 equations. (E=E(y1,...,y4), and t=t(y1,...,y4)). I have tried doing what you said before: you would get something of the form t=sqrt{(n1/cos(piy1/lp))^2+...+(n4/cos(piy4/lp))^2}. Sorry if the math in the comment is hard to read. – Lewis Proctor May 20 '16 at 13:22
• I think I got a result similar to that once too. I gave up on it because as you said, the equation is horrendous! That then leaves the points y1, y2, y3, y4 to be determined, which is the hardest task me thinks. Thank you for your suggestions. – Lewis Proctor May 20 '16 at 13:37
• I tried putting the terms into polar coordinates (let sin(piy1/lp)=x1=rcos(theta1), ..., x4=rsin(theta1)*sin(theta2)*sin(theta3)), then the condition for E becomes Epi/lp =r, for all angles. Which then leaves the ugly expressions for t! I'm working through that now... – Lewis Proctor May 20 '16 at 13:40

Hint:

After some changes of variables and constants (such as $a=2\sin^2(\lambda y_1)-1$), your system can be written as the intersection of four hyperquadrics and a hyperplane.

$$a^2=1-Au,\\ b^2=1-Bu,\\ c^2=1-Cu,\\ d^2=1-Du,\\ a+b+c+d=E.$$

• Sorry for not responding, this looks intriguing but I don't know how you could find the matrix multiplied by (a, b, c, d, u)^T to give the following equations for the hyper quadrics? – Lewis Proctor May 25 '16 at 11:43