1
$\begingroup$

I have this formula, (it is just the law of cosines angle formula):

$$ d = \sqrt{a^2 + b^2 - 2ab \ cos(\theta)} $$

Here is my issue. I am wondering if there is a way to 'extract' the $cos$ term. My motivation here is because I want to show that $d$ is in fact sinusoidal - or perhaps very close to sinusoidal - as $\theta$ is varied, while $a$ and $b$ are fixed.

So, might there be a way to simplify, or 'extract' the $cos$ term here? What is the approximation to $\sqrt{cos(\theta)}$? Thank you.

$\endgroup$
  • $\begingroup$ did you try to use series? $\endgroup$ – Sylvain Biehler Mar 5 '14 at 14:22
  • $\begingroup$ @Bilou06 I did not, I am not sure I would know how... $\endgroup$ – Spacey Mar 5 '14 at 14:25
  • $\begingroup$ To simplify, your expression, you need : $$cos(x) = \sum _{{n=0}}^{{\infty }}{\frac {(-1)^{n}}{(2n)!}}x^{{2n}}$$ $$(1+x)^{\alpha }=1+\sum _{{n=1}}^{{\infty }}{\alpha \choose n}x^{n}$$ and to compare with sinusoidal: $$sin(x) = \sum _{{n=0}}^{{\infty }}{\frac {(-1)^{n}}{(2n+1)!}}x^{{2n+1}}$$ $\endgroup$ – Sylvain Biehler Mar 5 '14 at 14:53
  • 1
    $\begingroup$ Expressions like this are not truly sinusoidal, even if they are perodic. It's "famously" known that the arc length formula for an ellipse defined by $(a\cos(t),b\sin(t))$ does not yield an elementary result for $a\neq b$. The integral is $\int\sqrt{a^2\sin^2(t)+b^2\cos^2(t)}\,dt$. The Pythagorean identity and double angle identity can be used to manipulate this into the form $\int\sqrt{A+B\cos(2t)}\,dt$, which is like your expression. So if your expression were purely sinusoidal, we would be able to integrate it, contradicting that it is well-know this cannot be integrated. $\endgroup$ – alex.jordan Mar 5 '14 at 16:28
2
$\begingroup$

If you want to show that $d(\theta)$ is sinusoidal, just compute its derivative which is $$\frac{a b \sin (\theta)}{\sqrt{a^2+b^2-2 a b \cos (\theta)}}$$ and see how the function behaves (maximum, minimum, symmetry, period,..).

$\endgroup$
  • $\begingroup$ Well, I happen to know that the result looks sinusoidal, but the $sqrt$ makes me uneasy about how truly sinusoidal it is.. $\endgroup$ – Spacey Mar 5 '14 at 14:26
  • $\begingroup$ Truly truly ! Look at the function values for $\theta=0$, $\theta=\pi/2$, $\theta=\pi$ and so on. Cheers. $\endgroup$ – Claude Leibovici Mar 5 '14 at 14:28
  • $\begingroup$ Not sure I follow how/why this should work... may you please expand on your answer? thanks $\endgroup$ – Spacey Mar 5 '14 at 14:45
2
$\begingroup$

Well, it's rather simple $$d = \sqrt{a^2 + b^2 - 2ab \ cos(\theta)}$$ $$d^2 = a^2 + b^2 - 2ab \ cos(\theta)$$ $$ d^2 - a^2 - b^2=2ab \ cos(\theta)$$ $$ \frac{d^2 - a^2 - b^2}{2ab} = \ cos(\theta)$$ $$ \frac{d^2}{2ab} - \frac{a^2 + b^2}{2ab} = \ cos(\theta)$$ and since $a$ and $b$ are fixed, $k = \frac{a^2 + b^2}{2ab}$ $$ \ cos(\theta) = \frac{d^2}{2ab} -k$$ with $d\leq a+b$ for the triangle inequality.

Finally $\sqrt{cos(\theta)} = \sqrt{\frac{d^2}{2ab} - \frac{a^2 + b^2}{2ab}}$

Anyway, assuming $a=b$ for simplicity, $$d=a\sqrt{2-2\cos(\theta)}=2|sin(\frac{\theta}{2})|$$ and this shows why $d$ is sinusoidal.

