Differential equation with a function defined such that $f(x+1)=f(x)$ I just tried to do the following question, but I can't help but think I've done it completely wrong. The question states:

The function $f$ satisfies $f(x+1)=f(x)$ and $f(x)>0$ for all $x$. 


*

*Give an example of such a function

*The function $F$ satisfies: $$\frac{\text{d}F}{\text{d}x}=f(x)$$ and $F(0)=0$. Show that $F(n)=nF(1)$, for any positive integer $n$.

*Let $y$ be the solution to the differential equation: $$\frac{\text{d}y}{\text{d}x}+f(x)y=0 $$ that satisfies $y(0)=1$. Show that $y(n)\rightarrow 0$ as $n \rightarrow \infty$, where $n=1,2,3,4,\dots$



Now I think I'm completely missing the point the question is getting at. Since for the first part I said let $f(x)=c$ for some $c>0$. Then for the second part I continued assuming $f(x)=c$ which gives answers that seem correct but after some thought it's clear that there are other functions such that e.g. $f(x+1)=f(x)$, $f(x)=\sin(2\pi x)+k$ ($x\in \mathbb{Z}$ and $k$ to make $f(x)>0$) since $\sin(2\pi x)+k=\sin(2\pi x+2\pi)+k$. But I'm not sure how to continue with the question only using the the general case of $f$. 
 A: Hint for (2):
$$\begin{align}
F(n+1)-F(n) &= \int_n^{n+1} f(x) dx \\[1em]
&\quad\left\downarrow f(x+n)=f(x) \text{ for } n\in\mathbb N\right.\\[1em]
&=\int_0^{1} f(x) dx \\
&=F(1)-F(0) \\
&=F(1)
\end{align}$$
The property $f(x+n)=f(x)$ follows from $f(x+1)=f(x)$ (you can prove it via induction).
A: I am assuming that $f$ satisfies some measureability/integrability condition so
that the various integrals are defined and a suitable Lipschitz condition is
satisfied so the differential equation (3.) has a unique solution passing
through a given initial conditon.


*

*Example $f(x) = 1$.

*Suppose $F$ solves 2. on $[0,1]$. Let $\phi(x) = F(x+1)-F(1)$, then
$\phi'(x) = F'(x+1) = f(x+1) = f(x)$, and $\phi(0) = F(1)$, hence $\phi$
satisfies the same differential equation with the same initial condition
and so $\phi(x) = F(x) = F(x+1)-F(1)$. This gives
$F(x+1) = F(x)+F(1)$ from which the desired result follows.

*Let $y$ be a solution of $y' = -f(x) y$ with $y(0) = 1$.
Note that $x \mapsto 0$ solves the one dimensional system, and $y(0) =1$,
hence $y(x) >0$ for all $x \ge 0$ (since the trajectories cannot cross).
Hence $y'(x) < 0$ for all $x \ge 0$, and so $y$ is strictly decreasing, and
hence $y(1) \in (0,1)$.
Let $\upsilon(x) = {1 \over y(1)}y(x+1)$ and note that
$\upsilon'(x) = {1 \over y(1)}y'(x+1) = f(x+1) {1 \over y(1)}y(x+1) = f(x) \upsilon(x)$, and $\upsilon(0) = 1$, hence
$\upsilon(x) = y(x) = {1 \over y(1)}y(x+1)$. It follows that
$y(n) = y(1)^n$, and since $y(1) \in (0,1)$, we see that $y(x) \to 0$
(since $y$ is decreasing).
