Approximately solving nonlinear trigonometric system

55 Views Asked by At

I have the following system:

$$ (a + tb)\cos \theta = x \\ (b + ta) \sin \theta = y \\ $$

with the constraints

$$a > b$$ $$\theta \in (-\pi, \pi]$$ $$t > -\frac b a$$

I am trying to solve for $t$ and $\theta$ in terms of $a,b,x,y$.

As far as I can tell, there is no closed-form solution. However, I am wondering if I can find good approximations. I tried substituting truncated Taylor series for $\sin$ and $\cos$, centered at $\pi / 2$ to take advantage of the symmetry of the problem, and I got a decent approximation but I wish I had a better one.

Any suggestions for good approximate solutions to the problem, or methods I could explore? Thanks.

3

There are 3 best solutions below

0
On

Hint: write $$ \cos \theta = \frac{x}{a+tb} \\ \sin \theta = \frac{y}{b + ta} \\ $$ Then solve $(\frac{x}{a+tb})^2+(\frac{y}{b + ta})^2=1$. Still pretty ugly but finding roots of quartic polynomial is a well-known problem that has a solution.

0
On

$x=(a+tb)\cos\theta, y=(b+at)\sin\theta$

So $t=\frac{1}{b}(\frac{x}{\cos(\theta)}-a)$

$y=\sin\theta[b+\frac{a}{b}(\frac{x}{\cos \theta}-a)]=\sqrt{1-\cos^2\theta}[b+\frac{a}{b}(\frac{x}{\cos \theta}-a)]$

From there you should be able to get a quartic expression for cosine of theta. That in turn can help you solve for $t$.

Note these parameterize a line having slope $\frac{a}{b}\tan{\theta}. $ and y-intercept $-b-\frac{a^2}{b}$.So any two points on the line should be able to give you theta, were you to know them.

0
On

$$(a + b\,t)\cos (\theta) = x \tag 1$$ $$(b + a\,t) \sin(\theta) = y \tag 2$$

Let $X=\frac x b$, $Y=\frac y a$, $\alpha=\frac ab$, $\beta=\frac ba$, $\alpha\beta=1$ to make $$(t+\alpha )\cos (\theta) = X \tag 3$$ $$(t+\beta )\sin (\theta) = Y\tag 4$$ As already said in previous answer, you can first reduce to a quartic in $t$ using $$\left(\frac X{t+\alpha }\right)^2+\left(\frac Y{t+\beta }\right)^2=1$$ which leads to

$$\color{blue}{t^4+2 (\alpha +\beta )\,t^3+\Big[4+\alpha ^2+\beta ^2-X^2-Y^2\Big]\,t^2+}$$ $$\color{blue}{2 \Big[\beta \left(1-X^2\right)+\alpha \left(1-Y^2\right)\Big]\,t-\Big[\beta ^2 X^2+\alpha ^2 Y^2-1\Big]=0}\tag 5$$ Solving quartics does not make any problem (but very unpleasant).

In the post, you wrote

"I tried substituting truncated Taylor series for $\sin(\theta)$ and $\cos(\theta)$, centered at $\frac \pi 2$ to take advantage of the symmetry of the problem, and I got a decent approximation but I wish I had a better one."

Better than Taylor series are Padé approximants and I give you below the simplest ones developed around $\theta=\frac \pi 2$ using for simpler notations $\Theta=\left(\theta +\frac{\pi }{2}\right)$. All of them are $O\left(\left(\theta -\frac{\pi }{2}\right)^3\right)$

$$\color{blue}{\cos(\theta)\sim-\frac{6 \Theta }{6+\Theta ^2}\quad \quad \sin(\theta)\sim \frac{12-5 \Theta ^2}{12+\Theta ^2}\quad \quad \tan(\theta)\sim \frac{\Theta }{3}-\frac{1}{\Theta }}\tag 6$$

May be, $(6)$ could provide better estimates.