Factor terms in mathematica

  • Mathematica
  • Thread starter yitriana
  • Start date
  • #1
36
0

Main Question or Discussion Point

is there a way to factor terms in non polynomials

for example, to factor out (e^t)*t^2, (e^t)*t

e^t t^2 (b + a t) + e^t (2 b + 6 a t) + e^t (2 b t + 3 a t^2) -
2 (e^t (2 b t + 3 a t^2) + e^t (b t^2 + a t^3)) +
e^t (2 b t + 3 a t^2) Log[e] + e^t (b t^2 + a t^3) Log[e]
 

Answers and Replies

  • #2
EnumaElish
Science Advisor
Homework Helper
2,304
124
You can factor out terms in Mathematica using Collect[expression, {terms}].

For example, Collect[a + a b + a b c, {a, b}] = a (1 + b (1 + c)).

But Collect[(a b)^2 + a b + a b c, {a}] = a^2 b^2 + a (b + b c), not a(a b^2 + b + b c).
 

Related Threads for: Factor terms in mathematica

Top