Ask Your Question

Masacroso's profile - activity

2020-05-26 06:49:19 -0500 answered a question Ubuntu 18.04 apt install - ModuleNotFoundError: No module named 'sage'

Alternatively you can download the last version of sagemath from it official web, then (after you have cleaned your not working installation of sage, say you have uninstalled it) you can do the following:

  1. Extract the file that contains sage to some folder, this would be the installation folder of sagemath.

  2. Install (if it is not already installed) jupyter.

  3. Now you need to add the sage kernel to jupyter running this command in the terminal (assuming that jupyter is available in your PATH):

     jupyter kernelspec install --user /folder-of-sage/local/share/jupyter/kernels/sagemath
    

    where /folder-of-sage is the direction of the folder where you have extracted sage.

  4. Now run in the terminal jupyter kernelspec list, this gives a list of the installed kernels of jupyter and the folder where each kernel was installed. Then open the folder where the kernel of sage was installed and the kernel.json file that you will find there, open it with some text editor and add the following just before the last }

    ,"env":{"SAGE_ROOT":"/folder-of-sage"}
    

    Finally save the file and close it.

And this is all. Now you can open jupyter (or jupyter lab) and find that the kernel of sage is installed and works correctly (to run jupyter you can run jupyter lab in a terminal.)

2020-05-21 20:45:27 -0500 commented question Sagemath, as an alternative of Geogebra

No, it is not possible. The capabilities of geogebra are unique, there is no software known to me with the functionalities of geogebra. Note that sage is a CAS, however geogebra is an app about geometric constructions, they are designed for different purposes and have a very different use. Your question is similar to ask if you can use a hammer as a substitute of a spoon to eat.

2020-05-03 02:06:57 -0500 received badge  Enthusiast
2020-05-02 12:47:26 -0500 commented answer Changing fonts in mark down cells.

@Cyrille about the button you can try something like this. If Im not wrong you can use python code inside sagemath cells, so it could work

2020-05-02 12:36:44 -0500 commented question Changing fonts in mark down cells.

take a look here, probably it is the answer that you wants, however Im not sure if it would work for sage under windows, try it

2020-05-01 10:52:23 -0500 commented question Question about Jupyter

off-topic: in general sage is not "windows friendly", if you can I will recommend to use some linux distribution. I have dual boot with win10 and kubuntu and almost all the time Im in kubuntu. Indeed I have a lot more of useful tools in kubuntu, at least for what I generally do in a computer.

2020-04-28 08:47:56 -0500 commented question How to add extensions to Jupyter?

off-topic: if you use linux then you can integrate sage directly to any pre-existing jupyter installation, so you can have everything integrated

2020-04-27 15:20:58 -0500 edited question How I can evaluate the limit superior of a sequence?

How I can evaluate the limit superior of a sequence? I don't found in the documentation something related to this tool.

EDIT: the limit superior of a sequence $(x_n)$ is defined as

$$\limsup x_n=\lim_{n\to\infty} \sup \{x_k:k\ge n\} =\inf\{\sup \{x_k:k\ge n\}: n\in \mathbb N \} $$

where the first definition is the more interesting computationally.


It seems that, computationally, evaluating the limit superior is hard because it is done via "brute force". This doesn't happen only in sage, it happen also in other CAS. It seems that there is a long run in the developing of computer algebra systems.

2020-04-27 15:16:37 -0500 received badge  Popular Question (source)
2020-04-27 14:25:29 -0500 commented answer Simplification fails

@Cyrille I have no error, maybe you forget to change the code from var to SR.var

2020-04-27 13:49:27 -0500 asked a question There is a way to forget the history of the prompt?

I'm using sagemath 9.0 in kubuntu 19.10, I can start it in the console just calling sage, then it starts the sage prompt. However I noticed that with the arrows up and down I can see the commands that I had written in the prompt days ago. My question is: there is a way to clear this history?

Googling I find some related things but nothing works, I tried the commands !clear (this just clear everything that is shown in the console, but not the history of sage), also %clear in and %clear out, that are IPython commands to delete some history, but they didnt work with the described kind of history.

2020-04-27 07:51:26 -0500 received badge  Good Answer (source)
2020-04-27 03:20:13 -0500 received badge  Nice Answer (source)
2020-04-26 06:51:45 -0500 answered a question How to correctly plot x^(1/3)

Another way is to use the method x.nth_root(3) for real numbers x.

Using this

sage: plot(lambda x: RR(x).nth_root(3), (-1, 1))

gives the desired plot.

2020-04-25 17:22:08 -0500 received badge  Critic (source)
2020-04-23 12:39:35 -0500 asked a question There is a way to transform an output to LaTeX code?

Suppose that I want to transform the output of integral(sqrt(x+sqrt(x)),x,algorithm='fricas') to $\LaTeX$ code to reuse in a different application. If I try the method .LatexExpr() it throw an error.

There is a way to accomplish the task to get an output as $\LaTeX$ code?


I noticed that setting the output to a variable r and using after it computation the code latex(r) it works again. I will delete this question.

2020-04-23 09:19:00 -0500 asked a question It is possible to use a previous output?

I dont find anything in the documentation about the possibility to re-use previous outputs, in jupyter notebook or in the prompt, so I will ask here: there is a command to reuse a previous output instead to avoid recompute it again?

By example, say that I compute a value of a function and I want to re-use again this result, there is a way to call for the oputput instead of re-computing it value again or pre-assigning the value to a variable? Of course a solution could be just copy-and-paste the output, by I want to know if there is a command to avoid also this manipulation.

2020-04-21 09:21:56 -0500 commented question Change the background color of certain cells

a cell of a jupyter notebook? See here: https://stackoverflow.com/questions/3...

2019-07-31 13:21:50 -0500 commented answer Trying to get the divided differences of a list of points

@JohnPalmieri you are totally right, I didn't see the examples (I dont know why, maybe I was seeing a different doc? I dont know). My bad.

2019-07-27 09:06:16 -0500 marked best answer Trying to get the divided differences of a list of points

I was trying to get the divided differences of a list of points, then I had written

divided_difference((0,1), (1,4.5), (3,14.5), (5,28.5), (6,37)) but when I tried to execute it the notebook spit out

```

NameError Traceback (most recent call last) <ipython-input-1-7581bf64e41a> in <module>() ----> 1 divided_difference((Integer(0),Integer(1)), (Integer(1),RealNumber('4.5')), (Integer(3),RealNumber('14.5')), (Integer(5),RealNumber('28.5')), (Integer(6),Integer(37)))

NameError: name 'divided_difference' is not defined

```

However the function divided_difference appear in the manual of SAGE related to polynomials. What Im doing wrong?