1
$\begingroup$

Here is an example: $\frac{\nu y_0}{\left(x_0+\frac{1}{2}\right) \sqrt{\nu ^2+\frac{\left(4 x_0^2+4 y_0^2-1\right){}^2}{16 y_0^2}}}$

 test=(\[Nu] Subscript[y, 0])/((1/2+Subscript[x, 0]) Sqrt[\[Nu]^2+(-1+4 Subsuperscript[x, 0, 2]+4 Subsuperscript[y, 0, 2])^2/(16 Subsuperscript[y, 0, 2])])

I'd like to get rid of the denominator in the squareroot. I tried separating the numerator and denominator, and multiply both by $4y_0$ or $\sqrt{16y_0^2}$. Somehow neither works. Strangely, even if I multiply the denominator by $\sqrt{16y_0^2}$, the two terms won't combine together even if I use Simplify.

Currently I use FullSimplify[test,Subscript[y, 0]>0], which does not work. Hence, I had to copy the material in the squareroot, multiply by $16y_0^2$, simplify it separately, then plug back the original expression to obtain the results (the numerator will be multiplied by $4y_0$, too).

I wonder if there is any better way to do this mor efficiently?

$\endgroup$
3
  • $\begingroup$ How about using a rule test /. {1/(16 Subsuperscript[y,0,2]) -> 1} $\endgroup$ Dec 17, 2019 at 16:26
  • $\begingroup$ This also might be a bit more generic test /. {1/ Sqrt[x_ + a_*y_/z_] -> 1/Sqrt[x + y]} $\endgroup$ Dec 17, 2019 at 16:30
  • $\begingroup$ A part of your problem is that you use Subsuperscript[y, 0, 2] instead of Subscript[y, 0]^2. Superscript is not a power, it is to make an upper index. You can make sure of it looking at FullForm[test]. $\endgroup$ Dec 17, 2019 at 16:47

2 Answers 2

2
$\begingroup$

Try this:

test = (ν y)/((1/2 + 
      x) Sqrt[ν^2 + (-1 + 4 x^2 + 4 y^2)^2/(16 y^2)]);

test2 = MapAt[Together[#] &, test, {4, 1}]
test3 = MapAt[Hold, test2, {5, 1, 2}] // Simplify[#, y > 0] & //ReleaseHold

enter image description here

Have fun!

$\endgroup$
2
  • $\begingroup$ Sorry, @Alexei Boulbitch, but this result is not true for negative y. % /. {x -> 3, y -> -2, \[Nu] -> 4} yields 128/(35 Sqrt[145]) whereas test /. {x -> 3, y -> -2, \[Nu] -> 4} yields -(128/(35 Sqrt[145])) . $\endgroup$
    – Akku14
    Dec 18, 2019 at 6:45
  • $\begingroup$ Have you noticed that I simplified with the condition y>0. For negative y values one simplifies with another condition. Generally, I only show the way of operation, not the exhaustive solution. $\endgroup$ Dec 18, 2019 at 9:56
2
$\begingroup$

Or:

test = (\[Nu] y)/((1/2 + 
   x) Sqrt[\[Nu]^2 + (-1 + 4 x^2 + 4 y^2)^2/(16 y^2)]);

test // Together // 
        PowerExpand[#, Assumptions -> y \[Element] Reals && y != 0] &

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.