Discontinuous at infinitely many points

Since it is a work-sheet problem, so it is better to give some hints rather than a complete solution.

So for 1st part, prove by contradiction. Looking on a small neighbor hood of minima/maxima and there use the property of continuity i.e intermediate value theorem.

For 2nd part, try to break $[0,1]$ into disjoint set of parirs.

For part 3, again try to prove it by contradiction. Assume that there is finitely many such discontinuity. And delete those points and their conjugate points and also $\{0,1\}$ and their conjugates. Now remaining part is union of open intervals. And we assume that the function restricted on that intervals are continuous. Now observe that in an interval if two points attain same value then there exists a minima or maxima, and corresponde to this, in its conjugate, there exists a maxima or minima. Also observe that inside an interval either maxima exists or minima exists (Hints if in the interval $I_1=(a_1,b_1)$, $f(t_1)$ is the minima and $f(t_2)$ is the maxima, then $lt_{a\to b_1^-}f(a)$ exists. And there is a point $t_0\in I_1$ such that $lt_{a\to b_1^-}f(a)= f(t_0)$. Now look at the conjugate point $t_0'$ of $t_0$. Then $t_0'$ is a point of discontinuity, but then both it and its conjugate $t_0\in I_1$ would have been eliminated earlier, contradiction ). So we can pair up these kind of intervals one whose maxim/minima is same as others minima/maxima. And in the other case if in an interval it does not take same value at two points then there exists another interval where the function taking same values(WHY? use I.V.T and openness). So basically from here you can actually pair up intervals. And there cannot b any other kind of intervals. So number of total intervals are even. So now those eliminating points are precisely the boundary points of these intervals. Since there are even number of intervals, so their total boundary points are odd. But initially we deleted even number of points. So it is a contradiction.

Since an example is not included, I would like to add it to the answer since I got one after some thinking (This is the person who gave the question). One of the easy examples as an answer to ($b$) is by defining the function $$\begin{align} f(x)&= x^2(1+x^2) \space\space\space\space for \space x\in \mathbb Q \\&=x(1+x) \space\space\space\space\space\space\space for \space x\in \mathbb Q^{C} \end{align}$$


To construct a function satisfying your condition, we first construct such a function $f$ on $\Bbb R$.

Decompose $\Bbb R$ into union of $[n,n+1)$, construct a function $f$ whose restriction $f_n:[n,n+1)\to[n,n+1)$ is defined by $$\begin{align} f_n(x) &= x\quad\text{;}\quad n\le x<n+\frac 12 \\ &= x-\frac 12\quad\text{;}\quad n+\frac 12 \le x <n+1 \end{align}$$ It is not hard to verify that $f$ has the property you want (but the domain is $\Bbb R$, however). Now get any homeomorphism $h:\Bbb R\to (0,1)$ and compose it with $f$.

The function $\bar f:[0,1]\to \Bbb R$ satisfying the condition is construct by assigning any number not in $\mathcal R(f)$ to the image of $\bar f(0)=\bar f(1) $ and $$\bar f:=h\circ f$$ otherwise. For the sake of completeness, you can let $h=\frac 1{1+e^{x}}$.

To prove $(c)$ see Mr. Anubhav's answer.


For a fairly simple concrete example for (b), for $a<b$ let

$$f_{a,b}:(a,b]\to\Bbb R:x\mapsto\begin{cases} x-a,&\text{if }a<x\le\frac12(a+b)\\ \frac12(b-a)-x,&\text{if }\frac12(a+b)\le x\le b\;. \end{cases}$$

The graph consists of the straight line segment of slope $1$ from $\langle a,0\rangle$ to $\left\langle\frac12(a+b),\frac12(b-a)\right\rangle$ and the straight line segment of slope $-1$ from there to $\langle b,0\rangle$, not including the point $\langle a,0\rangle$.

Let $g_0=f_{\frac12,1}$, $g_1=f_{\frac14,\frac12}+\frac14$, $g_2=f_{\frac18,\frac14}+\frac38$, and in general let

$$g_n=f_{2^{-(n+1)},2^{-n}}+\frac12-\frac1{2^{n+1}}$$

for $n\in\Bbb N$. Finally, let

$$g:[0,1]\to[0,1]:x\mapsto\begin{cases} g_n(x),&\text{if }2^{-(n+1)}<x\le 2^{-n}\\ 0,&\text{if }x=0\;; \end{cases}$$

then $g$ has the desired property and is discontinuous precisely at the points $x=2^{-n}$ for $n\in\Bbb Z^+$ and $x=0$. Here is a rough sketch of part of $g$:

enter image description here