8

I can think of an example where this wouldn't hold.

Take 1,-1,1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,-1.

But I can also prove that the statement holds.

Claim: $|f|$ is periodic then $f$ is periodic

Proof:

$|f(x+p)|=|f(x)|$

$f(x+p)=\pm f(x)$ if $f(x+p)=+f(x)$ then we are done, if $f(x+p)=-f(x)$ we get:

$f(x+2p)=-f(x+p)=f(x)$, so the period is twice bigger, but It still holds that $f$ is periodic.

Where is my mistake?

GRS
  • 2,495
  • Your 1st statement and third statement contradict each other. If you can show and give example that it does not hold in general, then how can you prove that the statement holds? – SchrodingersCat Nov 03 '15 at 14:18
  • A constant function is commonly assumed to be periodic, by convention, no? – MoebiusCorzer Nov 03 '15 at 14:20
  • 2
    If you have a proof and a counterexample, then one of them is wrong. Chances are that it's the proof that's wrong. – MPW Nov 03 '15 at 14:21
  • @MoebiusCorzer A constant function is certainly periodic. It fits the definition of a periodic function with period 1. No "by convention" about it. – Patrick Stevens Nov 03 '15 at 14:22
  • 2
    The only difficulty with constant functions is that there is no minimal period. Some definitions of periodicity require that. – MPW Nov 03 '15 at 14:27
  • @PatrickStevens Ok, but I thought of a definition requiring the existence of a minimum positive non-zero $p$. – MoebiusCorzer Nov 03 '15 at 14:29
  • @MPW Why is there no minimal period? $p=0$ is never an eligible period, because that's a "period" for every function whether or not it is periodic. $p$ negative can always be wloged into a positive one, because $f(x-p) = f(x)$ for all x, iff $f(x) = f(x+p)$ for all x. Therefore a period, if it exists, must be a strictly positive integer. – Patrick Stevens Nov 03 '15 at 14:34
  • @Aniket: That's exactly what OP is asking. – MPW Nov 03 '15 at 14:34
  • @PatrickStevens: There's no reason to think that any period for any function is necessarily an integer. For example: the minimal period of $f(x)=\sin x$ is $2\pi$ (not an integer). Every real number (or complex number, for that matter) is a period for any constant function. $c(x + \frac1{1000000})=c(x)$, for example. – MPW Nov 03 '15 at 15:25
  • @MPW Ah, I see - I thought we were working with functions from the integers (as the $1, -1, \dots$ example suggested to me). – Patrick Stevens Nov 03 '15 at 16:57
  • @PatrickStevens: Okay, now I see what you meant – MPW Nov 03 '15 at 17:29
  • It is trivial to construct counterexamples. Multiply any periodic function (e.g. sin(x) ) by any non-periodic function that only takes the values 1 and -1 (e.g. 1 if x is rational, -1 otherwise). – abligh Nov 03 '15 at 18:14
  • @abligh: Your multiplier is certainly periodic (unless you require that periodic functions have a minimum period), but since none of its periods are commensurable with $2\pi$, the result still works. – hmakholm left over Monica Nov 03 '15 at 19:20
  • @HenningMakholm I'd be interested in seeing an argument for periodicity, but yes I could have chosen a better function. f(x) = 1 for x>=0, f(x)=-1 otherwise would do the trick. – abligh Nov 03 '15 at 19:25
  • @abligh: Every positive rational number is a period, since the sum of two rational numbers is rational, and the sum of a rational and an irrational number is irrational. – hmakholm left over Monica Nov 03 '15 at 19:28
  • @HenningMakholm Doh! I think I picked the world's worst example to illustrate my point. Thanks. – abligh Nov 03 '15 at 19:38

2 Answers2

21

The mistake is that you're playing too hard and fast with the $\pm$ symbol.

You have concluded correctly that for each particular $x$ it is true that $ f(x+p)=\pm f(x)$. Or in other words, for each $x$ either $f(x+p)=f(x)$ or $f(x+p)=-f(x)$ holds. But this doesn't tell you that it will be the same of these for every $x$.

Written symbolically (and without the $\pm$ symbol), what you have concluded is $$ \forall x \; \exists k\in\{-1,1\} : f(x+p)=k\cdot f(x) $$ but you're trying to use it as if it were $$ \exists k\in\{-1,1\} \; \forall x : f(x+p)=k\cdot f(x) $$

The $\pm$ symbol can be confusing in this way because it implies a quantifier but leaves no way to express what the scope of that quantifier is. It is best avoided when you're trying to be rigorous -- except, perhaps, when you're extremely sure it will be clear to everyone what the shorthand actually means in each particular case.

  • So will my method work to prove the converse? That is $f$ is periodic implies $|f|$ is periodic? I'm not sure now if I can simply put absolute value around $f(x+p)=f(x)$ to get $|f(x+p)|=|f(x)|$? Is this statement true? – GRS Nov 03 '15 at 17:33
  • 4
    @Nick: Yes, that is true, and you shouldn't need any ­±-based method for that -- just the general fact that if $f$ is periodic, then $g\circ f$ is also periodic, for an arbitrary $g$. Letting $g$ be the absolute value is just a special case of the general fact. – hmakholm left over Monica Nov 03 '15 at 17:50
4

Your mistake is in the last line. $|f(x+2p)| = |f(x)|$ so $f(x+2p) = \pm f(x)$. However, you can't guarantee which of those it is.