\documentclass[tikz]{standalone} \usepackage{pgfplots} \usetikzlibrary{patterns} \begin{document} \def\a{-.3} \def\x{2.4} \def\b{5.7} \begin{tikzpicture} \begin{axis}[ axis lines = middle, xlabel={}, xlabel style={ %yshift=+7pt, %xshift=3cm, % Décale l'étiquette vers la droite (si nécessaire) }, xtick=\empty,ytick=\empty, ylabel={}, height=4cm, width=0.8\linewidth, enlargelimits=true, enlarge x limits={abs=3mm}, enlarge y limits={abs=1mm}, extra x ticks={\a,\x,\b}, extra x tick style={grid=major, tick label style={ rotate=0,anchor=north east},yshift=0mm}, extra x tick labels={$a$,\color{red} $c$,$b$}, ] \addplot[red, thick, smooth, domain=\a:\x, pattern=north east lines, pattern color=lightgray] {(x^2+1-x^3/8)/5-1}\closedcycle; \addplot[red, thick, smooth, domain=\x:\b, pattern=north east lines, pattern color=lightgray] {(x^2+1-x^3/8)/5-1}\closedcycle; \addplot[black, ultra thick, smooth, domain=-1:7] {(x^2+1-x^3/8)/5-1} node[above] {$\mathcal{C}_f$}; %\node[fill=white, inner sep=0pt] at (axis cs:2.5,.35) {\(F(x)\)}; \end{axis} \end{tikzpicture} \end{document}