2018-03-16 19:06:43 -0500 | received badge | ● Popular Question (source) |

2015-10-11 15:55:32 -0500 | received badge | ● Famous Question (source) |

2014-06-28 20:14:50 -0500 | marked best answer | block_matrix confusion (matrix constructor rewrite in new versions of Sage)
I'm having trouble making use of the block_matrix function. I can't even recreate simple examples from the block_matrix documentation, for example I receive the error "Must specify rows or cols for non-square block matrix." When I attempt to set those dimensions I continue to get errors. (My actual application of this is a bit more complicated, but the dimensions all work out. And I have used block_matrix in another program with symbolic entries. I must have gotten lucky.) I did not import numpy, I did not believe it was necessary. But there's no difference when I do. Thanks in advance to this magnificent community of sage-masters. Edit: I have an old version of Sage (4.4). I should have run |

2014-06-28 20:14:50 -0500 | marked best answer | Large symbolic determinant I have a dense matrix with symbolic variable entries. I am interested in the equation that describes when the matrix is singular. So I have been having Sage compute the determinant of this matrix and set it equal to zero, and return this expression (a polynomial in several variables). However when the dimensions get larger (around 9 variables) Sage is taking an incredibly long amount of time to do it. (My program has to perform a number of other tasks as well, the determinant seems to be taking up all the run-time.) Is there any way I can speed up this kind of computation? |

2014-06-28 20:14:49 -0500 | marked best answer | Finding roots of complex functions This could be a Maxima question as it relates to find_root, find_minimum_on_interval, etc. When I try to find the root of a function involving
For example, |

