input gdd; input gdd-rep; input gdd-lbl; input gdd-tra; input svgnames; lblPreambule := "\usepackage[frenchb]{babel}" & "\usepackage[garamond]{mathdesign}" & "\usepackage{amsmath}\usepackage{mflogo}"; input gdd-fct; input gdd-plt; labeloffset := 6; gddU:=1.2cm; vardef f(expr x) = x*(Pi-x) enddef; % f vardef g(expr x) = Pi-2*x enddef; % f' vardef h(expr x) = -2 enddef; % f'' def avecCrayon(expr t,c) = withpen pencircle scaled t withcolor c enddef; beginfig(1); Repere(10,6,5,3,.8,0.8); Axes; Debut; Graduations; trace (Pi,-2)--(Pi,2) dashed evenly; trace (-Pi,-2)--(-Pi,2) dashed evenly; trace Representation(f,0,Pi,100) avecCrayon(1.5,Indigo); trace (Representation(f,0,Pi,100) scaled -1) avecCrayon(1.5,Indigo); trace (Representation(f,0,Pi,100) shifted (-2*Pi,0)) avecCrayon(1.5,Indigo); trace (Representation(f,0,Pi,100) scaled -1 shifted (2*Pi,0)) avecCrayon(1.5,Indigo); trace Representation(g,0,Pi,100) avecCrayon(1.5,Olive); trace (Representation(g,0,Pi,100) xscaled -1) avecCrayon(1.5,Olive); trace (Representation(g,0,Pi,100) shifted (-2*Pi,0)) avecCrayon(1.5,Olive); trace (Representation(g,0,Pi,100) xscaled -1 shifted (2*Pi,0)) avecCrayon(1.5,Olive); trace Representation(h,0,Pi,100) avecCrayon(1.5,Orange); trace (Representation(h,0,Pi,100) scaled -1) avecCrayon(1.5,Orange); trace (Representation(h,0,Pi,100) shifted (-2*Pi,0)) avecCrayon(1.5,Orange); trace (Representation(h,0,Pi,100) scaled -1 shifted (2*Pi,0)) avecCrayon(1.5,Orange); pointe Point(Pi,2); pointe Point(Pi,-2); pointe Point(-Pi,2); pointe Point(-Pi,-2); label.urt(TEX("$$-\pi$$"), (-Pi,0) gddEnPlace) withcolor Peru; label.ulft(TEX("$$\pi$$"), (Pi,0) gddEnPlace) withcolor Peru; Fin; trace (0,-0.5)--(1,-0.5) avecCrayon(1.5,Indigo); label.rt(TEX("$$f$$"), (1,-0.5) gddEnPlace); trace (2,-0.5)--(3,-0.5) avecCrayon(1.5,Olive); label.rt(TEX("$$f'$$"), (3,-0.5) gddEnPlace); trace (4,-0.5)--(5,-0.5) avecCrayon(1.5,Orange); label.rt(TEX("$$f''$$"), (5,-0.5) gddEnPlace); labeloffset := 0; label.lft(TEX("\MP{}"), (10,-0.5) gddEnPlace); endfig; end