Thanks for the answers! Both
plot3d(floor(min_symbolic(x, y)),(x,1,7),(y,1,7))
and
plot3d(lambda a, b: floor(min(a, b)),(x,1,7),(y,1,7))
produce the right plot.
I wonder whether the result of ?min might mention the existence of
min_symbolic, and similarly for max. When the first attempt fail
Recently I was trying to get SageMath to plot something:
plot3d(floor(min(x,y)),(x,1,7),(y,1,7))
The result looks like this:
I checked, and it does seem that both floor(min(7,1)) and
floor(min(1,7)) are equal to 1, as they should be. But that's not what
the plot shows. Any explanations of wha
In an introductory probability class, one computes the probability of
getting all of n possible coupons in r individual purchases. The naive
approach with inclusion-exclusion leads to the awful formula
f(n,r) = \sum_{k=0}^n \binom{n,k} \frac{(n-k)^r}{n^r}
Computing this in GP is straightforwar
Is there a way to change the default when calling "solve"?
Fernando
On 12/3/2023 8:37 AM, Dima Pasechnik wrote:
Yes, Sage modifies the defaults of Maxima, in particular we set domain to
complex.
On 3 December 2023 12:28:45 GMT, Oscar Benjamin
wrote:
On Wed, 29 Nov 2023 at 12:40, Eric Gourg
I'm in the final stages of writing a book on infinite series for
calculus students. (I claim my way to do it is better than what you find
in standard textbooks.) I use Sage throughout, but only very simple
stuff. Most of my students use SageMath Cell and find that more than
adequate for what th
f the most
severe bugs in sage ever, since it is so likely to be randomly
misleading...
On Thu, Apr 13, 2023 at 1:15 PM Fernando Gouvea
wrote:
I must be missing something here...
sage: g(x)=x^10/(1-x)^11
sage: plot(g(x),(0,0.9))
sage: g(0.7)
15945.8104850773
What
I must be missing something here...
sage: g(x)=x^10/(1-x)^11
sage: plot(g(x),(0,0.9))
sage: g(0.7)
15945.8104850773
What's wrong?
Fernando
--
=
Fernando Q. Gouveahttp://www.colby.edu/~fqgouvea
Carter Professor of Mathematics
Dept. of
My college provides a Jupyter interface to Sage that runs version 9.0. I
just tried using the real_nth_root function and got a "no such function"
error. Was the function added after 9.0? Or is this an installation problem?
Thanks,
Fernando
--
==
Ubuntu includes python3, but not python without a number. I guess I could
make a symlink?
Fernando
On Sun, Feb 27, 2022 at 5:57 PM Dima Pasechnik wrote:
> On Sun, Feb 27, 2022 at 9:59 PM Fernando Gouvea
> wrote:
> >
> > I was trying to install SageMath using WSL, mostly
I was trying to install SageMath using WSL, mostly to learn how it is
done. Alas, the latest available Ubuntu distribution for WSL seems to be
20.04, which comes with SageMath 9.0. I have 9.2 running on Windows, so
no advantage to that.
I did find Ubuntu 20.04 binaries for SageMath 9.4 in
htt
I don’t see archlinux in the Microsoft store.
Fernando
On Sun, Feb 27, 2022 at 10:05 AM Dima Pasechnik wrote:
>
>
> On Sun, 27 Feb 2022, 14:37 G. M.-S., wrote:
>
>>
>> Thanks, Samuel.
>>
>> I think it is a pity there is nothing more straightforward…
>>
>> But you will tell me (to look for some
9.2 on Windows:
sage: 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())
9.2
[-2 2 -2]
[-2 0 2]
[-1 2 2]
sagecell.sagemath.org:
9.4
[-2 2 -2]
[-2 0 2]
[-1 2 2]
I'll try 9.3 on Windo
- https://trac.sagemath.org/ticket/32424 (waiting for review)
- https://trac.sagemath.org/ticket/32488 (which will be in
9.5.beta2)
On Thursday, September 23, 2021 at 2:49:40 AM UTC-7 Dima
Pasechnik wrote:
On Wed, Sep 22, 2021 at 10:12 PM Fernando Gouvea
Update: the problem is machine-dependent. On one Dell laptop, plot works
with no problem. On a different one, big crash.
Fernando
On 9/22/2021 3:49 PM, William Stein wrote:
-- Forwarded message -
From: Fernando Q. Gouvea
Date: Wed, Sep 22, 2021 at 12:26 PM
Subject: Re: [sage-s
I just realized that when faced with
log(a)-log(b)
Sage does not normally simplify that log(a/b), or vice-versa. I tried
using f.simplify_full() and friends with no effect.
Then I tried to enter
?simplify_full
and got
Object `simplify_full` not found.
I notice that there is a simplify_log
Good news! When is 9.2 expected to be ready?
Fernando
On 9/29/2020 3:54 AM, Eric Gourgoulhon wrote:
I confirm the issue with the Taylor series with Sage 9.1. Fortunately,
the bug seems to have been fixed for Sage 9.2. As Emmanuel, I get the
correct Taylor series with Sage 9.2.beta13.
Le mard
I'm running Sage 9.0 on a Windows 10 machine.
I get the same incorrect series from the built-in sin_integral function,
so the problem is not the integration.
sage: taylor(sin_integral(x),x,0,10)
73/466560*x^9 - 127/35280*x^7 + 31/600*x^5 - 7/18*x^3 + x
Fernando
On 9/29/2020 3:36 AM, Emmanuel
Thanks! I've already learned more.
What I first did was this:
sage: PP
-0.625*t^4 + 23.55000*t^3 - 264.0510*t^2 +
1026.900*t - 853.8000
sage: L=solve(PP==0,t)
sage: L[1]
t ==
-1/1250*sqrt((390625*(4/1953125*I*sqrt(37468876945450884598)*sqrt(5) -
39
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 attempt
I'm working with ideals in the polynomial ring in three variables.
sage> R.=QQ[]
sage> f=u*v-w
sage> g=u^2-v
sage> I=Ideal(f,g)
sage> I.is_prime()
True
sage> I.associated_primes()
[Ideal (v^2 - u*w, u*v - w, u^2 - v) of Multivariate Polynomial
Ring in u, v, w over Rational Field]
That
OK, so I'm doing a computation and my result is something I called
thirdroot. I'm trying to test whether it's equal to a particular
expression. Can someone explain what is wrong here?
(s*t+1)^2/(s+t)^2
(s*t + 1)^2/(s + t)^2
factor(thirdroot+1)
(s*t + 1)^2/(s + t)^2
thirdroot+1-(s*t+1)^2/(s+
),(u,-1,1),(v,-1,1))
On Thu, Mar 5, 2020 at 4:51 PM Dima Pasechnik wrote:
On Thu, Mar 5, 2020 at 2:32 PM Fernando Gouvea wrote:
This works, in the sense that there's no error. One does get a bunch of
extraneous points near the boundary of the disk. It's as if plot_points were
trying
return y^2-x^3+x
: implicit_plot(f_uv,(u,-1,1),(v,-1,1))
>
> On Tue, Mar 3, 2020 at 8:20 PM Fernando Gouvea
mailto:fqgou...@colby.edu>> wrote:
>
> Here's what I ended up trying, with r=3:
>
> var('x y u v')
> x=u*sqrt(9/(1-u^2-v^2))
;x y u v r phi')
: u=r*cos(phi)
: v=r*sin(phi)
: x=u*sqrt(9/(1-r^2))
: y=v*sqrt(9/(1-r^2))
: implicit_plot(y^2-x^3+x==0,(r,0,999/1000),(phi,-pi,pi))
On Tue, Mar 3, 2020 at 10:28 PM Dima Pasechnik wrote:
On Tue, Mar 3, 2020 at 10:10 PM Fernando Gouvea wrote:
The whole p
^3+x==0,(r,0,999/1000),(phi,-pi,pi))
>
> On Tue, Mar 3, 2020 at 10:28 PM Dima Pasechnik wrote:
> >
> > On Tue, Mar 3, 2020 at 10:10 PM Fernando Gouvea
> wrote:
> > >
> > > The whole point of this is to show the behavior of the curve near
> infinity, so c
The whole point of this is to show the behavior of the curve near
infinity, so changing the limits is not an option.
Fernando
On 3/3/2020 4:15 PM, Dima Pasechnik wrote:
On Tue, Mar 3, 2020 at 8:20 PM Fernando Gouvea wrote:
Here's what I ended up trying, with r=3:
var('x y u v
, self._py_constants
ValueError: negative number to a fractional power not real
Is there some way to tell implicit_plot to stay inside u^2+v^2\leq 1? Or
to ignore complex values?
The equivalent code seems to give the correct graph in Mathematica.
Fernando
On 2/29/2020 5:29 PM, Fernando Gouvea
Parametric plots won't work for general algebraic curves.
But I'm also not sure how to implement the transformation into a circle.
I'll look at the documentation for plots.
Fernando
On 3/1/2020 8:50 AM, David Joyner wrote:
On Sat, Feb 29, 2020 at 5:29 PM Fernando Gouve
(Repost, as the first message seems to have ended up in the wrong thread.)
Some years ago in a book review, David Roberts had the idea of plotting
an algebraic curve using the transformation (u,v) = (x,y)/(r^2 + x^2
+ y^2 )^1/2 , which transforms the plane into a circle and makes it
easy to
Some years ago in a book review, David Roberts had the idea of plotting an
algebraic curve using the transformation (u,v) = (x,y)/(r2 + x2 + y2)1/2,
which transforms the plane into a circle and makes it easy to visualize the
projective completion of the curve. You can see some of his plots at
http
I typically use Windows, but today I was trying to install Sage on the Mac
in one of my classrooms. It turns out to be running OSX 10.13.6, and the
only binaries I could find were version 8.7. I managed to download and
install those. It runs in a terminal window. The instructions say to type
notebo
If I create the p-adics in the default way, p-adic numbers are power series:
K=Qp(7)
a=K(1/42)
print a
6*7^-1 + 5 + 5*7 + 5*7^2 + 5*7^3 + 5*7^4 + 5*7^5 + 5*7^6 + 5*7^7 + 5*7^8
+ 5*7^9 + 5*7^10 + 5*7^11 + 5*7^12 + 5*7^13 + 5*7^14 + 5*7^15 + 5*7^16 +
5*7^17 + 5*7^18 + O(7^19)
On the other hand
Thanks to both Vincent and Nils!
Sage seems to include lots of ways to do things... Let me see if I
understand. Vincent suggested
R = PolynomialRing(Qp(7), 'x')
x = R.gen()
p = x^2 - 2
pari.padicappr(p, 4 + O(7^10))
Which works, but relies on using the built-in pari support; on the cell
serv
Hi, everyone.
I'm an old user of GP and a very raw beginner when it comes to Sage, so
please forgive the naiveté!
For a new edition of my book on the p-adics I am trying to add pointers to
how to do things on a computer with p-adic numbers. Everything in the book
is very elementary, so I'
34 matches
Mail list logo