2019-03-19 16:47:52 -0500 | answered a question | Converting real numbers to rational format Write |

2019-03-19 10:25:50 -0500 | commented question | Major index of skew-SYT Can you give a reference to a (mathematical) definition? |

2019-03-18 13:16:58 -0500 | answered a question | Set a REAL function in SAGE A simple alternative to 'setting it to be real' is to make a substitution such as this one: It depends on what kind of expressions you want to get rid of. |

2019-03-17 17:29:43 -0500 | answered a question | Factoring modulo prime ideal Nonzero prime ideals in a Dedekind domain – such as $\mathfrak{p} = (1-\sqrt{-2})$ in $O_K$ – are maximal, so the quotient is a field, called the residue field in Sage: Then you can factor polynomials over $O_K/\mathfrak{p}$, e.g. as follows: You can also lift the factorization and double-check the result (e.g. for fun): |

2019-03-16 04:11:56 -0500 | commented answer | transformation matrix for variable matrix of given jordan type You're welcome! :) |

2019-03-14 09:25:34 -0500 | marked best answer | Free nilpotent Lie algebra of step 3 with 11 generators This works: and this works: but this doesn't work: though it should? Traceback: |

2019-03-14 09:25:34 -0500 | received badge | ● Scholar (source) |

2019-03-14 09:25:29 -0500 | edited answer | Free nilpotent Lie algebra of step 3 with 11 generators This has been submitted as trac ticket #27018 and subsequently it was fixed. |

2019-03-13 12:39:43 -0500 | answered a question | multiplicity of a point in a scheme Yes, this is a bug. Typing As a temporary workaround I guess you can add a variable and set it to zero: |

2019-03-12 11:21:52 -0500 | received badge | ● Nice Answer (source) |

2019-03-12 04:11:26 -0500 | answered a question | How to compute the sums of squares of elements of a quotient ring? You can do it like this (also simplifying the notation a bit): We can explain the result (for this choice of $f$) as follows: $p(i) = a+bi$ implies $p(i)^2 = a^2 - b^2 + 2abi$ and the sum runs over all $a$ and $b$, so the "real part" of the sum is $$\sum_{a,b} a^2 - b^2 = \sum_a a^2 - \sum_b b^2 = 0,$$ and the "imaginary part" is $$\sum_{a,b} 2ab = \sum_{a,b} ab + \sum_{a,b} ab = \sum_{a,b} ab + \sum_{a,b} (-a)b = \sum_{a,b} ab - ab = 0.$$ |

2019-03-11 13:17:22 -0500 | commented question | Evaluating a derivative of an unknown function This does not quite do what you're asking, but is close: |

2019-03-09 05:24:34 -0500 | commented question | transformation matrix for variable matrix of given jordan type The quotient ring is not so nice because it has zero divisors, but see my answer below. |

2019-03-09 05:19:51 -0500 | answered a question | transformation matrix for variable matrix of given jordan type We can set up the problem as follows: A necessary condition for $gAg^{-1} = J$ is that the rank of $A^k$ equals the rank of $J^k$ for $1 \leq k < n$. (And since $A$ has all zeros as eigenvalues, this will give the right Jordan type.) In particular it is necessary that the $(\operatorname{rank}(J^k)+1)$-minors of $A^k$ vanish; these are polynomial equations upon the coefficients of $A$: We can solve these equations symbolically, substitute a solution into $A$, change to an exact ring (the fraction field of the polynomial ring in the new variables), calculate the Jordan form (to be sure), and change the names of the variables back to the originals where possible: Output: Beware that this assumes Sage can solve the polynomial equations symbolically, which may not be true for large |

2019-03-07 10:17:48 -0500 | answered a question | Cannot solve differential equation (Lane-Emden equation) numerically I don't know how to fix that code, but as an alternative you can use desolve_system_rk4: To plot To plot the curve in the ( The vector field only makes sense when |

2019-03-07 04:46:06 -0500 | commented answer | Graphs having highest second smallest laplacian eigen value from a collection You're welcome. You can vote and accept using the buttons to the left of the answer. |

2019-03-06 01:45:34 -0500 | commented answer | Graphs having highest second smallest laplacian eigen value from a collection |

2019-03-05 11:27:22 -0500 | answered a question | Obtaining integers from a linear extension of a poset. This is not my field, but it seems you can do |

2019-03-05 10:00:57 -0500 | answered a question | Summation of simbolic variables As part of the symbolic summation you are trying to access e.g. So instead of e.g. it should be e.g. Note also that you can do things like to save yourself some typing. |

2019-03-05 06:58:54 -0500 | commented answer | Graphs having highest second smallest laplacian eigen value from a collection Why do you say it's not correct? When I run |

2019-03-05 03:13:06 -0500 | edited question | Linear code over a finite ring The command works well on a Finite Field |

2019-03-04 03:48:50 -0500 | answered a question | Graphs having highest second smallest laplacian eigen value from a collection For convenience we can define Then we can obtain at once But this assumes there is only one maximum. If we want to be more on the safe side: Output: |

2019-03-03 16:50:12 -0500 | answered a question | What software does Sage use to solve linear equations ? From the documentation of Sage uses Maxima by default. Also, more precisely, the source code of So try Maxima's |

2019-03-03 06:49:44 -0500 | received badge | ● Good Answer (source) |

2019-03-03 03:37:38 -0500 | commented question | transformation matrix for variable matrix of given jordan type An alternative approach is to write $A = g^{-1}Jg$ with $g$ symbolic, and solve for $g$ such that $A$ is strictly upper triangular ($n(n+1)/2$ polynomial equations for the $n^2$ entries of $g$). Would that suffice, or not? What quotient ring did you want to work in? |

2019-03-03 03:13:26 -0500 | received badge | ● Nice Answer (source) |

2019-03-03 02:40:48 -0500 | answered a question | Iterator: amazing behavior The generator is defined correctly, but you're not using it in the right way. Expression Instead, you should create it once, and then call |

2019-03-02 07:01:08 -0500 | commented question | transformation matrix for variable matrix of given jordan type Can you give a more explicit example? |

2019-03-02 01:41:50 -0500 | received badge | ● Nice Answer (source) |

2019-03-01 10:38:40 -0500 | answered a question | Please can you advise how I can account allocate nominal account codes This forum is for questions about the SageMath mathematics software, not the Sage accounting software. For questions about the accounting software, see e.g. their support page. |

2019-03-01 04:40:15 -0500 | received badge | ● Nice Answer (source) |

2019-02-28 17:17:39 -0500 | commented answer | Eigenvalues over symbolic ring You're welcome! Yes, the characteristic polynomial can be computed in either ring, and The matrix This is a special case where there are no variables; then one should factor over $\mathbb{Q}$ instead of a polynomial ring. The polynomial won't factor in this case, and the subsequent attempt at a symbolic solution also won ... (more) |

2019-02-28 15:38:58 -0500 | answered a question | Eigenvalues over symbolic ring You can change the base ring of the matrix to the ring of rational functions (as you did), factor the characteristic polynomial, and set the factors equal to zero symbolically again (and solve). This runs in 33 seconds on my machine. The result is Maybe an algorithm like this could be included into Sage in the future. (The hard part is to detect when this can be applied.) |

2019-02-28 11:01:30 -0500 | received badge | ● Good Answer (source) |

2019-02-28 06:19:05 -0500 | received badge | ● Nice Answer (source) |

2019-02-28 04:53:27 -0500 | received badge | ● Nice Answer (source) |

Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.