How can I increase the size of integral inside tikz and the length of the arrow

Code:

\documentclass[a4paper,10pt]{article}
\usepackage{tikz}
\usepackage{amsmath}
\usetikzlibrary{arrows,chains,positioning,scopes}
%
\makeatletter
\tikzset{join/.code=\tikzset{after node path={%
\ifx\tikzchainprevious\pgfutil@empty\else(\tikzchainprevious)%
edge[every join]#1(\tikzchaincurrent)\fi}}}
\makeatother
%
\tikzset{>=stealth',every on chain/.append style={join},
every join/.style={->}}
\tikzstyle{labeled}=[execute at begin node=$\scriptstyle, execute at end node=$]
%
\begin{document}
\begin{tikzpicture}[start chain] {
\node[on chain] {$\int \cos^3(2x) dx$};
\node[on chain, join={node[above]
{$dx \leftarrow \frac{1}{2} d2x$}}] {$\int \cos^3(2x) \frac{1}{2} d2x$} ;
}
\end{tikzpicture}
$$\int \cos^3(2x) dx$$
\end{document}


Output:

1. How can I make the integral symbol bigger in tikz picture?
2. How can I make the arrow, that shows the transformation to auto-adjust it's length to the size of the expression above it? Currently it's much shorter, making the text overlap.
-

Here is a solution (using \displaystyle to make a bigger integral symbol and using node distance=2cm to enlarge the arrow).

\documentclass[a4paper,10pt]{article}
\usepackage{tikz}
\usepackage{amsmath}
\usetikzlibrary{arrows,chains,positioning,scopes}
%
\makeatletter
\tikzset{join/.code=\tikzset{after node path={%
\ifx\tikzchainprevious\pgfutil@empty\else(\tikzchainprevious)%
edge[every join]#1(\tikzchaincurrent)\fi}}}
\makeatother
%
\tikzset{>=stealth',every on chain/.append style={join},
every join/.style={->}}
\tikzstyle{labeled}=[execute at begin node=$\scriptstyle, execute at end node=$]
%
\begin{document}
\begin{tikzpicture}[start chain,node distance=2cm] {
\node[on chain] {$\displaystyle\int \cos^3(2x) dx$};
\node[on chain, join={node[above]
{$dx \leftarrow \frac{1}{2} d2x$}}] {$\displaystyle\int \cos^3(2x) \frac{1}{2} d2x$} ;
}
\end{tikzpicture}
$\int \cos^3(2x) dx$
\end{document}


EDIT: here is a solution with "auto adjustable" arrow (using \widthof from calc package).

\documentclass[a4paper,10pt]{article}
\usepackage{tikz}
\usepackage{calc}
\usepackage{amsmath}
\usetikzlibrary{arrows,chains,positioning,scopes}
%
\makeatletter
\tikzset{
join/.style={
after node path={%
\ifx%
\tikzchainprevious\pgfutil@empty%
\else
(\tikzchainprevious)%
edge[every join]#1(\tikzchaincurrent)
\fi
},
},
}
\makeatother
%
\newlength{\mylen}
\tikzset{
>=stealth',
every on chain/.append style={join},
every join/.style={->},
join with arrow/.code={
\setlength{\mylen}{\widthof{#1}}
\tikzset{node distance=\mylen,on chain,join={node[above]{#1}}}
},
}
%
\begin{document}
\begin{tikzpicture}[start chain] {
\node[on chain] {$\displaystyle\int \cos^3(2x) dx$};
\node[join with arrow={$dx \leftarrow \frac{1}{2} d2x$}]
{$\displaystyle\int \cos^3(2x) \frac{1}{2} d2x$} ;
\node[join with arrow={???}]
{$\displaystyle\int \cos^3(2x) \frac{1}{2} d2x$} ;
}
\end{tikzpicture}

$\int \cos^3(2x) dx$
\end{document}

-
Is it possible to make the arrow auto adjustable? Because I will have a chain of such transformations and the text at the top will always have different width. –  user4035 Aug 11 '14 at 8:11
@user4035 I edited my answer... –  Paul Gaborit Aug 11 '14 at 8:33
@user4035 Since I edited my answer, you may remove all your comments about the last line missing in the second example... ;-) –  Paul Gaborit Aug 14 '14 at 14:24
" you may remove all your comments about the last line" - Done –  user4035 Aug 15 '14 at 6:04