[sage-support] Re: A problematic dictionary update (possible Maxima problem)

2024-06-01 Thread Emmanuel Charpentier
0), log(-sqrt(($0 + 1)/($0 - 1))): arccoth($0), log(sqrt(($0 + 1)/($0 - 1))): arccoth($0)} But the need for this workaround makes me suspect thai it might not be as useful as I wish it would be… Hints ? Ideas ? [ Even lazzi are welcome… ] ​ Le samedi 1 juin 2024 à 22:11:43 UTC+2, Emmanuel Charpentier

[sage-support] A problematic dictionary update (possible Maxima problem)

2024-06-01 Thread Emmanuel Charpentier
Context : finding patterns of explicit forms of inverse (hyperbolic|trigonometric) functions for simplification. Simple solution : reset() y=SR.var("y") IL = [] w0=SR.wild(0) L=[sin, cos, tan, csc, sec, cot, sinh, cosh, tanh, csch, sech, coth] for f in L: R=(f(y)==x).solve(y)[0].rhs() for s

Re: [sage-support] Is there a way to use Sage's Jupyter outside the sage shell ?

2024-04-09 Thread Emmanuel Charpentier
Le mardi 9 avril 2024 à 02:24:45 UTC+2, Dima Pasechnik a écrit : [ Snip… ] Actually, the best way to solve this would be to get rid of Jupyter as a part of Sage the distribution. Agreed. Since I “seriously” configured Sage a lng time ago, I missed the rise of the .configure options

[sage-support] Is there a way to use Sage's Jupyter outside the sage shell ?

