Can you give an example of continuously differentiable function that satisfy this properties:

Let $\{(a_i, b_i)\}_{i=1}^{\infty}$ be the family of open subintervals of $[0,1]$ with rationals endpoints. For each $i\geq 1$, let

$$g_i:[a_i,b_i]\to [0,1]$$

be a continuously differentiable function such that

  1. $g_i(a_i)=1$, $g_i(b_i)=0$,
  2. $\lim_{x\to a_i^+} g_i^{\prime}(x)=0$,
  3. $\lim_{x\to b_i^-} g_i^{\prime}(x)=0$.

I have tried to make some examples, this is my attempt:

  1. $g_i(x)=\frac{b_i-x}{b_i-a_i}, a_i\leq x \leq b_i$. But, this function not satisfy properties poin (3) and (4).
  2. \begin{align*} g_i(x)=\begin{cases} 1,& a_i\leq x < \frac{a_i+b_i}{2}\\ \frac{16x-4a_i-12b_i}{a_i-b_i},& \frac{a_i+b_i}{2}\leq x < \frac{a_i+3b_i}{4}\\ 0, & \frac{a_i+3b_i}{4}\leq x \leq b_i \end{cases} \end{align*} This function satisfies properties poin (1)-(4), but this is not continuously differentiable.

Finally, I got stuck on finding an example of that function. Any helps will be appreciated.

  • $\begingroup$ Are your intervals disjoint? $\endgroup$ Apr 28, 2021 at 5:01
  • $\begingroup$ @Kavi Rama Murthy I think yes, my intervals are disjoint.. $\endgroup$
    – user136524
    Apr 28, 2021 at 6:10
  • $\begingroup$ The functions $$g_i(x):=\cos^2{\pi(x-a_i)\over2(b_i-a_i)}\qquad(i\geq1)$$ would do. – I think you have not properly described your problem, since you also talk about one function that should be constructed. Are you planning to concatenate the $g_i$ somehow? $\endgroup$ Apr 28, 2021 at 7:45
  • $\begingroup$ @Christian Blatter Yes, I will concatenate the $g_i$ with $f_i$, where $f_i$ is defined by $$f_i(x)=\begin{cases} 1, x<a_i\\ g_i(x), a_i≤x≤b_i\\ 0, x>b_i \end{cases}$$, then I will show that $f_i$ is continuously differentiable on $[0,1]$. Okay, I'll try the function that you give. $\endgroup$
    – user136524
    Apr 28, 2021 at 8:41

1 Answer 1


Hint. There are 4 conditions so try a polynomial with 4 c0-efficients, i.e. a cubic $$g(x)=\frac {x-b}{a-b}\cdot (\,A(x-a)^2+B(x-a)+1\,).$$

  • $\begingroup$ Are A and B arbitrary constant? Or can I take for example : A=1, B=2? $\endgroup$
    – user136524
    Apr 28, 2021 at 8:45
  • $\begingroup$ @MathLearner. Compute what g(x) and g'(x) are when x=a and when x=b, and compare those to Conditions 1.,2.,3. to find what A and B must be. $\endgroup$ Apr 29, 2021 at 10:34
  • $\begingroup$ oh I see.. thank you! I will try. $\endgroup$
    – user136524
    May 1, 2021 at 20:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.