Simplifying expressions involving Sum

In our case a simple and direct approach would be defining a list of rules. Here is an example:

enter image description here

rules =
  { c_ Sum[n a[n] c_^(n-1), {n, 0, Infinity}] :> Sum[n c^n a[n], {n, 0, Infinity}],
    α_ Sum[a[n] c_^n, {n, 0, Infinity}] + Sum[n a[n] c_^n, {n, 0, Infinity}] :>
    Sum[(α + n) a[n] c^n, {n, 0, Infinity}]};

Let's define an appropriate function for TransformationFunctions applying rules to an expression:

 tf[expr_] := expr /. rules  

and now FullSimplify with tf does the expected transformation:

FullSimplify[ D[y, x], TransformationFunctions -> {Automatic, tf}]//TraditionalForm

enter image description here

alternatively one can do this:

FullSimplify[ D[y, x]] //. rules

Note: Applying rules in TransformationFunctions it was quite sufficient to play with ReplaceAll (/.) while in the latter case we had to use rules repeatedly i.e. with ReplaceRepeated (//.) .


One way to do it is application of series of rules to the expression, just to "teach" Mathematica of how to transform the expression. I will break the chain of transformations into steps to make it better visible. These are your functions:

 expr1 = (x - x0)^α  Sum[a[n] (x - x0)^n, {n, 0, Infinity}]
expr2 = D[expr1, x]

and here are the results:

enter image description here

Let us do the first transformation:

expr3 = expr2 /. u_*\!\(
\*UnderoverscriptBox[\(\[Sum]\), \(n = 0\), \(\[Infinity]\)]v_\) -> \!\(
\*UnderoverscriptBox[\(\[Sum]\), \(n = 0\), \(\[Infinity]\)]\((u* v)\)\)

this is the result:

enter image description here

The second transformation:

 expr4 = expr3 /. (x - x0)^m_ \!\(
\*UnderoverscriptBox[\(\[Sum]\), \(n = 0\), \(\[Infinity]\)]\(s_*\ 
\*SuperscriptBox[\((x - x0)\), \(q_\)]\)\) -> \!\(
\*UnderoverscriptBox[\(\[Sum]\), \(n = 0\), \(\[Infinity]\)]\(s*\ 
\*SuperscriptBox[\((x - x0)\), \(q + m\)]\)\)

yielding

enter image description here

and the last one:

 expr5 = expr4 /. \!\(
\*UnderoverscriptBox[\(\[Sum]\), \(n = 0\), \(\[Infinity]\)]\(u1_*
      v_\)\) + \!\(
\*UnderoverscriptBox[\(\[Sum]\), \(n = 0\), \(\[Infinity]\)]\(u2_*
      v_\)\) -> \!\(
\*UnderoverscriptBox[\(\[Sum]\), \(n = 
      0\), \(\[Infinity]\)]\(\((u1 + u2)\)*v\)\)

gives the result:

enter image description here