# Max value of trignometric function $\sin \left(x+\frac\pi6\right)+\cos \left(x+\frac\pi6\right)$

Question: The maximum value of $\sin \left(x+\dfrac{\pi}{6}\right)+\cos \left(x+\dfrac{\pi}{6}\right)$ is at what value of $x$.

I solved the problem by setting the slope of the function to zero and got the value of $x$ is $\dfrac{\pi}{12}$ .My question is that is there a way to solve it using trigonometric identities and using some logic.Also how did that logic made sense to you or how did it came to your mind.

• You need a compound angle transformation to get something of the form $R\sin(x+\alpha)$ – David Quinn Jul 29 '15 at 18:40
• We have $\sin t+\cos t=\sqrt{2}\sin(t+\pi/4)$. – André Nicolas Jul 29 '15 at 18:42
• How did this came to your mind , also how to go further from here. @AndréNicolas – Kartik Watwani Jul 29 '15 at 18:51
• What is the domain of x ? – Cardinal Jul 29 '15 at 18:52
• In general $a\sin t+b\cos t=\sqrt{a^2+b^2}\sin(t+\phi)$, where $\phi$ is an angle whose cosine is $a/\sqrt{a^2+b^2}$ and whose sine is $b/\sqrt{a^2+b^2}$. This follows from the addition law for $\sin(A+B)$ and is used pretty often. The max is then obviously $\sqrt{2}$. For where this occurs, in your case we want the sine of $x+\pi/6+\pi/4$ to be $1$. You know that $\sin w=1$ precisely if $w$ has the shape $\pi/2+n\pi$. The simples place then is where $\pi/6+\pi/4=\pi/2$. – André Nicolas Jul 29 '15 at 19:00

## 2 Answers

Recall the sine angle identity $$\sin(\alpha + \beta) = \sin \alpha \cos \beta + \cos \alpha \sin \beta.$$ For the choice $\beta = \pi/4$, we observe $$\sin \beta = \cos \beta = \frac{1}{\sqrt{2}},$$ thus we have as a special case $$\sin\left( \alpha + \frac{\pi}{4} \right) = \frac{1}{\sqrt{2}} \left(\sin \alpha + \cos \alpha\right).$$ Consequently, for any angle $\alpha$, we have the identity $$\sin \alpha + \cos \alpha = \sqrt{2} \sin \left(\alpha + \frac{\pi}{4}\right),$$ and the choice $$\alpha = x + \frac{\pi}{6}$$ immediately gives the simplification desired, from which the maximum value is trivially obtained.

In general, because of the circular identity $$\sin^2 \beta + \cos^2 \beta = 1,$$ we can write expressions of the form $$A \sin \alpha + B \sin \alpha$$ as $$\sqrt{A^2 + B^2} \left(\frac{A}{\sqrt{A^2 + B^2}} \sin \alpha + \frac{B}{\sqrt{A^2+B^2}} \cos \alpha\right),$$ then there exists an angle $\beta$ such that $$\sin \beta = \frac{A}{\sqrt{A^2+B^2}}, \quad \cos \beta = \frac{B}{\sqrt{A^2 + B^2}}.$$ $$a \sin x +b \cos x=\\ \frac{a}{|a|} \sqrt{a^2+b^2}\sin(x+\alpha)\\ \tan \alpha = \frac{b}{a}$$ $$\sin\left(x+\frac{\pi}{6} \right)+\sin\left( x+\frac{\pi}{6}\right)=\\\sqrt{2} \sin\left( x+\frac{\pi}{6}+\frac{\pi}{4}\right)=\\\sqrt{2} \sin\left( x+\frac{5\pi}{12}\right)$$