# How to isolate $x$ when $\cos(x/2)\cos(3x)/2−3\sin(x/2)\sin(3x)= 0$

Asked to find all relative and absolute extrema of $$f(x) = \sin\left(\frac{1}{2}x\right)\cos(3x)$$ on the interval $$[0,\pi]$$. I've gotten the derivative, $$f'(x)=\frac{\cos(\frac{x}{2})\cos(3x)}{2} - 3\sin(\frac{x}{2})\sin(3x),$$ just fine, but how would I proceed to isolate x after this? I noticed that the situation is similar to the sine angle sum identity, but I don't know if there's an identity for an equation with the form $$h\cos(\alpha)\cos(\beta) - k\sin(\alpha)\sin(\beta)$$ and can't find anything online. I don't have much experience working with Euler's Formula in this context but know enough that I could probably follow an explanation based on it.

• Wolfram Alpha seems to solve it the way I feared: by turning the whole thing into a degree six polynomial. This question appears to be unreasonable for a first year calculus course. – Theo Bendit Aug 15 at 3:18
• Just wondering, is this a book problem? Which class? – imranfat Aug 15 at 3:33
• Taking Calc BC online through UC Scout; this is an open response assignment so just Wolfram Alpha without explanation isn't really good enough (and I also need exact answers when everything I've seen just approximates with polynomials). – throwaway2395 Aug 15 at 3:40
• Since $f'(x)/(\cos x/2)$ can be written as a cubic polynomial in $\cos x$, you could conceivably use Vieta's trig solution to the cubic to get $x=\arccos(\tfrac{2}{7}+\tfrac{\sqrt{37}}{7}\cos \theta)$, $\cos 3\theta = -\tfrac{104}{37\sqrt{37}}$. – K B Dave Aug 15 at 5:01

Expanding and varying my own comment:

$$\begin{split} f'(x)&=\tfrac{1}{2}\cos\tfrac{x}{2}\cos 3x - 3\sin\tfrac{x}{2}\sin 3x\\ &=\tfrac{1}{2}\cos\tfrac{x}{2}\left(\cos 3x - 6\frac{\sin\tfrac{x}{2}\sin x}{\cos\tfrac{x}{2}} \frac{\sin 3x}{\sin x}\right)\\ &=\tfrac{1}{2}\cos\tfrac{x}{2}\left(\cos 3x - 6(1-\cos x) \frac{\sin 3x}{\sin x}\right)\\ &=\tfrac{1}{2}\cos\tfrac{x}{2}\left(T_3(\cos x) - 6(1-\cos x) U_2(\cos x)\right)\\ \end{split}$$ where \begin{align} T_3(y)&=4y^3-3y \\ U_2(y)&=4y^2-1\text{.} \end{align} Thus, $$f'(x)=\tfrac{1}{2}\cos\tfrac{x}{2}g(\cos x)$$ where $$g(y)=28y^3-24y^2-9y+6\text{.}$$

Now, we "cheat" a bit and use a CAS to find an optimized representation for $$g(y)$$. Let $$y=\frac{z+2}{2(z+4)}\text{.}$$ Then $$g(y)=-\frac{h(z)}{(z+4)^3}$$ where $$h(z)=z^3-66 z -172\text{.}$$ Using the trigonometric solution to the cubic, we find \begin{align} z&=2\sqrt{22}\cos\theta&\cos 3\theta&=\frac{43}{11\sqrt{22}}\text{.} \end{align}

That is, \begin{align}x&=\arccos\frac{1+\sqrt{22}\cos\theta}{2(2+\sqrt{22}\cos\theta)} \\ \theta&=\tfrac{1}{3}\arccos\frac{43}{11\sqrt{22}}+\frac{2k\pi}{3}\end{align}

• Like it! but can't you turn g(y) into $t^3+pt+q=0$ directly instead of 'cheat'? – Quanto Aug 15 at 17:48
• Yes, you can. I just prefer to work with the normal form of an algebraic extension. If you depress the cubic with $y\mapsto y+c$ you get the expression for $x$ given in my comment on the question. – K B Dave Aug 15 at 21:31
• You made it ! Great and $\to +1$. Cheers. – Claude Leibovici Aug 16 at 4:10

Trying approximate solutions.

First, using trigonometric formulae, the derivative can write $$f'(x)=\frac{1}{4} \left(7 \cos \left(\frac{7 x}{2}\right)-5 \cos \left(\frac{5 x}{2}\right)\right)$$ Forget the $$\frac{1}{4}$$ and plot the function. You should notice that, for the range of concern, the solution are "close" to $$\frac \pi{12}$$, $$\frac \pi{3}$$, $$\frac {2\pi}{3}$$ and the last one is exactly $$\pi$$.

So, around each of these values, build Taylor expansions to get successively $$f'(x)=\left(7 \sin \left(\frac{5 \pi }{24}\right)-5 \cos \left(\frac{5 \pi }{24}\right)\right)+\left(x-\frac{\pi }{12}\right) \left(\frac{25}{2} \sin \left(\frac{5 \pi }{24}\right)-\frac{49}{2} \cos \left(\frac{5 \pi }{24}\right)\right)+\left(x-\frac{\pi }{12}\right)^2 \left(\frac{125}{8} \cos \left(\frac{5 \pi }{24}\right)-\frac{343}{8} \sin \left(\frac{5 \pi }{24}\right)\right)+O\left(\left(x-\frac{\pi }{12}\right)^3\right)$$ and we know the values of the trigonometric functions of $$\frac{n \pi }{24}$$. Solving the quadratic will give $$x_1=0.286024$$ (while the "exact" solution would be $$0.286061$$).

$$f'(x)=-\sqrt{3}+\frac{37}{2} \left(x-\frac{\pi }{3}\right)+\frac{109}{8} \sqrt{3} \left(x-\frac{\pi }{3}\right)^2+O\left(\left(x-\frac{\pi }{3}\right)^3\right)$$ Solving the quadratic will give $$x_2=1.13170$$ (while the "exact" solution would be $$1.13265$$).

$$f'(x)=1-\frac{37}{2} \sqrt{3} \left(x-\frac{2 \pi }{3}\right)-\frac{109}{8} \left(x-\frac{2 \pi }{3}\right)^2+O\left(\left(x-\frac{2 \pi }{3}\right)^3\right)$$

Solving the quadratic will give $$x_3=2.12520$$ (while the "exact" solution would be $$2.12525$$).