2024-04-08 Thread Emmanuel Charpentier
Setup : Sage 10.4.beta1 running on Ubuntu 22.04 LTS under WSL2 in Windows 11 (don’t get me started…). I also installed emacs and its juyter package, which is able to use Sage-installed kernels … when emacs is started from the Sage shell. [ Yes,

[sage-support] Re: Successful plots (without notebook) on Windows?

2024-04-03 Thread Emmanuel Charpentier
Le mardi 2 avril 2024 à 21:13:50 UTC+2, kcrisman a écrit : On Monday, April 1, 2024 at 3:31:44 PM UTC-4 Emmanuel Charpentier wrote: I just had to install Sage on a Windows machine (long story…) which has to be connected to a corporate VPN, whose an annoying side effect is to deprive Linux apps

[sage-support] Re: Successful plots (without notebook) on Windows?

2024-04-01 Thread Emmanuel Charpentier
I just had to install Sage on a Windows machine (long story…) which has to be connected to a corporate VPN, whose an annoying side effect is to deprive Linux apps of network connectivity (don’t get me started…). Therefore, the Linux browser couldn’t use Mathjax. Using your utilities works

[sage-support] Re: init.sage not running anymore

2024-03-04 Thread Emmanuel Charpentier
FWIW, Someone going under the nickname of stillconfused posted alpost exactly the same problem on ask.sagemath.org. Is that you ? ​ Le dimanche 3 mars 2024 à 21:40:50 UTC+1, David Ayotte a écrit : > Hello, > > Since I

Re: [sage-support] Issues with real precision

2024-02-24 Thread Emmanuel Charpentier
mething useful today… On Saturday 24 February 2024 at 13:54:51 UTC Emmanuel Charpentier wrote: Le vendredi 23 février 2024 à 23:23:20 UTC+1, Dima Pasechnik a écrit : [ Snip…] the normal Python way, without any symbolic sum, would be like this: sage: sage: g(n,k,r)=(-1)^(k)*binomial(n,k)*(n-k)^

Re: [sage-support] Issues with real precision

2024-02-24 Thread Emmanuel Charpentier
Le vendredi 23 février 2024 à 23:23:20 UTC+1, Dima Pasechnik a écrit : [ Snip…] the normal Python way, without any symbolic sum, would be like this: sage: sage: g(n,k,r)=(-1)^(k)*binomial(n,k)*(n-k)^r/n^r : sage: def f(n,r): return math.fsum([1.0*g(n,k,r) for k in range(n+1)]) :

[sage-support] Re: Why cant this limit be evaluated?

2024-02-19 Thread Emmanuel Charpentier
Indeed. That’s probably an oversight : sage: elliptic_kc(x).limit(x=0) 1/2*pi sage: elliptic_ec(x).limit(x=0) limit(elliptic_ec(x), x, 0) Curioisly : sage: elliptic_ec(0) 1/2*pi FWIW : sage: D(r)._mathematica_().Limit(mathematica.Rule(r, 0)) -1/8 HTH, ​ Le lundi 19 février 2024 à 21:25:51

[sage-support] Developer's guide and configure : the list of packages needs some updating

2024-01-22 Thread Emmanuel Charpentier
For installation from source on Debian, a few packages have incorrect names in the Developer’s guide (and possibly in the configuration process files) : | Replace | with | ++--| | beautifulsoup4 | python3-bs4 | | cython | cython3

[sage-support] Re: Sage seems to incorrectly evaluate fractional powers of complexes

2024-01-04 Thread Emmanuel Charpentier
ay, January 4, 2024 at 10:29:56 AM UTC Emmanuel Charpentier wrote: > >> The problem seems Sage-specific : the same systems solve correctly (up to >> numerical noise) in “pure” Maxima : >> ;;; Loading #P"/usr/lib/x86_64-linux-gnu/ecl-21.2.1/sb-bsd-sockets.fas"

[sage-support] Re: Sage seems to incorrectly evaluate fractional powers of complexes

2024-01-04 Thread Emmanuel Charpentier
024 à 10:21:31 UTC+1, Emmanuel Charpentier a écrit : > Motivation : see [this post], which shows a case where Sage fails to find > the roots of a three equations system. > > I signalled in this thread that Sympy was able to find these roots. But I > stumbled on a difficulty checking thes

[sage-support] Re: limitations of "solve"?

2024-01-04 Thread Emmanuel Charpentier
These systems and Sage’s “solutions” exhibit some *serious* problems. See there <https://groups.google.com/g/sage-support/c/gGssS_15jxE>… ​ Le mardi 2 janvier 2024 à 12:30:14 UTC+1, Emmanuel Charpentier a écrit : > FWIW, a working workaround this interesting Maxima quirk (bug ?)

[sage-support] Re: limitations of "solve"?

2024-01-04 Thread Emmanuel Charpentier
These systems and Sage's "solutions" exhibit some *serious* problems. See [there](https://groups.google.com/g/sage-support/c/gGssS_15jxE)... Le mardi 2 janvier 2024 à 12:30:14 UTC+1, Emmanuel Charpentier a écrit : > FWIW, a working workaround this interesting Maxima quirk (bug

[sage-support] Sage seems to incorrectly evaluate fractional powers of complexes

2024-01-04 Thread Emmanuel Charpentier
Motivation : see [this post], which shows a case where Sage fails to find the roots of a three equations system. I signalled in this thread that Sympy was able to find these roots. But I stumbled on a difficulty checking these solutions. Set up the systems : # Pretext :

[sage-support] Re: limitations of "solve"?

2024-01-02 Thread Emmanuel Charpentier
FWIW, a working workaround this interesting Maxima quirk (bug ?) is to use sympy, as demonstrated here

[sage-support] Re: A nice (minor ?) bug ?

2023-12-24 Thread Emmanuel Charpentier
Never ming : this has been reported <https://github.com/sagemath/sage/issues/35489> six months ago… Sorry for the noise… ​ Le vendredi 22 décembre 2023 à 06:51:59 UTC+1, Emmanuel Charpentier a écrit : > Seen in 10.3.beta3 : > sage: show_identifiers() :1: > DeprecationWar

[sage-support] A nice (minor ?) bug ?

2023-12-21 Thread Emmanuel Charpentier
Seen in 10.3.beta3 : sage: show_identifiers() :1: DeprecationWarning: Importing Euler_Phi from here is deprecated; please use "from sage.arith.misc import Euler_Phi" instead. See https://github.com/sagemath/sage/issues/30322 for details. show_identifiers()

[sage-support] Re: Problem with plot

2023-12-16 Thread Emmanuel Charpentier
Le mercredi 13 décembre 2023 à 12:35:42 UTC+1, Philippe Delavalade a écrit : Hi. I'm using sage-10.2 with linux (slint-15.0 based on slackware 15.0) on the console. When I run p=plot(x^2); p there is no graphics on the screen, just the line Launched png viewer for Graphics object

[sage-support] Re: factor((A-B)*(B-C)).list() ?

2023-10-23 Thread Emmanuel Charpentier
sage: var("a, b, c") (a, b, c) sage: foo=(a-b)*(b-c) ; foo (a - b)*(b - c) Note that : sage: foo.expand() a*b - b^2 - a*c + b*c >From foo.list? : Docstring: Return the coefficients of this symbolic expression as a polynomial in x. INPUT: * "x" -- optional variable. OUTPUT: A list of

[sage-support] Re: factor((A-B)*(B-C)).list() ?

2023-10-23 Thread Emmanuel Charpentier
``` sage: var("a, b, c") (a, b, c) sage: foo=(a-b)*(b-c) ; foo (a - b)*(b - c) ``` Note that : ``` sage: foo.expand() a*b - b^2 - a*c + b*c ``` >From `foo.list?` : ``` Docstring: Return the coefficients of this symbolic expression as a polynomial in x. INPUT: * "x" --

[sage-support] Re: factor((A-B)*(B-C)).list() ?

2023-10-23 Thread Emmanuel Charpentier
FWIW : sage: var("a, b, c") (a, b, c) sage: ((a-b)*(b-c)) (a - b)*(b - c) sage: ((a-b)*(b-c)).list() [-b^2 + b*c, b - c] sage: ((a-b)*(b-c)).operands() [a - b, b - c] HTH, ​ Le lundi 23 octobre 2023 à 18:23:32 UTC+2, Rolandb a écrit : > Hi, > > I am surprised by the output (9.8 and 10.1

[sage-support] (Possible) bug in solving a simple complex equation.

2023-08-06 Thread Emmanuel Charpentier
Consider : sage: reset() sage: z=var("z") sage: Eq=(3+4*I)^2-2*(z.conjugate())==z ; Eq -2*conjugate(z) + 24*I - 7 == z sage: Sol=solve(Eq, z) ; Sol [z == (8*I - 7/3)] sage: Eq.subs(Sol[0]) (40*I - 7/3) == (8*I - 7/3) sage: bool(Eq.subs(Sol[0])) False which annoys me *immensely*. It reeks of

Re: [sage-support] Possible bug in the mathematica interface

2023-07-10 Thread Emmanuel Charpentier
Sum[%s, %s]"%tuple(map(lambda u:repr(mathematica(u)), > ((1+(-1 > : )^k)*x^k, [k , 0, oo] > -2/(-1 + x^2) > > sage: mathematica.Sum(*map(mathematica, ((1+(-1)^k)*x^k, [k , 0, oo]))) > {(1 + (-1)^k)*k*x^k, 0, (1 + (-1)^k)*x^k*Infinity} > > On Sun, 9 Jul 2023 at 23:01, Em

[sage-support] Possible bug in the mathematica interface

2023-07-09 Thread Emmanuel Charpentier
Inspiration : this ask.sagemath.org question . Using the Wolfram engine gives me a curious and nonsensical conversion. Compare : sage: mathematica("Sum[%s, %s]"%tuple(map(lambda

[sage-support] A possibly serious problem in the Maxima interface.

2023-04-19 Thread Emmanuel Charpentier
The new issue #35541 , inspired by this `ask.sagemath.org question reports a non-insignificant discrepancy between Maxima’s behaiour of its solver and what our interface

Re: [sage-support] How to convert complex_root_of to QQbar (algebraic number)

2023-04-01 Thread Emmanuel Charpentier
Le vendredi 31 mars 2023 à 15:19:51 UTC+2, William Stein a écrit : [ Snip… ] Meta comment -- I added this "Help me fix this..." feature to cocalc jupyter notebooks a week ago, and it's been extremely popular with 1000+ uses a day. It's exactly the sort of thing that ChatGPT can be very

[sage-support] Re: mathematica_console() command not working

2023-01-19 Thread Emmanuel Charpentier
mathematica_console() does not indeed exist. but mathematica.console() does (and so does mathematica.interact(), which might be what you are really searching…). ​ Le jeudi 19 janvier 2023 à 11:13:28 UTC+1, pvit...@gmail.com a écrit : > Using Sage 9.7 installed in Arch Linux over WSL2 in

[sage-support] cython_lambda not usable in practice

2023-01-18 Thread Emmanuel Charpentier
Inspired by this ask.sagemath.org question . Let sage: f = x^2*sin(x) - cos(x)*e^(-x) + log(x^2 + 1) - log(sqrt(1991)) Then, one would may like to accelerate f evaluation via

[sage-support] Re: gridlines in 3d ?

2023-01-17 Thread Emmanuel Charpentier
Le mardi 17 janvier 2023 à 07:21:08 UTC+1, roger...@gmail.com a écrit : I am not sure if it is exactly what you are looking for, but a few months ago I wrote some lines of code to create a frame with gridlines for 3D plots. [image: plot_frame3d.png] See the link

Re: [sage-support] solve solution is this a bug?

2023-01-13 Thread Emmanuel Charpentier
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”

Re: [sage-support] Plot doesn't respect numerical precision specification.

2022-12-06 Thread Emmanuel Charpentier
décembre 2022 à 14:23:48 UTC+1, Emmanuel Charpentier a écrit : > Le mardi 6 décembre 2022 à 14:16:56 UTC+1, dim…@gmail.com a écrit : > > It's plotting via matplotlib, perhaps that's why the precision setting is >> ignored (or pehaps something like RDF is hardcoded in Sag

Re: [sage-support] Plot doesn't respect numerical precision specification.

2022-12-06 Thread Emmanuel Charpentier
lambda expression in the third example isn’t accepted : matplotlib should see the RR values returned by it (which *do* accept the precision specification). > > On Tue, Dec 6, 2022 at 12:53 PM Emmanuel Charpentier < > emanuel.c...@gmail.com> wrote: > >> Question already asked on

[sage-support] Plot doesn't respect numerical precision specification.

2022-12-06 Thread Emmanuel Charpentier
Question already asked on |`ask.sagemath.org`](https://ask.sagemath.org/question/64934/plotting-ill-conditionned-function/), where it didn't attract a lot of attention... Let ``` sage: f(x)=log(tan(pi/2*tanh(x))).diff(x) ; f x |--> -1/2*pi*(tan(1/2*pi*tanh(x))^2 + 1)*(tanh(x)^2 -

Re: [sage-support] Re: Sagecell : is it possible to install the Wolfram engine ?

2022-12-02 Thread Emmanuel Charpentier
William, Le mercredi 30 novembre 2022 à 18:00:22 UTC+1, wst...@gmail.com a écrit : > On Wed, Nov 30, 2022 at 1:26 AM Dima Pasechnik wrote: > > > > On Sat, Nov 19, 2022 at 7:59 PM William Stein wrote: > > > > > > On Sat, Nov 19, 2022 at 11:25 AM kcrisman wrote: > > > > > > > > Though see

Re: [sage-support] Re: Sagecell : is it possible to install the Wolfram engine ?

2022-11-30 Thread Emmanuel Charpentier
*Timeo advocatos a communa lege loquentes... *The relevant precedents in (what passes for) american law strongly hint at a very complicated resolution (which would enrich lawyers and nobody else...). I do not know if William's analysis is right, but it seems to be *prudent*, and therefore a

Re: [sage-support] Re: Rendering tables in jupyter notebook

2022-11-20 Thread Emmanuel Charpentier
ntation choices, and, for example, systematically rewrite `1/sqrt(2)` as `sqrt(2)/2`. Even if you sacrifice a goat ;-)... > Regards > G > > On Sun, Nov 20, 2022 at 3:36 PM Emmanuel Charpentier < > emanuel.c...@gmail.com> wrote: > >> > How can I ask Sage to place e

[sage-support] Re: Rendering tables in jupyter notebook

2022-11-20 Thread Emmanuel Charpentier
> How can I ask Sage to place each factorization in the right column on a single line. Both the display in a console and the LaTeX display given by `view` are single-lined. I can reproduce your problem in Jupyter ; therefore, I think that the question should be directed to a Jupyter-centered

[sage-support] Re: Listing elements of a finite ring.

2022-11-20 Thread Emmanuel Charpentier
No predefined method, but listing S’s elements seems easy : sage: R1.=GF(97)[] sage: p=lambda x:x^2+2 sage: S=R1.quotient(p(t),'a') sage: L=[u for u in S] sage: len(L) 9409 HTH, ​ Le dimanche 20 novembre 2022 à 07:39:27 UTC+1, gauri...@gmail.com a écrit : > I am afraid I cannot seem to find

[sage-support] Sagecell : is it possible to install the Wolfram engine ?

2022-11-19 Thread Emmanuel Charpentier
Dear list Now that the *gratis* (but by no means free) [Wofram engine](https://www.wolfram.com/engine/) can be used for "pre-production" projects, it seems to me that it *could* be installed on `sagegell.sagemath.org`, this allowing access to the `algorithm="mathematica"` options and, more

[sage-support] Re: Plotting the solution returned by desolve

2022-11-15 Thread Emmanuel Charpentier
Try this : sage: var("x, t") ## t will be used later (x, t) sage: y=function("y") ## Note : no default argument sage: sol=desolve(diff(y(x),x)==(x*y(x)^2 - cos(x)*sin(x) )/(y(x)*(1 - x^2)) ,y(x), ics=[0, 2]) ; sol ## Note : specify y argument 1/2*(x^2 - 1)*y(x)^2 + 1/2*cos(x)^2 == (-3/2)

[sage-support] Re: Somethog in rotten is the state of Maxima...

2022-11-03 Thread Emmanuel Charpentier
True You are right…. ​ Le jeudi 3 novembre 2022 à 16:51:31 UTC+1, Emmanuel Charpentier a écrit : > Le jeudi 3 novembre 2022 à 12:59:48 UTC+1, axio…@yahoo.de a écrit : > > @Emmanuel, why are you saying that FriCAS returns the same as sage? >> > I tried solve(Sys0, IVars) and g

[sage-support] Re: Plotting heat maps of scalar fields in SAGE

2022-10-19 Thread Emmanuel Charpentier
That can be done in Sage in a variety of ways . Here’s one : var("x, y") L = 3# Plotted function f =lambda x,y:cos(x)-2*y# Coloring# Colormap cm=colormaps["RdBu"]# We have to scale the colormap :# Range of values : possible shortcut via some analytical obviousnesses :# cmin = f(-3, 3).n()#

[sage-support] Re: Somethog in rotten is the state of Maxima...

2022-10-09 Thread Emmanuel Charpentier
It turns out that the original author has also posted this problem in sage-devel <https://groups.google.com/g/sage-devel/c/6jIKV1hPoCQ>, wher we should continue… ​ Le dimanche 9 octobre 2022 à 18:27:54 UTC+2, Nils Bruin a écrit : > On Sunday, 9 October 2022 at 08:45:36 UTC-7

[sage-support] Somethog in rotten is the state of Maxima...

2022-10-09 Thread Emmanuel Charpentier
... and all is not fresh in Sympy's realm either. Full details in [this ask.sagematjh.org question](https://ask.sagemath.org/question/64344/solving-a-system-of-linear-equations-with-complex-numbers-yields-false-solution/?answer=64363#post-id-64363). TL;DR : a linear system, perfectly solved by

[sage-support] Sagetex version ?

2022-08-20 Thread Emmanuel Charpentier
I do not understand my installation of sagetex. As far as I understand it, Sage will use the files accessible via $SAGE_ROOT/venv/share/texmf/tex/latex/sagetex, and that’s what I symlinked to my LaTeX setup (in /usr/local/share/tex/latex/ in a Debian testing installation). However, this

[sage-support] Re: Solving system of Linear Equatin over finite fields.

2022-05-11 Thread Emmanuel Charpentier
Your example has several problems : 1) You don’t define your polynomial indeterminates ; you should Rx.inject_variables(). 2) The syntax you use to substitute values in f is questionable… 3) f(v) is a polynomial in x0..x9 over GF(7), *not* a symbolic expression. Therefore f(v)==1 is *not* a

