2020-02-22 17:10:38 -0600 | commented question | "how to test if two matrices are similar by a signed permutation matrix" code sage What are the entries of the matrices? Real numbers or integers or? |
2020-02-21 10:10:11 -0600 | received badge | ● Nice Answer (source) |
2020-02-20 15:11:53 -0600 | received badge | ● Nice Answer (source) |
2020-02-20 09:16:36 -0600 | answered a question | Error in calling a custom function from sage When you create a Python module and you want to use external code (such as So you have to find out where Adding this line to the top of your module will fix your problem. (By the way, there is already a |
2020-02-19 15:44:00 -0600 | answered a question | continuous Fourier transform At least you can always take a naive numerical approach: Output: |
2020-02-19 11:31:26 -0600 | commented answer | Why doesn't show() render latex properly? Are you using a variable called |
2020-02-19 09:33:27 -0600 | commented answer | Why doesn't show() render latex properly? Surely if you run only that, there should be no error. What code do you run before that? |
2020-02-19 08:46:55 -0600 | commented answer | Why doesn't show() render latex properly? What code do you use as input, exactly? |
2020-02-19 08:40:55 -0600 | commented answer | Why doesn't show() render latex properly? What is the error? |
2020-02-19 08:38:28 -0600 | received badge | ● Nice Answer (source) |
2020-02-19 08:09:38 -0600 | answered a question | Unexpected result from r.quantile function According to the documentation of |
2020-02-19 06:56:08 -0600 | answered a question | Why doesn't show() render latex properly? I don't know how it used to work, but the way I understand it is that NumPy's matrix type is not a SageMath data type, so it doesn't support SageMath's latex rendering (in particular, it doesn't have a So just convert to a SageMath data type first: $$\left(\begin{array}{rrrr} 0 & 0 & 20 & 20 \\ 0 & 20 & 20 & 0 \end{array}\right)$$ |
2020-02-19 06:49:45 -0600 | answered a question | Displaying Chessboard Graphs The range $[0,1,2]$ is obtained by Your You can also use |
2020-02-18 18:26:43 -0600 | commented question | How do I solve a vector valued equation? Do you mean you want to substitute $t=0$ into $r(t)$? What have you tried? |
2020-02-18 15:50:58 -0600 | answered a question | intersection of two free submodules SageMath uses Singular for this, and Singular can compute intersections of modules over polynomial rings. I don't think this functionality has been exposed to SageMath, but we can easily do that ourselves: Then we can do: Indeed, this single generator lies in the intersection: |
2020-02-18 07:03:42 -0600 | commented question | Isogeny from Two Curves |
2020-02-16 14:25:00 -0600 | received badge | ● Good Answer (source) |
2020-02-16 13:07:25 -0600 | received badge | ● Nice Answer (source) |
2020-02-16 11:47:03 -0600 | received badge | ● Good Answer (source) |
2020-02-16 09:12:14 -0600 | answered a question | meta-question: post formatting You can create a code block by indenting the code by four spaces. A fast way to do this is to select the code and press the There is no quote button which copies the source of an existing post. When you get enough karma you will be able to edit other people's posts, which allows you to see (and copy) the source for easier quoting. |
2020-02-16 05:42:15 -0600 | answered a question | <symbolic matrix>.simplify_rational() accepts no keywords? These are two different methods, with the same name, on different classes (symbolic expressions and symbolic dense matrices respectively). The documentation for the matrix method does not mention keyword arguments, and indeed none are accepted, as you have seen. As an alternative you can apply the symbolic expression method to each entry: It would be nice if the matrix method accepted the same arguments. If you want, someone could open an enhancement ticket on trac. |
2020-02-16 05:02:10 -0600 | received badge | ● Nice Answer (source) |
2020-02-15 05:29:47 -0600 | answered a question | I'm having trouble plotting this population differential equation with five particular solutions all on the same graph. Please help. You can sum the plots: For a better picture, you can change the colors of the individual solutions, e.g.: Personally I would also change it to plot until time 3 or so instead of 10, and then use |
2020-02-14 16:26:28 -0600 | answered a question | Can't substitute H=dot(a)/a in SageMath I hope you appreciate that this is not such a simple operation to perform in general. The simplest way is probably to replace $\dot{a}$ by $Ha$. We can use the class I gave as an answer to Substituting a differential equation into an expression: This also works when there are second or mixed derivatives, e.g.: |
2020-02-14 16:18:57 -0600 | edited answer | Substituting a differential equation into an expression This is tricky, but it can be done. The idea is to replace (in the expression tree) derivatives of $f$ (with at least one derivative with respect to $t$) by the right-hand side of the equation, substituted into itself as many times as there are derivatives with respect to $t$ minus one, and finally replacing $f$ by the derivative of $f$ with respect to the remaining variables (if any). My attempt to implement this (based on Edit: updated to use |
2020-02-14 03:29:29 -0600 | received badge | ● Nice Answer (source) |
2020-02-13 16:21:28 -0600 | commented question | Please include all the codes for solving this problem. It's advisable not to blatently tell people to do your work. SageMath won't help you write down the differential equation for a given word problem (yet), you have to do that part yourself. Solving and plotting can be done, there are examples of it in the documentation. What have you tried? |
2020-02-13 04:14:15 -0600 | answered a question | Acess bracked elements in free lie algebra element? There seems to be room for improvement in the design here. Basis elements apparently have the same parent as ordinary elements, and From the source code, accessed by You may want to discuss this on sage-devel. |
2020-02-13 03:34:31 -0600 | answered a question | Lie bracket of derivations over polynomial ring You can do it like this: Output: You can pass |
2020-02-12 03:52:50 -0600 | commented answer | Error while creating augmented matrix: TypeError: unable to convert a to an integer Personally I learned it from lecture notes in Dutch, but I also liked A Book of Abstract Algebra by Pinter. Like most books on abstract algebra it starts with groups and takes a while to get to rings. An example of a "rings first" book is Abstract Algebra: A Geometric Approach by Shifrin; it looks nice but I haven't read it. |
2020-02-12 03:04:08 -0600 | commented answer | Error while creating augmented matrix: TypeError: unable to convert a to an integer You could start at the Simple English Wikipedia: https://simple.wikipedia.org/wiki/Rin... |
2020-02-12 01:54:44 -0600 | answered a question | Error while creating augmented matrix: TypeError: unable to convert a to an integer When you defined the matrix The solution is to always specify the base ring, like You can also change the base ring later, e.g. |
2020-02-11 17:17:16 -0600 | answered a question | How to rewrite multivariate polynomial as polynomial on one variable? For this purpose it is more convenient to work in a polynomial ring than in the symbolic ring: Or, avoiding the symbolic ring altogether: You can go back from a polynomial ring element |
2020-02-09 11:51:47 -0600 | commented question | Failing to add a script to sage Looks like the authors forgot to list some dependencies. Here is one possibility: OrderData. Probably your question is better addressed to the authors. |
2020-02-08 06:13:02 -0600 | answered a question | Tensor Product of Quotient Rings The two quotient rings are coordinate rings of affine varieties. The tensor product of coordinate rings is the coordinate ring of the product variety (under some assumptions). You can construct it like this: The object you want is There are maps from I used different names for the generators in Here |
2020-02-07 11:55:46 -0600 | received badge | ● Nice Answer (source) |
2020-02-07 03:08:51 -0600 | answered a question | Find order of an Elliptic Curve over Gaussian Integer While the quotient you constructed is a valid object, it seems to be not the optimal way to construct the respective mathematical object. Apparently, general It outputs: as you predicted. Alternatively, making use of the third isomorphism theorem: This is possibly even faster. |
2020-02-05 13:25:48 -0600 | commented answer | Sagemath 9.0 Markdown inconsistency Cocalc vs. Local @eric_g conversely, I posted my comment without seeing yours :) |
2020-02-05 13:24:50 -0600 | commented answer | Sagemath 9.0 Markdown inconsistency Cocalc vs. Local On cocalc.com if you go to Help → About, it reads:
So they are not the same. |
2020-02-05 13:10:27 -0600 | answered a question | Sagemath 9.0 Markdown inconsistency Cocalc vs. Local This is a bug in Jupyter: #4259 Markdown broken for single-character bold and italics. Hopefully it will be fixed there (although it doesn't seem to be a priority), so eventually the fix will be in SageMath as well. For now, a workaround is to write 'three' instead of '3' :) Another idea is to try JupyterLab, where the respective issue is fixed. |
2020-02-05 08:40:28 -0600 | commented question | Weighted adjacency matrix of a graph. Probably you should create a |
2020-02-04 17:34:29 -0600 | answered a question | How are symbolic derivatives composed in quaternions? Let me summarize the comments: 1) Use symbolic functions, e.g.: 2) Do the LaTeX yourself (for now), e.g. like this: Of course this can be improved (draw parentheses only if necessary, skip zeros, extract signs, etc.) The documentation of 3) Issue #6183 Quaternion algebra latexification has been open for 11 years. If you want to revive it, you could bring it up (with or without patch) on sage-devel. The old patch linked in the issue also has the start of a |
2020-02-04 17:18:18 -0600 | commented question | How are symbolic derivatives composed in quaternions? Issue #6183 Quaternion algebra latexification has been open for 11 years :) If you want to revive it, you could bring it up (with or without patch) on sage-devel. The old patch linked in the issue also has the start of a |