[sage-support] Re: how to factorize a polynomial function of third degree with only variables like coefficient

2017-09-20 Thread Yann Cargouet
Thank you Nils for your answer Le mardi 19 septembre 2017 10:23:07 UTC+2, Yann Cargouet a écrit : > > Hi everybody, > > I would like to factorize a polynomial function of third degree in order > to obtain the following form: > (1 + a*s + b*s^2)*(1 + c*s). > > Here my t

[sage-support] Re: how to factorize a polynomial function of third degree with only variables like coefficient

2017-09-19 Thread Yann Cargouet
+ Rs*Cin eq2 = c + a*b == Rc*Rl*Cc*Cl + Rc*Rs*Cc*Cin + Rs*Rl*Cc*Cin + Rs*Rl*Cc*Cl + Rs*Rl*Cin*Cl eq3 = a*c == Rc*Rl*Rs*Cc*Cin*Cl solve([eq1,eq2,eq3],a,b,c) Here is the result given by SAGE: sage: [] Why this systen doesn't work ? Regards, Yann Le mardi 19 septembre 2017 10:23:07 UTC+2, Yann

[sage-support] Re: how to factorize a polynomial function of third degree with only variables like coefficient

2017-09-19 Thread Yann Cargouet
Here is the text of the expression: Cc*Cin*Cl*Rc*Rl*Rs*s^3 + Cc*Cl*Rc*Rl*s^2 + Cc*Cin*Rc*Rs*s^2 + Cc*Cin*Rl*Rs*s^2 + Cc*Cl*Rl*Rs*s^2 + Cin*Cl*Rl*Rs*s^2 + Cc*Rl*Rs*gm*s + Cc*Rc*s + Cc*Rl*s + Cl*Rl*s + Cc*Rs*s + Cin*Rs*s + 1 Yann Le mardi 19 septembre 2017 10:23:07 UTC+2, Yann Cargouet a écrit

[sage-support] Re: how to factorize a polynomial function of third degree with only variables like coefficient

2017-09-19 Thread Yann Cargouet
Here is the expression: Le mardi 19 septembre 2017 10:23:07 UTC+2, Yann Cargouet a écrit : > > Hi everybody, > > I would like to factorize a polynomial function of third degree in order > to obtain the following form: > (1 + a*s + b*s^2)*(1 + c*s). > > Here my t

[sage-support] how to factorize a polynomial function of third degree with only variables like coefficient

2017-09-19 Thread Yann Cargouet
simplication ? all my variables are defined with the command var('Cc, Cin,...) Thanks in advance for your answers Yann -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, sen

[sage-support] Re: Possible bug in algebraic_immunity( ) function in crypto toolbox

2013-08-20 Thread Yann
From the doc of .algebrais_immunity : Returns the algebraic immunity of the Boolean function. This is the smallest integer i such that there exists a non trivial annihilator for self or ~self. The annihilator you get is for ~f1 (or if you prefer 1+f1) You can check that:

Re: [sage-support] Re: Possible bug in algebraic_immunity( ) function in crypto toolbox

2013-08-20 Thread Yann
)*annihilator_f1 == 0 Best regards Le mardi 20 août 2013 20:01:03 UTC+2, Martin Albrecht a écrit : Hi Yann, I believe you are the original author of this code? Cheers, Martin -- Forwarded Message -- Subject: [sage-support] Re: Possible bug in algebraic_immunity( ) function

[sage-support] Re: union of lists and remove an element from a list

2010-10-28 Thread Yann
people write this: L = sum( a list of list, [] ) which is correct but quite inefficient. Compare the following: timeit('L = sum([[0] for i in range(1)], [])') and timeit('L = []\nfor i in range(1): L += [0]') Regards Yann -- To post to this group, send email to sage-support

[sage-support] Re: polynomial constructor from roots

