I have a function works like this:
f[{m_, n_}] := Assuming[m > 0 && n > 0, Simplify[{n, Sqrt[n m]}]]
finalT = NestList[f, {T3, (T1 T2)^(1/2)}, 25]
Which will return result like this:
finalT[[All, 2]]
I wonder how to capture those exponent degrees in finalT[[All, 2]]
, like $(T_1 T_2)^\frac{1}{2} \rightarrow \frac{1}{2}$. I have tried
Exponent[finalT[[All, 2]], (T1 T2)]
Cases[finalT[[All, 2]], (T1 T2)^n]
both of them did not work. The first return a list of $0$s and the second returns an empty list. How can I achieve my goal? I am using Mathematica 11.
n==1
then useCases[finalT, (T1 T2)^n_. :> n, Infinity]
; if not, thenCases[finalT, (T1 T2)^n_ :> n, Infinity]
$\endgroup$-1
instead ofInfinity
, shorter to write, same effect. :) $\endgroup$