2022-11-14 01:51:20 +0100 received badge ● Popular Question (source) 2022-10-10 08:58:33 +0100 received badge ● Good Question (source) 2022-08-12 12:40:22 +0100 marked best answer Submatrix of a given matrix by deleting some rows and columns(For my case 2 rows and columns). I have a matrix A of order $n\times n$. Now I need another matrix B whose (i,j)th entry is $det A(i,j)$, where $det A(i,j)$ denote the determinant of the sub matrix of A formed by deleting $i^{th}$ and $j^{th}$ rows and columns. I'm unable to generate the submatrices $A(i,j)$ for every element at a time. 2022-08-12 12:40:19 +0100 received badge ● Nice Question (source) 2022-04-25 23:55:50 +0100 received badge ● Popular Question (source) 2022-04-25 23:55:50 +0100 received badge ● Notable Question (source) 2021-11-29 08:42:29 +0100 received badge ● Popular Question (source) 2021-11-29 08:42:29 +0100 received badge ● Notable Question (source) 2021-11-26 00:40:14 +0100 received badge ● Popular Question (source) 2021-05-18 02:02:03 +0100 received badge ● Notable Question (source) 2021-03-25 08:38:21 +0100 received badge ● Popular Question (source) 2021-03-25 08:38:21 +0100 received badge ● Notable Question (source) 2021-01-28 22:15:20 +0100 received badge ● Famous Question (source) 2020-12-09 04:03:42 +0100 received badge ● Notable Question (source) 2020-10-09 00:37:53 +0100 received badge ● Notable Question (source) 2020-10-09 00:37:53 +0100 received badge ● Famous Question (source) 2020-05-13 19:44:31 +0100 received badge ● Popular Question (source) 2020-02-23 16:23:33 +0100 received badge ● Notable Question (source) 2019-12-30 07:24:53 +0100 received badge ● Notable Question (source) 2019-06-22 17:30:31 +0100 received badge ● Popular Question (source) 2019-06-10 15:58:02 +0100 received badge ● Nice Question (source) 2019-06-08 06:16:55 +0100 received badge ● Notable Question (source) 2019-05-01 01:25:57 +0100 received badge ● Popular Question (source) 2019-04-23 15:41:06 +0100 received badge ● Nice Question (source) 2019-04-23 15:09:51 +0100 received badge ● Popular Question (source) 2018-08-17 21:02:53 +0100 received badge ● Popular Question (source) 2018-07-25 13:48:40 +0100 asked a question Smallest positive numerical solution of an equation in one variable I have some functions, all of which are functions of variable $x$ but some of them may not have any positive solutions. It is known that at least one of them have a positive solution. Now I need a list of all smallest positive solutions for those functions. For example consider $f=x^2+3x+2$ and $g=2^{(5x + 1)} - 3.2^{(3x + 1)}$. Here $f$ doesn't have any positive root but $g$ has (0.792481250360578). I want a sage code like min(solve([f,x>1],x))+min(solve([g,x>1],x)) to get the list as [0.792481250360578]. Thank you in advance. 2018-07-25 08:39:42 +0100 commented answer Optimizing a function of a given matrix Thank you for your solution. It works with that particular matrix. But it doesn't work for all matrices. For example consider $$A=\left(\begin{array}{rrrrr} 0 & 2^{x} & 1 & 1 & 1 \ 2^{x} & 0 & 1 & 1 & 1 \ 1 & 1 & 0 & 2^{x} & 2^{x} \ 1 & 1 & 2^{x} & 0 & 2^{x} \ 1 & 1 & 2^{x} & 2^{x} & 0 \end{array}\right)$$ or $$A=\left(\begin{array}{rrrr} 0 & 1 & 2^{x} & 1 \ 1 & 0 & 1 & 2^{x} \ 2^{x} & 1 & 0 & 1 \ 1 & 2^{x} & 1 & 0 \end{array}\right)$$ Here I get an error "cannot evaluate symbolic expression numerically" Note: For all my matrices, it is known that the solution is at most equal to 2. So if something like min(find_root(X,0,2)+find_root(Y,0,2)) could be used, that is also enough for me. 2018-07-25 05:49:07 +0100 commented answer Optimizing a function of a given matrix Actually, I was stuck at this step. I tried the code "solve" to solve the two systems, but I don't get numerical value from this. Again I tried "find_root" code with the interval but one of the systems (First one) does not have a solution, and so it gives a long list of errors. Therefore I cannot evaluate the minimum of all solutions (min() doesn't work). For this particular matrix, I can find it by direct calculation. But what I need a general method to get my required (numerical value) whenever I input a matrix as a function of $x$. I need something like this X=det(A); Y=sum((~A).list()); S=solve([X,x>0],x); T=solve([Y,x>0],x); min(S+T) This doesn't give me numerical value. Note the last step, I want sage to calculate the minimum value of the ... 2018-07-24 03:12:25 +0100 received badge ● Famous Question (source) 2018-07-24 03:12:25 +0100 received badge ● Notable Question (source) 2018-07-23 16:50:52 +0100 asked a question Optimizing a function of a given matrix Let us consider the $4\times 4$ symmetric matrix $$A_x=\left(\begin{array}{rrrr} 0 & 1 & 1 & 1 \ 1 & 0 & 2^x & 2^x \ 1 & 2^x & 0 & 2^x \ 1 & 2^x & 2^x & 0 \end{array}\right)$$ Here I need to find $\min { x>0: det(A_x)=0 \, or \, ||A_x^{-1}||=0 } ,$ where by $||M||$ we mean the sum of all entries of the matrix $M.$ I'm looking for a general sage program where my input will be a matrix with entries as functions of an inderminant (like the matrix $A_x$ above) which will give me the unique $x$ corresponding to my matrix. If no such real value exists, it should result as $\infty$ Can anyone help me? Thank you in advance. 2018-07-23 07:12:52 +0100 commented question Optimal solution Let us consider the $4\times 4$ symmetric matrix $$A_x=\left(\begin{array}{rrrr} 0 & 1 & 1 & 1 \\ 1 & 0 & 2^x & 2^x \\ 1 & 2^x & 0 & 2^x \\ 1 & 2^x & 2^x & 0 \end{array}\right)$$ Here I need to find $\min { x>0: det(A_x)=0 \, or \, ||A_x^{-1}||=0 } ,$ where by $||M||$ we mean the sum of all entries of the matrix $M.$ If anyone helps me solving this problem using sage, this will be enough for me. Thank you 2018-07-23 06:56:51 +0100 commented question Optimal solution Most of my functions are not rationals., For example, I have some functions like $f(x)=4.12^x-4.9^x-7.8^x+8.4^x+8.3^x-4.$ Can you please write a program that works for the two functions that I have mentioned? 2018-07-22 18:24:45 +0100 commented question Optimal solution Actually, I need to check different kinds of functions. So I need a sage program where I can input any kind of such functions to get the result. Simply you can consider $f(x)=x^3-2x^2-2x+4.$ But a general sage program will be more helpful. Thank you. 2018-07-22 11:49:39 +0100 asked a question Optimal solution If $f(x)$ is a given real valued function, then how to find the minimum value of $x>0$ such that either $\frac{1}{f(x)}>5$ or $f(x)=0.$ If no such $x$ exist then it should return $\infty$ as output. If anyone write the sage code for me by considering any real valued function it would be helpful for me. Thank you in advance. 2018-07-06 17:16:00 +0100 received badge ● Popular Question (source)