Ask Your Question

kevinfat's profile - activity

2023-05-11 09:58:59 +0200 received badge  Notable Question (source)
2023-01-09 18:18:07 +0200 received badge  Self-Learner (source)
2023-01-09 18:18:07 +0200 received badge  Teacher (source)
2023-01-09 18:18:07 +0200 received badge  Necromancer (source)
2023-01-08 21:41:02 +0200 marked best answer Cylindrical Algebraic Decomposition and connected components

From what I've read Sage has support for accessing QEPCAD which implements Cylindrical Algebraic Decomposition.

Given a collection of polynomial inequalities I would like to know if they define a single connected region or multiple regions. It looks to me that the Cylindrical Algebraic Decomposition can be used to determine that though I don't know how to get at that. Does QEPCAD support that question or do I need to understand a lot of details to implement that using QEPCAD?

2023-01-08 21:40:50 +0200 answered a question Cylindrical Algebraic Decomposition and connected components

So I figured out how to compile sage from source with qepcad. There is already a connectivity test in qepcad. For exampl

2023-01-08 21:37:53 +0200 marked best answer How to install qepcad?

I am running linux mint 21. I installed sage with sudo apt install sagemath and this installed sage 9.5. Then I tried sage -i qepcad and got the message

make: *** No rule to make target 'all-toolchain'. Stop.

2023-01-08 21:37:46 +0200 answered a question How to install qepcad?

Following the sage compilation instructions I was able to successfully compile sage with qepcad and verify that it worke

2023-01-08 21:35:48 +0200 received badge  Popular Question (source)
2022-12-06 04:52:25 +0200 asked a question How to install qepcad?

How to install qepcad? I am running linux mint 21. I installed sage with sudo apt install sagemath and this installed sa

2022-11-15 04:12:41 +0200 commented question Cylindrical Algebraic Decomposition and connected components

I don't think cells represent largest connected regions.

2022-11-13 23:26:21 +0200 asked a question Cylindrical Algebraic Decomposition and connected components

Cylindrical Algebraic Decomposition and connected components From what I've read Sage has support for accessing QEPCAD w

2022-10-10 10:51:10 +0200 received badge  Nice Question (source)
2022-10-04 03:35:57 +0200 marked best answer Finding minimal linearly dependent vectors

I have a matrix whose rows are linearly dependent. Showing that with sage is straightforward. Is there a reasonably fast algorithm to find a smallest set of rows that form such a linear dependence and would it be simple to implement in sage?

2022-10-04 03:35:54 +0200 commented answer Finding minimal linearly dependent vectors

Yah I was worried this might fall into the NP-complete issue.

2022-10-04 03:33:16 +0200 commented question Matrix kernel not shown when printed

great matrix() worked

2022-10-01 20:42:43 +0200 asked a question Matrix kernel not shown when printed

Matrix kernel not shown when printed I ran mat.kernel() and then tried to print it. That gave the following without show

2022-10-01 17:04:37 +0200 edited question Finding minimal linearly dependent vectors

Finding minimal linearly dependent vectors I have a matrix whose rows are linearly dependent. Showing that with sage is

2022-10-01 17:04:05 +0200 commented question Finding minimal linearly dependent vectors

These are vectors of real numbers.

2022-10-01 09:58:32 +0200 asked a question Finding minimal linearly dependent vectors

Finding minimal linearly dependent vectors I have a matrix whose rows are linearly dependent. Showing that with sage is

2022-10-01 09:37:57 +0200 marked best answer Get maximally linearly independent set of vectors

Given a matrix where each row represents a vector how can I find a set of maximally linearly independent vectors from the collection of vectors. I'm not looking for a echelon form from which I can get a representation for the span I want my representation of the span to only use the original vectors. Does Sage have functions to easily do this?

2022-10-01 00:11:28 +0200 asked a question Get maximally linearly independent set of vectors

Get maximally linearly independent set of vectors Given a matrix where each row represents a vector how can I find a set

2021-08-24 22:53:37 +0200 received badge  Notable Question (source)
2020-12-14 23:01:18 +0200 received badge  Famous Question (source)
2017-03-22 20:00:46 +0200 received badge  Notable Question (source)
2016-12-23 18:37:52 +0200 received badge  Popular Question (source)
2016-09-30 23:18:13 +0200 received badge  Popular Question (source)
2016-09-30 23:18:13 +0200 received badge  Notable Question (source)
2015-10-11 16:03:47 +0200 received badge  Popular Question (source)
2014-06-29 03:15:29 +0200 marked best answer System of polynomial inequalities

I heard that something called a Groebner Basis can be used to find the solutions of a system of polynomial equations like $p_1(x_1,\ldots,x_m)=0,\ldots,p_n(x_1,\ldots,x_m)=0$

Is there something analgous that can find solutions when inequalities are also involved such as