2010-10-24 Thread Yann
= q.roots()[0][0] sage: (a+b).minpoly() x^4 - 12*x^3 + 257/3*x^2 - 298*x + 5503/9 sage: (a*b).minpoly() x^4 + 7*x^3 + 77/3*x^2 + 196/3*x + 784/9 I hope this helps. Yann -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage

[sage-support] Re: Finding cube roots in terms of parameters

2010-10-24 Thread Yann
On Oct 24, 3:30 am, vasu tewari.v...@gmail.com wrote: Hi all Suppose I have an positive integer parameter  't', and a polynomial Delta(t) , which is a polynomial in 't' with coefficients being integers. Assume we also know that Delta(t) 0. There is another polynomial with integer

[sage-support] Re: Creating large matrix hangs

2010-10-23 Thread Yann
) Yann -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org

[sage-support] Re: Creating large matrix hangs

2010-10-23 Thread Yann
]: entries.extend(v) Yann -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org

[sage-support] Re: Creating large matrix hangs

2010-10-23 Thread Yann
this is now ticket #10158 Yann -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http

[sage-support] Re: minimum polynomial

2010-10-23 Thread Yann
= Ideal([a^3-3, b^2-7, c^4-2, al-(a+b*c)]) sage: alpha = QQbar(3^(1/3)+(7^(1/2)*2^(1/4))) sage: am = alpha.minpoly()(al) sage: am in I ... True sage: am al^12 + (-12)*al^9 + (-294)*al^8 + 54*al^6 + (-14112)*al^5 + 28812*al^4 + (-108)*al^3 + (-26460)*al^2 + (-345744)*al - 94 cheers, Yann

[sage-support] Re: common devisor

2010-09-28 Thread Yann
(or if you have no good guess, you can also try simplify_full) cheers, Yann -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more options, visit this group at http

[sage-support] Re: simplifying expressions

2010-09-28 Thread Yann
, 1, -1] Yann -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org

[sage-support] Re: common devisor

2010-09-27 Thread Yann
On Sep 27, 5:53 pm, luisfe lftab...@yahoo.es wrote: On Sep 27, 3:34 pm, Johannes dajo.m...@web.de wrote: Hi list, is there a way to get a sum of fraction to a common devisor? or even better into a product of a fraction like \frac{1}{something here} and a sum of integers? and my next

[sage-support] Re: subsop

2010-09-26 Thread Yann
this still gives you some insight. Yann -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http

[sage-support] Re: integral

