# an explicit example of two particular but simple continuous function

I was trying to construct some functions, but I don´t know how I can do it Dx. The first it´s a continuous function, that has exactly the set $$\left\{ 0 \right\} \cup \left\{ {\frac{1} {n}} \right\}$$ as local strictly maximum points. My problem is with the point 0. Dx

The second is construct ( if it exist ) an infinite differentiable function, such that \eqalign{ & f^{\left( k \right)} \left( 0 \right) = 1\,\,\forall k \in {\Bbb N} \cr & f\left( 0 \right) = 1 \cr} and it´s different from the exponential.

here it´s obvious that if exist such function exist, and it´s different from the exponencial, could not be analytic, otherwise, i´ll be the exponencial, but I don´t have some example If someone can help me with that )=

-
For the second question, take $e^x+f(x)$ where $f(x)$ is the standard example of a nonzero smooth function whose derivatives at $0$ all vanish. – Henning Makholm Oct 12 '11 at 21:09

We will produce a function $g$ such that $0$ together with the set $\{\frac{1}{n}\}$, where $n$ ranges over $\mathbb{N}$ is the set of local strictly minimum points. If we set $f(x)=-g(x)$, then $f$ has the property that was asked for.

Let $g(0)=0$, and for any positive integer $n$, let $g(1/n)=\frac{1}{n}$. It remains to define $g(x)$ for $x$ in the intervals $\left(\frac{1}{n+1},\frac{1}{n}\right)$, and for $x>1$.

For any positive integer $k$, let $P_k$ be the point $(1/k,1/k)$. Let $m_n$ be the number midway between $1/(n+1)$ and $1/n$. Let $g(m_n)=2/n$, and let $M_n=(m_n,2/n)$.

For $x$ between $m_n$ and $1/n$, define $g(x)$ by specifying that $(x,g(x))$ lies on the straight line segment that joins $M_n$ and $P_n$. Similarly, for $x$ between $1/(n+1)$ and $m_n$, define $g(x)$ by specifying that $(x,g(x))$ lies on the straight line segment that joins $P_{n+1}$ and $M_n$. Finally, for $x>1$, let $g(x)=1+x$.

This $g(x)$ does the job. Continuity at $0$ is ensured because near $0$, our function does not dip much below $0$. If we also want things to work for negative $n$, reflect the curve we have described across the $y$-axis.

The function $g$ has many points of non-differentiability. It is not hard to smooth it out, so that it is everywhere infinitely differentiable.

For the second question, @Henning Makholm's comment is a full answer.

-
@Henning Makholm: Definitely not on purpose! Thanks for pointing out the typo. – André Nicolas Oct 13 '11 at 2:33
$@$André, so I thought. I had tried correcting it myself, but my edit must have been lost in crosstalk. – Henning Makholm Oct 13 '11 at 2:43
@Henning Makholm: Thanks for trying to fix it. Last I looked, it is fixed. Am not sure which one of us did it. – André Nicolas Oct 13 '11 at 2:50