Show the minimum value for v Really struggling with this question...
If $$v=\frac{(L\cdot V1-V1\cdot x+V2\cdot x)\cdot R}{2Lrx-2rx^2+LR}$$
Prove that the minimum values ($x>0$) for $v$ will occur at:
$$x=\frac{L}{V2-V1}\cdot [-V1 \pm \sqrt{V1\cdot V2-\frac{R}{2rL} \cdot (V1-V2)^2}]$$
How do I do this?
I have tried differentiating the equation and setting it to 0, but I end up with a different formula than the one given.
Thanks in advance...

Suppose that $L,r,R,V_1,V_2$ are constants.
If we set
$$a=-2r,b=2Lr,c=LR,d=R(V_2-V_2),e=RLV_1,$$
we have
$$v=\frac{dx+e}{ax^2+bx+c}\Rightarrow \frac{dv}{dx}=\frac{-dax^2-2eax+dc-eb}{(ax^2+bx+c)^2}.$$
Hence, we have
$$-dax^2-2eax+dc-eb=0$$$$\iff -R(V_2-V_1)(-2r)x^2-2RLV_1(-2r)x+R(V_2-V_1)LR-RLV_1\times 2Lr=0$$
$$\iff (V_2-V_1)x^2+2LV_1x+\frac{(V_2-V_1)LR}{2r}-L^2V_1=0$$
$$\iff x=\frac{-LV_1\pm\sqrt{D}}{V_2-V_1}\tag1$$
where
$$D=L^2V_1^2-(V_2-V_1)\left(\frac{(V_2-V_1)LR}{2r}-L^2V_1\right)$$
$$=L^2\left(V_1^2-\frac{(V_1-V_2)^2R}{2rL}+V_1(V_2-V_1)\right)$$
$$=L^2\left(V_1V_2-\frac{R}{2rL}(V_1-V_2)^2\right).$$
Hence, from $(1)$, we have what you wrote.
P.S. Suppose that $L\gt 0$. Since 
$$D=L^2\left(V_1V_2-\frac{R}{2rL}(V_1-V_2)^2\right),$$
we have
$$\sqrt D=\sqrt{L^2\left(V_1V_2-\frac{R}{2rL}(V_1-V_2)^2\right)}=L\sqrt{V_1V_2-\frac{R}{2rL}(V_1-V_2)^2}.$$
Hence, from $(1)$, we have
$$\begin{align}x&=\frac{-LV_1\pm\sqrt{D}}{V_2-V_1}\\&=\frac{-LV_1\pm L\sqrt{V_1V_2-\frac{R}{2rL}(V_1-V_2)^2}}{V_2-V_1}\\&=\frac{L}{V_2-V_1}\left(-V_1\pm \sqrt{V_1V_2-\frac{R}{2rL}(V_1-V_2)^2}\right).\end{align}$$