2010-09-17 Thread Yann
If I try this, here is what I get: sage: var('a') a sage: integral(cos(2*x)/(x^2+a^2),x,-Infinity,+Infinity) ERROR: An unexpected error occurred while tokenizing input ... TypeError: Computation failed since Maxima requested additional constraints (try the command 'assume(a0)' before integral or

[sage-support] Re: wrong model fitting

2010-08-29 Thread Yann
On Aug 29, 4:50 am, Oscar Gerardo Lazo Arjona algebraicame...@gmail.com wrote: Hello! I have tried to fit some data about an harmonic oscillator to a sine function, but without success. Well, the find_fit command does return the values of constants, but they don't fit the data at all!

[sage-support] Re: Symbolic determinant

2010-08-12 Thread Yann
On Aug 12, 5:32 pm, vasu tewari.v...@gmail.com wrote: Hi I wanted to know how could one compute symbolic determinants. To give an idea of what I am looking for, R.x=PolynomialRing(QQ,'x') M = [ x^a,x^b][x^c x^d] I would like to compute the determinant of the 2*2 matrix M, say. Now, I

[sage-support] Re: Cython and static data

2010-06-07 Thread Yann
You migth also try this: timeit('for x in sxrange(1,10): x.is_square()', number=25) On Jun 7, 6:59 pm, Rolandb rola...@planet.nl wrote: Tnx! int* did the tric. Maybe an idea to mention this in the Cython manual. Look at the amazing difference in speed sage: timeit('for x in

[sage-support] Re: Polynomial mod

2010-04-28 Thread Yann
This at least documented: sage: R.x=ZZ[] sage: f = x^3+x+1 sage: f.mod? ... When little is implemented about a given ring, then mod may return simply return f. For example, reduction is not implemented for ZZ[x] yet. (TODO!) sage: R.x = PolynomialRing(ZZ) sage: f

[sage-support] Re: Lattice Probem

2010-03-30 Thread Yann
An orthogonal lattice might not exist in general, but you can use LLL   to get close (and, perhaps, hit it right on). sage: m = matrix([[1,2,3],[2,3,4]]) sage: m.LLL() [-1  0  1] [ 1  1  1] You might also want to try BKZ algorithm too. sage: m [ 1 0 -1 -2 -1] [ 1 -2 0 1 0] [ 1 2 0

[sage-support] Re: norm or absolute value

2010-03-12 Thread Yann
Hi, Is this helping? sage: var('a,b,z') (a, b, z) sage: f=a*z+i*b*z^2 sage: f.norm() b*z^2*conjugate(b)*conjugate(z)^2 - I*a*z*conjugate(b)*conjugate(z)^2 + I*b*z^2*conjugate(a)*conjugate(z) + a*z*conjugate(a)*conjugate(z) sage: f.norm().full_simplify() b^2*z^4 + a^2*z^2 sage: f.norm().factor()

[sage-support] Re: convert trigonometric/hyperbolic functions to exponentials

2010-03-12 Thread Yann
And I guess the answer to Paul's question is then: sage: (sinh(log(t)))._maxima_().exponentialize().sage() 1/2*t - 1/2/t sage: (cos(log(t)))._maxima_().exponentialize().sage() 1/2*e^(-I*log(t)) + 1/2*e^(I*log(t)) -- To post to this group, send email to sage-support@googlegroups.com To

[sage-support] Re: Why does my little program bring my department's server to its knees?

2010-03-04 Thread Yann
it seems the part eating memory is: K=NumberField(f,'t') don't know why though -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more options, visit this group at

[sage-support] Re: Why does my little program bring my department's server to its knees?

2010-03-04 Thread Yann
the del a4 should be indented one step more to the left (otherwise you try to use it to define your matrix but it doesn't exist anymore) -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com

[sage-support] Re: Why does my little program bring my department's server to its knees?

2010-03-04 Thread Yann
sage: R.x=QQ[] sage: while True: : f=x+1 this eats up memory... it's bad -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more options, visit this group at

[sage-support] Re: Roots of polynomial system involving square roots

2010-03-01 Thread Yann
Is this enough for you? sage: var('x,y,z') (x, y, z) sage: solve([sqrt(x)-2,y-2*x,x-z**2],[x,y,z]) [[x == 4, y == 8, z == -2], [x == 4, y == 8, z == 2]] (you can then filter the solutions) -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group,

[sage-support] Re: cancellation in fraction fields

2010-01-24 Thread Yann
On Jan 24, 9:17 pm, William Stein wst...@gmail.com wrote: Here's a potentially good way to do this right now  :-) Define this function: def normalize_denoms(f):     n, d = f.numerator(), f.denominator()     a = [vector(x.coefficients()).denominator() for x in [n,d]]     return

[sage-support] Re: polynomial remainder

2010-01-05 Thread Yann
*x+1 sage: g = cyclotomic_polynomial(18)(x) sage: f.quo_rem(g) (a*x^4 + 2*x^2 + a*x, 2*x^5 - 2*x^2 + (-a + 3)*x + 1) Yann -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more options

[sage-support] Re: matrix exponential and logarith in sage?

2009-12-22 Thread Yann
some exponentials exist: sage: M = matrix(SR,2,[1,0,3,x]) sage: M.exp() [ e0] [-3*(e - e^x)/(x - 1) e^x] sage: M = matrix(CDF,2,[1+i,0,3,i]) sage: M.exp() [ 1.46869393992 + 2.28735528718*I 0] [

[sage-support] Re: Integer points of an elliptic curve

2009-12-07 Thread Yann
The general method is called Naggel's algorithm. Take a look at http://www.math.mcgill.ca/connell/public/ECH1/c1.ps (1.4) On Dec 7, 1:53 pm, Jaakko Seppälä jaakko.j.sepp...@gmail.com wrote: Hello again! Is that method general? I tried now to find the integer points of x^3 - 3*x*y^2-y^3-1

[sage-support] Re: Integer points of an elliptic curve

2009-12-07 Thread Yann
You might also take a look at the full book www.ucm.es/BUCM/mat/doc8354.pdf And of course, it's only a method to go from a general cubic equation to a weierstrass form, net a general method th find integral points. On Dec 7, 6:24 pm, Yann yannlaiglecha...@gmail.com wrote: The general method

[sage-support] Re: Integer points of an elliptic curve

2009-12-07 Thread Yann
If you want solution for this precise equation, look for thue equation. The thue equations are some of the few for which there exists efficient methods. for example in PARI/GP (from sage with gp_console()) sage: gp_console() GP/PARI CALCULATOR Version 2.3.3 (released) [snip]

[sage-support] Re: Integer points of an elliptic curve

2009-12-06 Thread Yann
From the example you give: 2x**3+385x**2+256x-58195=3y**2 , over the rational field it's not direct because sage does not handle general cubic equation yet. In sage, let's define: {{{ sage: R.x,y = QQ[] sage: P = 2*x**3 + 385*x**2 + 256*x - 58195 - 3*y**2 }}} Given an equation A6 + A4 x + A3 y

[sage-support] sparse linear algebra

2009-09-20 Thread Yann
Is there a good reason for such a difference? sage: m=identity_matrix(1000,sparse=True) sage: v=vector([1]*1000,sparse=True) sage: time p = v*m CPU times: user 2.26 s, sys: 0.00 s, total: 2.26 s Wall time: 2.26 s sage: v=matrix(1,1000,[1]*1000,sparse=True) sage: time p = v*m CPU times: user 0.36

[sage-support] Re: sparse linear algebra

2009-09-20 Thread Yann
I made a tiny one line patch, it would be nice of view to review it. http://sagetrac.org/sage_trac/ticket/6968 Yann Results after patching: sage: m=identity_matrix(1000,sparse=True) sage: v=vector([1]*1000,sparse=True) sage: time p = v*m CPU times: user 0.20 s, sys: 0.00 s, total: 0.20 s Wall

[sage-support] linbox bug?

2009-06-10 Thread Yann
-- | Sage Version 4.0.1, Release Date: 2009-06-06 | | Type notebook() for the GUI, and license() for information.| -- sage:

[sage-support] Re: Questions about parallel sage, i.e. dsage

2008-09-18 Thread yann-ledu
) and I want to install sage on worker nodes. Yann, do you generate Monte Carlo data for LHC experiment ? I would be grateful for any links and any collaboration on developing dsage for Grid computing. No, it's Monte-Carlo for some optimization problem in imaging. The parallelization is very

[sage-support] Re: Questions about parallel sage, i.e. dsage

2008-09-18 Thread yann-ledu
Thanks for your answers, this will probably solve all my problems. And writing to a file sounds good, since I can always read it's tail and do whatever I want. Yann On 17 sep, 22:03, John Voight [EMAIL PROTECTED] wrote: Hello! It is a pity that Yi has moved on (at least for the moment

[sage-support] Re: Questions about parallel sage, i.e. dsage

2008-09-17 Thread yann-ledu
On Sep 16, 9:37 pm, William Stein [EMAIL PROTECTED] wrote: On Tue, Sep 16, 2008 at 12:16 PM, Yann Le Du [EMAIL PROTECTED] wrote: Hello, I tried to email the person apprently responsible for dsage, Yi Qiang, about this, to no avail, so I turn to the list. I use sage, v. 3.1.1

[sage-support] An octal bug and some book advice for abstract algebra

2008-04-30 Thread Yann Le Du
. Any other suggestion ? Cheers, -- Yann Le Du --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com