Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

A way to do it is to check if the expression is true with bool() for example

bool(2==2)
True
bool(2==4)
False

With your expression you would have:

var('n')
bool(sum((-1)^(n+1)/(3*n+6*(-1)^n),n,0,oo) == (log(2)-1)/3)

This returns false because sage doesn't seem to be able to prove their equality. So either they aren't equal or sage can't simplify it enough to prove it. So you might have to do some manipulation by hand until you can get it to a simpler state that sage can then work with.

A way to do it is to check if the expression is true with bool() for example

bool(2==2)
True
bool(2==4)
False

With your expression you would have:

var('n')
bool(sum((-1)^(n+1)/(3*n+6*(-1)^n),n,0,oo) == (log(2)-1)/3)

This returns false because sage doesn't seem to be able to prove their equality. So either they aren't equal or sage can't simplify it enough to prove it. So you might have to do some manipulation by hand until you can get it to a simpler state that sage can then work with.

Another option is to do a numerical approximation of the infinite sum:

var('n')
sum((-1)^(n + 1)/(3*n + 6*(-1)^n),n,0,100000).n()
−0.102292606438353

((log(2)-1)/3).n()
−0.102284273146685

This code approximates the sum with the first 100,000 terms. We can see that the numerical approximation of this function does seem to approach $$\frac{log(2)-1}{3}$$

A way to do it is to check if the expression is true with bool() for example

bool(2==2)
True

Or

bool(2==4)
False

With your expression you would have:

var('n')
bool(sum((-1)^(n+1)/(3*n+6*(-1)^n),n,0,oo) == (log(2)-1)/3)

This returns false because sage doesn't seem to be able to prove their equality. So either they aren't equal or sage can't simplify it enough to prove it. So you might have to do some manipulation by hand until you can get it to a simpler state that sage can then work with.

Another option is to do a numerical approximation of the infinite sum:

var('n')
sum((-1)^(n + 1)/(3*n + 6*(-1)^n),n,0,100000).n()
−0.102292606438353

((log(2)-1)/3).n()
−0.102284273146685

This code approximates the sum with the first 100,000 terms. We can see that the numerical approximation of this function does seem to approach $$\frac{log(2)-1}{3}$$