<<"A:POLYMV.M"

mm = {{ka+kb*w, kf, 0, 0},

      {-2*kb-2*kc, kc+kd+ke, -3*kf, 0},

      {0, -kd, kd+I*xa, -u},

      {0, 0, -I*u, kg}}

mm//MatrixForm

SetOptions[$Output,PageWidth->55]

Det[mm]

DetFactored[mm]

tp = SeparateTerms[ {DetFactored[mm]} ]

tq = GatherTerms[ tp, !FreeQ[#,kf]& ]

AdjustTerms[{1+w^3, 2b, 0}, {1,3}, w^3]

TransformTerms[ {-1, b(x-a), (x-a)^2}, 3, Expand]

SumTerms[{1, 4x, 6x^2, 4x^3, x^4}, {1,3,4}]

ShowTerms[tp,3]

ShowExponents[tp,3]

LocateTerms[{3+a, -2, a b, (x+1)^2, a+1},

            Head[#]=!=Times&, {1,3,5,4}]

PolynomialParts[ 2 a (b - 2 c)^2 d^3 (e + 3), ww]

ShowTerms[tp, ExactDivideQ[#, -2 kb - 2 kc]& ]

h = Expand[(a - b)(3 a - b)(a - 2 b)]

ExactDivide[ h, a - 2 b ]

AntiDistribute[ (x-1)b^2 + (x-1)(a+1) - x a + y, x - 1]

DistributeTerm[ (a-2)(s-t) + (a-1)k, s-t ]

TopExpand[ ((s-x0)^2 + k(t-y0+1) - w)^2 ]

ExpandTerm[ w(u-w)^2 (u-z) (y-z), (u-w)^2(y-z) ]

FactorNumber[ 5 d^3 (-2 kb + 4 kc)^2, -2]