System of (trigonometric) equations

142 Views Asked by At

I have a system of two equations, involving trigonometric terms of two variables $\theta$ and $\phi$:

$$ d_1 = a_1\sin\theta \cos\phi + b_1\sin\phi + c_1\cos\theta\cos\phi $$ $$ d_2 = a_2\sin\theta \cos\phi + b_2\sin\phi + c_2\cos\theta\cos\phi $$

$d_1$, $d_2$, $a_1$, $a_2$, $b_1$, $b_2$, $c_1$ and $c_2$ being known, real constants.

(if we assume $\theta$ and $\phi$ to be spherical angles, you will probably recognize spherical harmonics of degree 1 at work here).

Other than somewhat brute-force numerical resolution methods, is there a way to more or less elegantly solve this system of equations in $\theta$ and $\phi$ ?

Thanks!

2

There are 2 best solutions below

1
On BEST ANSWER

Both equations describe the intersection of a plane with the unit sphere, in spherical coordinates. These intersections are (small) circles, which can intersect in at most two points.

Finding the line common to the planes and the two intersection points with the sphere is no big deal.

Then convert from Cartesian to spherical.


Intersection with the sphere:

Write the equation of the plane perpendicular to the two given ones, through the origin (its normal is obtained as the cross-product of the normals). Then solve the $3\times3$ linear system to get the point common to the three planes.

$$\begin{cases}a_1x&+b_1z&+c_1y&=d_1\\a_2x&+b_2z&+c_2y&=d_2\\(b_1c_2-c_1b_2)x&+(c_1a_2-a_1c_2)z&+(a_1b_2-b_1a_2)y&=0,\end{cases}$$

Now you have a starting point $\vec p$ and the direction of the line $\vec n$ that you plug in the sphere equation:

$$\|\vec p+t\vec n\|^2=\vec p^2+2\vec p\,\vec n\,t+t^2=1,$$

$$t=-\vec p\,\vec n\pm\sqrt{(\vec p\,\vec n)^2+1-\vec p^2}.$$

This gives you the two solution points (if they exist).

0
On

The solution of problem is:

$\tan{\theta}=\frac{b_{1} c_{3} d_{2}-b_{2} c_{3} d_{1}+b_{3}(c_{2} d_{1}-c_{1} d_{2})}{ a_{1} b_{3} d_{2}-a_{2} b_{3} d_{1}+a_{3}(b_{2} d_{1}-b_{1} d_{2})}$

$\tan{\phi}=\frac{z}{\sqrt{x^{2}+y^{2}}}$

$x=-\frac{b_{1} c_{3} d_{2}-b_{2} c_{3} d_{1}+b_{3}(c_{2} d_{1}-c_{1} d_{2})}{a_{1}(b_{2} c_{3}-b_{3}c_{2})+a_{2}(b_{3}c_{1}-b_{1} c_{3})+a_{3}(b_{1} c_{2}-b_{2}c_{1})}$

$y=-\frac{a_{1} b_{3} d_{2}-a_{2} b_{3} d_{1}+a_{3}(b_{2} d_{1}-b_{1} d_{2})}{a_{1}(b_{2} c_{3}-b_{3}c_{2})+a_{2}(b_{3}c_{1}-b_{1} c_{3})+a_{3}(b_{1} c_{2}-b_{2}c_{1})}$

$z=+\frac{a_{1} c_{3} d_{2}-a_{2} c_{3} d_{1}+a_{3}(c_{2} d_{1}-c_{1} d_{2})}{a_{1}(b_{2} c_{3}-b_{3}c_{2})+a_{2}(b_{3}c_{1}-b_{1} c_{3})+a_{3}(b_{1} c_{2}-b_{2}c_{1})}$

$a_{3}=b_{1} c_{2}-b_{2} c_{1}$

$b_{3}=a_{1} b_{2}-a_{2}b_{1}$

$c_{3}=a_{2}c_{1}-a_{1} c_{2}$