0
$\begingroup$

I have the following expression:

Sum[x^n, {n, 1, Infinity}]*Sum[Log[m, x], {m, 2, Infinity}]

How can I Force Mathematica to write this expression in the following form?

Sum[x^n Log[m, x], {n, 1, Infinity}, {m, 2, Infinity}]
$\endgroup$
2
  • 1
    $\begingroup$ In the first expression, the first sum will evaluate symbolically unless held or inactivated; and the second sum contains a division by zero i.e. Log[1, x] $\endgroup$
    – Bob Hanlon
    Dec 5, 2021 at 1:58
  • $\begingroup$ I edited the zero division problem. Thanks for that. @BobHanlon $\endgroup$
    – Alex97
    Dec 5, 2021 at 7:14

1 Answer 1

1
$\begingroup$

Try the following. Let us introduce a rule:

rule = Inactive[Sum][a_., {k_, k0_: 1, m_}]*
    Inactive[Sum][b_., {q_, q0_: 1, n_}] :> 
   Inactive[Sum][Simplify[(a *b)], {k, k0, m}, {q, q0, n}];

In your expression let us first inactivate the sums:

expr = Inactive[Sum][x^n, {n, 1, Infinity}]*
  Inactive[Sum][Log[m, x], {m, 2, Infinity}]

enter image description here

Then:

expr1=expr /. rule

yields the following:

enter image description here

Now you can activate the result:

expr1//Activate

The result you will see on the screen is the same as I have shown above:

enter image description here

Have fun!

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.