I have the following expression:
(1 - a) (H - 3 L*r + L)
and I would like to `simplify' this to
(1 - a) (H - L(3 r +1))
I thought that maybe Simplify or Collect could work, but to no avail.
What's the right function to achieve this?
Mathematica Stack Exchange is a question and answer site for users of Wolfram Mathematica. It only takes a minute to sign up.
Sign up to join this communityYou can map HornerForm
to each factor:
expr = (1 - a) (H - 3 L*r + L);
HornerForm /@ expr
(1 - a) (H + L (1 - 3 r))
expr = (1 - a) (H - 3 L*r + L); Collect[#, L] & /@ expr
$\endgroup$