Let's say I have a function $f$ which is defined on an interval $[0,1]$ . How can I create a function $g$ defined on $[0,2]$ where:
$f(x)=\sqrt{x^{a} - x^b}$ ,$0<a<b$ ,$a$ and $b$ are constants and $ g(x)= \left\{ \begin{array}{rl} f(x) \hspace{0.3cm}for \hspace{0.3cm}x\in[0,1]\\ -f(2-x) \hspace{0.3cm}for \hspace{0.3cm}x\in [1,2] \end{array} \right. $
knowing that $f(1)=0$. Of course, I can still use the above definition, but is there a way to avoid a piecewise definition (maybe using absolute values ?)
You could write $g(x) = (1-2\theta(x-1))f(x-\lfloor x\rfloor)$, where $\lfloor x\rfloor$ denotes the integer part of $x$ and $\theta$ is the Heaviside step function.
This expresses $g$ in terms of "built-in" functions, which may be a help. But of course those built-in functions are defined piecewise.
I suspect one could express this result without using piecewise functions, at the cost of casting it as an integral transform. But I'm not sure if that's within the scope of your question.