Please comment on whether the following approximation is well known
$$\cos\frac23x \approx \frac12(1 + \cos x)$$
in the first quadrant, with a maximum error of $0.016$.
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It only takes a minute to sign up.
Sign up to join this communityPlease comment on whether the following approximation is well known
$$\cos\frac23x \approx \frac12(1 + \cos x)$$
in the first quadrant, with a maximum error of $0.016$.
Suppose that you look for the best $a$ such that $\cos(ax)$ is as close as possible to $\frac{1}{2} (1+\cos (x))$.
Consider the norm $$\Phi(a)=\int_0^{\frac \pi 2} \left(\cos(ax)-\frac{1}{2} (1+\cos (x)) \right)^2\,dx$$ which is $$\Phi(a)=\frac{1}{4} \left(\frac{4 \cos \left(\frac{\pi a}{2}\right)}{a^2-1}+\frac{\sin (\pi a)-4 \sin \left(\frac{\pi a}{2}\right)}{a}+\frac{7 \pi }{4}+2\right)$$ Computing the derivative, we then need to solve for $a$ the equation $$\left(a^2-1\right) \left(\pi a \left(a^2-1\right) \cos (\pi a)-2 \sin \left(\frac{\pi a}{2}\right) \left((\pi -2) a^2+\left(a^2-1\right) \cos \left(\frac{\pi a}{2}\right)+2\right)\right)-2 a \left(\pi a^4-2 (\pi -2) a^2+\pi \right) \cos \left(\frac{\pi a}{2}\right)=0$$ Using any root-finder, the solution is $a=0.6797$.
Considering $\Phi_{\text{min}}=5.59\times 10^{-5}$ while, for $a=\frac 23$, $\Phi=\frac{35 \pi-32-45 \sqrt{3}}{80}=1.68\times 10^{-4} $ which is only three times larger.
Using simple numbers $$\cos \left(\frac{17 }{25}x\right)\approx \frac{1}{2} (1+\cos (x))$$
If you want to minimize the maximum error, consider the less pleasant norm $$\Psi(a)=\int_0^{\frac{\pi }{2}} \left| \cos (a x)-\frac{1}{2} (1+\cos (x))\right| \, dx$$ which is minimum for $a \sim 0.6834$ (maximum error of $0.0073$).
To summarize : "congratulations for your approximation !"
Here is a graphical representation that can be considered as a "Proof without words" ; strictly speaking, it isn't a proof of equality but a way to see the "plausability" of the good approximation :
(Added by @Blue)
I've animated @JeanMarie's visualization to show that OP's construction always puts the "upper trisection point" of the blue arc almost onto the perpendicular bisector of the red segment. (We get exactness when the blue arc has measure $90^\circ$ or $0^\circ$.)
If we were to reflect the blue arc in the horizontal radius, the red segment would be the sagitta of the doubled arc, so one might call this construction "approximate arc trisection via sagitta bisection".
This approximation is a special case of a general approximation formula of the form $$\cos \alpha x \approx A + B \cos x$$ for $x$ in $J := [-\frac{\pi}{2}, \frac{\pi}{2}]$ good for, say, $|\alpha|$ not too much larger than $1$.
Matching values at $x = 0, \pm \frac{\pi}{2}$ gives $A = \cos \frac{\pi \alpha}{2}, B = 1 - \cos \frac{\pi \alpha}{2}$, hence an approximation $$\boxed{\cos \alpha x \approx \cos \frac{\pi \alpha}{2} + \left(1 - \cos \frac{\pi \alpha}{2}\right) \cos x}.$$
(In fact, a short calculus argument shows that (for $|\alpha| \leq 4$) our approxmation is an inequality (on $J$): $$\cos \alpha x \geq \cos \frac{\pi \alpha}{2} + \left(1 - \cos \frac{\pi \alpha}{2}\right) \cos x .$$ Moreover, provided that $|\alpha| < 1$, equality holds in $J$ only at $0, \pm \frac\pi2$.)
Examples
Taking $\alpha = \frac{2}{3}$ recovers the identity $$\cos \frac{2}{3} x = \frac{1}{2} \left(1 + \cos x\right)$$ in the question statement, which has a maximum absolute error of $\frac{-46 + 13 \sqrt{13}}{54} \approx \frac{1}{62}$ on $J$. This special case is characterized by $A = B$.
Instead taking $\alpha = \frac{1}{2}$, for example, gives $$\cos \frac{x}{2} \approx \frac{1}{\sqrt{2}} + \left(1 - \frac{1}{\sqrt{2}}\right) \cos x,$$ which has a maximum absolute error of $\frac{10 - 7 \sqrt{2}}{8} \approx \frac{1}{80}$ on $J$.
Taking $\alpha = \frac{2}{5}$ gives $$\cos \frac{2 x}{5} \approx \frac{\phi}{2} + \left(1 - \frac{\phi}{2}\right) \cos x,$$ where $\phi := \frac{1 + \sqrt{5}}{2}$ is the Golden Ratio, and this approximation has maximum absolute error $\approx \frac{1}{110}$ on $J$.
For $\alpha \approx 0$, $\cos \alpha x \approx 1 - \frac{1}{2} \alpha^2 x^2$, so the error in the original approximation is maximized near $\pm x_0$, where $x_0 \approx 1.09882$ is the unique solution of $8 x = \pi^2 \sin x$ in $(0, \frac{\pi}{2})$, and the maximum absolute error is $O(\alpha^2)$.
I prefer to add a separate answer since this one is more than much inspired by @Travis Willse's answer.
If we want the best approximation for $$\cos(\alpha x) \approx A + B \cos( x)$$ consider again the infinite norm $$\Phi(\alpha,A,B)=\int_0^{\frac \pi 2}\Big( A + B \cos( x)-\cos(\alpha x) \Big)^2\,dx$$ which is $$\frac{1}{4} \left(\frac{\sin (\pi \alpha )}{\alpha }+2 \pi A^2-\frac{8 A \sin \left(\frac{\pi \alpha }{2}\right)}{\alpha }+8 B \left(\frac{\cos \left(\frac{\pi \alpha }{2}\right)}{\alpha ^2-1}+A\right)+\pi B^2+\pi \right)$$ Computing the partial derivatives, we have $$\frac{\partial \Phi(\alpha,A,B)}{\partial A}=-\frac{2 \sin \left(\frac{\pi \alpha }{2}\right)}{\alpha }+\pi A+2 B$$ $$\frac{\partial \Phi(\alpha,A,B)}{\partial B}=\frac{2 \cos \left(\frac{\pi \alpha }{2}\right)}{\alpha ^2-1}+2 A+\frac{\pi B}{2}$$ Solving $$A=\frac{2 \pi \left(\alpha ^2-1\right) \sin \left(\frac{\pi \alpha }{2}\right)+8 \alpha \cos \left(\frac{\pi \alpha }{2}\right)}{\left(\pi ^2-8\right) \alpha \left(\alpha ^2-1\right)}$$ $$B=\frac{-8 \left(\alpha ^2-1\right) \sin \left(\frac{\pi \alpha }{2}\right)-4 \pi \alpha \cos \left(\frac{\pi \alpha }{2}\right)}{\left(\pi ^2-8\right) \alpha \left(\alpha ^2-1\right)}$$
Computing $$f(x)= A + B \cos( x)-\cos(\alpha x)$$ and assuming $\alpha$ close to $\frac 23$ $$f(0) =\frac{1}{188}-\frac{1}{393}\left(\alpha -\frac{2}{3}\right)+O\left(\left(\alpha -\frac{2}{3}\right)^2\right)$$ $$f\left(\frac{\pi }{2}\right)=\frac{2}{137}+\frac{1}{163}\left(\alpha -\frac{2}{3}\right)+O\left(\left(\alpha -\frac{2}{3}\right)^2\right)$$ $$\Phi(.)=\frac{1}{27087}-\frac{1}{30047}\left(\alpha -\frac{2}{3}\right)+O\left(\left(\alpha -\frac{2}{3}\right)^2\right)$$
None of these values can be very large.
So, for any value of $\alpha$, we have the corresponding $A$ and $B$.
For example, if $ \alpha=\frac 23$ $$ A=\frac{3 \left(5 \sqrt{3} \pi -24\right)}{10 \left(\pi^2-8\right)}=0.514599\qquad B=\frac{6 \left(3 \pi -5 \sqrt{3}\right)}{5 \left(\pi ^2-8\right)}=0.490707$$ For these values $$\Phi(.)=\frac{3 \sqrt{3}}{16}+\frac{\pi }{4}+\frac{27 \left(80 \sqrt{3}-49 \pi \right)}{200 \left(\pi ^2-8\right)}=3.69\times 10^{-5}$$ which is not much better than your $1.68\times 10^{-4}$
If, as in your post, you want $A=B$ regardless of their values, $$\alpha=0.675440 \sim \frac{25}{37}=\frac 23+\frac{1}{111} \quad \implies \quad A=B\sim \frac{69}{137}=\frac 12+\frac{1}{274} $$
Now, if we want the best combination, we need to solve for $\alpha$ the equation $$\frac{\partial \Phi(\alpha,A,B)}{\partial \alpha}=0$$ which is too long to type here but which does not make any problem. The solution is $$\alpha=0.697144\sim \frac 23+\frac 1{32}$$ which, in turn, gives $$A\sim \frac 12-\frac 1{36}\quad\quad \text{and}\quad\quad B\sim \frac 12+\frac 1{30}$$
By using Maclaurin series $$\cos(\frac{2}{3}\arccos x)=\frac12+\frac1{\sqrt3}x-\frac19 x^2+\frac{5}{54\sqrt3}x^3...$$ we have $$\cos\frac23 x\approx\frac12+\frac1a\cos x\left(\frac a{\sqrt3}-\frac a9\cos x \right).$$ Minimizing $|| \frac a{\sqrt3}-\frac a9\cos x-1||_2$ we get $a=\frac{108\sqrt3\pi-72}{110\pi-48\sqrt3}\approx 1.9649.$