在“pgfplots”中作为函数输入的域的端点无法识别

在“pgfplots”中作为函数输入的域的端点无法识别

我在环境中的文本右侧绘制了y = 1/x的图形。我将的图形部分绘制在负实数集上,将 的图形部分绘制在正实数集上。不过,绘制的图形不是关于原点对称的。tikzpictureminipagedomain=-3:{-1/9}domain={1/9}:3

\documentclass{amsart}
\usepackage{amsmath}
\usepackage{amsfonts}

\usepackage{tikz}
\usetikzlibrary{calc}

\setlength{\oddsidemargin}{0.0in}
\setlength{\evensidemargin}{0.0in} \setlength{\textwidth}{6.1in}
\setlength{\topmargin}{0.0in} \setlength{\textheight}{9in}

\begin{document}

\begin{minipage}{4.25in}
\begin{raggedright}
$f(x) = 1/x$ is a decreasing function over the interval $(-\infty, \, 0)$ and over the interval $(0, \, \infty)$, but $f$ is not a decreasing function. For every $0 < a < b$, since the product of positive numbers is a positive number, and since the reciprocal of a positive number is a positive number,
\begin{equation*}
f(b) = \frac{1}{b} = \left( \frac{1}{ab} \right) a < \left( \frac{1}{ab} \right) b = \frac{1}{a} = f(a) .
\end{equation*}
So, the restriction of $f$ to the set of positive real numbers is a decreasing function. Likewise, for every $m < n < 0$, since the product of negative numbers is a positive number,
\begin{equation*}
f(n) = \frac{1}{n} = \left( \frac{1}{mn} \right) m < \left( \frac{1}{mn} \right) n = \frac{1}{m} = f(m) .
\end{equation*}
So, the restriction of $f$ to the set of negative real numbers is a decreasing function. Though, $f$ is not a decreasing function. If $m < 0 < a$, since the reciprocal of a negative number is a negative number,
\begin{equation*}
f(m) = \frac{1}{m} < 0 < \frac{1}{a} = f(a) .
\end{equation*}
\end{raggedright}
\end{minipage}
%
\hspace{0.25cm}
%
\begin{tikzpicture}[baseline=(current bounding box.center)]
\begin{axis}[height=2in, width=2in, clip=false,
    xmin=-3.5,xmax=3.5,
    ymin=-10,ymax=10,
    restrict y to domain=-9:9,
   % enlargelimits={abs=1cm},
    xtick={\empty},ytick={\empty},
    axis lines=middle,
    axis line style={latex-latex},
    xlabel=$x$,ylabel=$y$,
    xlabel style={at={(ticklabel* cs:1)},anchor=north west},
    ylabel style={at={(ticklabel* cs:1)},anchor=south west}
]

\addplot [blue, domain=-3:{-1/9}] {1/x};
\addplot [blue, domain={1/9}:3] {1/x} node [pos=0, anchor=west, font=\tiny] {$y=\dfrac{1}{x}$};

\end{axis}
\end{tikzpicture}

\end{document}

相关内容