Simplifying solutions I am given the differential equation $$\frac{dz}{dx} = m(c_{1}-z)(c_{2}-z)^{\frac{1}{2}}, z(0) =0$$ and have arrived at a solution: $$z(x) = c_{2} - (c_{1}-c_{2})\tan^{2}{\left[\arctan{\left(\frac{\sqrt{c_{2}}}{\sqrt{c_{1}-c_{2}}}\right)} - \frac{mx}{2}\sqrt{c_{1}-c_{2}}\right]}.$$ I was wondering if there was any more simplification that could occur here since we have the $\arctan$ within the $\tan$. I have tried using the identity for $\tan{(A-B)}$ but this doesn't seem to simplify matters.
 A: Using the identity
$$
\tan(\arctan(u)-v) = \frac{u - \tan(v)}{1 + u \tan(v)}
$$
I was able to simplify your answer to
$${{{  c_1}\,\tan \left({{\sqrt{{  c_1}-{  c_2}}\,m\,x}\over{2
 }}\right)\,\left(2\,{  c_2}\,\tan \left({{\sqrt{{  c_1}-
 {  c_2}}\,m\,x}\over{2}}\right)-{  c_1}\,\tan \left({{\sqrt{
 {  c_1}-{  c_2}}\,m\,x}\over{2}}\right)+2\,\sqrt{{  c_1}-
 {  c_2}}\,\sqrt{{  c_2}}\right)}\over{\left(\sqrt{{  c_2}}\,
 \tan \left({{\sqrt{{  c_1}-{  c_2}}\,m\,x}\over{2}}\right)+
 \sqrt{{  c_1}-{  c_2}}\right)^2}}$$
I have to confess that I used Maxima to keep track of all the terms!
Not sure if this is simpler than you answer.
A: If I may, I would have integrated the differential equation ignoring first the boundary condition; this leads to 
$$z(x)=\text{c2}-(\text{c1}-\text{c2}) \tan ^2\left(\frac{1}{2} \sqrt{\text{c1}-\text{c2}} (K-m
   x)\right)$$ for which the boundary condition gives $$(\text{c1}-\text{c2}) \tan ^2\left(\frac{1}{2} \sqrt{\text{c1}-\text{c2}}
   K\right)=\text{c2}$$ from which $K$ can be easily extracted to give your expression  
I must confess that I wrote this thinking about the manner I should code it for numerical aplications. It is just a personal opinion but if find it easier to read.
