Graph high degree polynomial using Tikz/pgfplot

pgfplotsscalingtikz-pgf

I want to draw the area under the curve x(2-x²)¹², over the interval (0,1). It's a high degree polynomial and I have a lot of problems using pgfplot.

Here's the format I need to use (and unfortunately I cannot use another, I'm allowed to scale everything needed):

\begin{figure}[h!]
\centering
\begin{tikzpicture}
\fill [blue!20, domain=0:1, variable=\x, samples=2000]
(0, 0) -- plot (\x, {\x*(2-(\x)^2)^12})-- (1,0);

\draw [thick] [->] (0,0)--(1.2,0) node[right, below] {$x$};
\foreach \x in {0.2,0.4,0.6,0.8,1}
\draw[xshift=\x cm, thick] (0pt,-1pt)--(0pt,1pt) node[below] {$\x$};

\draw [thick] [->] (0,0)--(0,800) node[above, left] {$y$};
\foreach \y in {200,400,600}
\draw[yshift=\y cm, thick] (-1pt,0pt)--(1pt,0pt) node[left] {$\y$};

\draw [domain=0:1, variable=\x, line width =1.5pt, samples=2000]
plot (\x, {\x*(2-(\x)^2)^12});
\end{tikzpicture}
\caption*{Representaci\'{o}n gr\'{a}fica de $\displaystyle \int\limits_{0}^{1} x\left(2-x^{2}\right)^{12} dx$}
\end{figure}

The figure I need to get is something like this:

enter image description here

I've been playing with scales in my x-axis/y-axes, but I always get this message:

"! Dimension too large.<recently read> \pgf@yy l.201 (0, 0)-- plot (\x, {\x*(2-(\x)^2)^12})-- (1,0);"

Best Answer

Welcome to TeX.SX! Well, you told TikZ to draw a line every 200cm on the y axis, which, of course, would not fit on a page. Hence the error. With a bit of scaling, you can get it.

By the way, TikZ uses 1cm as default unit, if you don't specify a unit.

\documentclass[border=1mm, tikz]{standalone}

\begin{document}
    
\begin{tikzpicture}[y=.2pt, x=10cm]
\fill [blue!20, domain=0:1, variable=\x, samples=2000]
(0, 0) -- plot (\x, {\x*(2-(\x)^2)^12})-- (1,0);

\draw [thick] [->] (0,0)--(1.2,0) node[right, below] {$x$};
\foreach \x in {0.2,0.4,0.6,0.8,1}
\draw[thick] (\x,-1pt) -- ++(0pt,2pt) node[below] {$\x$};

\draw [thick] [->] (0,0)--(0,800) node[above, left] {$y$};
\foreach \y in {200,400,600}
\draw[thick] (-1pt,\y) -- ++(2pt,0pt) node[left] {$\y$};

\draw [domain=0:1, variable=\x, line width =1.5pt, samples=2000]
plot (\x, {\x*(2-(\x)^2)^12});
\end{tikzpicture}
    
\end{document}

enter image description here