Needs["NumericalCalculus`"]

square[x_] := If[x<π,1,-1]
sawth[x_] := If[x<(π/2),(2/π)x,If[x≥(π/2)&&x<3(π/2),(2/π)x-2,(2/π)x-4]]
comparator[x_,y_] := If[x>y,1,-1]
buffer[x_]:=x
noninv[x_]:=x*(1+(100/10))
inv[x_]:=((-100)/10)x
diff[f_,x_]:=N[f'[x]]
int[f_,x_]:=Integrate[f[x],x]
int[square,x]
int[sawth,x]
sine:=Plot[Sin[x],{x,0,2π}, Ticks -> False, PlotStyle->Red,PlotLegends->{"Sine"}]
sqr:=Plot[square[x],{x,0,2π}, Ticks -> False, PlotStyle->Red,PlotLegends->{"Square"}]
saw:=Plot[sawth[x],{x,0,2π}, Ticks -> False, PlotStyle->Red,PlotLegends->{"Sawtooth"}]

comp1sin := Plot[comparator[Sin[x],.5],{x,0,2π}, Ticks -> False, PlotLegends->{"Comparator"}]
comp1square := Plot[comparator[square[x],.5],{x,0,2π}, Ticks -> False, PlotLegends->{"Comparator"}]
comp1saw := Plot[comparator[sawth[x],.5],{x,0,2π}, Ticks -> False, PlotLegends->{"Comparator"}]

comp2sin:= Plot[comparator[Sin[x],-.5],{x,0,2π}, Ticks -> False, PlotLegends->{"Comparator"}]
comp2square:= Plot[comparator[square[x],-.5],{x,0,2π}, Ticks -> False, PlotLegends->{"Comparator"}]
comp2saw:= Plot[comparator[sawth[x],-.5],{x,0,2π}, Ticks -> False, PlotLegends->{"Comparator"}]

buffersin:= Plot[buffer[Sin[x]],{x,0,2π}, Ticks -> False, PlotLegends->{"Buffer"}]
buffersquare:= Plot[buffer[square[x]],{x,0,2π}, Ticks -> False, PlotLegends->{"Buffer"}]
buffersaw:= Plot[buffer[sawth[x]],{x,0,2π}, Ticks -> False, PlotLegends->{"Buffer"}]

noninvsin:= Plot[noninv[Sin[x]],{x,0,2π}, Ticks -> False, PlotLegends->{"Non-Inverting Amp"}]
noninvsquare:= Plot[noninv[square[x]],{x,0,2π}, Ticks -> False, PlotLegends->{"Non-Inverting Amp"}]
noninvsaw:= Plot[noninv[sawth[x]],{x,0,2π}, Ticks -> False, PlotLegends->{"Non-Inverting Amp"}]

invsin:= Plot[inv[Sin[x]],{x,0,2π}, Ticks -> False, PlotLegends->{"Inverting Amp"}]
invsquare:= Plot[inv[square[x]],{x,0,2π}, Ticks -> False, PlotLegends->{"Inverting Amp"}]
invsaw:= Plot[inv[sawth[x]],{x,0,2π}, Ticks -> False, PlotLegends->{"Inverting Amp"}]

diffsin:= Plot[diff[Sin,x],{x,0,2π}, Ticks -> False, PlotLegends->{"Differentiator"}]
diffsquare:= Plot[diff[square,x],{x,0,2π}, Ticks -> False, PlotLegends->{"Differentiator"}]
diffsaw:= Plot[diff[sawth,x],{x,0,2π}, Ticks -> False, PlotLegends->{"Differentiator"}]

intsin:= Plot[-Cos[x],{x,0,2π}, Ticks -> False, PlotLegends->{"Integrator"}]
intsquarefunc= int[square,x]
intsquare:= Plot[intsquarefunc,{x,0,2π}, Ticks -> False, PlotLegends->{"Integrator"}]
intsawfunc = int[sawth,x]
intsaw:= Plot[intsawfunc,{x,0,2π}, Ticks -> False, PlotLegends->{"Integrator"}]

Export["comp1sin.eps",Show[comp1sin,sine]]
Show[comp1square,sqr]
Show[comp1saw,saw]

Show[comp2sin,sine]
Show[comp2square,sqr]
Show[comp2saw,saw]

Show[buffersin,sine]
Show[buffersquare,sqr]
Show[buffersaw,saw]

Show[noninvsin,sine]
Show[noninvsquare,sqr]
Show[noninvsaw,saw]

Show[invsin,sine]
Show[invsquare,sqr]
Show[invsaw,saw]

Show[diffsin,sine]
Show[diffsquare,sqr]
Show[diffsaw,saw]

Show[intsin,sine]
Show[intsquare,sqr]
Show[intsaw,saw]