# How to draw curve inside a closed curve?

I want to draw the following diagram:

I have limited idea about TikZ but I want to draw this picture with TikZ. I have tried to draw the figure but ultimately faied. My written code given here:

\documentclass{article}
\usepackage{tikz}
\begin{document}

\begin{tikzpicture}

\draw (0,0) ellipse  (49pt and 39pt);
\draw (0,1) to [out=90,in=190](0,-1);
\draw (0,1) to [out=180,in=195](0,-1);
\end{tikzpicture}

\end{document}


Anyone can give an idea so that I can draw the picture?

After adjusting the in and out values a little bit and adding appropriate styles and nodes, one can get something like the following.

If the two paths inside the ellipse should have more kinks like in your picture you will need to give more coordinates and more in and out options (or similar solutions) or for nicer outputs the hobby library or the smooth options …

## Code

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{decorations.markings}
\tikzset{
Arrow/.style={
decoration={
name=markings,
mark=at position .5 with \arrow{#1}
},
postaction=decorate
},
Arrow/.default=>
}
\begin{document}
\begin{tikzpicture}[
auto,
nodes={font=\scriptsize},
every label/.append style={inner ysep=+1pt}
]
\draw (0,0) ellipse  (49pt and 39pt);
\path (60:49pt and 39pt) coordinate[label=above right:$x$];
\draw[Arrow]   (0,1) coordinate[label=above:$x_0$]
to [out=-30,  in=45]  node {$f$} (0,-1)
coordinate[label=below:$x_1$];
\draw[Arrow=<] (0,1) to [out=-150, in=135] node[swap] {$g$} (0,-1);
\end{tikzpicture}
\end{document}


## Output

• This shows 1 error : ' File 'standalone.cls' not found.\usetikzlibrary' – Md Kutubuddin Sardar Apr 20 '13 at 6:09
• @MdKutubuddinSardar The standalone class is only used for this MWE. You can simply use \documentclass{article}\usepackage{tikz} as usual. (I’ve updated the code.) – Qrrbrbirlbel Apr 20 '13 at 6:20
• It is working well.Thank you. +1 for you. – Md Kutubuddin Sardar Apr 20 '13 at 6:26