We know that Resistance is given by: $$R = \dfrac{\rho L}{A}$$
The figure of Resistance is like this, $L$ is perpendicular distance between $A_1$ and $A_2$
I assumed that the area change linearly, so Area $A(x)$ will be:
$$A = A_1 + \left(\dfrac{A_2-A_1}{L}\right)x$$
Using this, $dR$ will be:
$$\dfrac{\rho dx}{A_1 + \left(\dfrac{A_2-A_1}{L}\right)x}$$
Integrating this, I get:
$$R = \dfrac{\rho L\ln\left(\dfrac{A_2}{A_1}\right)}{A_2 - A_1}$$
But answer given in problem book is $$R = \dfrac{\rho L}{\sqrt{A_1A_2}}$$
Where do I go wrong? I am confused with this for long time. Thank You!

As @MaxPayne pointed out, area varies quadratically with side length, which in turn varies linearly with $x$. The right formula for $A$ is thus: $$ A=\left( \sqrt{A_1}+ {\sqrt{A_2}-\sqrt{A_1}\over L}x \right)^2. $$