On Fri, Jan 13, 2023 at 3:01 PM Emmanuel Charpentier
wrote:
>
> In Google Groups, I can’t see the screenshot nor the notebook, but this is a
> FAQ, so I risk an answer :
>
> solve, used without algorithm= uses Maxima’s solver. The latter may introduce
> new variables to denote unknown,
On Fri, Jan 13, 2023 at 2:27 PM 'Charles Bradshaw' via sage-support
wrote:
>
> More info:
> If I run my notebook code on https://sagecell.sagemath.org/ is see a huge
> page of errors begining:
sagecell does not take ipython notebooks, sorry, not a bug.
>
>
In Google Groups, I can’t see the screenshot nor the notebook, but this is
a FAQ, so I risk an answer :
solve, used without algorithm= uses Maxima’s solver. The latter may
introduce new variables to denote unknown, arbitrary, quantities : “zxxx”
denote integer arbitrary constants, “rxxx”
More info:
If I run my notebook code on https://sagecell.sagemath.org/ is see a huge
page of errors begining:
/home/sc_serv/sage/src/sage/calculus/calculus.py:2509: DeprecationWarning:
Importing union from here is deprecated; please use "from sage.misc.misc
import union" instead. See
OK One more time. I finally figured out how to attach the the notebook. I
hope it's in the right format.
In the process of playing with the probllem I have re-numbered the lines.
The pi*z1649 term now appears in line 5, 7 and 8
Where did the z come from??
Thanks for your patience.
On
the screenshot does not show lines 113 and 98 you refer to.
It might be better to send the notebook than the screenshot.
On Thu, Jan 12, 2023 at 8:40 PM 'Charles Bradshaw' via sage-support
wrote:
>
> My mistake, here is the screenshot
>
> On Thursday, January 12, 2023 at 8:14:20 PM UTC
My mistake, here is the screenshot
On Thursday, January 12, 2023 at 8:14:20 PM UTC dim...@gmail.com wrote:
> On Thu, Jan 12, 2023 at 8:00 PM 'Charles Bradshaw' via sage-support
> wrote:
> >
> > In the attached screenshot line 'out [113]' and 'out [98]' please
> observe 2*pi*z5484
> > the
On Thu, Jan 12, 2023 at 8:00 PM 'Charles Bradshaw' via sage-support
wrote:
>
> In the attached screenshot line 'out [113]' and 'out [98]' please observe
> 2*pi*z5484
> the attempt to evaluate: line [114] produces the error x5484 is not defined
there is no attachment.
>
> is this a bug or did
In the attached screenshot line 'out [113]' and 'out [98]' please observe
2*pi*z5484
the attempt to evaluate: line [114] produces the error x5484 is not defined
is this a bug or did I not understand something?
I am running Fedora 37 with the dnf installed
SageMath version 9.6, Release Date:
One way is to use polynomials
sage: x = polygen(QQ)
sage: (x^4 - 2*x - 1).roots(RealField(32), multiplicities=False)
[-0.474626618, 1.39533699]
sage: (x^4 - 2*x - 1).roots(ComplexField(128), multiplicities=False)
[-0.47462661756260555032941320989493141267,
I still don't know my way around the Sage documentation... Sorry for the
elementary question.
I just tried to use the *solve* command to find the roots of a
polynomial of degree 4 with real coefficients. The result is a list of
solutions expressed in (complicated) symbolic form. When I
Solve this Equation for H: 5260862 = M*H^y % 20876441
Does anyone happen to know the steps to solve for h:
Equation: 5260862 = M*Hy % 20876441
Where y = 17, and M = 20192834? My H value is wrong from my previous tries.
I think my order of op. is wrong. Function for code would be helpful.
Hi,
I have inequalities like these:
3 x1 + 5 x2 + 2 x3 + 5 x4 + 7 x5 <= 28
2 x1 + 0 x2 + 0 x3 + 8 x4 <= 14
4 x4 + 5 x5 <= 22
3 x2 <= 2
3 x4 >= 1
I want to get a solution. Values of x's are either 0 or 1.
--
You received this message because you are subscribed to the Google Groups
I have matrices B and C of size (m,n) over integer with m>n.
I know there is matrix A of size (m,m) such that
AB=C. How to find A efficiently in Sage?
--
You received this message because you are subscribed to the Google Groups
"sage-support" group.
To unsubscribe from this group and stop
sage: solve(*2**(x+sqrt(*1*-x^*2*))-*7*,x)
[x == -sqrt(-x^2 + 1) + 7/2]
sage: version()
'SageMath version 8.0, Release Date: 2017-07-21'
That doesn't look like a solution to me because x still appears on the
right.
Is this the intended behavior?
--
You received this message because
On Fri, Oct 5, 2018 at 12:05 PM HG wrote:
>
> I would like to solve these equations but I don't know how?
> >
> > t_0=t_p==gamma*(t-V*x/c^2);show(t_0)
> > x_0=x_p==gamma*(x-V*t);show(x_0)
> >
> > solve(t_0,gamma*(t-V*x/c^2))
> > desolve(gamma*(t-V*x/c^2)==0,x)
> >
> > error desolve() takes at
I would like to solve these equations but I don't know how?
>
> t_0=t_p==gamma*(t-V*x/c^2);show(t_0)
> x_0=x_p==gamma*(x-V*t);show(x_0)
>
> solve(t_0,gamma*(t-V*x/c^2))
> desolve(gamma*(t-V*x/c^2)==0,x)
>
> error desolve() takes at least 2 arguments (1 given)
>
> Any help?
> Henri
--
You
HI,
I would like to solve these equations but I don't know how ?
t_0=t_p==gamma*(t-V*x/c^2);show(t_0)
x_0=x_p==gamma*(x-V*t);show(x_0)
solve(t_0,gamma*(t-V*x/c^2))
desolve(gamma*(t-V*x/c^2)==0,x)
error desolve() takes at least 2 arguments (1 given)
Any help ?
Henri
--
You received this
Hello,
I'm encountering an issue in using solve:
assume(x,"real")
assume(x>=0)
f(x)=(0.01+x^2)/(1+x^2)- 0.4*x
roots = solve(f(x) == 0,x)
num_roots = len(roots)
print "roots ", num_roots
roots
plot(f(x),(x,0,3))
I'm expecting 3 roots, but this only finds one. Is this intended? Can some
provide
I am solving a polynomial which arises from plotting titration cures in
chemistry. The rule of signs suggests it has one positive root. Find_root
seems to find it. Solve with poly_solve=true does not. Instead it gives 4
complex roots, which don't appear to satisfy the equation. They do not
Hello guys,
I have a quadratic programming for instance like the following equation:
max t1.f1 + t2.f2 + 0.5f1 + 0.3f2
subj to : 0.1t1 + 0.2t2 = 1
2f1 + 4f2= 0.5
(f1, f2, t1 and t2 are unknown variables).
If I had min instead of max in the program, I would be able to
Hello everybody,
I am new to sage and try to solve the following LP with
MixedIntegerLinearProgram:
Maximization:
3.0 x_0 + 2.0 x_1 - 1.0 x_2
Constraints:
(x_0, x_1, x_2) in {(4.0,5.0,6.0), (1.0,2.0,3.0), (9.0,5.0,2.0)}
How can I define MixedIntegerLinearProgram to solve my
solve does not solve ?
sage: solve(-(1/2*sqrt((4*w+1)+1))*t+w==0,w)
[w == 1/2*sqrt(4*w + 2)*t]
In fact, the solution is: w=t+t^2
What is wrong ? Thank you for any help.
--
You received this message because you are subscribed to the Google Groups
sage-support group.
To unsubscribe from this
How to solve([f(x)==0],x) for a function f(x) defined in a .sage file?
The error message: TypeError: Cannot evaluate symbolic expression to a
numeric value.
Thank you...
--
You received this message because you are subscribed to the Google Groups
sage-support group.
To unsubscribe from
hello, sage 5.9
If solve() gives an unspecificed integer, how do I substitute a
particular value into the expression?
subs() does not work as expected/desired because the free variables
don't seem to be defined.
sage: a=solve(sin(x)==0,x,to_poly_solve='force');a
[x == 2*pi*z38, x == pi +
Thanks,
But if the matrix A is non-square How I will be able to solve?. I am trying
but I get number of rows of self must equal degree of B
2013/4/17 Robert Bradshaw rober...@gmail.com
sage: A = random_matrix(GF(2), 1, 1)
sage: A.det()
1
sage: b = random_vector(GF(2), 1)
sage:
On Thursday, April 18, 2013 8:01:38 AM UTC-7, juaninf wrote:
Thanks,
But if the matrix A is non-square How I will be able to solve?. I am
trying but I get number of rows of self must equal degree of B
This is a math question now. If A is n x k, and if you want to solve Ax =
b, then b
I have the equation Ax=b where all matrix entries and all entrie of vector
b are in GF(2). How I will be able to solve this linear system equation
over GF(2) in SAGE software?
--
-
MSc. Juan del Carmen Grados Vásquez
Laboratório
sage: A = random_matrix(GF(2), 1, 1)
sage: A.det()
1
sage: b = random_vector(GF(2), 1)
sage: %time x = A \ b
CPU times: user 1.61 s, sys: 0.06 s, total: 1.67 s
Wall time: 1.67 s
sage: A * x == b
True
On Wed, Apr 17, 2013 at 1:45 PM, Juan Grados juan...@gmail.com wrote:
I have the
I want to solve a polynomial over ring.
However my code does not work.
N=8
R.x=Integers(N)[]
f=x^2-1
print f.roots()
In my case, N is always a power of 2.
--
You received this message because you are subscribed to the Google Groups
sage-support group.
To unsubscribe from this group and stop
On Jan 30, 2013, at 3:20 PM, Santanu Sarkar wrote:
N=8
R.x=Integers(N)[]
f=x^2-1
print f.roots()
Try :
sage: print f.roots(multiplicities=False)
[1, 3, 5, 7]
It's a start...
---
Charles Bouillaguet
http://www.lifl.fr/~bouillaguet/
--
You received this message because you are
Thank you.
On 30 January 2013 10:17, Charles Bouillaguet charles.bouillag...@gmail.com
wrote:
On Jan 30, 2013, at 3:20 PM, Santanu Sarkar wrote:
N=8
R.x=Integers(N)[]
f=x^2-1
print f.roots()
Try :
sage: print f.roots(multiplicities=False)
[1, 3, 5, 7]
It's a start...
---
try ./sage -i instead of sage -i
-- sent from a tablet, please excuse my brevity
On Dec 23, 2012 5:38 PM, Santanu Sarkar sarkar.santanu@gmail.com
wrote:
I want to install sat solver. I have the following error
On Sunday 09 Dec 2012, Georgi Guninski wrote:
On Sat, Dec 08, 2012 at 11:44:19AM +0530, Santanu Sarkar wrote:
Dear all,
I have a system of non linear equations over GF(2). How to solve
them in Sage?
If you need to solve large nonlinear systems over GF(2) and don't
insist on
Thank you very much for your help.
On 9 December 2012 12:18, Georgi Guninski gunin...@guninski.com wrote:
On Sat, Dec 08, 2012 at 11:44:19AM +0530, Santanu Sarkar wrote:
Dear all,
I have a system of non linear equations over GF(2). How to solve
them in Sage?
If you need to solve
On Sat, Dec 08, 2012 at 11:44:19AM +0530, Santanu Sarkar wrote:
Dear all,
I have a system of non linear equations over GF(2). How to solve
them in Sage?
How large is your system ? (how many variables ?). What is the largest degree
in an equation ? Depending on the answer to these
On Sat, Dec 08, 2012 at 11:44:19AM +0530, Santanu Sarkar wrote:
Dear all,
I have a system of non linear equations over GF(2). How to solve
them in Sage?
If you need to solve large nonlinear systems over GF(2) and don't
insist on using sage I suspect a better choice is to convert
them to
Dear all,
I have a system of non linear equations over GF(2). How to solve
them in Sage?
--
You received this message because you are subscribed to the Google Groups
sage-support group.
To post to this group, send email to sage-support@googlegroups.com.
To unsubscribe from this group, send
In the fourth call of solve below, solve(..., solution_dict=True) does
not return a list, but a dictionary, in contrast to the documentation
(solution_dict - bool (default: False); if True, return a list of
dictionaries containing the solutions.)
f(x)=x-1
g(x)=0
print solve(f(x)==0,x)
print
Hi...
I'm very new to Sage, and I've run into some trouble. I have the following
system of equations, which come from a model of a simple protein
phosphorylation network:
s00,s01,s10,s11,k,p = var('s00 s01 s10 s11 k p')
eq1 = 0.55*k*s00 + 0.6*k*s01 + 0.6*k*s10 + 0.6*p*s01 + 0.6*p*s10 +
On 06/30/11 02:59, Laurent wrote:
Maybe you want to do something like that :
sage: a=var('x,y,z')
sage: a
[x, y, z]
sage: solve( a[0]*x==x,x) # This is x^2==x
[x == 0, x == 1]
If you need to generate n variables:
sage: s=,.join([a+str(i) for i in range(1,10)])
sage: a=var(s)
Le 29/06/2011 22:22, Michael Orlitzky a écrit :
This is probably just a case of don't do that, but I thought I'd check:
sage: c = [ var('c[0]') ]
sage: system = c[0]*x == 1
sage: solve(system, c[0])
boom
...
TypeError: unable to make sense of Maxima expression '[c[0]==1/x]' in
This is probably just a case of don't do that, but I thought I'd check:
sage: c = [ var('c[0]') ]
sage: system = c[0]*x == 1
sage: solve(system, c[0])
boom
...
TypeError: unable to make sense of Maxima expression '[c[0]==1/x]' in
Sage
--
To post to this group, send email to
If I try to solve the following equation there are still a_x on the
right hand side. In my opinion it should be solvable.
Or is there an error in my code?
thanks
Jakob
reset()
var('x v_x a_x t y v_y a_y a')
d = (x + v_x * t + 1/2*a_x*t**2)**2 + (y + v_y * t + 1/2 *
a_y*t**2)**2
var('m')
e =
shouldn't this be taken care of automatically ?
sage: solve([x == 0, x== 1],x,solution_dict=True)
...
IndexError: list index out of range
sage: solve([x == 0, x== 1],x)
[]
--
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to
I observed that solve behaves inconsistently in the following regards:
sage: solve([x==1,x==-1],x)
[]
(this is as expected)
However:
solve([x==1,x==-1],x, solution_dict=True)
produces an error message. Easy to live with, but I was scared when I
first saw it :-).
It should be easy to correct,
Hi,
Two examples:
var('x1,x2')
y=[x1,x2]
opl=solve([x1^2==4,x2^2==9],y,solution_dict=True)
print opl
[{x2: -3, x1: -2}, {x2: -3, x1: 2}, {x2: 3, x1: -2}, {x2: 3, x1: 2}]
var('x1')
y=[x1]
opl=solve([x1^2==4],y,solution_dict=True)
print opl
Traceback (click to the left of this block for
hello everyone
I can't make solve() do what I want.
Look at this:
sage (2+I)*(1+7*I)
15I-5
sage (2+I)*(1-7*I)
-13I+9
sagesolve([a*b==15*I-5,a*conjugate(b)==-13*I+9],[a,b])
[]
So, from the first two lines I know that a=2+I, b=1+7I should
be a solution to the system in the third, yet solve()
I'm solving recurrence relations for a k-SAT algorithm, and have run
up against an apparent limit in solve. I'm running:
solutions = solve([x^3 - x^2 - x - 1 == 0], x, solution_dict=True)
solutions = solve([x^4 - x^3 - x^2 - x - 1 == 0], x,
solution_dict=True)
solutions = solve([x^5 - x^4 - x^3 -
Why does Sage not solve the equation? (The quadratic equation is just a
test.)
sage: x,y,a,b = var('x, y, a, b')
sage: solve([x - 2*y == a, x + 3*y == b],[x,y]);
sage: solve([x^2 + a*x + b == 0],x)
[x == -1/2*a - 1/2*sqrt(a^2 - 4*b), x == -1/2*a + 1/2*sqrt(a^2 - 4*b)]
sage: solve([x - 2*y -
On Fri, Apr 2, 2010 at 10:11 AM, bb bblo...@arcor.de wrote:
Why does Sage not solve the equation? (The quadratic equation is just a
test.)
sage: x,y,a,b = var('x, y, a, b')
sage: solve([x - 2*y == a, x + 3*y == b],[x,y]);
sage: solve([x^2 + a*x + b == 0],x)
[x == -1/2*a - 1/2*sqrt(a^2 -
William Stein schrieb:
On Fri, Apr 2, 2010 at 10:11 AM, bb bblo...@arcor.de wrote:
Why does Sage not solve the equation? (The quadratic equation is just a
test.)
sage: x,y,a,b = var('x, y, a, b')
sage: solve([x - 2*y == a, x + 3*y == b],[x,y]);
sage: solve([x^2 + a*x + b == 0],x)
[x ==
Hello group,
I've been eyeing Sage for a while-- it has always struck me as a
wonderful project. Recently I have started trying to use it for
homework assignments and have had very encouraging results so far.
However, tonight I have been trying to solve an open channel flow
problem which
On Sun, 28 Feb 2010 23:02:08 -0800 (PST), Sharpie ch...@sharpsteen.net wrote:
However, tonight I have been trying to solve an open channel flow
problem which requires me to find the roots of:
y^3 - 1.39027132807289 * y^2 + 0.090610488164005 == 0
find_root() does return the correct
Hello everybody
I just learnt about the rsolve function from Maple, which seems to
give the formula of sequences defined by recurrence.. Is there a
similar function in Sage ?
For example, how could I have Sage give me the general formula of
fibonacci's sequence ? :-)
Thank you very much
On Wed, Feb 10, 2010 at 12:54 AM, Nathann Cohen nathann.co...@gmail.com wrote:
Hello everybody
I just learnt about the rsolve function from Maple, which seems to
give the formula of sequences defined by recurrence.. Is there a
similar function in Sage ?
I don't believe there is anything
Dear users of Sage, sorry to bother again, with checked Typeset button
the command
solve(x==sqrt(99),x)
gives x==3*sqrt(11)
However sqrt(99) gives 3\,\sqrt{11}. I think that this second format
should be used also in the first case and I am almost sure that it was
in some previoous versions of
Hi,
I am trying to solve the following equation:
sage: f(x)=((1-0.15)/(1-0.15+(0.15/(1-x*0.15)^22)))^3-x
sage: solve(f,x)
This gives me the following error, which doesn't make much sense to me.
---
TypeError
Hi,
I only manage to use solve() as in the following code:
---
x, y, z = var( 'x,y,z' )
genLst = [x ** 2 * y, x * y ** 2, x * y, ( x ** 2 + y ** 2 + 1 ) * y]
solLst = solve( genLst, [x, y], solution_dict = True )
bpLst = [ ( sol[x], sol[y] ) for sol in solLst ]
bp = bpLst[1]
print
Sage will not solve this system of equations:
x^2 + y^2 == 25
x^2 - y^2 - y == 5 (-y^2)
{{{
sage: var('x y')
sage: solve( [x^2 + y^2 == 25, x^2 - y^2 - y == 5], x,y )
[]
}}}
Yet, save will solve this system of equations:
x^2 + y^2 == 25
x^2 + y^2 - y == 5 (+y^2)
{{{
sage:
I worked it out by hand to be x=2 or x=42. I get nothing useful back
from sage. What am I missing?
--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to
How come that solve doesn't solve this?
sage: solve(sqrt(sqrt(4*x^2 + 1) - x^2 - 1), x)
[x == -sqrt(sqrt(4*x^2 + 1) - 1), x == sqrt(sqrt(4*x^2 + 1) - 1)]
sage: axiom.solve(sqrt(sqrt(4*x^2 + 1) - x^2 - 1), x)
+-+ +-+
[x= 0,x= \|2 ,x= - \|2 ]
Furthermore, is there a way to
Can someone please tell me why it is impossible to solve the following
system of boolean equations in SAGE:
sage: N=144
sage: P = BooleanPolynomialRing(N,'x',order='lex')
sage: t = []
sage: for i in range(0,N):
t.append(var(P.gen(i)))
sage: print t,t
t [x0, x1, x2, x3, x4, x5, x6, x7, x8,
solve([x==0, 1-exp(y)==0],x,y)
returns the empty set, although (0,0) is an obvious solution. This
occurs also for other simple combinations involving exp, as well as
for
solve([y*sin(x)==0, cos(x)==0],x,y)
What am I doing wrong? Thanks. (Sage 3.0.2 on Mac OSX)
Dear all,
When I use solve, the variable to be solved for sometimes appears on
both sides of the solution. Example:
--
| SAGE Version 3.0.2, Release Date: 2008-05-24 |
| Type notebook() for the GUI, and
Hi,
While trying to compute the Golden ratio using SAGE I noticed the
following strange (to me) behavior in solve().
* This fails:
sage: var('a b phi')
(a, b, phi)
sage: solve([phi==a/b, phi==(a+b)/a], phi)
---
type
Hello,
I have a system of 5 equations:
x=2*a+1
x=3*b+2
x=4*c+3
x=5*d+4
x=6*e+5
a,b,c,d,e,x are integers variables.
I would solve the system with solve().
1)How to declare that solve have to assume x,a,b,c,d,e as integers?
The answer is k*60+59 k integer.
Can Sage with the solve function
I was going to work on the sage wiki's teaching page for linear
algebra, but I got stuck on my first attempt at porting a problem.
The problem was to study the two by two solutions to A^2 = I; in one
of my classes I have students work on that for a day on paper and then
let them use Mathematica
Does anyone have any thoughts on why solve() returns [R == -1*I*E] in
the following SAGE session?
Thanks in advance :-)
Ted
--
| SAGE Version 2.6, Release Date: 2007-06-02|
| Type notebook() for the
69 matches
Mail list logo