2014-06-28 20:14:49 -0500 | marked best answer | Method for solving a large system of under-determined equations? I am trying to parametrize and find a family of solutions to some equations. (I am using the Here is a (partial) particular example that I had in mind. My real equation is actually a bit more complicated. But this is a point where it went from solving to simply spitting out the original equations. Here is the output: Is there anything I can do? I've read the solve and x.solve pages, but I don't see a clear method I should try... =========== Edit: I'm looking for the simplest representation of this system of equations. I would like Sage to parametrize a few of the variables and solve for the others. For instance, a linear system example would be the following: Sage can do this using the In essence I want it to "solve" the system of equations. Clearly this requires a few parameters, since there are more variables than equations... and since it's not a linear system I can't just ask a linear algebra student to do it. ;-) |

2014-06-28 20:14:47 -0500 | marked best answer | Solve() confusion... I've been experimenting with the Can someone explain what is going on in the following code and output? The result: |

2014-06-28 20:14:47 -0500 | marked best answer | A list of symbolic variables Hello, I'm new to sage so I hope that I'm asking a very basic question. I'm trying to create a list of symbolic variables. I would like to be able to set the number of variables initially and then let sage create the list. I was (sort of) able to achieve this when I realized that the input for
In my context, the variables are actually real, and they satisfy a system of equations that I would also like sage to produce. By playing with strings, and then using But when I run for loops indexed by i I can never seem to actually refer to the variables indexed by i. For example, the following will not make sense to sage:
The only way I can think to achieve the above result is to create a string with a for loop that states the command I want, turn it into an expression, save it as an equation, and then include it in a big list of equations. Even so, I can't index the equations by i either, so I can't create the 2*n equations that I would need... I have to do a lot more with these variables, so I hope someone can tell me what I am doing terribly wrong. The first thing I want to do is create a second list, w, defined as: $w_k = s_{2n-k}$ |

2014-01-24 23:10:03 -0500 | received badge | ● Popular Question (source) |

2013-09-30 13:59:31 -0500 | received badge | ● Famous Question (source) |

2013-08-02 13:34:36 -0500 | received badge | ● Notable Question (source) |

2013-05-19 19:56:00 -0500 | received badge | ● Famous Question (source) |

2013-04-06 20:33:32 -0500 | received badge | ● Great Question (source) |

2013-01-01 11:44:19 -0500 | received badge | ● Famous Question (source) |

2012-11-27 03:57:58 -0500 | marked best answer | A list of symbolic variables You're pretty close! The problem as you've noted is that "s_i" merely "s_i"; there's no rule that says that the parts of (would-be) variable names after underscores get interpolated in this way. Here's how I'd do it, assuming I've understood you correctly: Note that I had to put a -1 in there to get the relations I think you were aiming at. If I've misunderstood it's easy to change. |

2012-11-03 06:16:28 -0500 | commented question | Solve equations integrally If it were a polynomial in one variable you could use roots() and tell it to consider the integers ZZ. (e.g. http://ask.sagemath.org/question/66/how-to-get-all-numerical-solutions-of-an-equation ) |

2012-11-03 06:10:02 -0500 | commented question | Solve equations integrally I don't believe Sage can do what you're asking, at least not out of the box without you coming up with your own algorithm. There are a few questions about this already, but I think this is the best explanation is here: http://ask.sagemath.org/question/790/finding-integer-solutions-to-systems-of-polynomial |

2012-05-08 10:14:51 -0500 | received badge | ● Notable Question (source) |

2012-04-05 09:47:25 -0500 | received badge | ● Popular Question (source) |

2012-03-25 13:11:31 -0500 | received badge | ● Notable Question (source) |

2012-03-16 09:15:50 -0500 | received badge | ● Notable Question (source) |

2012-01-16 08:07:30 -0500 | commented answer | "New Worksheet" opens current worksheet and erases name Yes, it was a cache issue! I don't understand why. Thanks kcrisman! I cleared the cache in my browser and I can create new worksheets again. |

2012-01-16 08:05:08 -0500 | commented answer | "New Worksheet" opens current worksheet and erases name Oh, I just meant that installing Sage via the package installer on Mandriva gives you Sage 4.4. I installed Sage 4.7 myself after I realized this wavelet module (pywavelets) wasn't working correctly. But I haven't cut ties with 4.4 completely. I use 4.7 if I remember to. :) |

2012-01-14 05:35:01 -0500 | answered a question | "New Worksheet" opens current worksheet and erases name Sage 4.4 and Sage 4.7 under Firefox 9.0.1 is doing something similar to me right now. Whenever I hit 'new worksheet' it just pulls up the last worksheet I created. I tried updating Firefox but it hasn't helped. I'm using Mandriva Linux 2010, which for some reason wants to use Sage 4.4 by default. But both are giving me this issue... Am I only allowed to have 20 worksheets or something? |

2011-11-26 11:48:19 -0500 | received badge | ● Popular Question (source) |

2011-10-04 01:36:05 -0500 | received badge | ● Popular Question (source) |

2011-09-24 16:19:34 -0500 | marked best answer | Method for solving a large system of under-determined equations? There is no closed form for the roots of a polynomial in general. So we'll have to assume that you can somehow compute roots. One nice trick to get a parametrization is to compute a Groebner basis in lexicographic order. You need to put your parameters last in the order of variables. Say, These are two (random) polynomial equations in three variables, so we expect the solution to be a curve. Indeed, it is: It is also an irreducible curve, that is, not two curves that are disjoint or intersect in a point: The Groebner basis in the given lexicographic order is: The last variable (in the lexicographic order) is z, which we take to be the parameter. The second equation in the Groebner basis depends only on y and z, so if you plug in a value for z then it is a polynomial equation in a single variable. Solving this univariate polynomial equation yields multiple (in this case, two) solutions for y. Then plug y,z into the first equation of the Groebner basis. You get one polynomial equation in x, which you have to solve again. Hence, you have determined y(z) and x(y(z),z), that is, parametrized your curve by z. |

2011-09-13 07:08:58 -0500 | marked best answer | Solve() confusion... Let's look one by one. Looks good - no equations, so any complex number (hence the Hmm, this must be an artifact of the difference between single-variable and multivariable solve. Here Maxima gives us a Seems fine except for the real versus complex issue. Ditto. Huh, a tuple. I wonder if this is giving multiplicity of this solution? That This seems fine. Still, I agree that there isn't 100% uniformity here, so I'm opening Trac 10750 to track this issue. |

2011-08-26 01:34:03 -0500 | received badge | ● Popular Question (source) |

2011-07-20 06:04:07 -0500 | asked a question | WaveletPacket - wp['a'] vs wp.a I'm having trouble using pywt.WaveletPacket. The documentation and examples at http://www.pybytes.com/pywavelets/reg... are not helping me very much. This may be more of a lack of understanding python. For example after repeating these first few steps: The documentation suggests accessing different levels by typing but for me this results in gibberish. I am able to access the first level of decomposition by typing However, I cannot access levels higher than this, only level 0 (print wp - which returns the original data in x) and level 1 (using wp.a or wp.d). In short, wp['a'] seems to be a completely different object from wp.a, and I cannot access higher level data, which I suspect is there, because outputs 3, as it should in this case. ==== update ==== As I am writing this question out, I just now realized I can access the higher level data by typing for example. Which is fairly intuitive. But what is the difference between wp['a'] and wp.a? Is the documentation simply incorrect? I apologize if this is more of a python question and not so much a sage question. |

2011-04-02 15:52:31 -0500 | marked best answer | block_matrix confusion (matrix constructor rewrite in new versions of Sage) This works for me in 4.6.2: Previously I think you had to write or at least you did back in 4.5.1, and it looks like the constructor was rewritten not so long ago. Check your block_matrix's help.. or upgrade, I guess. :^) |

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.