![曲线面积](https://linux22.com/image/480041/%E6%9B%B2%E7%BA%BF%E9%9D%A2%E7%A7%AF.png)
我想填充曲线上的区域:
\documentclass[10pt]{standalone}
\usepackage{pgf,tikz}
\usepackage{amsmath}
\usetikzlibrary{arrows,patterns}
\pagestyle{empty}
\begin{document}
\begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=1cm,y=1cm]
\draw[->,line width = 1pt] (0,0) -- (6,0);
\draw[color=black] (6.3,0) node { $x_1$};
\draw[->,line width = 1pt] (0,0) -- (0,6);
\draw[color=black] (0,6.2) node { $x_2$};
\draw[color=red,line width = 1pt,smooth,samples=1000,domain=0.8333:6] plot(\x,{5/\x})
\end{tikzpicture}
\end{document}
答案1
欢迎!一个非常基本的变体:
\documentclass[10pt]{standalone}
\usepackage{tikz}
\usepackage{amsmath}
\usetikzlibrary{arrows,patterns}
\pagestyle{empty}
\begin{document}
\begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=1cm,y=1cm]
\draw[->,line width = 1pt] (0,0) -- (6,0);
\draw[color=black] (6.3,0) node { $x_1$};
\draw[->,line width = 1pt] (0,0) -- (0,6);
\draw[color=black] (0,6.2) node { $x_2$};
\path[pattern=north east lines]
plot[smooth,samples=101,domain=0.8333:6] (\x,{5/\x}) |- cycle;
\draw[color=red,line width = 1pt]
plot[smooth,samples=101,domain=0.8333:6] (\x,{5/\x});
\end{tikzpicture}
\end{document}
一个可能更好的方案可能是
\documentclass[10pt]{standalone}
\usepackage{tikz}
\usepackage{amsmath}
\usetikzlibrary{arrows.meta}
\pagestyle{empty}
\begin{document}
\begin{tikzpicture}[line cap=round,line join=round,>=Triangle]
\draw[<->,line width = 1pt] (6,0) node[right]{$x_1$}
-| (0,6) node[above]{$x_2$};
\path[fill=blue!40]
plot[smooth,samples=101,domain=0.8333:6] (\x,{5/\x}) |- cycle;
\draw[color=red,line width = 1pt]
plot[smooth,samples=101,domain=0.8333:6] (\x,{5/\x});
\end{tikzpicture}
\end{document}