Group Abstract Group Abstract

Message Boards Message Boards

0
|
6.9K Views
|
12 Replies
|
1 Total Like
View groups...
Share
Share this post:

Using conditional expression in summation

Posted 5 years ago

Hi, I have the following sum to compute numerically using wolfram mathematica and i cant seem to succeed limiting my variables as intended. The sum is:

The sum i have to solve

I tried using ConditionalExpression as follows:

A simple code

But to no avail. Code for copying:

ConditionalExpression[\!\(
\*UnderoverscriptBox[\(\[Sum]\), \(n = \(-\[Infinity]\)\), \(\
\[Infinity]\)]
\*FractionBox[\(1\), \(
\*SuperscriptBox[\(n\), \(2\)] 
\*SuperscriptBox[\((n - m)\), \(2\)]\)]\), {n != {0, m}, 
  m \[Element] Integers}]

Does anybody know how to write the conditions properly so mathematica will solve the summation?

edit: I have also tried the following way, but still the compiler doesn't recognize m,n from the conditions in the actual summation:

New try

code for copy:

Assuming[Element[m, Integers] && n != 0 && n != m, Simplify[\!\(
\*UnderoverscriptBox[\(\[Sum]\), \(n = \(-\[Infinity]\)\), \(\
\[Infinity]\)]
\*FractionBox[\(1\), \(
\*SuperscriptBox[\(n\), \(2\)] 
\*SuperscriptBox[\((n - m)\), \(2\)]\)]\)]]

Thanks for helping! :>

POSTED BY: Michael Morami
12 Replies
POSTED BY: Richard Frost

haha obviously :D.

But how does Wolfram Mathematica know it needs to limit m to be an integer? The way you wrote it does not imply such a restriction on the code, yet it outputs the correct solution.

To be clear: m>0 contains the case where m=1.59723621 which is not something i want to allow when im doing the summation

POSTED BY: Michael Morami

I took m to be an integer because it is stated in your problem definition. :-)

POSTED BY: Richard Frost

Wow that is amazing. Thank you!

When I asked how splitting the 'm' into cases is the same as 'm in Z' I meant that by splitting you are still allowing 'm' to any Real number within those cases.

I see what you did there and this is very clever. I guess the fact that 'm' is part of the SUM limit force it to be an integer? Am I right?

POSTED BY: Michael Morami

POSTED BY: Richard Frost

Cool this is helpful! Now it looks like a more sensable answer thanks. I guess the code was interperted correctly

POSTED BY: Michael Morami
Posted 5 years ago

Hi Michael,

Try FullSimplify on the result

Assuming[Element[m, Integers], 
 Sum[1/(n^2*(n - m)^2), {n, -Infinity, -1}] + Sum[1/(n^2*(n - m)^2), {n, 1, Infinity}]]

(*
(12 EulerGamma + m \[Pi]^2 + 12 PolyGamma[0, 1 - m] + 
  6 m PolyGamma[1, 1 - m])/(
 6 m^3) + (-12 EulerGamma + m \[Pi]^2 - 12 PolyGamma[0, 1 + m] + 
  6 m PolyGamma[1, 1 + m])/(6 m^3)
*)

FullSimplify@%

(*
(-9 + m^2 \[Pi]^2 + 3 m \[Pi] Csc[m \[Pi]]^2 (m \[Pi] + Sin[2 m \[Pi]]))/(3 m^4)
*)
POSTED BY: Rohit Namjoshi

For the 3 cases of m, think about what happens to the denominator. For example, it is n^4 when m=0, so the two split summation terms are equal.

POSTED BY: Richard Frost

I do, but couldnt find it there... At least not in the series section.

POSTED BY: Michael Morami

Do you have access to Gradshteyn and Ryzhik?

https://en.m.wikipedia.org/wiki/Gradshteyn_and_Ryzhik

POSTED BY: Richard Frost

I actually did the first one (splitting it into 2 summations), but i cant see how seperating it to m<0, m=0, m>0 is equivalent to 'm is an integer'. i have tried a new approach based on your answer:

New approach

code:

Assuming[m \[Element] Integers, \!\(
\*UnderoverscriptBox[\(\[Sum]\), \(n = \(-\[Infinity]\)\), \(-1\)]
\*FractionBox[\(1\), \(
\*SuperscriptBox[\(n\), \(2\)] 
\*SuperscriptBox[\((n - m)\), \(2\)]\)]\) + \!\(
\*UnderoverscriptBox[\(\[Sum]\), \(n = 1\), \(\[Infinity]\)]
\*FractionBox[\(1\), \(
\*SuperscriptBox[\(n\), \(2\)] 
\*SuperscriptBox[\((n - m)\), \(2\)]\)]\)]

and arrived to the following solotioun:

An answer

This might be the intended solution, but i am not certain. We have never used PolyGamma functions before, and although we dont really need to study it to get this result, i suspect it is not what the exercise was aiming for. I guess i am expecting a nice convergance to a compact form. So am i just paranoid or wolfram really misinterpet my quary?

POSTED BY: Michael Morami

The sum can be split into 2 large pieces: n from -infinity to -1, plus n from 1 to +infinity. Then you have 3 cases for m: m < 0, m==0, and m>0.

POSTED BY: Richard Frost
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard