Monday 27 February 2017

algebra precalculus - How to solve for $theta$ in terms of $a,b,c$ in this expression?



profile



I am trying to design a cam profile like in the above image. There are 2 equations I have come up with that define variable "c". The problem, however, is that variables a, b & c are known values and it is angle $\theta$ that I need to know. The 2 arcs on either end of the straight line are equal. The radius of the arcs and the angle $\theta$ change when any of the variables are changed.



The 2 equations I have so far:



$c = \frac{2a}{\sin \theta}(1-\cos \theta)+\frac{b.\sin \theta}{\cos \theta} $




$c = 2 \left[ \frac{a}{\sin \theta} - \sqrt{ \left( \frac{a}{\sin \theta} \right)^2 - a^2}\, \right] + \frac {b.\sin \theta}{\cos \theta} $



I can't for the life of me manage to rearrange the equation to make $\theta$ the subject!



If anyone is an algebra whiz, any help would be much appreciated!



Cheers.



EDIT




Ok, so after a bit of geometric shenanigans, I have come up with some different equations to help solve this but and still struggling to rearrange it. (However, I had to replace $\theta$ with $x$ as I couldn't get $\theta$ to work with the program I drew this with!)



Redrawn Problem
Single Quadrant



By drawing a chord for the arc, we can show that the angle of the chord is half that of the slope. What I really need to find is the length of either $e$ or $d$, where $d + e = \frac{c}{2}$



Using the half angle formula I get:




$\tan x = \frac{2 \tan \frac{x}{2} }{1 - \tan^2 \frac{x}{2}}$



Which can be written as:



$\frac{c-2e}{b} = \frac{\frac{2e}{a}}{1-\frac{e^2}{a^2}} $



Simplifying to:



$\frac{c-2e}{b} = \frac{2ae}{a^2-e^2}$




My problem now, is that I can't simplify it to get $e$ on its own!



If anyone has any ideas, that would be awesome!


Answer



Considering the first equation
$$c = \frac{2a}{\sin (\theta)}(1-\cos (\theta))+\frac{b\,\sin (\theta)}{\cos (\theta)}$$
using the tangent half-angle substitution, we end with
$$c=\frac{2 t \left(-a t^2+a+b\right)}{1-t^2}$$ that is to say
$$2 a t^3-c t^2-2 t (a+b)+c=0$$ that you can solve using Cardano method.




Probably easier would be Newton method for solving the cubic equation. Starting using $t_0=0$, we should have $t_1=\frac{c}{2 (a+b)}$ and
$$t_2=\frac{c^3 (b-a)+4 c (a+b)^3}{8 (a+b)^4-2 c^2 (a-2 b) (a+b)}$$
$$t_{n+1}=\frac{4 a t_n^3-c t_n^2-c}{2 \left(3 a t_n^2-c t_n-(a+b)\right)}$$



Similarly, if $\theta$ is small, we could expand the first equation as Taylor series
$$c= (a+b)\theta+\frac{a+4 b}{12} \theta ^3 +\frac{a+16
b}{120} \theta ^5 +\frac{17 (a+64 b)}{20160}\theta ^7+O\left(\theta ^9\right)$$
and use series reversion to get
$$\theta=\frac{c}{a+b}-\frac{ (a+4 b)}{12 (a+b)^4}c^3+\frac{ \left(a^2+2 a b+16
b^2\right)}{80 (a+b)^7}c^5+O\left(c^7\right)$$




Edit



Still assuming small values fo $\theta$, we could build at $\theta=0$ the $[2,2]$ Padé approximant and get for the whole
$$f(\theta) = \frac{2a}{\sin (\theta)}(1-\cos (\theta))+\frac{b\,\sin (\theta)}{\cos (\theta)}-c$$ the approximation
$$f(\theta)\simeq\frac{-c+ (a+b)\theta+\frac{c (a+4 b)}{12 (a+b)}\theta ^2}{1-\frac{(a+4 b)}{12 (a+b)} \theta ^2 }$$ Solving the quadratic
$$\theta\simeq \frac{2 \left(\sqrt{3 c^2 (a+4 b) (a+b)+9 (a+b)^4}-3 (a+b)^2\right)}{c (a+4 b)}\tag 1$$ which seems interesting.



Let us try it for $a=1$ and $b=4$. Give $\theta$ a value to compute $c$ and recompute the estimate $\theta_*$ from $(1)$. The table below reproduces results (in degrees).
$$\left(
\begin{array}{ccc}

\theta & c & \theta_* \\
5 & 0.43728 & 5.00001 \\
10 & 0.88029 & 10.0003 \\
15 & 1.33510 & 15.0020 \\
20 & 1.80853 & 20.0082 \\
25 & 2.30862 & 25.0249 \\
30 & 2.84530 & 30.0617 \\
35 & 3.43143 & 35.1324 \\
40 & 4.08434 & 40.2567 \\
45 & 4.82843 & 45.4605 \\

50 & 5.69963 & 50.7782 \\
55 & 6.75373 & 56.2542 \\
60 & 8.08290 & 61.9466
\end{array}
\right)$$



Update



After comments, it is quite sure that we can make better knowing that the area of interest is around $\theta=\frac \pi 4$. To stay "simple", writing the $[1,1]$ Padé approximant, we should get
$$\theta\simeq \frac \pi 4+ \frac{\alpha +\beta c}{\gamma+\delta c}$$ where

$$\alpha=2 \left(\left(6 \sqrt{2}-8\right) a^2+\sqrt{2} a b+b^2\right)$$
$$\beta=2 \left(\sqrt{2}-2\right) a-2 b$$
$$\gamma=2 \left(\sqrt{2}-2\right) a^2+3 \left(5 \sqrt{2}-8\right) a b-2 b^2$$
$$\delta=\left(4-3 \sqrt{2}\right) a-2 b$$ Applied to the case
$$a= \pi 160\frac{12}{360}=\frac{16 \pi }{3}\qquad b= \pi 160\frac{50}{360}=\frac{200 \pi }{9}\qquad c=80$$ this would give
$$\theta\simeq \frac \pi 4 +\frac{90 \left(6 \sqrt{2}-37\right)+\left(337+366 \sqrt{2}\right) \pi }{\left(1161
\sqrt{2}-2497\right) \pi -90 \left(13+9 \sqrt{2}\right)}\approx 0.761710$$
which converted to degrees would give $43.6427$ while the exact solution would be $\theta=0.7617146$ corresponding to $43.6430$. Not too bad.



Keeping $a=\frac{16 \pi }{3}$ and $b= \frac{200 \pi }{9}$ and varying $c$ over a quite large range, here are some results.
$$\left(

\begin{array}{ccc}
c & \theta_{approx} & \theta_{exact} \\
60 & 35.1540 & 35.2569 \\
65 & 37.4779 & 37.5244 \\
70 & 39.6591 & 39.6759 \\
75 & 41.7103 & 41.7142 \\
80 & 43.6427 & 43.6430 \\
85 & 45.4666 & 45.4665 \\
90 & 47.1906 & 47.1894 \\
95 & 48.8228 & 48.8165 \\

100 & 50.3704 & 50.3528
\end{array}
\right)$$



New update



We could still do much better at the price of a quadratic equation. Around a given angle $\theta_0$, develop the rhs of the original equation as a $[2,2]$ Padé approximant and solve for $\theta$. I shall not give here the formulae but just the results for the last worked case $(\theta_0=\frac \pi 4, a=\frac{16 \pi }{3}, b= \frac{200 \pi }{9})$
$$\left(
\begin{array}{ccc}
c & \theta_{approx} & \theta_{exact} \\

60 & 35.256535 & 35.256856 \\
65 & 37.524331 & 37.524418 \\
70 & 39.675901 & 39.675917 \\
75 & 41.714232 & 41.714233 \\
80 & 43.643029 & 43.643029 \\
85 & 45.466540 & 45.466540 \\
90 & 47.189400 & 47.189400 \\
95 & 48.816481 & 48.816478 \\
100 & 50.352781 & 50.352763
\end{array}

\right)$$


No comments:

Post a Comment

real analysis - How to find $lim_{hrightarrow 0}frac{sin(ha)}{h}$

How to find $\lim_{h\rightarrow 0}\frac{\sin(ha)}{h}$ without lhopital rule? I know when I use lhopital I easy get $$ \lim_{h\rightarrow 0}...