1

Original Question Image

Help! Does anybody know how to do part b?

a) Let $a$ be a real number and consider the function $f:\mathbb R \to \mathbb R$ defined piecewise by

$$f(x) := \begin{cases} x-a, & \text{if $x>a$}\\ 0, & \text{if $x\le a$} \end{cases}$$ Show that for every real number $x$ we have

$$f(x) = 0.5(x-a)+0.5|x-a|$$

b) Consider the function $P:(0,+\infty)\to\mathbb R$, which is defined piecewise by $$P(x) = \begin{cases} 27, & \text{if $0<x\le 2$}\\ 9.5x+8, & \text{if $2<x\le 9$}\\ 6.5x+35, & \text{if $x>9$} \end{cases}$$ Using the result from a), express $(x)$ as the sum of a linear polynomial and absolute values of linear polynomials, i.e. write $(x)$ in the form

$$P(x)=(b_0x+c_0)+|b_1x+c_1|+|b_2x+c_2|+...$$

where $b_i$ and $ c_i$ are real numbers.

D S
  • 4,961
ss7
  • 19
  • Can you ask it without that image? – Bob Dobbs Dec 09 '22 at 09:46
  • Hint. Two functions $f,g$ are equal when they have the same domain, codomain and $f(x) = g(x), , \forall x \in D$, where $D$ is the common domain of $f$ and $g$. – xyz Dec 09 '22 at 09:51
  • Avoid posting the image links – Vedant Chourey Dec 09 '22 at 10:05
  • @Rodrigo Sadly, they only have the same range in this question. – ss7 Dec 09 '22 at 11:01
  • @ziwenshen Let $f$ be the original function in $(a)$, that's defined by cases. Now, let $g\colon \mathbb R \to \mathbb R$ defined by $$ g(x) = \frac{1}{2}(x-a) +\frac{1}{2}|x-a|, \quad \forall x \in \mathbb R.$$ What happens to $g(x)$ when $x>a?$ What happens to $g(x)$ when $x \leqslant a?$ This functions will share domain,codomains and will also share $f(x) = g(x), ,\forall x \in \mathbb R.$ – xyz Dec 09 '22 at 11:07
  • @Rodrigo so the same happens for (b), right? But how is g(x) formed? – ss7 Dec 09 '22 at 11:23

1 Answers1

0

One can observe the logic behind the example in the question and then prove the following. Let: $$a(x) = \frac{p(x) + q(x) + |p(x) - q(x)|}{2}$$ Then, if $p(x)\ge q(x)$, we get $a(x) = p(x)$. Otherwise, $a(x) = q(x)$. And: $$b(x) = \frac{p(x) + q(x) - |p(x) - q(x)|}{2}$$ yields $b(x) = q(x)$ if $p(x) \ge q(x)$ and $b(x) = p(x)$ otherwise. We will use these rules to find $P(x)$.

Let: $$\color{blue}{f(x) = 27}$$$$\color{blue}{g(x) = 9.5x+8}$$$$\color{blue}{h(x) = 6.5x+35}$$ Now, the question breaks down $P(x)$ into piecewise functions based on $x$, not $f(x),g(x),$or $h(x)$. But our formulae only work for comparisons between functions of $x$. So, before using the above formulae, you must make the conditions equivalent. Note that $g(x) = f(x)$ at $x = 2$ and $g(x) > f(x)$ for $x > 2$. Similarly, $g(x) = h(x)$ at $x = 9$ and $g(x)>h(x)$ for $x>9$, which is lucky(as 2 and 9 are the cusps where $P(x)$ changes the 'output function'), since it gives us: $$P(x) = \begin{cases} Q(x), & \text{if $h(x) \ge Q(x)$} \\ h(x), & \text{if $h(x)<Q(x)$} \end{cases}$$ where $$Q(x) = \begin{cases} f(x), & \text{if $f(x) \ge g(x)$} \\ g(x), & \text{if $f(x)<g(x)$} \end{cases}$$ Using the first formula: $$\color{green}{Q(x) = \frac{f(x) + g(x) + |f(x) - g(x)|}{2}}$$ Using the second formula: $$\color{green}{P(x) = \frac{h(x) + Q(x) - |h(x) - Q(x)|}{2}}$$ Now, substitute the values to get the desired answer.

D S
  • 4,961
  • after graphing it in desmos without the non-negative constraint of $P(x)$, I missed the point where $f(x)$ meets $h(x)$, at $x = -1.231$. This makes $P(x) = h(x)$ for $x<-1.231$, but since $P(x)$ is only defined for non-negative real numbers, this isn't a problem. – D S Dec 09 '22 at 13:25
  • the graph looks like this : https://www.desmos.com/calculator/kahyrul95t – D S Dec 09 '22 at 13:28