$$p_1(x_1,\ldots,x_m)=0,\ldots,p_n(x_1,\ldots,x_m)=0$$ $$q_1(x_1,\ldots,x_m)>0,\ldots,q_r(x_1,\ldots,x_m)>0$$

and is there a way to do this in Sage?

2013-05-31 00:50:59 +0200 asked a question Plotting random variables

Consider a probability space $(\Omega, F, P)$ where $\Omega$ is the sample space, $F$ is a borel field, and $P$ is a probability measure. Let $X_i$ be iid $N(0,1)$. Each random variable is a function $X_i:\Omega \to \mathbb{R}$.

How can I plot the graphs of the $X_i$? Specifically I mean consider $\Omega=[0,1]$ with $P$ being the usual Lebesgue measure. Then I would like to plot {$(w, X_i(w))| w\in \Omega=[0,1]$}. Plotting an individual $X_i$ could be considered just figuring out a function on $\Omega$ that maintains the condition of normality. That should be easily doable. But what about plotting a bunch of $X_i$'s all at once. Then the plots also need to respect the constraint that the $X_i$'s are independent. Is there some easy way to do this in Sage?

2013-04-09 22:50:08 +0200 marked best answer How to simplify expression with fractional exponents?

Do you mean something like this?

sage: var('a,e')
(a, e)
sage: p1 = (a+e^(1/3))
sage: p2 = e^(2/3)
sage: p1*p2
(a + e^(1/3))*e^(2/3)
sage: expand(_)
a*e^(2/3) + e
2013-04-09 21:24:12 +0200 asked a question How to simplify expression with fractional exponents?

Is there a way to have Sage recognize that e^(2/3) times e^(1/3) in the below will simplify to just the variable e. Is there a type that can handle this? Obviously using a PolynomialRing in the code below won't work.

R.<a,e> = PolynomialRing(QQ)
p1 = (a+e^(1/3))
p2 = e^(2/3)
p1*p2
2013-03-07 05:02:36 +0200 marked best answer System of polynomial inequalities

You can use the cylindirical algebraic decomposition (CAD) method to solve a system of polynomials with inequalities. Sage has an optional package for QEPCAD. See the output of

sage: qepcad?

and try

./sage -i qepcad

from the command line to install QEPCAD. Note that the version we have (1.50) is quite old. The latest version on the web site is 1.69.

2013-03-05 20:21:32 +0200 marked best answer How to print out Maxima commands being used by Sage?

Sage sets the domain of all variables to complex when initializing Maxima. You can get the same result as Sage by doing this manually on the Maxima prompt:

$ ./sage -maxima
;;; Loading #P"/home/burcin/sage/sage-5.5.rc0/local/lib/ecl/sb-bsd-sockets.fas"
;;; Loading #P"/home/burcin/sage/sage-5.5.rc0/local/lib/ecl/sockets.fas"
;;; Loading #P"/home/burcin/sage/sage-5.5.rc0/local/lib/ecl/defsystem.fas"
;;; Loading #P"/home/burcin/sage/sage-5.5.rc0/local/lib/ecl/cmp.fas"
Maxima 5.26.0 http://maxima.sourceforge.net
using Lisp ECL 11.1.1
Distributed under the GNU Public License. See the file COPYING.
Dedicated to the memory of William Schelter.
The function bug_report() provides bug reporting information.
(%i1) domain: complex;
(%o1)                               complex
(%i2) load(fourier_elim);
(%o2) /home/burcin/sage/sage-5.5.rc0/local/share/maxima/5.26.0/share/contrib/f\
ourier_elim/fourier_elim.lisp
(%i3) fourier_elim([x^2*y^2 <= x^2*y, x^2*y^2 > x^2*y],[x,y]);
(%o3)           [x = 0, 1 < y, 0 # 0] or [x = 0, y < 0, 0 # 0]

If you want to take a look at the code, Maxima initialization is done at the beginning of sage/interfaces/maxima_lib.py. Line 141 has the default options set by Sage.

2013-03-05 20:21:32 +0200 received badge  Scholar (source)
2013-03-05 05:54:44 +0200 received badge  Editor (source)
2013-03-05 04:52:39 +0200 asked a question How to print out Maxima commands being used by Sage?

The documentation says that solve_ineq is implemented with Maxima fourier_elim. I am trying to figure out why the output below of Sage and Maxima are different. Is there a way I can have Sage print out the exact Maxima commands it issued to try to understand why I'm not getting the same result as from Using Maxima directly?

sage: x,y = var('x,y')
sage: solve_ineq([x^2*y^2 <= x^2*y, x^2*y^2 > x^2*y],[x,y])
[[x == 0, 1 < y, 0 != 0], [x == 0, y < 0, 0 != 0]]

(%i1) load(fourier_elim);
(%i2) fourier_elim([x^2*y^2 <= x^2*y, x^2*y^2 > x^2*y],[x,y]);
(%o2)                              emptyset
2012-12-03 04:11:56 +0200 received badge  Student (source)