# For any two functions $f_1 : [0,1] →\mathbb R$ and $f_2 : [0,1] →\mathbb R$, check which among the statements are true.

For any two functions $f_1 : [0,1] →\mathbb R$ and $f_2 : [0,1] →\mathbb R$, deﬁne the function $g : [0,1] →\mathbb R$ as $g(x) = \max(f_1(x),f_2(x))$ for all $x ∈ [0,1]$.

A. If $f_1$ and $f_2$ are linear, then $g$ is linear

B. If $f_1$ and $f_2$ are diﬀerentiable, then g is diﬀerentiable

C. If $f_1$ and $f_2$ are convex, then g is convex

D. None of the above

My attempt:- $g(x) = \max(f_1(x),f_2(x))=\frac{f_1(x)+f_2(x)}{2}+\frac{|f_1(x)-f_2(x)|}{2}$

A. $g(0)=\max\{f_1(0),f_2(0)\}=0$

$g(cx+y)=\max\{f_1(cx+y),f_2(cx+y)\}=\frac{f_1(cx+y)+f_2(cx+y)}{2}+\frac{|f_1(cx+y)-f_2(cx+y)|}{2}=\frac{cf_1(x)+f_1(y)+cf_2(x)+f_2(y)}{2}+\frac{|cf_1(x)+f_1(y)-(cf_2(x)+f_2(y))|}{2}=c\frac{f_1(x)+f_2(x)}{2}+\frac{f_1(y)+f_2(y)}{2}+\frac{|c(f_1(x)-f_2(x))+(f_1(y)-f_2(y))|}{2}$. $c(f_1(x)-f_2(x))$ and $(f_1(x)-f_2(x))$ lie in the same line. so, Equality holds in the triangular ineqality.
$c\frac{f_1(x)+f_2(x)}{2}+\frac{f_1(y)+f_2(y)}{2}+\frac{|c(f_1(x)-f_2(x))|}{2}+\frac{|(f_1(y)-f_2(y))|}{2}\implies$ $c\frac{f_1(x)+f_2(x)}{2}+\frac{f_1(y)+f_2(y)}{2}+|c|\frac{|(f_1(x)-f_2(x))|}{2}+\frac{|(f_1(y)-f_2(y))|}{2}$ It need not be linear. Since,If $c<0$, $|c|=-c$.

B. $\lim_{h\to 0}\frac{g(h)-g(0)}{h}=\lim_{h\to 0}\frac{f_1(h)+f_2(h)}{2h}+\frac{|f_1(h)-f_2(h)|}{2h}-(\frac{f_1(0)+f_2(0)}{2h}+\frac{|f_1(0)-f_2(0)|}{2h})=\lim_{h\to 0}\frac{f_1(h)-f_1(0)+f_2(h)-f_2(0)}{2h}+\frac{|f_1(h)-f_2(h)|}{2h}-\frac{|f_1(0)-f_2(0)|}{2h}$

How do I proceed further?

C. Let $x,y \in[0,1],g(tx+(1-t)y)=\max(f_1(tx+(1-t)y),f_2(tx+(1-t)y))=\frac{f_1(tx+(1-t)y)+f_2(tx+(1-t)y)}{2}+\frac{|f_1(tx+(1-t)y)-f_2(tx+(1-t)y)|}{2}\leq \frac{f_1(tx+(1-t)y)+f_2(tx+(1-t)y)}{2}+\frac{|f_1(tx+(1-t)y)|}{2}+\frac{f_2(tx+(1-t)y)|}{2}$

How do I proceed further?

I couldn't find any counterexample for $B$ and $C$. So, I tried to prove it. I am not able to complete the proof. Plese help me.

• For B. you can take $f_{1}(x)=x$ and $f_{2}(x)=-x$, then $max(f_{1},f_{2}) = |x|$, which is not differentiable. – Gabriel Fernandes May 30 '18 at 18:19
• Thank you @GabrielFernandes – Unknown x May 30 '18 at 18:20
• @GabrielFernandes Except the domain is given as $[0,1]$ so you would have to take something more like $f_1(x) = x - \frac{1}{2}$ and $f_2(x) = \frac{1}{2} - x$. – Daniel Schepler May 30 '18 at 18:21
• @ManeeshNarayanan sorry I've just seen that you are restricted to $[0,1]$. – Gabriel Fernandes May 30 '18 at 18:22
• Maybe A. should be stated as: if $f_{1}:\mathbb{R} \rightarrow \mathbb{R}$ and $f_{2}:\mathbb{R} \rightarrow \mathbb{R}$ are both linear then there is $g:\mathbb{R} \rightarrow \mathbb{R}$ linear such that $g|[0,1] = max(f_{1}|[0,1],f_{2}|[0,1])$. (In this case A is true) – Gabriel Fernandes May 30 '18 at 18:57

