Code: Select all
\addplot
Code: Select all
\documentclass[12pt]{article}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{caption}
\usepackage{tikz}
\usepackage{pgfplots}
\\usetikzlibrary{arrows.meta}
\pgfplotsset{compat=1.17}
\pgfplotsset{every x tick label/.append style={font=\footnotesize, yshift=0.6ex}}
\pgfplotsset{every y tick label/.append style={font=\footnotesize, xshift=0.5ex}}
\begin{document}
\subsubsection*{Negative Integer Powers}
The graphs of power functions that have negative integer exponents have \emph{two} distinct shapes (see Figures 3 and 4 below).
\begin{minipage}[ht]{2.75in}
\begin{tikzpicture}
\begin{axis}[
grid style={blue!50},
axis x line = center,
axis y line = center,
xmin = -5, xmax = 5,
ymin = -5, ymax = 5,
xtick = {-5,-4,...,5},
ytick = {-5,-4,...,5},
grid = both,
]
\addplot[samples=300,domain=-3:-0.1,ultra thick,color=blue]{1/(x^2)};
\addplot[samples=300,domain=0.1:3,ultra thick,color=blue]{1/(x^2)};
\qquad
\end{axis}
\end{tikzpicture}
\captionof{figure}{$y=x^n$ $\bigcup$-shaped}
\end{minipage}
\begin{minipage}[ht]{2.75in}
\begin{tikzpicture}
\begin{axis}[
grid style={blue!50},
axis x line = center,
axis y line = center,
xmin = -5, xmax = 5,
ymin = -5, ymax = 5,
xtick = {-5,-4,...,5},
ytick = {-5,-4,...,5},
grid = both,
]
\addplot[samples=300,domain=-3:-0.1,ultra thick,color=red]{1/(x^3)};
\addplot[samples=300,domain=0.1:3,ultra thick,color=red]{1/(x^3)};
\end{axis}
\end{tikzpicture}
\captionof{figure}{Graph of $y=x^{-3}$ or $y=1/x^3$}
\end{minipage}
\end{document}