I am aiming to produce the following diagram:

Here's an MWE which almost does that:
\documentclass[11pt]{article}
\usepackage{tikz}
\usetikzlibrary{calc,intersections,through,backgrounds,matrix,patterns}
\begin{document}
\begin{tikzpicture}[scale=0.5]
\footnotesize
\draw[<->] (0,15)--(0,0)--(16.5,0);
\draw[name path = S] (0,0) ..controls (1,5) and (9,9.5) .. (12,10.1) node[right]{$S$};
\draw[name path = Y] (0,0)--(12,12) node[right]{$Y$};
\path [name intersections={of=S and Y, by = I1}];
\draw[dashed] let \p1 = (I1) in (\x1,0) node[below]{$k^*$} --(\x1,\y1);
% a loop to generate the arrows on the x-axis
\foreach\i in {1,...,5}{
\draw let \p1 = (I1) in (\x1,0) node[shift={(0.5*\i,0)}] {$<$};
\draw let \p1 = (I1) in (\x1,0) node[shift={(-0.5*\i,0)}] {$>$};
}
\end{tikzpicture}
\end{document}
This MWE produces this output:
I actually know why it is going wrong. The lines Y and S have two intersections - one at the origin, and one higher up (the one I actually want to work with). My code which specifies the coordinates of I1 is:
\path [name intersections={of=S and Y, by = I1}];
and this takes the first intersection at (0,0), which is why the output is as you see.
However, despite knowing the problem, I don't know how to fix it.
How do I modify that code to get the second intersection instead?
There is a 'cheat' which can be used to solve the problem. Simply change the initial coordinates of the Y line from (0,0) to (0.001, 0). This removes the first intersection with no visible effects. However, I'd still like to know how to solve it robustly.


\path [name intersections={of=S and Y, by ={aux, I1}}]; \draw[dashed] let \p1 = (I1) in (\x1,0) node[below]{$k^*$} --(\x1,\y1);you can shortly write\draw[name intersections={of=S and Y, by = {I1,I2}}, dashed] (I1) -- (I1 |- aux) node[below] {$k^*$};– Zarko Oct 11 '18 at 01:13I2coordinates in three places. – Thev Oct 12 '18 at 09:18