ASKSAGE: Sage Q&A Forum - Latest question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Wed, 03 Dec 2014 18:07:57 -0600Solving systems of equations always returns [ ]http://ask.sagemath.org/question/25105/solving-systems-of-equations-always-returns/Suppose I have the set of equations and I'm trying to solve for f1, f2 and f3:
![formula][1]
[1]: http://latex.codecogs.com/gif.latex?f_1%20%26%3D%26%20a+b+f_2%20%5C%5C%202f_2%20%26%3D%26%20c+d+f_1%20%5C%5C%20f_3%20%26%3D%26%20f_1+f_2
I've tried solving it in the following way
eq1 = f1 == a + b + f2
eq2 = 2*f2 == c + d + f1
eq3 = f3 == f1 + f2
solve([eq1,eq2,eq3],f1,f2,f3)
[]
This is easy to solve using matrices, and I have double-checked that the answer is fully constrained, so why does sage always return [ ]? I would have expected answers for f1, f2 and f3 in terms of a, b , c and d. Is there another argument to solve() that tells Sage what I want my answer in terms of?
I would prefer to use solve() instead of matrices both for the sake of convenience and if I have a nonlinear system later on.
EvidloWed, 03 Dec 2014 18:07:57 -0600http://ask.sagemath.org/question/25105/How do I find a solution of a set of inequalities?http://ask.sagemath.org/question/9744/how-do-i-find-a-solution-of-a-set-of-inequalities/Help with coding please. I'm completely new to Sage.
I have a model system written in Python and I need to do recursively call a subroutine to determine the existence of a solution of a set of inequalities. We have a primitive subroutine written, but I'd rather not reinvent the wheel.
Mathematica can do it easily It takes two calls "Resolve[Exists[ {set of variables}, {set of inequalities}. The output is either True or False.
I tried to research calling Mathematica from my python code, but it seems like a big detour technical from my actual research. The same for Matlab. I need to call on an external symbolic calculus program, have the answer returned to python and continue computing. Sage seems perfect for this. The introduction video says that anything Mathematica can do, sage should be able to do it too. Here's my question: HOW?
I know you can import sage from any python script, but what packages do I import? What commands do I use?
For example, if the following set is my symbols: {g1 g2 g3 t11 t12 t21 t32 k11 k21 k22 k31} for this set of inequalities { k11 > g1*t11 && k11 < g1*t12 && 0 < g1*t11 && k11 > 0 && k21 > g2*t21 && (k21 + k22) < g2*t21 && 0 < g2*t21 && k22 < 0 && k31 > g3*t32 && k31 > g3*t32 && 0 < g1*t11 && k11 > g1*t11 && (k11*k11) < (k11 + k11)*g1*t11}.
diana_doing_math_in_italyTue, 05 Feb 2013 01:36:44 -0600http://ask.sagemath.org/question/9744/