I'm having trouble simplifying (a family of) complicated rational expressions. For instance, I obtained the following $$ expr=\frac{\sqrt{3} \left(\frac{\sqrt{\frac{\tau ^3 (\tau +2) (\lambda -\tau +1) (\lambda +\tau +2)}{\lambda (\lambda +3)}}}{(\tau +1) (2 \tau +1)}+\frac{2 \sqrt{\tau (\tau +2)} (\lambda -2 \tau (\tau +2))}{\sqrt{\lambda (\lambda +3)} (4 \tau (\tau +2)+3)}-\frac{1}{\sqrt{\frac{\lambda (\lambda +3) (\tau +1)^2 (2 \tau +3)^2}{\tau (\tau +2)^3 (\lambda -\tau ) (\lambda +\tau +3)}}}\right)}{\sqrt{(\lambda +1) (\lambda +2)}} $$ as a result of
FullSimplify[expr, Assumptions -> {lambda> 0, tau > 0, tau <= lambda}]
Here's the same expression in InputForm
:
expr = (Sqrt[3]*(Sqrt[((1 + lambda - tau)*tau^3*(2 + tau)*(2 + lambda + tau))/(lambda*(3 + lambda))]/((1 + tau)*(1 + 2*tau)) -
1/Sqrt[(lambda*(3 + lambda)*(1 + tau)^2*(3 + 2*tau)^2)/((lambda - tau)*tau*(2 + tau)^3*(3 + lambda + tau))] +
(2*Sqrt[tau*(2 + tau)]*(lambda - 2*tau*(2 + tau)))/(Sqrt[lambda*(3 + lambda)]*(3 + 4*tau*(2 + tau)))))/Sqrt[(1 + lambda)*(2 + lambda)]
There are clear additional simplifications, such as factors of $\sqrt{(\tau+1)^2}$, commons factors of $\lambda (\lambda+3)$ and the last term, with the inverse fraction in the denominator, is annoying because when $\lambda=\tau$ it appears there is a $0$ in one of the denominators.
I followed the suggestion of this post
FullSimplify[ExpandAll@expr, Assumptions -> {lambda> 0, tau > 0, tau<= lambda}]
but this returns $$ \frac{\sqrt{3} \tau \sqrt{\frac{(\tau +2) (\tau +3)}{(\lambda +1) (\lambda +2)}} \left(2 \sqrt{\frac{\lambda ^3 (\lambda +3)}{\tau (\tau +3)}}+2 \sqrt{\frac{\lambda ^3 (\lambda +3) \tau }{\tau +3}}-4 \sqrt{\frac{\lambda (\lambda +3) \tau ^5}{\tau +3}}-12 \sqrt{\frac{\lambda (\lambda +3) \tau ^3}{\tau +3}}+2 \sqrt{\frac{\lambda (\lambda +3) \tau ^3 (\lambda -\tau +1) (\lambda +\tau +2)}{\tau +3}}-2 \sqrt{\frac{\lambda (\lambda +3) \tau ^3 (\lambda -\tau ) (\lambda +\tau +3)}{\tau +3}}-8 \sqrt{\frac{\lambda (\lambda +3) \tau }{\tau +3}}+3 \sqrt{\frac{\lambda (\lambda +3) \tau (\lambda -\tau +1) (\lambda +\tau +2)}{\tau +3}}-2 \sqrt{\frac{\lambda (\lambda +3) (\lambda -\tau ) (\lambda +\tau +3)}{\tau (\tau +3)}}-5 \sqrt{\frac{\lambda (\lambda +3) \tau (\lambda -\tau ) (\lambda +\tau +3)}{\tau +3}}\right)}{\lambda (\lambda +3) (\tau +1) (2 \tau +1) (2 \tau +3)} $$ which removes some of the irksome problems of apparently singular expressions in denominators (although the $\tau$ factor in front would cancel some denominator factors of $\sqrt{\tau}$ thus removing the singularity issue for $\tau=0$) but is not that much better as there are still lots of common factors, again like $\sqrt{\lambda(\lambda+3)}$ and $\sqrt{\tau+3}$.
This one expression turns out to be always $<0$ over the allowed range of $\tau$ so I thought of multiplying by $-1$, squaring and taking the square root but this doesn't seem productive (and is very time consuming) because the square roots don't go away "nicely" upon squaring.
This is one of a series of expression of similar structure (always a sum of $3$ terms) and complexity so I wonder if there is a better way to proceed, possibly starting from the last expression, to properly factor the common terms.