# Curves with Latex

How I can draw curves as :

Any help would be appreciated.

-
What have you tried? What package are you using? pgfplots? tikz? –  Jubobs May 19 '14 at 18:21
@Jubobs, I have no idea how to draw curves with latex. –  Med May 19 '14 at 18:27
texample.net/tikz/examples/tag/plots –  JLDiaz May 19 '14 at 18:29

I'd suggest you pgfplots:

\documentclass[border=5pt]{standalone}
\usepackage{pgfplots}

\pgfplotsset{
compat=1.10,
axis lines=middle,
width=6cm,
height=7cm,
samples=90,
xtick=\empty,
ytick=\empty,
}

\newcommand\Title[2]{%
$\begin{array}{r@{\,=\,}l} y^{2} &#1 \\ \Delta & #2 \end{array}$
}

\begin{document}

\begin{tikzpicture}
\begin{axis}[
title={\Title{x^{3}-3x+3}{2160}}
]
\end{axis}
\begin{tikzpicture}
\begin{axis}[
xmin=-0.5,
title={\Title{x^{3}+x}{-64}}
]
\end{axis}
\begin{tikzpicture}
\begin{axis}[
xmin=-1.5,
title={\Title{x^{3}-x}{64}}
]
\end{axis}
\end{tikzpicture}

\end{document}


-
Thank you so much sir for your help. –  Med May 19 '14 at 19:19

Run with xelatex. \psplotImp plots the implicit defined functions:

\documentclass[pstricks,border=10pt]{standalone}
\usepackage{pst-func}
\begin{document}

\begin{pspicture*}[showgrid,stepFactor=0.2,algebraic](-3,-3)(4,3)
\psaxes[labelFontSize=\scriptstyle,ticks=none,labels=none]{->}(0,0)(-3,-3)(4,3)
\psplotImp[linewidth=1pt,linecolor=blue] (-4,-4)(5,4){ y^2-x^3+3*x-3  }
\psplotImp[linewidth=1pt,linecolor=red]  (-4,-4)(5,4){ y^2-x^3-x  }
\psplotImp[linewidth=1pt,linecolor=green](-4,-4)(5,4){ y^2-x^3+x  }
\rput[lb](-3,2.5)   {\blue$y^2=x^3-3*x+3$}
\rput[rb](1.2,-2.75){\red$y^2=x^3+x$}
\rput[lb](1.5,-0.5) {\green$y^2=x^3-x$}
\end{pspicture*}

\end{document}


-
Thank you so much Herbert. –  Med May 19 '14 at 19:45

Just for fun.

\documentclass[border=12pt]{standalone}
\usepackage{pst-func}
\begin{document}
\foreach \f/\c/\l in
{
x^3-3*x+3/red/x^3-3x+3,
x^3+x/green/x^3+x,
x^3-x/blue/x^3-x%
}{
\begin{pspicture*}[algebraic,stepFactor=.2](-3.5,-4.5)(4.5,4.5)
\psaxes{->}(0,0)(-3,-4)(4,4)[$x$,0][$y$,90]
\psplotImp[linecolor=\c](-4,-3.5)(4,3.5){-y^2+\f}
\rput(2,-4){\textcolor{\c}{\large$y^2=\l$}}