How to calculate curve length of a helix with linearly variable pitch? I have designed a 3D helix which has a variable pitch $P(z)$ which is defined over the axial axis $z$ and has the form $P(z)=a*z+b$, $a$ and $b$ are constants. The larger the pitch, the sparser the helix should be at that part. It's like a wave which has variable wavelength. The radius of the helix is $r$. The total helix height (in $z$ direction) is $L$.
Since the helix has a linearly varying pitch, this spring-like helix will become more and more "dense" when $z$ increases if pitch decreases with $z$.
The question is how to express the helix length using all the aforementioned parameters?
I have a preliminary form, but this does not meet the result that I measured in the 3D CAD software.

 A: Parametrize the helix as 
\begin{eqnarray}
x(t) &=& r \cos (2\pi t) \\
y(t) &=& r \sin (2\pi t) \\
z(t) &=& at + b
\end{eqnarray}
The length of the helix is
$$
L = \int_{t_1}^{t_2}\left[ \left(\frac{{\rm d}x}{{\rm d}t} \right)^2 + \left(\frac{{\rm d}y}{{\rm d}t} \right)^2 + \left(\frac{{\rm d}z}{{\rm d}t} \right)^2\right]^{1/2}{\rm d}t = \int_{t_1}^{t_2}[b^2 + 4\pi^2 r^2]^{1/2}{\rm d}t = \sqrt{b^2 + 4\pi^2 r^2}(t_2 - t_1)
$$
A: Just served as some inspirations for others, I posted my derivation process. Maybe someone can help to review the process? I hope this is counted as en eligible answer.
My derivation process is like the following:
$$\frac{dz}{d\theta}=\frac{P(z)}{2\pi}$$
so that:
$$\theta=2\pi\int_0^z\frac{1}{P(z)}dz+const$$
Consider $\theta_{z=0}=0$:
$$\theta=2\pi\int_0^z\frac{1}{P(z)}dz=\frac{2\pi}{a}\log(az+b)$$
Thus $z$ can be expressed by $\theta$:
$$z=\frac{e^{\frac{a\theta}{2\pi}}-b}{a}$$
For $x$ and $y$:
$$x=r\cos{\theta}$$
$$y=r\sin{\theta}$$
And the helix length is:
\begin{equation*}
 L_{helix}=\int_{\theta_1}^{\theta_2}\left[\left(\frac{dx}{d\theta}\right)^2+\left(\frac{dy}{d\theta}\right)^2+\left(\frac{dz}{d\theta}\right)^2\right]^\frac{1}{2}d\theta
\end{equation*}
The upper and lower boundary of $\theta$ can be decided by plugging boundary conditions for $z=0$ and $z=L$ into $\theta=\frac{2\pi}{a}\log(az+b)$
So the final form before solving the integral is:
\begin{equation*}
L_{helix}=\int_{\frac{2\pi}{a}\log{b}}^{\frac{2\pi}{a}\log{(aL+b)}}\left[r^2+\left(\frac{1}{2\pi}e^{\frac{a\theta}{2\pi}}\right)^2\right]^\frac{1}{2}d\theta
\end{equation*}
This can be solved in some software. To me, I think this first equation $\frac{dz}{d\theta}=\frac{P(z)}{2\pi}$ is the key one. I'm not sure its correctness. I get it from intuition.
A: The pitch is the derivative of the $z$ position on the angle parameter, hence the element of arc is
$$\sqrt{(at+b)^2+r^2}\,dt,$$
which integrates as follows:
https://www.wolframalpha.com/input/?i=integrate+sqrt((az%2Bb)%5E2%2Br%5E2)+dz