Re: [sage-support] Unexpected result for cos(a)^2 + sin(a)^2, question about variables

2022-04-30 Thread Emmanuel Charpentier
Also : sage: b.simplify_trig() 1 Using specific simplifications in a specific order is often the key to get interesting results that the brute-force simplify_full cannot. Such simplifications are : sage: import re sage: print(", ".join([v[0] for v in list(map(lambda

[sage-support] Re: \ZZ not defined

2022-04-18 Thread Emmanuel Charpentier
This means that Mathjax, which is used by Jupyter to interpret LaTeX expressions, has no definition of a `\ZZ` LaTeX macro. On 9.6.rc0, I get `\Bold푍/6\Bold푍`, which is not interpreted by `mathjax` either. I don't know how to work around this with Mathjax. Would you mind filing a ticket ? Le

Re: [sage-support] Solving logarithmic equations

2022-04-09 Thread Emmanuel Charpentier
BTW : sage: solve(1+2*log(x+1, 4)==2*log(x,2), x, to_poly_solve="force") [x == -sqrt(3) + 1, x == sqrt(3) + 1] HTH, ​ Le samedi 9 avril 2022 à 11:34:10 UTC+2, wdjo...@gmail.com a écrit : > On Sat, Apr 9, 2022 at 5:18 AM Paolo Robillos > wrote: > > > > Hi, > > > > I am trying to solve the

[sage-support] Re: search_def(), search_src() are not working in Sage

2022-03-23 Thread Emmanuel Charpentier
How did you install Sage ? And on what platform ? Le mercredi 23 mars 2022 à 06:37:20 UTC+1, adarsh.k...@gmail.com a écrit : > Hello everyone, > I was going through some of the Sage functions and I wanted to look it up > in the source file definitions. For this I tried search_def() and then >

Re: [sage-support] Re: 2 questions on var

2022-03-08 Thread Emmanuel Charpentier
even more simpler :-) : sage: V=var("v", n=8) sage: V (v0, v1, v2, v3, v4, v5, v6, v7) sage: v2 v2 sage: V[2] v2 *“Who could ask for anything more ?”* ​ Le mardi 8 mars 2022 à 08:20:07 UTC+1, slelievre a écrit : > Even more practical, I find, is to name the tuple of indexed variables: >

Re: [sage-support] nonlinear equation system

2022-03-03 Thread Emmanuel Charpentier
Or (unexpectedly much simpler) : ``` sage: mathematica.Reduce(Sys, Vars) False ``` Le jeudi 3 mars 2022 à 15:09:27 UTC+1, Emmanuel Charpentier a écrit : > And, BTW : > > sage: mathematica("Sys = {%s}"%", ".join([u._mathematica_init_() for u in > Sys])) > {

Re: [sage-support] nonlinear equation system

2022-03-03 Thread Emmanuel Charpentier
+ T^2 == 1/2, -(EE*RR) + F*T - 2*J*T == 0, II^2 - J^2 - RR^2 + T^2 == -1} sage: mathematica("Vars = {%s}"%", ".join([u._mathematica_init_() for u in Vars])) {A, B, EE, F, II, J, RR, T} sage: mathematica("Reduce[Sys, Vars]") False HTH, ​ Le jeudi 3 mars 2022 à 15:0

Re: [sage-support] nonlinear equation system

2022-03-03 Thread Emmanuel Charpentier
FWIW, executing : reset() # Don't scratch Sage's predefined identifiers, for sanity's sake... Vars= var('A B EE F II J RR T') eq1 = A*EE-B^2-B*F+EE^2==1 eq4 = A*II-B*J+II^2+RR^2==-1/2 eq5 = A*RR-B*T+2*RR*II==0 eq6 = B*II-EE*J+II*J+RR*T==0 eq8 = -B*RR+EE*T-RR*J-II*T==0 eq9 =

[sage-support] Re: mathematica_free error

2022-02-19 Thread Emmanuel Charpentier
I have had similar problems. Wolfram may have changed (again !) something in their output format... Since I know zilch about HTML mysteries and miseries, I can't offer anything but my warmest condolences... Le lundi 14 février 2022 à 17:17:20 UTC+1, rodrigos...@gmail.com a écrit : > Good

[sage-support] Re: Inter-versions reproducibility problem of random elements.

2022-02-06 Thread Emmanuel Charpentier
Also : coud you report the results on as many platforms and/or versions as possible ? Le dimanche 6 février 2022 à 20:23:39 UTC+1, Emmanuel Charpentier a écrit : > Seen in this thread > <https://groups.google.com/g/sage-support/c/IvjMhqryRQs> : > > On Sagecell <https://

[sage-support] Inter-versions reproducibility problem of random elements.

2022-02-06 Thread Emmanuel Charpentier
Seen in this thread : On Sagecell : print(sage.version.version) with seed(0): M = matrix(AA, 3, 3, lambda u,v: AA.random_element()) M.apply_map(lambda u:u.radical_expression()) prints 9.4 [-2 2 -2]

Re: [sage-support] Re: Eigen spaces of algebraic matrices broken ?

2022-02-06 Thread Emmanuel Charpentier
Nins and me got *different* random matrices : his was composed of integers in (-2..2), and Sage could compute its eigenspaces ; mine was : sage: with seed(0): M = matrix(AA, 3, 3, lambda u,v: AA.random_element()) sage: M.apply_map(lambda u:u.radical_expression()) [ -sqrt(2) - 1

[sage-support] Re: Eigen spaces of algebraic matrices broken ?

2022-02-06 Thread Emmanuel Charpentier
That was my initial complaint... ;-) Le samedi 5 février 2022 à 18:05:42 UTC+1, alan_thoma...@yahoo.co.uk a écrit : > M.eigenvalues() never returns. > On Saturday, February 5, 2022 at 11:48:47 AM UTC Emmanuel Charpentier > wrote: > >> What exactly fails in the example ? &

[sage-support] Re: Eigen spaces of algebraic matrices broken ?

2022-02-05 Thread Emmanuel Charpentier
, February 3, 2022 at 6:44:47 AM UTC Emmanuel Charpentier wrote: > >> Le mercredi 2 février 2022 à 22:15:00 UTC+1, Nils Bruin a écrit : >> >> On Monday, 31 January 2022 at 15:19:49 UTC-8 Emmanuel Charpentier wrote: >>> >>>> As advertised, an atempt at a mi

[sage-support] Re: Eigen spaces of algebraic matrices broken ?

2022-02-02 Thread Emmanuel Charpentier
Le mercredi 2 février 2022 à 22:15:00 UTC+1, Nils Bruin a écrit : On Monday, 31 January 2022 at 15:19:49 UTC-8 Emmanuel Charpentier wrote: > >> As advertised, an atempt at a minimal (non-)working example : >> >> # Reproducible minimal example >> with seed(0): M =

[sage-support] Re: init_printing from sympy is no longer working in SageCell

2022-02-02 Thread Emmanuel Charpentier
WorksForMe(TM) in Sage 9.5, in both Jupyter and Jupyterlab... HTH, Le mercredi 2 février 2022 à 18:42:48 UTC+1, dsfitz...@gmail.com a écrit : > I'm teaching a linear algebra course where we use the Sympy Python package > for a lot of the computations. This includes a PreTeXt textbook where

[sage-support] Re: Eigen spaces of algebraic matrices broken ?

2022-02-02 Thread Emmanuel Charpentier
See lines #7-8 of the "Minimal example" : Le mercredi 2 février 2022 à 11:57:41 UTC+1, alan_thoma...@yahoo.co.uk a écrit : > > What is v0? When I run the above it isn't defined. > On Monday, January 31, 2022 at 11:19:49 PM UTC Emmanuel Charpentier wrote: > >&

[sage-support] Re: Eigen spaces of algebraic matrices broken ?

2022-01-31 Thread Emmanuel Charpentier
init KeyboardInterrupt: 1.000?*v0 - 35.57125011095806?*v1 - 492.8896998473554? Similarly, V00.coefficient(v0).is_one() “never returns”. The current aritmetic on algebraics is therefore problematic for this kind of problems. Suggestions ? ​ Le lundi 31 janvier 2022 à 17:59:34 UTC+1,

[sage-support] Re: Eigen spaces of algebraic matrices broken ?

2022-01-31 Thread Emmanuel Charpentier
29 January 2022 at 13:51:14 UTC-8 Emmanuel Charpentier wrote: > >> /usr/local/sage-9/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/sage/rings/qqbar.py >> >> in pari_field(self) >> >>>3134 if self._pari_field is None:

[sage-support] Re: Eigen spaces of algebraic matrices broken ?

2022-01-29 Thread Emmanuel Charpentier
+1, Emmanuel Charpentier a écrit : > The promlem seems tolie wit (my use of) polynomial rings to compute the > eigenvectors. Manually, after executing > > dims = M.dimensions() > if dims[0] != dims[1]: raise DomainError("Not a square matrix !") > dim = dims[0] > BR

[sage-support] Re: Eigen spaces of algebraic matrices broken ?

2022-01-29 Thread Emmanuel Charpentier
ari_field(self) 3134 if self._pari_field is None: 3135 pari_pol = self._field.pari_polynomial("y") -> 3136 self._pari_field = pari_pol.nfinit(1) 3137 return self._pari_field 3138 cypari2/auto_gen.pxi in cypari2.gen.Gen_base.nfinit()

[sage-support] Eigen spaces of algebraic matrices broken ?

2022-01-29 Thread Emmanuel Charpentier
Setup : Sage 9.5.rc1 running in Debian testing on core i7 + 16 GB RAM. def test(Size=2, Ring=QQ): from time import time as stime with seed(0): M = matrix(Ring, Size, Size, lambda u, v:Ring.random_element()) t0 = stime() SL =

Re: [sage-support] Problem in running SageMath application

2022-01-15 Thread Emmanuel Charpentier
Le samedi 15 janvier 2022 à 10:52:52 UTC+1, slelievre a écrit : > 2022-01-15 09:05:10 UTC, Dima Pasechnik: > > > > what is "Gilbert Source"? > > I would bet some auto-respelling software thought > that was a nice way to reinterpret "GitHub releases" > to make the conversation interesting.

Re: [sage-support] Re: Snowman

2022-01-15 Thread Emmanuel Charpentier
Homework ? Le vendredi 14 janvier 2022 à 19:41:05 UTC+1, iva.po...@gmail.com a écrit : > Sorry, here is the picture how snowman has to look like..I started drawing > with a Sphere, but I can't get it like in the picture. > > -- You received this message because you are subscribed to the

[sage-support] Re: Problem iniciating sage

2022-01-10 Thread Emmanuel Charpentier
You are trying to run Sage on a virtual machine. This Linix virtual machine requires you to log in. I note that this virtual machine runs Linux 2.6.32 on a 32-bit virtual machine, which is downright paleontologic... Are you trying to run a pre-packaged "appliance" ? Those weren't updated for

[sage-support] Re: Sage Crash report (again...)

2021-12-18 Thread Emmanuel Charpentier
n installation problem occurring on a previously-working system. Thank you for your attention. ​ Le samedi 18 décembre 2021 à 10:44:07 UTC+1, Emmanuel Charpentier a écrit : > Same circumstances as in the previous case : on Debian testing running on > core i7 + 16 GB RAM, after upgrading Sage

[sage-support] Sage Crash report (again...)

2021-12-18 Thread Emmanuel Charpentier
Same circumstances as in the previous case : on Debian testing running on core i7 + 16 GB RAM, after upgrading Sage 9.5.beta7 compiled from a git tree  to 9.5.beta8, Sage crashes at startup. Crash report enclosed I'll try the same steps as in the last occurrence... -- Emmanuel Charpentier

[sage-support] Re: Bug in integrals

2021-12-16 Thread Emmanuel Charpentier
A nice one, indeed. Here, Sage seems to use Maxima’s integrator : sage: table([[u,(f(x)-g(x)).integrate(x,algorithm=u)] for u in ["maxima", "sympy", "giac", "fricas", "mathematica_free"]], header_row=["Algorithm", "Indefinite integral"]) Algorithm Indefinite integral

[sage-support] Re: Bug in integrals

2021-12-16 Thread Emmanuel Charpentier
Le mercredi 15 décembre 2021 à 20:43:07 UTC+1, juanlui...@gmail.com a écrit : > See this example: > > f(x)=(x+sin(3*x))*exp(-3*x*I) > g(x)=f(x).expand() > integral(f(x)-g(x),(x,0,2*pi)) > > The answer is I*pi, but it should be 0. > Huh ? f has no poles ; therefore, the value of the integrate

[sage-support] Re: Deprecation warning when calling certain symbolic commands on Ubuntu 21.10 but not on 20.04 (SageMath 9.4)

2021-12-13 Thread Emmanuel Charpentier
chmayr a écrit : > It happens in command line and in jupyter notebook (firefox). > > On Monday, December 13, 2021 at 11:36:24 PM UTC+1 Emmanuel Charpentier > wrote: > >> Smells of an interface problem... >> >> Are you using a notebook, the command line or another interf

[sage-support] Re: Deprecation warning when calling certain symbolic commands on Ubuntu 21.10 but not on 20.04 (SageMath 9.4)

2021-12-13 Thread Emmanuel Charpentier
Smells of an interface problem... Are you using a notebook, the command line or another interface (e. g. sage_shell_mode in emacs) ? If notebook, which browser do you use ? Le lundi 13 décembre 2021 à 20:31:48 UTC+1, Marcus Aichmayr a écrit : > Hi, > > I'm using SageMath 9.4 on both Ubuntu

Re: [sage-support] Re: Sage crash report

2021-12-10 Thread Emmanuel Charpentier
anything when I stop-and-close a Jupyter notebook. Thoughts ? ​ Le vendredi 10 décembre 2021 à 16:39:53 UTC+1, Emmanuel Charpentier a écrit : > make giac-clean && make did it ! > > (*Alla cinese*) 10^4 thanks ! > ​ > Le vendredi 10 décembre 2021 à 11:56:00 UTC+1, d

Re: [sage-support] Re: Sage crash report

2021-12-10 Thread Emmanuel Charpentier
r sure. > > On Fri, Dec 10, 2021 at 10:36 AM Emmanuel Charpentier > wrote: > > > > > > > > Le vendredi 10 décembre 2021 à 01:04:33 UTC+1, Matthias Koeppe a écrit : > >> > >> "make sagelib-clean" will fix this > > > > > > N

[sage-support] Re: Sage crash report

2021-12-10 Thread Emmanuel Charpentier
be deleted. Set the environment variable SAGE_KEEP_BUILT_SPKGS=yes to prevent this. make[1]: *** [Makefile:39 : all-start] Erreur 1 make[1] : on quitte le répertoire « /usr/local/sage-9 » make: *** [Makefile:13 : all] Erreur 2 ``` Suggestions ? > On Thursday, December 9, 2021 at 12:18:02 PM UT

Re: [sage-support] another "how to simplify" question

2021-12-09 Thread Emmanuel Charpentier
In Sage, this can be written wrong.maxima_methods().trigrat().expand(). HTH, ​ Le jeudi 9 décembre 2021 à 10:37:11 UTC+1, Daniel Volinski a écrit : > Hi All, > > In Maxima (embedded in SageMath) you can use: > > expand(trigrat(integrate(integrate(sin(x^2),x,y,1),y,0,1))); > > in order to get

[sage-support] Transformations/functions of equalities (and possibly inequalities)

2021-12-08 Thread Emmanuel Charpentier
Sage can “distribute” many operations on equalities operands, such as : sage: var("a, b") (a, b) sage: (a==b)+3 a + 3 == b + 3 sage: 3*(a==b) 3*a == 3*b sage: (a==b)^3 a^3 == b^3 But not common functions : sage: log(a==b) log(a == b) sage: sin(a==b) sin(a == b) In both cases above,

[sage-support] Re: A problem with the Sage solvers

2021-12-06 Thread Emmanuel Charpentier
urrent in Sage 9.5.beta7). Sorry for the noise… ​ Le dimanche 5 décembre 2021 à 20:55:32 UTC+1, Emmanuel Charpentier a écrit : > ask.sagemat.org question > <https://ask.sagemath.org/question/59063/weird-c-values-from-solving-system-of-equations/> > > demonstrating a problem com

[sage-support] A problem with the Sage solvers

2021-12-05 Thread Emmanuel Charpentier
ask.sagemat.org question demonstrating a problem common to all free equation solvers : solve $$ \begin{align *}-a{1}^{3} a{2} + a{1} a{2}^{2} \ -3 \, a{1}^{2} a{2} b{1} + 2 \, a{1} a{2} b{2} +

Re: [sage-support] Re: Constrained optimization with strange result.

2021-11-30 Thread Emmanuel Charpentier
Le mardi 30 novembre 2021 à 18:18:35 UTC+1, cyrille piatecki a écrit : > Thanks Emmanuel for your so precious answer. But obviously the doc must be > upgraded. From > > "maxima", "fricas", "sympy", "giac" > > only "sympy&qu

Re: [sage-support] Re: Constrained optimization with strange result.

2021-11-30 Thread Emmanuel Charpentier
Le lundi 29 novembre 2021 à 16:33:41 UTC+1, cyrille piatecki a écrit : Thanks Emmanuel for your precious answer. But It generates some few new > questions : > - is there a place in the documentation where I can find the information > on `solve()` and mainly its options ? > The d

[sage-support] Re: Constrained optimization with strange result.

2021-11-29 Thread Emmanuel Charpentier
Variables of the form z_ are *integer* variables created by Maxima, which attempts to give you *also* the complex roots, if any, thus ignoring the assumptions on x, y and l. Note that : sage: solve(FOC[0], x) --- [

Re: [sage-support] I'm confused with symbolic fractions

2021-11-27 Thread Emmanuel Charpentier
Alternatives : sage: var("a, b, c") (a, b, c) sage: f=1/(a-b)+2/(b-c)+3/(c-a) sage: g=f*(a-b)*(b-c)*(c-a) sage: f 1/(a - b) - 3/(a - c) + 2/(b - c) sage: f.factor() (2*a^2 - 4*a*b + 3*b^2 - 2*b*c + c^2)/((a - b)*(a - c)*(b - c)) sage: g -(a - b)*(a - c)*(b - c)*(1/(a - b) - 3/(a - c) + 2/(b -

[sage-support] Re: why does this not work? i am trying to create a pattern 1 2 3 4 5 6 which will repeat 6 times. i got this method from my lecturer but it is not working

2021-11-25 Thread Emmanuel Charpentier
Sage (i. e. Python) solution : list(range(1,9))*6 HTH, ​ Le samedi 13 novembre 2021 à 17:09:54 UTC+1, abdulra...@gmail.com a écrit : > -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails

[sage-support] Re: subs

2021-11-24 Thread Emmanuel Charpentier
Also : sage: import sympy sage: ex._sympy_().subs({(5^x)._sympy_():t._sympy_()})._sage_() t^2 - 7*t + 4 HTH, ​ Le mercredi 24 novembre 2021 à 17:20:10 UTC+1, Emmanuel Charpentier a écrit : > FWIW : > > sage: var("x, t") > (x, t) > sage: maxima_calculus.ratsubst(t,5^

[sage-support] Re: subs

2021-11-24 Thread Emmanuel Charpentier
FWIW : sage: var("x, t") (x, t) sage: maxima_calculus.ratsubst(t,5^x, ex).sage() t^2 - 7*t + 4 sage: maxima_calculus.lratsubst([5^x==t], ex).sage() t^2 - 7*t + 4 See also this ask.sagemath.org question

Re: [sage-support] After (routine) upgrade of Python in Debian testing, command-line Sage crashes at startup

2021-11-10 Thread Emmanuel Charpentier
FWIW, I just positively reviewed the Mathias Koeppe's solution to the ticket. HTH, Le mercredi 10 novembre 2021 à 20:06:54 UTC+1, Emmanuel Charpentier a écrit : > As reported in the ticket : > > charpent@zen-book-flip:~$ python --version > Python 3.9.8 > > HTH, > ​ >

Re: [sage-support] After (routine) upgrade of Python in Debian testing, command-line Sage crashes at startup

2021-11-10 Thread Emmanuel Charpentier
As reported in the ticket : charpent@zen-book-flip:~$ python --version Python 3.9.8 HTH, ​ Le mercredi 10 novembre 2021 à 19:35:20 UTC+1, dim...@gmail.com a écrit : > On Wed, Nov 10, 2021 at 5:41 PM Emmanuel Charpentier < > emanuel.c...@gmail.com> wrote:

Re: [sage-support] After (routine) upgrade of Python in Debian testing, command-line Sage crashes at startup

2021-11-10 Thread Emmanuel Charpentier
org/ticket/32852#ticket>…, whose priority I’m uncertain about. Obvious workaround : ./configure --with-system-python3=no && make HTH, ​ Le mercredi 10 novembre 2021 à 12:31:06 UTC+1, Jan Groenewald a écrit : > Maybe sage -f ipython will fix it? > > > On Wed, 10 Nov 2021 at 1

Re: [sage-support] After (routine) upgrade of Python in Debian testing, command-line Sage crashes at startup

2021-11-10 Thread Emmanuel Charpentier
Le mercredi 10 novembre 2021 à 10:49:28 UTC+1, dim…@gmail.com a écrit : > > On Wed, 10 Nov 2021, 09:45 Emmanuel Charpentier, > wrote: > >> >> >> Le mercredi 10 novembre 2021 à 10:41:59 UTC+1, dim...@gmail.com a écrit : >> >>> it might be t

Re: [sage-support] After (routine) upgrade of Python in Debian testing, command-line Sage crashes at startup

2021-11-10 Thread Emmanuel Charpentier
Le mercredi 10 novembre 2021 à 10:41:59 UTC+1, dim...@gmail.com a écrit : > it might be that you have to rebuild all the cython/python packages of > Sage. > That amounts to rebuilding from scratch, no ? > On Wed, 10 Nov 2021, 09:35 Emmanuel Charpentier, > wrote: > &g

[sage-support] After (routine) upgrade of Python in Debian testing, command-line Sage crashes at startup

2021-11-10 Thread Emmanuel Charpentier
A routine upgrade of Debian testing (where a few Python binaries were upgraded, broke a formerly functional (command line) Sage. It now crashes at startup : charpent@p-202-021:~$ sage ┌┐ │ SageMath version 9.5.beta2, Release

[sage-support] Re: Inverse of a Matrix in a Polynomial Quotient Ring

2021-10-06 Thread Emmanuel Charpentier
of the implementation of inverses in your ring in this version... -- Emmanuel Charpentier Le mardi 5 octobre 2021 à 21:52:25 UTC+2, Samanta a écrit : > Hi supporters, > I am using SageMath (version 8.9) in my Ubuntu 18.04 LTS and during the > calculation of inverse of a matrix in the quotient ring

  1   2   3   4   5   >