在 tikz 中重现两条曲线的交点

在 tikz 中重现两条曲线的交点

我希望使用 tikz 重现下图:

在此处输入图片描述

我所拥有的代码并不能准确地产生这个数字。

   \begin{tikzpicture}[nodes={text height=0.7em,text depth=0.25ex},
my arc/.style={insert path={(4,0)  arc[start angle=0,end angle=180,radius=2]}},
my curve/.style={insert path={(0,0) to[out=-90,in=-135] (1,0) -- ++ (66:4)}}]
\begin{scope}
\clip[my curve] -| cycle;
\fill[red!20,my arc] -- ++ (0,-1) -- ++ (4,0);
\end{scope}
\draw (0,4) node[above left] {$x$} |- (5,0) node[below left] {$y$};
\draw[my arc] node[pos=0.1,above right]{$\alpha\, W(y)$};
\draw[my curve] node[right] {$P(y)$};
\draw (0,2) node[left]{$x^{*}$} -| (2,0) node[below] {$y^*$}
\draw (0,1.8) node[left]{$x_{0}$} -| (1.8,0) node[below] {$y_{0}$}
(0,1) node[left]{$a$} -- (2,1) node[above left]{Incentive-feasible set}; 
\end{tikzpicture}

$P(y)$ 曲线太直,底部有点平坦。另外,出于某种原因,我无法添加 $x_{0}$ 和 $y_{0}$。我的 Texstudio 编辑器会因此崩溃。任何帮助都将不胜感激。

编辑:在薛定谔猫的帮助下:

    \begin{tikzpicture}[nodes={text height=0.7em,text depth=0.25ex},
my arc/.style={insert path={(4,0)  arc[start angle=0,end angle=180,radius=2]}},
my curve/.style={insert path={(0,0) to[out=-90,in=-114,looseness=1.5] (1,0) -- ++ (70:4)}}]
\begin{scope}
\clip[my curve] -| cycle;
\fill[red!20,my arc] |- ++ (4,-1);
\end{scope}
\draw (0,4) node[above left] {$x$} |- (5,0) node[below left] {$y$};
\draw[my arc,name path=arc] node[pos=0.1,above right]{$\alpha\, W(y)$};
\draw[my curve,name path=curve] node[right] {$P(y)$};
% \draw  (0,2) node[left]{$x^{*}$} -| (2,0) node[below] {$y^*$};
\draw[name intersections={of=arc and curve,by={i0,i1}}] 
(i1-|0,0) node[left]{$x_{0}$} -| (i1|-0,0) node[below] {$y_{0}$}
-| (2.1,0) node[below] {$y^*$} node[anchor=east,yshift=6ex,align=left]{Incentive-\\ feasible set} ; 
\end{tikzpicture}

在此处输入图片描述

答案1

这将计算交点。这个答案也一样。

\documentclass[tikz,border=3mm]{standalone}
\usetikzlibrary{intersections}
\begin{document}
\begin{tikzpicture}[nodes={text height=0.7em,text depth=0.25ex},
my arc/.style={insert path={(4,0)  arc[start angle=0,end angle=180,radius=2]}},
my curve/.style={insert path={(0,0) to[out=-90,in=-114,looseness=1.5] (1,0) -- ++ (66:4)}}]
 \begin{scope}
  \clip[my curve] -| cycle;
  \fill[red!20,my arc] |- ++ (4,-1);
 \end{scope}
 \draw (0,4) node[above left] {$x$} |- (5,0) node[below left] {$y$};
 \draw[my arc,name path=arc] node[pos=0.1,above right]{$\alpha\, W(y)$};
 \draw[my curve,name path=curve] node[right] {$P(y)$};
% \draw  (0,2) node[left]{$x^{*}$} -| (2,0) node[below] {$y^*$};
 \draw[name intersections={of=arc and curve,by={i0,i1}}] 
 (i1-|0,0) node[left]{$x_{0}$} -| (i1|-0,0) node[below] {$y_{0}$}
 (0,1) node[left]{$a$} node[anchor=west,yshift=-1.4ex,align=left]{Incentive-\\
 feasible set}
 -- (i1|-0,1) ; 
\end{tikzpicture}
\end{document}

在此处输入图片描述

相关内容