Ask Your Question

rtc's profile - activity

2020-08-02 15:54:31 +0200 received badge  Notable Question (source)
2018-07-18 15:03:00 +0200 received badge  Popular Question (source)
2018-07-18 10:55:18 +0200 received badge  Famous Question (source)
2018-07-18 07:35:24 +0200 marked best answer Simplify trig expressions with the double angle formula

I am trying to simplify the following expression in sage:


the resulting expression should be:


.simplify_full(), trig_reduce(), or simplify_trig() cannot produce this simplification.

Is sage currently capable of doing this?

2018-07-17 10:45:05 +0200 received badge  Notable Question (source)
2017-05-24 15:55:36 +0200 received badge  Notable Question (source)
2017-05-24 15:51:37 +0200 received badge  Good Question (source)
2017-05-24 00:26:18 +0200 received badge  Popular Question (source)
2017-04-09 11:39:46 +0200 marked best answer functions of variables with matrices

I am trying to make a function of a variable with sage for example:

f(x) = sin(x)



However if It is in a matrix this no longer works:

f(x) = matrix([[sin(x)],[cos(x)]])



Is this not possible or am I missing something to make this work?

I am using sage 7.3 on Ubuntu 16.04 with the aims ppa.

2016-12-13 16:28:26 +0200 asked a question Current State of Sage Notebooks?

I was just curious as to what the current plan for notebooks in sage are. If open the sage notebook server the command windows states "Please wait while the old SageNB Notebook server starts..." But that still seems to be the default. There is also the option to use jupyter notebook. Is that going to be the new default? The ArchWiki seems to state just that: ArchWiki

To summarize, there is "the old SageNB", jupyter, and the Sage Math Cloud notebook, is there a plan for what is the default or recommended option?

2016-11-15 06:25:54 +0200 commented answer Sage seems to be improperly computing an infinite sum, and giving an incorrect answer

In the upstream bug report it seems to have now been fixed.

2016-11-08 15:42:58 +0200 received badge  Enthusiast
2016-11-07 02:28:41 +0200 received badge  Popular Question (source)
2016-11-03 05:05:32 +0200 received badge  Nice Question (source)
2016-11-02 21:29:13 +0200 commented answer Sage seems to be improperly computing an infinite sum, and giving an incorrect answer

@krisman thanks!

2016-11-02 20:44:56 +0200 received badge  Good Answer (source)
2016-11-02 20:43:58 +0200 received badge  Good Answer (source)
2016-11-02 20:43:58 +0200 received badge  Enlightened (source)
2016-11-02 18:23:14 +0200 asked a question Sage seems to be improperly computing an infinite sum, and giving an incorrect answer

Reference this question:

Here is the evaluation of an infinite sum in sage:

f(n) = (-1)^(n+1)/(3*n+6*(-1)^n)

1/3*log(2) - 7/9

Evaluating the same sum in Mathematica:

f[n_] := (-1)^(n + 1)/(3*n + 6*(-1)^n)
Sum[f[2*n] + f[2*n + 1], {n, 0, Infinity}]

1/6 (-2 + Log[4])

Sage seems to be giving an incorrect solution. Am I missing something?

2016-11-02 18:19:07 +0200 commented answer How I can test this equality with sage?

That is a very good question. I am going to ask another question to see if someone knows. It seems that sage is improperly computing this sum.

2016-11-02 09:07:28 +0200 received badge  Nice Answer (source)
2016-11-02 07:43:35 +0200 received badge  Nice Answer (source)
2016-11-02 07:22:36 +0200 answered a question factor x^2 - 30*x + 2817 in sqrt(-2)

I think you are looking for the roots of the polynomial:

f = x^2 - 30*x + 2817

which gives:

[(-36*I*sqrt(2) + 15, 1), (36*I*sqrt(2) + 15, 1)]

This would mean that your original function is equal to:

$$ x^2-30x+2817 = \left(x-(15-36 \sqrt{-2})\right)\left(x-(15+36\sqrt{-2})\right)$$

2016-11-02 06:23:59 +0200 received badge  Commentator
2016-11-02 06:23:59 +0200 commented answer How I can test this equality with sage?

You can't get it directly, as far as I know. It seems to be a difficult sum for CAS to solve.

2016-11-02 05:57:09 +0200 received badge  Teacher (source)
2016-11-02 04:02:08 +0200 edited answer How I can test this equality with sage?

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




With your expression you would have:

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:

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


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}$$