拋物線與垂直線在特定點的交點

拋物線與垂直線在特定點的交點

我想創建一條在特定點與垂直線相交的拋物線。有人可以幫我弄這個嗎?

我的 MWE 是

\usepackage{tikz}
\usetikzlibrary{intersections,shapes,arrows,calc}
\usepackage{esvect}
\usepackage{relsize}

\begin{tikzpicture}
% New graph - bottow left 
\draw[<->,rounded corners, thick]  (0,2.5) node(yline)[left] {$r$} -- (0,0) -- (3,0)  node(yline)[below] { $Y$}; 
\draw (1.5,0) -- (1.5,2.5);
\node[label=right:$\overline{S}(Y_{A})$] at (1.5,2.5) {};
\node[ circle,fill=black,minimum size=2pt,inner sep=0pt, outer sep=-1pt, label=left:$r^*_{A}$] at (0,1.5) {};
\draw[dashed]  (0,1.5) -- (1.5,1.5) ;
\draw (0.8,2.5) parabola[bend at end] (1.5,1.5) ;
\draw (1.5,1.5) parabola[bend at end] (2.5,1.2) ;
\end{tikzpicture}

產生以下 agly 圖片:

在此輸入影像描述

我對交點非常嚴格。就我而言,拋物線必須經過 (1.5,1.5) 點

有什麼幫助可以讓圖表看起來更好嗎?

答案1

看看,如果你喜歡...

\documentclass[tikz, margin=3mm]{standalone}
\usetikzlibrary{intersections}

\begin{document}
\begin{tikzpicture}
% axes
\draw[thick,->]  (-0.1,0) coordinate (O)
                          -- ++ (4.1,0) node [below left] {$X$};
\draw[thick,->]  (0,-0.1) -- ++ (0,4.1) node [below left] {$r$};
\draw[ultra thin, gray] (0,0) grid + (4,4); %  only to show that intersection is at (1.5,1.5)
% curve
\begin{scope}[font=\footnotesize]
\draw[red, very thick,name path=A] 
    plot[domain=0.32:4, samples=64] (\x,0.8333+1/\x);
\draw[name path=B]   
                (1.5,-0.1) node[below] {1.5}
                           -- ++ (0,4.1) node[below right] {$\overline{S}(Y_{A})$};
\draw[dashed, name intersections={of =A and B, by={r}}] 
    (r) -- (r -| O) node[left]  {$r^*_{A}$};
\end{scope}
\end{tikzpicture}
\end{document}

在此輸入影像描述

附錄: 在答案的第一個版本中,我假設主要問題是重新設計影像的 LaTeX 部分,例如函數的定義不是問題。看來我錯了,所以現在我糾正了我的錯誤表現:)但以最小的努力。您可以自己找到足夠的功能,當然也可以將刻度標籤改為您喜歡的功能。添加的網格只是指示性的,在實際使用 MWE 時必須將其刪除(據我了解您的願望)。

筆記:推動曲線不是拋物線,我只是用反函數(即雙曲線)模仿您在問題中顯示的內容。

相關內容