For a counterexample to B, consider two linear functions, one sloping upward and one sloping downward, crossing in the middle, so that the max is V-shaped and thus has a point of nondifferentiability (this would also be a counterexample to A).

For C, since convexity is defined in terms if inequalities, it's probably just easier to use the $\max$ definition directly than to use your decomposition. $$tg(x)+(1-t)g(y) \geq tf_1(x)+(1-t)f_1(y) \geq f_1(tx+(1-t)y)$$ and $$tg(x)+(1-t)g(y) \geq tf_2(x)+(1-t)f_2(y) \geq f_2(tx+(1-t)y)$$ thus $$tg(x)+(1-t)g(y) \geq \max\{f_1(tx+(1-t)y),f_2(tx+(1-t)y)\} = g(tx+(1-t)y)$$

B. is false. Just take $f(x)=x$ and $g(x)=1-x$.

C. is true. It follows from the definition of convex function.

• C $\frac{f_1(tx+(1-t)y)+f_2(tx+(1-t)y)}{2}+\frac{|f_1(tx+(1-t)y)-f_2(tx+(1-t)y)|}{2}\leq \frac{f_1(tx+(1-t)y)+f_2(tx+(1-t)y)}{2}+\frac{|f_1(tx+(1-t)y)|}{2}+\frac{f_2(tx+(1-t)y)|}{2}$ for this part,$\frac{|f_j(tx+(1-t)y)|}{2},j=1,2$, – Unknown x May 31 '18 at 1:32
• $\frac{|f_j(tx+(1-t)y)|}{2} \leq\frac{|tf_j(x)+(1-t)f_j(y)|}{2}$ since $f_j$ is convex. Then using the triangle inequality it follows. Sir, Am I correct? – Unknown x May 31 '18 at 1:34
• @ManeeshNarayanan This is not correct. Your last inequality assumes that $|f_j|$ is convex. But it doesn't have to be. – José Carlos Santos May 31 '18 at 7:31
• can you help me? how do I proceed further? – Unknown x May 31 '18 at 10:29
• @ManeeshNarayanan You already have this answer. – José Carlos Santos May 31 '18 at 10:38

A. is not true. $f_1(x) = x$ and $f_2(x) = 1-x$.

B. is not true, see above, not differentiable at $x =\frac{1}{2}$.

C. is true though. Plug in definition of a convex function.

• At first, I thought as you with respect to A. However, is $f_2$ linear? – José Carlos Santos May 30 '18 at 18:27
• @JoséCarlosSantos ...yes? It's a linear function, even if it's not linear as an operator. – Y. Forman May 30 '18 at 18:28
• How do you define “linear function”? – José Carlos Santos May 30 '18 at 18:29
• A necessary (but not sufficient) condition for $f: [0,1] \mapsto \mathbb{R}$ to be linear is $f(\frac{1}{2}) = \frac{1}{2}[f(0) + f(1)]$ – Mike May 30 '18 at 18:33
• Since $[0,1]$ isn't a vector space, "linear transformation" probably wouldn't even be applicable as a predicate on functions $[0, 1] \to \mathbb{R}$. – Daniel Schepler May 30 '18 at 18:51

Regarding $C.$

If $f_1(x) \ge f_2(x)$ and $f_1(y) \ge f_2(y)$

$\lambda g(x) + (1-\lambda)g(y) = \lambda f_1(x) + (1-\lambda)f_1(y) \ge f_2(x\lambda + (1-\lambda)y)$

and

$\lambda g(x) + (1-\lambda)g(y) \ge \lambda f_2(x) + (1-\lambda)f_2(y) \ge f_2(x\lambda + (1-\lambda)y)$

If $f_1(x) \ge f_2(x)$ and $f_2(y) \ge f_1(y)$

$\lambda g(x) + (1-\lambda)g(y) \ge \lambda f_1(x) + (1-\lambda)f_1(y)$ and $\lambda g(x) + (1-\lambda)g(y) \ge \lambda f_2(x) + (1-\lambda)f_2(y)$

But $g(x\lambda + (1-\lambda)y)$ equals either $f_1(x\lambda + (1-\lambda)y)$ or $f_2(x\lambda + (1-\lambda)y)$

$g(x\lambda + (1-\lambda)y) \ge g(x\lambda + (1-\lambda)y)$