Furthermore, let $a=b+k$, then $$d = \sqrt{a^2 + a^2 +2ak+k^2 - 2a(a+k) \ cos(\theta)}$$ $$ d = \sqrt{2a^2-2a^2\cos\theta+2ak-2ak\cos\theta+k^2} $$ $$ d = \sqrt{2a^2(1-\cos\theta)+2ak(1-\cos\theta)+k^2} $$ $$ d = \sqrt{2a^2(2\sin^2(\frac{\theta}{2})+2ak(2\sin^2(\frac{\theta}{2})+k^2} $$ $$ d = \sqrt{4a^2\sin^2(\frac{\theta}{2})+4ak\sin^2(\frac{\theta}{2})+k^2} $$

which does have a sinusoidal pattern, but it's more difficult to unveil when $k \ne 0$

$\endgroup$
  • $\begingroup$ Hmm, but how does this show that $d$ is sinusoidal, or near sinusoidal? $\endgroup$ – Spacey Mar 5 '14 at 14:28
  • $\begingroup$ I'm finishing the answer, the first part is only to explicit $d$... $\endgroup$ – sirfoga Mar 5 '14 at 14:30
1
$\begingroup$

Sounds like an approach to your problem is to let $a=b$ for simplicity so $$ d = \sqrt{a^2+b^2-2ab \cos x} = a \sqrt{2-2\cos x} $$ and then just plot the function $f(x) = \sqrt{2-2\cos x}$, getting sqrtPlot

which is clearly a wave, but not sure how sinusoidal it is.

It is, however, similar to a similar transformation of the sine, just off by a horizontal translation, it seems. Here is the plot of $\sqrt{2-2\cos x}, \sqrt{2-2\sin x}$ on the same axis:

2xfrms

$\endgroup$
  • 1
    $\begingroup$ $1 - \cos x = 2\sin^{2}(\frac{x}{2})$, so $f(x) = 2\left|\sin(\frac{x}{2})\right|$. :) $\endgroup$ – Andrew D. Hwang Mar 5 '14 at 14:50
  • $\begingroup$ @user86418 indeed, thanks $\endgroup$ – gt6989b Mar 5 '14 at 16:04
1
$\begingroup$

The function that describes the distance of a fixed point from a point travelling on a circle cannot be perfectly "sinusoidal", since it exhibits discontinuities for the derivatives, as shown by @gt6989b, for instance. However we can state that the coefficients of the Fourier cosine series of $$ f(\theta) = \sqrt{1-\lambda \cos\theta}, $$ where we set $\lambda=\frac{2ab}{a^2+b^2}\leq 1$, decay pretty fast, giving good approximations of $f(\theta)$ in terms of even trigonometric polynomials. The coefficient of $\cos(n\theta)$ in the Fourier cosine series of $f(\theta)$ is: $$ c_n = -2\sqrt{\lambda+1}\left(\frac{\lambda}{1+\lambda}\right)^n\cdot\frac{\binom{2n}{n}}{(2n-1)8^n}\cdot\phantom{}_2 F_1\left(\frac{2n-1}{2},\frac{2n+1}{2};2n+1;\frac{2\lambda}{1+\lambda}\right),$$ and the hypergeometric term can be quite trivially bounded by $\left(\frac{1+\lambda}{1-\lambda}\right)^{n/2}$. This gives reasonable bounds when $a$ and $b$ are pretty different, so $\lambda$ is pretty far from $1$. In the opposite case, it is worth considering that: $$g(a,b,\theta)=\sqrt{a^2+b^2-2ab\cos\theta}=\sqrt{(a-b)^2+4ab\sin^2\frac{\theta}{2}}$$ is always between $2\sqrt{ab}\cdot\left|\sin\frac{\theta}{2}\right|$ and $2\sqrt{ab}\cdot\left|\sin\frac{\theta}{2}\right|+\frac{(a-b)^2}{4\sqrt{ab}\cdot\left|\sin\frac{\theta}{2}\right|}$, and we can refine the upper bound by applying the Newton method to the convex function $x^2-\left((a-b)^2+4ab\sin^2\frac{\theta}{2}\right)$ by choosing the previous upper bound as a starting point. For any $\theta$ far enough from $0$ and $2\pi$, this works just nice. For a uniform bound, we can use a continued fraction, since: $$ \sqrt{x^2+\varepsilon^2} = x + \frac{\varepsilon^2}{x+\sqrt{x^2+\varepsilon^2}}=x+\frac{\varepsilon^2}{2x+\frac{\varepsilon^2}{2x+\frac{\varepsilon^2}{\ldots}}}.$$

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.