Even and Odd Periodic Extensions

Now that you can recall even and odd functions, it should be clear to you that if you know a function f(x) on an interval [0, Pi], you automatically know f(x) on [-Pi,0]. This idea leads to the notion of even and odd periodic extensions

If you have a function f(x) defined on [0, Pi] or [-Pi, 0] only, we can extend the definition of f(x) to all of [-Pi, Pi] in two ways:

The odd periodic extension defines f on the other half of the interval by defining f(-x)=-f(x) and redefining f(0) to be the average value of f(0-) and f(0+).

The even periodic extension defines f on the other half of the interval by defining f(-x)=f(x)

This is quite simple if you look at the graphs:
Consider f(x)=x on 0 to Pi


  Clear[p1,p2,p3]
  p1=Plot[x,{x,0,Pi},PlotRange->{{-Pi,Pi},Automatic},
  PlotStyle->RGBColor[1,0,0]];

The even periodic extension is
x if x is in [0,Pi]
-x if x is in [-Pi,0]
(note that this is just the absolute value function!)


  p2=Plot[Abs[x],{x,-Pi,Pi},PlotStyle->RGBColor[0,1,0]];

The odd periodic extension is
x if x is in [0,Pi]
x if x is in [-Pi,0]
(note that this is just the function f(x)=x on -Pi to Pi!)


  p3=Plot[x,{x,-Pi,Pi},PlotStyle->RGBColor[0,0,1]];

All together now!


  Show[p1,p2,p3];

Let's look at another one. f(x)=e^x on 0 to Pi


  Clear[p1,p2,p3,p]
  p1=Plot[Exp[x],{x,0,Pi},PlotRange->{{-Pi,Pi},Automatic},
  PlotStyle->RGBColor[1,0,0]];

The even periodic extension is
e^x if x is in [0,Pi]
e^(-x) if x is in [-Pi,0]


  branch1=Plot[Exp[x],{x,0,Pi},PlotStyle->RGBColor[0,1,0],
  DisplayFunction->Identity];
  branch2=Plot[Exp[-x],{x,-Pi,0},PlotStyle->RGBColor[0,1,0],
  DisplayFunction->Identity];
  p2=Show[branch1,branch2,DisplayFunction->$DisplayFunction];

The odd periodic extension is
e^x if x is in (0,Pi]
0 if x=0
-e^(-x) if x is in [-Pi,0)


  branch1=Plot[Exp[x],{x,0,Pi},PlotStyle->RGBColor[0,0,1],
  PlotRange->{0,10},DisplayFunction->Identity];
  branch2=Plot[-Exp[-x],{x,-Pi,0},PlotStyle->RGBColor[0,0,1],
  PlotRange->{-10,0},DisplayFunction->Identity];
  branch3=ListPlot[{{0,0}},PlotStyle->{PointSize[.02]},
  DisplayFunction->Identity];
  p3=Show[branch1,branch2,branch3,
  DisplayFunction->$DisplayFunction,PlotRange->{-10,10}];

All together now!


  Show[p1,p2,p3];

Up to Even and Odd Functions and More