# Tikz : compare x^3 and 2^x * x from x = 0 to 10

I'm far from being an expert in TikZ because I just start using it.

I would like to be able to plot this comparison of equations:

This plot came from the Wolfram Alpha, which is a very good website to obtain results, but unfortunately not free to download the displayed result...

I try something like:

\begin{tikzpicture}[domain=0:10]
\draw[very thin,color=gray] (-0.1,-1.1) grid (9.9,2200.9);
\draw[->] (-0.2,0) -- (10.2,0) node[right] {$x$};
\draw[->] (0,-0.2) -- (0,2201.2) node[above] {$f(x)$};

\draw[color=blue] plot[id=x] function{x*x*x}
node[right] {$f(x) =x^3$};

\draw[color=blue] plot[id=x] function{2^x * x}
node[right] {$f(x) = 2^x \times x$};
\end{tikzpicture}


But I've got issue with the scale, with the display etc... and I have no idea how to fix this :/

Best Regards.

You can use pgfplots.

\documentclass{article}
\usepackage{pgfplots}
\pgfplotsset{compat=1.12}
\begin{document}
\begin{tikzpicture}
\begin{axis}[domain=0:10,scaled ticks=false,ymax=2000,ymin=2,minor tick num=1,xlabel=$x$, ylabel=$f(x)$]
\addlegendentry{$x^3$};
\addlegendentry{$2^x\,x$};

• @ValentinMontmirail It really is. If you want to plot something, go for pgfplots first. :) – user11232 Aug 24 '15 at 13:19