Mirror a function about y axis

3.5k Views Asked by At

I have a piecewise function from -1 to 0 in Maple, and I want somehow get a mirror piecewise function about y axis, just like here:

Piecewice mirror example

Is there any bult-in function for that?

3

There are 3 best solutions below

2
On BEST ANSWER

However, we can think about the code reflect(p, [pt_2d, pt_2d]) in Maple, It is easy to do that as follows. I defined a function and their plots.

> with(plots):
  h := x->piecewise(x < -2, x+3, x <= 2, 5-x^2, 3-x):
  t:=x->h(-x):
  a:= plot(h(x), x = 0 .. 10, color = red, thickness = 3):
  b:= plot(t(x), x = -10 .. 0, color = green, thickness = 3):
  display(a,b);

enter image description here

1
On

Substitute $x$ with $-x$. ${}{}{}$

0
On

Consider the substitution $ x \mapsto -x $. Note: functions such that $ f(-x) = f(x) $ are called even. For example, $f(x)=x^n$ is even if $n$ is even. Also, $ f(x) = \cos x $ is even.