[sage-support] Re: how to do this in SAGE

2017-02-13 Thread valeriodea
Thanks for the explanations. I now know how to use the tab completion in SAGE and it's useful. Best, Valerio On Wednesday, February 8, 2017 at 4:21:31 PM UTC-6, Simon King wrote: > > Hi! > > On 2017-02-08, valer...@gmail.com > wrote: > > Is there a difference between

[sage-support] Re: how to do this in SAGE

2017-02-08 Thread Simon King
Hi! On 2017-02-08, valerio...@gmail.com wrote: > Is there a difference between > return expand(f^2) > and > return (g^2).expand() > or are they perfect synonyms? SageMath's language is Python, in particular it is object oriented. Personally, I'd always prefer calling a

[sage-support] Re: how to do this in SAGE

2017-02-08 Thread Dima Pasechnik
On Wednesday, February 8, 2017 at 6:45:41 PM UTC, valer...@gmail.com wrote: > > Thank you to the people who responded, all answers were helpful. > > Is there a difference between > return expand(f^2) > and > return (g^2).expand() > or are they perfect synonyms? > the documentation of expand()

[sage-support] Re: how to do this in SAGE

2017-02-08 Thread valeriodea
Thank you to the people who responded, all answers were helpful. Is there a difference between return expand(f^2) and return (g^2).expand() or are they perfect synonyms? The same question for lambda f: (f^2).expand() (in Simon's answer): is the lambda construction just a shortcut, equivalent

[sage-support] Re: how to do this in SAGE

2017-02-07 Thread Simon King
Hi, On 2017-02-07, valerio...@gmail.com wrote: > I have not been able to use f as a parameter. To use a simpler example, > what is the SAGE code corresponding to this Mathematica code: > f[x_]:=1+x+x^2 > g[x_]:=1+x+x^2+x^3 > Ex[f_]:=Expand[f[x]^2] > Ex[f] > > 1 + 2 x + 3

Re: [sage-support] Re: how to do this in SAGE

2017-02-07 Thread David Joyner
On Tue, Feb 7, 2017 at 7:14 AM, wrote: > > > On Saturday, February 4, 2017 at 4:46:38 PM UTC-6, Dima Pasechnik wrote: >> >> >> >> On Saturday, February 4, 2017 at 8:48:22 PM UTC, valer...@gmail.com wrote: >>> >>> I would like to know the right way to do in SAGE what I am

[sage-support] Re: how to do this in SAGE

2017-02-07 Thread Dima Pasechnik
On Tuesday, February 7, 2017 at 12:14:49 PM UTC, valer...@gmail.com wrote: > > > > On Saturday, February 4, 2017 at 4:46:38 PM UTC-6, Dima Pasechnik wrote: >> >> >> >> On Saturday, February 4, 2017 at 8:48:22 PM UTC, valer...@gmail.com >> wrote: >>> >>> I would like to know the right way to do

[sage-support] Re: how to do this in SAGE

2017-02-07 Thread valeriodea
On Saturday, February 4, 2017 at 4:46:38 PM UTC-6, Dima Pasechnik wrote: > > > > On Saturday, February 4, 2017 at 8:48:22 PM UTC, valer...@gmail.com wrote: >> >> I would like to know the right way to do in SAGE what I am currently >> doing with Mathematica in these two examples (I actually know

[sage-support] Re: how to do this in SAGE

2017-02-04 Thread Dima Pasechnik
On Saturday, February 4, 2017 at 8:48:22 PM UTC, valer...@gmail.com wrote: > > I would like to know the right way to do in SAGE what I am currently doing > with Mathematica in these two examples (I actually know how to do the first > one in SAGE, but probably not in the best way): > 1) Finding