ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Wed, 17 Mar 2021 00:15:49 +0100LaTeX Greek names for symbolic variableshttps://ask.sagemath.org/question/56197/latex-greek-names-for-symbolic-variables/Instead of the following:
x,y,z,s1,s2,s3,s4,s5 = var('x,y,z,s_1,s_2,s_3,s_4,s_5')
I want to display `s_1, s_2, s_3, s_4, s_5` as $\sigma_1, \sigma_2, \sigma_3, \sigma_4, \sigma_5$. So for example, when I type `show(s1/s2)` , it would typeset
$$
\frac{\sigma_1}{\sigma_2}.
$$RoadWed, 17 Mar 2021 00:15:49 +0100https://ask.sagemath.org/question/56197/prove an identity for any integerhttps://ask.sagemath.org/question/55699/prove-an-identity-for-any-integer/Let $n$ be a positive integer and $m = (m_1, \ldots, m_n)$ an $n$-dimensional vector of real numbers.
Let $g$ be a real number.
I want to prove, for any $n$ and $m$, an equality of the form
$$ \sum_{i=1}^n f_i (m,g) = 0 $$
where the function $f_i$ is a rational function of $m$ and $g$.
Of course it's easy to check this by substituting finite values of $n$, but is there a way in Sage to prove it for any integer?rue82Sat, 13 Feb 2021 21:40:36 +0100https://ask.sagemath.org/question/55699/simplifying a symbolic expressionhttps://ask.sagemath.org/question/51751/simplifying-a-symbolic-expression/Hi I am really tired of not being able to see that sage says the following expression is zero. Instead it returns the same expression. Please help how to make sure that I get 0 for the calculation. Thank you.
q= var('q',domain='positive');
n= var('n',domain='positive');
k= var('k',domain='positive');
x= var('x',domain='positive');
(((q - 1)*x + 1)^n*q^n - ((q^2 - q)*x + q)^n).simplify_full()
((q - 1)*x + 1)^n*q^n - ((q^2 - q)*x + q)^niozenThu, 04 Jun 2020 08:01:15 +0200https://ask.sagemath.org/question/51751/Factorize characteristic polynomial in SR base ringhttps://ask.sagemath.org/question/45249/factorize-characteristic-polynomial-in-sr-base-ring/ I am total newbie to SAGE so this question might be trivial. How can I factorize the characteristic polynomial obtained by a symbolic matrix in SAGE 8.6? Is there a workaround the fact that `factor()` is not defined on the base ring `SR` which is the one inherited from the symbolic matrix?
For example I have in a SAGE/Jupyter notebook something like:
a,b,c = var('a','b','c')
M = Matrix(SR,3,3)
M[0] = [a, -b, 0]
M[1] = [c, a+b, 0]
M[2] = [0, 0, 1]
e = M.eigenvalues()
f = M.charpoly()
factor(f)
The last instruction raises a `NotImplementedError` as expected from the fact that `factor` is not defined on `SR`...
In my real problem I am computing characteristic polynomials of large (8x8) symbolic matrices and I would like to get at glance all the factors, so as to quickly isolate negative real roots and instead easily discuss conditions for existence and sign of symbolic ones.maurizioThu, 31 Jan 2019 18:26:46 +0100https://ask.sagemath.org/question/45249/