import graph_pi; import patterns; graphicrules(xunit=2.5cm,yunit=1.5cm, xmin=-1, xmax=4, ymin=-1, ymax=5, crop=Crop); // Définition des fonctions f et g : real f(real x) {return 4x-x^2+4/(x^2+1)^2;} real g(real x) {return x-1+4/(x^2+1)^2;} // Tracé des courbes : path Cf=graph(f,n=700); path Cg=graph(g,n=700); draw(Cf,linewidth(1bp)); draw(Cg,linewidth(1bp)); crop(currentpicture); // La grille. grid(); // Les axes. cartesianaxis(xticks=Ticks(NoZero,ptick=grey), yticks=Ticks(NoZero,ptick=grey),arrow=None); labeloij(UnFill); label("$\mathscr{C}_f$",(2.25,f(2.25)),2N); label("$\mathscr{C}_f$",(2.25,g(2.25)),2S); // Les hachures. path vline=(1,-1)--(1,5); add("hachure",hatch(3mm)); fill(buildcycle(vline,graph(f,1,4),graph(g,1,4)),pattern("hachure"));