\documentclass{beamer}
\usetheme{AnnArbor}
\usepackage{pgfplots}
 \usepgfplotslibrary{fillbetween}
\usetikzlibrary{patterns}

\begin{document}
\begin{frame}[fragile]
\begin{tikzpicture}
\begin{axis}
\addplot[blue,name path=A,domain=0:5] {x^2};
\addplot[red,name path=B,smooth] table {
x y
0 10
1 8
2 6
3 1
4 5
};
\addplot[gray] fill between[of=A and B,
split,
every segment no 0/.style=
{pattern color=gray!50,
pattern=north east lines},
every segment no 1/.style=
{pattern=north west lines},
];
\end{axis}
\end{tikzpicture}
\end{frame}
\end{document}