Unfortunately the question is not very clear to me, so this answer is based on guessing and provided desired images. This means, that your MWE wasn't very helpful. From it I only see, that you expect figure drawn by pgfplots
and not by pure tikz
...
See, if my result is what you after:

Above images is done by the following code:
\documentclass[border=3mm]{standalone}
\usepackage{pgfplots}
\pgfplotsset{width=6cm, compat=1.13,
title style={at={(0.5,-0.1)}, anchor=north, font=\large},
xlabel style = {anchor=west},
ylabel style = {anchor=south},
clip=false
}% <-- common styles
\usetikzlibrary{arrows}
\begin{document}
\begin{tikzpicture}
\begin{axis}[%small,anchor=aninnernode.center,
axis y line=center,
axis x line=middle,
%
xmin=-0.5,xmax=5,
ymin=-0.5,ymax=5,
xtick={0}, ytick={0},% this disables the standard
ylabel=$y$,
xlabel=$x$,
title = {$f$ is increasing},
]
\addplot[line width=2pt,red,%
domain=0.5:4.5, samples=9, mark=none,
->] {0.2*(x^2) + 1};
\node[right] at (4.5,{0.2*(4.5^2) + 1}) {$f(x)$};
%
\draw[dashed] (0,{0.2*(2^2) + 1}) node[left] {$f(x_1)$} -|
(2, 0) node[below] {$x_1$}
(0,{0.2*(3^2) + 1}) node[left] {$f(x_2)$} -|
(3, 0) node[below] {$x_2$};
\end{axis}
\end{tikzpicture}
\hfill
\begin{tikzpicture}
\begin{axis}[%small,anchor=aninnernode.center,
axis y line=center,
axis x line=middle,
%
xmin=-0.5,xmax=5,
ymin=-0.5,ymax=5,
xtick={0}, ytick={0},% this disables the standard
ylabel=$y$,
xlabel=$x$,
title = {$f$ is decreasing},
]
\addplot[line width=2pt,red,%
domain=0.5:4.5, samples=9, mark=none,
->] {7-3*sqrt(x)};
\node[right] at (4.5,{7-3*sqrt(4.5)}) {$f(x)$};
%
\draw[dashed] (0,{7-3*sqrt(2)}) node[left] {$f(x_1)$} -|
(2, 0) node[below] {$x_1$}
(0,{7-3*sqrt(3)}) node[left] {$f(x_2)$} -|
(3, 0) node[below] {$x_2$};
\end{axis}
\end{tikzpicture}
\end{document}
The code is (almost) semi-explanatory, but if you have some question about it, pleas ask.
Addendum:
The code for pure TikZ solution seems to be slightly simpler:
\documentclass[border=3mm]{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}[domain=0.5:4.5, samples=17,]
% axes
\draw[->] (-0.5,0) -- node[below=5mm] {$f$ is increasing}
+ (5.5,0) node[right] {$x$};
\draw[->] (0,-0.5) -- + (0,5.5) node[above] {$y$};
% graph
\draw[line width=2pt, draw=red, ->]
plot (\x,{0.2*(\x^2) + 1}) node[right] {$f(x)$};
%
\draw[dashed] (0,{0.2*(2^2) + 1}) node[left] {$f(x_1)$} -|
(2, 0) node[below] {$x_1$}
(0,{0.2*(3^2) + 1}) node[left] {$f(x_2)$} -|
(3, 0) node[below] {$x_2$};
\end{tikzpicture}
\hfill
\begin{tikzpicture}[domain=0.5:4.5, samples=17]
% axes
\draw[->] (-0.5,0) -- node[below=5mm] {$f$ id decreasing}
+ (5.5,0) node[right] {$x$};
\draw[->] (0,-0.5) -- + (0,5.5) node[above] {$y$};
% graph
\draw[line width=2pt, draw=red, ->]
plot (\x,{7-3*sqrt(\x)}) node[right] {$f(x)$};
%
\draw[dashed] (0,{7-3*sqrt(2)}) node[left] {$f(x_1)$} -|
(2, 0) node[below] {$x_1$}
(0,{7-3*sqrt(3)}) node[left] {$f(x_2)$} -|
(3, 0) node[below] {$x_2$};
\end{tikzpicture}
\end{document}
Result of above MWE is (almost) the same as at the first solution (with use of pgfplots
)
pgfplots
(I didn't add it, since your MWE is in contradiction with your question). Now it is not very clear, what is your problem. Your function? If for it you don't know math function, you can determine it with coordinates and draw smooth curve through points. is this your problem?