Troubleshooting SumConverge in Mathematica

In summary, the conversation discusses the use of the function SumConvergence in Mathematica to determine the convergence of a given function. The user initially encounters an issue where the function simply echoes back their input, indicating that the answer cannot be determined. It is later discovered that the function SumConvergence is actually SumConverge, and the problem lies in the Sin[n x] term. The user then receives a hint to use the Assuming function to specify a value for t, resulting in a successful determination of convergence.
  • #1
member 428835
Hi PF!

So in mathematica I am trying to see if a function converges so I type: SumConverge[2/(n*Pi) Exp[-n^2*t] Sin[n x], n]

All mathematica does here is echo back what I typed in. Is something I'm doing wrong?

Thanks!
 
Physics news on Phys.org
  • #2
For the record, there seems to be a problem with the n^2 in the Exp
 
  • #3
The function you want is SumConvergence, not SumConverge. Usually, when a Mathematica function simply echoes your input that means that it cannot determine the answer.

In this case, the problem isn't the n^2, the problem is the Sin[n x]. If x is some rational multiple of pi then Mathematica can correctly determine that the convergence criteria is Re[t]>0. However, for an arbitrary x or for an x which is not a rational multiple of pi then Mathematica doesn't know, so it returns the input.
 
Last edited:
  • Like
Likes member 428835
  • #4
Thanks!
 
  • #5
It just needs a little hint

In[1]:= Assuming[t > 0,
FullSimplify[SumConvergence[2/(n*Pi) Exp[-n^2*t] Sin[n x], n]]]

Out[1]= True
 
  • #6
I copied what you have and all i received out was an echo... :(
 
  • #7
Hummm. I reboot the machine. Win7 64, MMA 9 64. Open MMA. Scrape

Assuming[t > 0, FullSimplify[SumConvergence[2/(n*Pi) Exp[-n^2*t] Sin[n x], n]]]

off the screen, paste it into the notebook, <shift><enter> and a few seconds later it replies True.

The result is the same even if you remove the 2/(n*Pi).

If you could reply with your having done exactly those steps, nothing more, and you still get echo then we can try to figure out where to go next.

Unfortunately all the work is done internally and Trace tells us nothing about where it might be going wrong.

You might try all the examples in the help pages for SumConvergence and verify that they work for you.
 

FAQ: Troubleshooting SumConverge in Mathematica

What is SumConverge in Mathematica?

SumConverge is a built-in function in Mathematica that is used to numerically evaluate a convergent sum.

How does SumConverge work?

SumConverge uses a combination of numerical and analytical methods to compute the sum of a convergent series. It first attempts to find an exact symbolic solution, and if that is not possible, it uses numerical techniques such as the Levin u-transform or the Euler-Maclaurin formula.

What are the common issues encountered when using SumConverge?

The most common issue is when SumConverge returns an error message indicating that the sum is not convergent. This can happen if the summand does not decrease fast enough or if there are singularities in the summation range. Another common issue is when the numerical methods used by SumConverge fail to converge to a solution.

How can I improve the performance of SumConverge?

One way to improve the performance of SumConverge is to provide more information about the sum, such as the expected order of convergence or the location of singularities. This can help the function choose the most appropriate numerical method. Additionally, using the option "Method"->"SeriesTerm" can often lead to faster and more accurate results.

Can SumConverge be used for divergent sums?

No, SumConverge can only be used for convergent sums. If you need to evaluate a divergent sum, you can try using the functions NSum or NLimit in Mathematica.

Similar threads

Replies
3
Views
2K
Replies
9
Views
724
Replies
5
Views
2K
Replies
1
Views
735
Replies
4
Views
1K
Replies
4
Views
1K
Replies
1
Views
444
Back
Top