Given
t1 = {1/7 (4 + Sqrt[37]), 1/15 (3 + 2 Sqrt[7]), 1/2 (5 + 3 Sqrt[2])}
I do not want to simplify the square roots. I want to get
t2 = {1/7 (4 + Sqrt[37]), 1/15 (3 + Sqrt[28]), 1/2 (5 + Sqrt[18])}
I can cheat my way round by code:
t2 = t1[[All, 2, -1]]
t3 = t2^2
Defer[Sqrt[#]] & /@ t3
to get
{Sqrt[37], Sqrt[28], Sqrt[18]}
and fiddle it in again. What is an elegant way to obtain t2? How could I use Cases
inserting two optional patterns? I tried with If
inside Cases
but that didn't do the job properly.
Sqrt[28]
as2 Sqrt[7]
. So you will fighting against the front end all the time trying to prevent it from doing this. But why exactly you want it displayedSqrt[28]
vs2 Sqrt[7]
? Is it just for display purposes? computationally there is no difference. $\endgroup$