input TEX; u=0.7cm; t=1.5pt; r=2pt; c=1pt; picture grid; beginfig(1); grid := image( %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% for i=1 upto 5: draw (-5.5u,-i*u)--(5.5u,-i*u); draw (-5.5u,i*u)--(5.5u,i*u); draw (-i*u,-5.5u)--(-i*u,5.5u); draw (i*u,-5.5u)--(i*u,5.5u); endfor pickup pencircle scaled t; drawarrow (-6u,0)--(6u,0); drawarrow (0,-6u)--(0,6u); picture l; for i=1 upto 5: l:=thelabel.top(TEX("$\scriptstyle" & decimal(-i) & "$"), (-i*u,0)); unfill bbox l; draw l; l:=thelabel.top(TEX("$\scriptstyle" & decimal(i) & "$"), (i*u,0)); unfill bbox l; draw l; l:=thelabel.rt(TEX("$\scriptstyle" & decimal(-i) & "$"), (0,-i*u)); unfill bbox l; draw l; l:=thelabel.rt(TEX("$\scriptstyle" & decimal(i) & "$"), (0,i*u)); unfill bbox l; draw l; endfor label.rt(btex$x$etex, (6u,0)); label.top(btex$y$etex, (0,6u)); ); %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% draw(grid); path p; p := (-5.5u,0.00237593u)..(-4u,u/81)..(-3u,u/27)..(-2u,u/9)..(-u,u/3)..(0,u) ..(u,3u)..(1.55172858507u,5.5u); pickup pencircle scaled 2c; drawdblarrow p withcolor white; pickup pencircle scaled c; drawdblarrow p withcolor blue; picture ll; ll := thelabel.rt(btex$y=f(x)$etex, (1.14031399559u+0.1u,3.5u)); unfill bbox ll; draw ll withcolor blue; endfig; beginfig(2); draw(grid); path p; p := (5.5u,0.00237593u)..(4u,u/81)..(3u,u/27)..(2u,u/9)..(u,u/3)..(0,u) ..(-u,3u)..(-1.55172858507u,5.5u); pickup pencircle scaled 2c; drawdblarrow p withcolor white; pickup pencircle scaled c; drawdblarrow p withcolor blue; picture ll; ll := thelabel.lft(btex$y=g(x)$etex, (-1.14031399559u-0.1u,3.5u)); unfill bbox ll; draw ll withcolor blue; endfig; beginfig(3); draw(grid); path p; p := (5.5u,0.00237593u-2u)..(4u,u/81-2u)..(3u,u/27-2u)..(2u,u/9-2u)..(u,u/3-2u) ..(0,-u)..(-u,u)..(-1.83404376715u,5.5u); pickup pencircle scaled 2c; drawdblarrow p withcolor white; pickup pencircle scaled c; drawdblarrow p withcolor blue; picture ll; ll := thelabel.lft(btex$y=h(x)$etex, (-1.55172858507u-0.1u,3.5u)); unfill bbox ll; draw ll withcolor blue; endfig; bye