# Compute the period of this function $f(x)$

I'm starting my journey into Fourier Series. I am given this function: $$f(x)=7+3\cos{(\pi x)}-8\sin{(\pi x)}+4\cos{(2\pi x)}-6\sin{(2\pi x)}$$

Following my book, this function has a period of $T=2$ (this is the book I'm reading).

However from what I know:

1. A function $f(x)$ is periodic with period $T$, if and only if each of its summands is periodic with period $T$.
2. A function $g(x)$ is said to be periodic with period $T$ when it satisfies: $g(x+T)=g(x)$

So, for the function above, I can't seem to understand why the author says its period is 2, since: (please correct the following statements if I'm wrong)

1. $\cos{(\pi x+T)}=\cos{(\pi x)} \Leftrightarrow T=\boxed{2\pi}, 4\pi,...$
2. $\sin{(\pi x+T)}=\sin{(\pi x)} \Leftrightarrow T=\boxed{2\pi}, 4\pi,...$
3. $\cos{(2\pi x+T)}=\cos{(2\pi x)} \Leftrightarrow T=\boxed{2\pi}, 4\pi,...$
4. $\sin{(2\pi x+T)}=\sin{(2\pi x)} \Leftrightarrow T=\boxed{2\pi}, 4\pi,...$

I derived the above periods using the formulas for the sine and cosine of a sum of 2 angles. For example:

\begin{align} \cos{(\pi x)} & = \cos{(\pi x+T)} \\ & = \cos{(\pi x)}\underbrace{\cos{(T)}}_{=1}-\sin{(\pi x)}\underbrace{\sin{(T)}}_{=0} \end{align}

Which is satisfied only when $T=\boxed{2\pi}, 4\pi,... = 2\pi k$

So... why did the book say $f(x)$ has a period equal to $T=2$? Where am I going wrong?

In your test for periodicity, you need to replace $x$ by $x+T$.

So for example, $\cos(\pi x)$ has period $2$ since $$\cos(\pi(x+2)) = \cos(\pi x)$$

• Thank you for the concise answer. However, I don't understand why I have to replace $(x)$ with $(x+T)$. What's wrong with applying the definition of a periodic function $g(x)=g(x+T)$? And then solving for $T$? – Jose Lopez Garcia Jan 30 '18 at 11:38
• Nothing is wrong with the definition : here, for instance, if $g(\mathbf{x}):=\cos(\pi\times \mathbf{x} )$, you will have $g(\mathbf{x+T})= \cos(\pi\times (\mathbf{x+T}) )= \cos(\pi x+ \pi T)$. – Netchaiev Jan 30 '18 at 11:42
• @Jose Lopez Garcia: Sure, you can do that, but that's not what you did. Note that $g(x+T)$ is what you get when you replace $x$ by $x+T$ in $g(x)$. – quasi Jan 30 '18 at 11:43
• Oh... I see my mistake now. I didn't apply the definition properly. Thank you all guys for your help. I'll accept this answer for its conciseness, but all 4 answers are just as good. – Jose Lopez Garcia Jan 30 '18 at 11:46

Looking at $g(x) = \cos{(\pi x)}$ you should have:

$\cos{(\pi (x+T))} = \cos{(\pi x)}$

That is:

$\cos{(\pi x+ \pi T))} = \cos{(\pi x)}\Leftrightarrow T=2, 4,...$

And obviously the same applies for the others.

You need $$7+3\cos{(\pi x)}-8\sin{(\pi x)}+4\cos{(2\pi x)}-6\sin{(2\pi x)}=$$ $$=7+3\cos{(\pi (x+T))}-8\sin{(\pi (x+T))}+4\cos{(2\pi( x+T))}-6\sin{(2\pi (x+T))}$$ for all real $x$, which indeed gives $T=2$.

Assume g(x+T) =g(x), for all x, real, then T is called period.

If there exists a least positive constant T it is called fundamental period.

1)$\cos(πx),\sin(πx) .$

$T_1=2:$

Since $\cos(π(x+2)) =\cos(πx+2π)$, for $x$ real. Likewise for $\sin(πx).$

2) $\cos(2πx), \sin(2πx).$

$T_2= 1.$

Since $\cos(2π(x+1))= \cos(2πx+2π)$ for $x$ real. Likewise for $\sin(2πx).$

Note any $nT$ , $n \in.\mathbb{Z^+}$, a multiple of the fundamental period $T$ is also a period.

Choose $T=T_1$ to satisfy periodicity for 1) and 2).

Finally :

The fundamental period of $g$ is $T =2,$

$g(x+2)= g(x),$ with

$g(x) = 7+3\cos(πx)-8\sin(πx) +4\cos(2πx) -6\sin(2πx)$.

The functions $x\mapsto \sin(\pi x)$ and $x\mapsto \cos(\pi x)$ are 2-periodic and the functions $x\mapsto \sin(2\pi x)$ and $x\mapsto \cos(2\pi x)$ are 1-periodic : the sum is then 2-periodic ($T=2$)