# Verifying the period of $f(x)=\sin(x)+\cos(x/2)$

It seems clear from the graph of $$f(x)=\sin(x)+\cos(x/2)$$ that the period $$p$$ of the function is equal to $$4\pi$$.

To verify that $$4\pi$$ is a period of $$f(x)$$, note that

\begin{align} \sin(x + 4\pi) + \cos\left(\frac{x + 4\pi}{2}\right) & =\sin(x)\cos(4\pi)+\cos(x)\sin(4\pi)+\cos(x/2)\cos(4\pi/2)-\sin(x/2)\sin(4\pi/2) \\ & =\sin(x)+\cos(x/2) \end{align}

Thus $$4\pi$$ is indeed a period of $$f$$. My question is, how would one go about trying to prove that $$4\pi$$ is the smallest $$p>0$$ such that $$f(x+p)=f(x)$$?

• Why not find it as $lcm(2\pi,4\pi)=4\pi$? Jul 8, 2020 at 10:53
• Maybe solve $f(x)=0$, noting that if $f(x_0)=0$ and if $p$ is the period in question, then $f(x_0+p)=0$.
– lulu
Jul 8, 2020 at 11:06
• The $lcm$ will not always work. Examples: $\sin{(\omega x)}(\sin^2{x}+\cos^2{x}), \sin(x)\cos(x)$ Jul 8, 2020 at 12:00

If $$f$$ is periodic with period $$T$$ then so is $$f'$$. This means that

$$f'(x) = c \implies f'(x+T) = c.$$

When looking at the graph of $$f$$ it looks like the solutions of the equation

$$f'(x) = f'(\pi)$$

are exactly the points $$S = \{ \pi + 4k \pi : k \in \mathbb Z\}$$ . If we manage to prove this then we are finished since for a smaller period $$\tilde T,$$ $$\pi + \tilde T$$ would not be a solution of the equation which contradicts the periodicity of $$f'$$.

We now solve $$f'(x) = f'(\pi).$$ By definition of $$f$$ we have $$f'(x) = \cos(x) - \frac 12 \sin \frac x2$$ and $$f'(\pi) = -1.5$$. Let $$x = 2u$$ and write $$-1.5$$ as $$-1.5 = -1 - 1/2$$ and we have

$$f'(x) = -1.5 \iff \cos(2u)- \frac 12\sin(u) = -1 - 1/2 \iff \cos(2u)+1 -\frac 1 2 \sin(u) + 1/2 = 0.$$

Using the identity

$$\cos(2u) + 1 = 2 -2 \sin^2(u)$$

(which can be deduce from the double angle formula and the $$\cos^2 u + \sin^2 u =1)$$ we have

$$-2 \sin^2 u - \frac 1 2 \sin u + 2.5 = 0 \iff -4 \sin^2(u)- \sin(u) + 5 = 0$$

This is a quadratic equation in $$\sin(u)$$ whose solutions are

$$\sin(u) = 1, \sin(u) = - 5/4.$$

Since $$-5/4 < -1$$ we have

$$f'(x) = -1.5 \iff \sin(x/2) = 1 \iff x = \pi + 4 k \pi, k \in \mathbb Z$$

Therefore $$4\pi$$ is the smallest possible period of $$f$$.

Let $$\sin(x + T) + \cos(\frac{x+T}{2}) = \sin(x) + \cos(\frac{x}{2})$$And $$T\gt 0$$. Then we have $$\sin(x+T) - \sin(x) = \cos(\frac{x}{2}) - \cos(\frac{x+T}{2}) \implies$$

$$2\sin(\frac{T}{2})\cos(\frac{2x+T}{2}) = -2\sin(\frac{2x + T}{4})\sin(\frac{-T}{4})$$ So then $$\sin(\frac{T}{4}) = 0$$ Or $$2\cos(\frac{T}{4})\cos(\frac{2x+T}{2}) = \sin(\frac{2x + T}{4}) \tag{1}$$ For all $$x\in \mathbb{R}$$. It can be shown that it's not possible $$(1)$$ holds for all $$x\in \mathbb{R}$$. So we have $$T = 4k\pi$$ It implies that the fundamental period is $$T = 4\pi$$.

One way for proving the mentioned statement is using differentiation. For all $$x\in \mathbb{R}$$ $$2\cos(\frac{T}{4})\cos(\frac{2x+T}{2}) = \sin(\frac{2x + T}{4}) \implies$$ $$-2\cos(\frac{T}{4})\sin(\frac{2x+T}{2}) = \frac{1}{2}\cos(\frac{2x + T}{4}) \implies$$ $$-2\cos(\frac{T}{4})\cos(\frac{2x+T}{2}) = \frac{-1}{4}\sin(\frac{2x + T}{4}) \implies$$ $$\sin(\frac{2x + T}{4}) = \frac{1}{4}\sin(\frac{2x + T}{4}) \implies$$ $$\sin(\frac{2x + T}{4}) = 0 \tag{2}$$ No matter what's the value of $$T$$, it's not possible $$(2)$$ holds for all $$x\in \mathbb{R}$$.

If you already have a $$p$$ such that $$f(x+p)=f(x)$$ for all $$x$$, then you can look at the function on the segment $$[0,p)$$ and check if it can be written as several copies (after proving that any other period is $$p/n$$ for integer $$n$$). You can look at the intersections with the origin, for instance. If there is more than one, you can check if $$f'(x_1)=f'(x_2)$$. if not, then there is no smaller period. Otherwise, you have to keep checking.