\documentclass[]{standalone}
\usepackage[]{graphicx}
\usepackage{tikz}
\usepackage{pgfplots}
\pgfplotsset{compat=1.17}
\tikzset{>=latex}
\usetikzlibrary{arrows,arrows.meta}
\usepackage{steinmetz}
\newcommand*{\equal}{=}
\usepackage{tikz-3dplot}
\usetikzlibrary{decorations.markings}
\tikzset{->-/.style={decoration={
markings,
mark=at position #1 with {\arrow{>}}},postaction={decorate}}}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
axis y line=middle, axis x line=bottom,
%scale only axis,
%width=5cm,
%height=5cm,
width=\textwidth,
grid=both,
ymin = 0, ymax = 1.2, xmin = 0,xmax=5,
xtick ={0,1,2,3,4},
xticklabels={0, $r$, $2r$,$3r$,$4r$},
ytick ={0, 0.25, 0.5, 0.75,1},
yticklabels={0, $\frac{1}{4}\frac{E^2}{r}$, $\frac{1}{2}\frac{E^2}{r}$,$\frac{3}{4}\frac{E^2}{r}$, $\frac{E^2}{r}$},
xlabel={$R$},
ylabel={$P(R)$},
legend style={draw=none},
ticklabel style={font=\tiny},
%set layers = axis on top,
label style={font=\tiny},
]
\addplot [domain=0:5,samples=100,black,very thick] {x/(1 + x)^2};
\addplot [domain=0:5,samples=100,black,dashed,very thick] {1/(1+x)^2)};
\legend{$P_l$,$P_i$};
\end{axis}
\end{tikzpicture}
\end{document}