1

I want to use of collect for this code:

x^α (9/(100 α κ Gamma[α]) - x/(
    100 (α + α^2) κ Gamma[α]) - Subscript[
    a, 0]/(α Gamma[α])) + 
 x^(2 α) ((
    2^(2 - 2 α)
      Cos[π α] Gamma[1/2 - α] Subscript[a, 0])/(
    5 Sqrt[π] α κ Gamma[α]) - (
    x Subscript[a, 0])/(10 κ Gamma[2 + 2 α]) - (
    x Gamma[2 + α] Subscript[a, 0])/(
    10 α κ Gamma[α] Gamma[2 + 2 α]) - (
    2^(-2 α) Sqrt[π] Subscript[a, 1])/
    Gamma[1/2 + α])

so that we have power to form of

x   x^α   x^(2α)  x^(3α)  ...

that

Collect

I have reviewed these answers Collect1 collect2 but I did not understand. Any suggestion?

Bob Hanlon
  • 157,611
  • 7
  • 77
  • 198
Bahram Agheli
  • 504
  • 2
  • 12
  • How is this different than your last question? You've asked a lot of questions about this in the last few days, and it seems you haven't gotten an acceptable answer. Perhaps you need to give more details. Anyway, what's wrong with Collect[expr, x^_]? – march Apr 09 '16 at 15:03
  • @march I deleted that question, because that is not my opinion. This question is not the same with it. – Bahram Agheli Apr 09 '16 at 15:12
  • Neither of the two answers cited in the question relate to Collect. As suggested earlier by @march, use Collect[exp, x^α, Simplify] or some variant of it. – bbgodfrey Apr 09 '16 at 17:42
  • @bbgodfrey I used this code but "Simplify" is not good, and " x" is not in collect. I want "Ax+B x^α+C*x^2α + . . . ". – Bahram Agheli Apr 09 '16 at 17:48
  • The expression contain terms proportional to (x^α), x^(2 α), x^(1 + α), and x^(1 + 2 α), so it cannot look like what your want. – bbgodfrey Apr 09 '16 at 18:02
  • @bbgodfrey Thanks for your time. – Bahram Agheli Apr 09 '16 at 18:16
  • @march Thanks for your time. – Bahram Agheli Apr 09 '16 at 18:17

1 Answers1

1
expr = x^α (9/(100 α κ Gamma[α]) - 
      x/(100 (α + α^2) κ Gamma[α]) - 
      Subscript[a, 0]/(α Gamma[α])) + 
   x^(2 α) ((2^(2 - 2 α) Cos[π α] Gamma[
          1/2 - α] Subscript[a, 
          0])/(5 Sqrt[π] α κ Gamma[α]) - (x \
Subscript[a, 0])/(10 κ Gamma[2 + 2 α]) - (x Gamma[
          2 + α] Subscript[a, 
          0])/(10 α κ Gamma[α] Gamma[
          2 + 2 α]) - (2^(-2 α) Sqrt[π] Subscript[a, 1])/
       Gamma[1/2 + α]);

If your intent is to allow the coefficients to contain terms with an x factor

TraditionalForm[expr2 = Collect[expr, x^α, FullSimplify]]

enter image description here

If the intent is to display terms with the form x^(m*α + n)

TraditionalForm[expr3 = Collect[#, x, FullSimplify] & /@ expr2]

enter image description here

Bob Hanlon
  • 157,611
  • 7
  • 77
  • 198