Mathematics Asked by Thoth on December 25, 2021
I am trying to compute the inverse of
$$f(theta,phi) = left(frac{costheta sinphi}{1-cosphi}, frac{sintheta sinphi}{1-cosphi}right)$$ but I lack some basic knowledge on how I can do that. Could please provide some guidance?
Thank you in advance.
Edit:
Following @peek-a-boo's
comment (and M. Strochyk's
answer), I have tried the following. For
$$f:quad (Theta,Phi) to (X,Y),qquad (theta,phi)mapsto (x,y):=left(frac{costheta sinphi}{1-cosphi}, frac{sintheta sinphi}{1-cosphi}right),$$
and setting $$x = frac{cos theta sin phi}{1 – cos phi},$$ and $$y = frac{sin theta sin phi}{1 – cosphi},$$ we have
$$x^2+y^2 = frac{1 +cos phi}{1 – cos phi},$$ and
$$frac{y^2}{x^2} = frac{sin^2 theta}{cos^2 theta}.$$
Combining the last two equations we obtain
$$x = left|cos theta right| sqrt{frac{1+cos theta}{1-cos theta}} ,$$ and
$$y = left|sin theta right| sqrt{frac{1+cos theta}{1-cos theta}},$$ which finally leads
$$f^{-1}:quad(x,y)mapsto (theta,phi) = sqrt{frac{1+cos theta}{1-cos theta}}left(left|cos theta right| , left|sin theta right|right)$$
Let $f(phi,theta)=(x,y)$.
Then
$$frac yx=tantheta$$ gives you $theta$ (on the four quadrants). Next
$$frac{sinphi}{1-cosphi}=frac{2sinfracphi2cosfracphi2}{2sin^2fracphi2}=cotfracphi2=xcostheta+ysintheta.$$
gives you $phi$.
Answered by user65203 on December 25, 2021
I do not have enough reputation to comment yet. But here is a hint to an algorithm:
Set $a=frac{sinphi}{1-cosphi}$ and rewrite the fuction $f$ into $g(theta,a)=(acostheta,asintheta)$. You want to recover the input variables. Assume you have $x$ and $y$ given such that $x=acostheta$ and $y=asintheta$. To recover $a$ you have $a^2=x^2+y^2$ where $x$ and $y$ are known and then when you have $a$ you can obtain $theta$ from $tantheta=frac{y}{x}$. Further when you have $a$ you also recover $phi$ from $a=frac{sinphi}{1-cosphi}$ by use of some numerical solver. (You can build one yourself, a Newton solver).
Maybe someone here knows an analytic solution to obtain $phi$?
Answered by Mikael Helin on December 25, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP