Construct a specific function for a given sequence

Given the sequence $A_n=n$, I want to construct a function $f : R \to R$, such that for every $x \in N$:

• $f(x)=A_x$
• $\int\limits_{0}^{x}f(t)dt=\sum\limits_{i=0}^{x}A_i$

How can do that?

Thanks

• $A$ seems to be a function from the natural numbers to natural numbers. Yet you require that $f(.5)=A_{0.5}$. What is the definiton of $A_{0.5}$
– Amr
Apr 14, 2014 at 6:07
• @Amr: It says for every $x \in N$, and $0.5 \notin N$!!! Apr 14, 2014 at 6:15
• You are right ${}{}{}$
– Amr
Apr 14, 2014 at 6:28

It is enough to construct $f$ such that $f(n)=A_n$ for $n=0,1,2,...$ and $$\int_{n}^{n+1} f(t)\, dt=A_{n+1}\quad \hbox{for all}\; n\geq 1$$

Let $(c_n)$ be a sequence of real numbers to be chosen later, and define $f$ as follows: on every interval $[n,n+1]$, $f$ is the unique polynomial function of degree $2$ such that $f(n)=A_n$, $f(n+1)=A_{n+1}$ and $f(n+\frac 12)=c_n$.

The explicit formula for $f$ on $[n,n+1]$ is (Lagrange's interpolation formula) $$f(t)=2A_n (t-n-1/2)(t-n-1)-4c_n (t-n)(t-n-1)+ 2A_{n+1}(t-n)(t-n-1/2)\, .$$ So we have $$\int_{n}^{n+1} f(t)\, dt = \alpha_n \, c_n +\beta_n\, ,$$ where $\alpha_n$, $\beta_n$ do not depend on $c_n$. The coefficient $\alpha_n$ is equal to $$\alpha_n=\int_n^{n+1} (t-n)(t-n-1)\, dt\, ,$$ and it is not hard to check that $\alpha_n\neq 0$. So one can choose $c_n$ in such a way that $$\alpha_n c_n+\beta_n=A_{n+1}\, .$$ Then your function $f$ has all the required properties.

Note that the actual value of $A_n$ is irrelevant because the coefficients $\beta_n$ do not depend on the $A_n$.

Note also that $f$ is continuous. With a little more work, one could produce a $\mathcal C^\infty$ function $f$ satisfying the requirements.

• You're welcome! Apr 14, 2014 at 9:49

Baisically, you need for every $x\in\mathbb{N}$ that: $$\int_{0}^x f(y) dy=\sum_{i=0}^xA_i=\frac{x(x-1)}{2}$$

Choose $f(x)$ to be $x-\frac{1}{2}$ (I got that by differentiating). Finally t satisfy the condition $\forall x\in \mathbb{N} [f(x)=A_x]$ $\,\,\,$just change the value of $f(x)$ to be $x$ for every $x\in \mathbb{N}$. This will not change the integral of $f$ since $\mathbb{N}$ as a subset of $\mathbb{R}$ has a Lebesgue measure of zero.

• So your suggestion is $f(x)= \begin{cases} x & \text{$ x \in N$}\\ x-\frac{1}{2} & \text{$ x \notin N$}\\ \end{cases}$ ...? Apr 14, 2014 at 9:39
• @barakmanos Exactly. $\,\,\,\,\,\,\,\,\,\,\,\,$
– Amr
Apr 14, 2014 at 9:52
• This function is not continuous. How do you calculate its integral? Apr 14, 2014 at 10:39
• @barakmanos You did not ask for a continuous function, did you ?The function is Lebesgue-integrable and that suffices. See en.wikipedia.org/wiki/Lebesgue_integration.
– Amr
Apr 14, 2014 at 10:56
• @barakmanos I also think that the function which I gave is Riemann integrable as well.
– Amr
Apr 14, 2014 at 10:59