I want to create a parabola that intersects a vertical line at a particular point. Can someone help me with this?

my MWE is


% 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) ;

Which produces the following agly picture:

enter image description here

I am very rigid about the intersection point. In my case the parabola has to pass through the (1.5,1.5) point

Any help to make the graph look better ?

  • 1
    \draw (0.5,2.5) parabola[bend at end] (2.5,3.5/3) ; contains the point (1.5,1.5). – TonioElGringo Jul 3 '17 at 15:49

See, if you liked ...

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

% 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
\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}$};

enter image description here

Addendum: In the first version of answer I assume, that the main problem is redesign LaTeX part of image, e.g. defining of function is not problem. It seems, that I was wrong, so now I correcting this my faulty performance :) but on the way of minimal effort. You can find adequate function yourself, and of course change tick labels to what you like to have. Added grid is only indicative and had to be removed in real use of MWE (as I understand your wish).

Note: shoved curve is not parabola, I only mimic what you shown in your question with inverse function i.e. hyperbole.

  • 1
    The plot was supposed to pass through (1.5, 1.5) I think, here it passes through (1.5, 0.667). – Torbjørn T. Jul 3 '17 at 16:06
  • @TorbjørnT. is now better? – Zarko Jul 3 '17 at 17:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.