2023-08-06 11:26:44 +0200 | received badge | ● Notable Question (source) |
2022-07-04 09:09:10 +0200 | received badge | ● Famous Question (source) |
2019-11-26 20:57:26 +0200 | received badge | ● Notable Question (source) |
2018-03-17 01:06:43 +0200 | received badge | ● Popular Question (source) |
2015-10-11 22:55:32 +0200 | received badge | ● Famous Question (source) |
2014-06-29 03:14:50 +0200 | marked best answer | block_matrix confusion (matrix constructor rewrite in new versions of Sage) Solved - My mistake - I was running an older version 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-29 03:14:50 +0200 | 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-29 03:14:49 +0200 | 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-29 03:14:49 +0200 | 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-29 03:14:47 +0200 | 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-29 03:14:47 +0200 | 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-25 06:10:03 +0200 | received badge | ● Popular Question (source) |
2013-09-30 20:59:31 +0200 | received badge | ● Famous Question (source) |
2013-08-02 20:34:36 +0200 | received badge | ● Notable Question (source) |
2013-05-20 02:56:00 +0200 | received badge | ● Famous Question (source) |
2013-04-07 03:33:32 +0200 | received badge | ● Great Question (source) |
2013-01-01 18:44:19 +0200 | received badge | ● Famous Question (source) |
2012-11-27 10:57:58 +0200 | 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 12:16:28 +0200 | 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 12:10:02 +0200 | 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 17:14:51 +0200 | received badge | ● Notable Question (source) |
2012-04-05 16:47:25 +0200 | received badge | ● Popular Question (source) |
2012-03-25 20:11:31 +0200 | received badge | ● Notable Question (source) |
2012-03-16 15:15:50 +0200 | received badge | ● Notable Question (source) |
2012-01-16 15:07:30 +0200 | 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 15:05:08 +0200 | 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 12:35:01 +0200 | 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 18:48:19 +0200 | received badge | ● Popular Question (source) |
2011-10-04 08:36:05 +0200 | received badge | ● Popular Question (source) |
2011-09-24 23:19:34 +0200 | 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. |