I have a Gaussian beam somewhere away from the beam waist (also referred to as focus point). Then, according to text books (or wikipedia), the beam size $w$ is given by
$$ w(z) = w_0 \sqrt{ 1+\left(\frac{z}{z_R}\right)^2 }, $$
with $z$ the axial distance from the beam waist, $w_0$ the waist size and the Rayleigh length $z_R$ which is defined as
$$ z_R=\frac{\pi w_0^2}{\lambda_0}. $$
The radius of curvature of the phase fronts are given by
$$ R(z) = z \left( 1 + \left(\frac{z_R}{z}\right)^2 \right). $$
I have: $R$, $w$, and $\lambda_0$.
I am looking for: $w_0$, $z$, and $z_R$.
My idea was to solve the third equation for $z$,
$$ z_{1,2} = \frac{R}{2} \pm \sqrt{\left( \frac{R}{2} \right)^2 - z_R^2}, $$
and then inserting into the first equation
$$ w = w_0 \sqrt{ 1 + \left( \frac{ \frac{R}{2} \pm \sqrt{\left( \frac{R}{2} \right)^2 - z_R^2} }{z_R} \right)^2 }. $$
Inserting $z_R$ yields
$$ w = w_0 \sqrt{ 1 + \left( \frac{ \frac{R}{2} \pm \sqrt{\left( \frac{R}{2} \right)^2 - \left(\frac{\pi w_0^2}{\lambda_0}\right)^2} }{\frac{\pi w_0^2}{\lambda_0}} \right)^2 } $$
which is an equation for $w_0$. Since I am currently stuck solving it, my question is in principle twofold: what software/tool do you guys recommend me for solving such an equation for $w_0$ and if there is a different way determining the beam parameters (maybe I missed something) ?