Ask Your Question

mathematicboy's profile - activity

2023-03-21 09:30:16 +0100 received badge  Notable Question (source)
2023-03-21 09:30:16 +0100 received badge  Popular Question (source)
2020-06-18 21:05:07 +0100 received badge  Famous Question (source)
2019-08-29 18:26:34 +0100 received badge  Popular Question (source)
2016-08-13 21:07:29 +0100 received badge  Popular Question (source)
2015-06-14 21:58:39 +0100 received badge  Notable Question (source)
2013-11-10 15:11:25 +0100 received badge  Popular Question (source)
2013-03-21 13:52:29 +0100 received badge  Teacher (source)
2013-03-21 13:52:29 +0100 received badge  Self-Learner (source)
2013-03-19 20:48:41 +0100 answered a question unaccurate plot of a circle

Thank you for your answers.

Of course there are several ways to fix it, but my point is that I don't understand why it works with sqrt(3) and don't with sqrt(2). It seems a problem in accuracy. And it leads to a maybe not good algorithm for painting.

I think this kind of simple examples can transmit a poor image of Sage to pupils. Moreover, if you simply google "plot sqrt(2-x^2)" you obtain a more precise graph. And if you use an obsolete software like Mathematica 4.2 you obtain an ugly graph, but precise at extreme points. And maybe in older versions the result is the same, but i can't check it.

My point of view in this question is not to find alternatives to do a simple task when a command is not working properly in comparison to other softwares. Since it is an easy question there are several alternatives, but believe me, not all pupils are able to find them. My purpose is to ask if someone knows why the command is behaving like this and more interesting, if is there any plan to change it.

Sorry for my answer, but my wish is improve Sage.

2013-03-19 13:39:36 +0100 asked a question unaccurate plot of a circle


I want to plot a circle centered at the origin and radius sqrt(2). When I type:


in sage 5.4, the graph obtained is really unaccurated.

However, for the circle of radius sqrt(3) works fine. Does anybody know why?

Of course I know there are several ways to plot a circle, but i want do do like this for showing my pupils some applications of integral calculus.

I think it is important to have a "plot" command working properly, since it is extensively used in teaching.

2013-01-29 10:10:14 +0100 received badge  Famous Question (source)
2012-11-23 09:01:29 +0100 commented answer mistake in a indefinite integral

Thank you!

2012-11-19 12:02:30 +0100 asked a question mistake in a indefinite integral


I'm trying to compute the integral:


Sage (with version 5.4 and previous ones) tell that the integral is $-\infty$. But the integral converges, and it is is equal to $\frac{\pi\log(2)}8$.

I think this can be a bug. Maybe it is a Maxima issue, but it should be interesting to find where the bug is, and correct it, if possible.

2012-11-14 13:48:49 +0100 asked a question strange way to simplify square roots


Let us consider the number


which is zero. If we simplify


we obtain

-2.73205080756888 - 8.36449319149292e-17*I,

which of course is false. I guess it is a problem handling complex roots of degree four, but still, it don't seems to me a reasonable computation. ¿Anybody knows how to fix it?

2012-07-24 00:32:30 +0100 received badge  Notable Question (source)
2012-04-17 09:51:47 +0100 received badge  Popular Question (source)
2012-02-03 09:26:11 +0100 commented answer using 'R' in sage: can not plot. errors of X11 and PNG

Thank you! It works now.

2012-02-01 08:24:27 +0100 answered a question using 'R' in sage: can not plot. errors of X11 and PNG


I've been trying to apply your advices and this is the result:

First I tried the just downloaded 4.8 ova file and the server. In both cases the result is the same, that is:

The instructions:


work fine.

However, when I write:


and try to compile with 'R', I don't obtain any error message, but the graphic is not shown. That is, I obtain an empty output.

Finally I tried with my ubuntu 10.4. and sage 4.8. I installed packages libpango1.0-dev and libcairo-dev with xorg-dev previously installed. I got an error that says 'Unable to start r' So I guess this is a matter of my lack of competence in linux and not a general problem.

2012-01-26 14:42:44 +0100 answered a question using 'R' in sage: can not plot. errors of X11 and PNG

Thank you for your quick and accurate answers. I'm sorry I did not know the questions on the right part of the screen. I tried to do a search and only found some threads and finally got lost. I'm not an expert.

I will try installing the 4.8 ova file but I have to wait, because the current version in the servers I have checked is 4.7.2.

But mainly I'm interested in fixing the sage server of my university. So I will show your answers to the administrator of that server to see what is more suitable.

I will tell you the end of the story. Thank you so much!!!

2012-01-26 07:15:47 +0100 asked a question using 'R' in sage: can not plot. errors of X11 and PNG

Hi! We are going to use SAGE this semester in a course which has a piece of statistics. For this part we planned to compile Sage worksheets with the option 'R'. But we have the following errors. If we write the instruction:




the instruction works in a mac which has a local sage (packages are on the hard disk). However, the pupils will use the sage server of our university (v4.6), wich gives the error message:

Error in png() : X11 is not available

The same error is obtained with a local installation on windows 7 (v4.7.2, with VM virtual box).

Besides, if we try at sage server on (v4.7.2), we obtain a different error:

Error in X11(paste("png::", filename, sep = ""), width, height, pointsize, : unable to start device PNG In addition: Warning message: In png() : no png support in this version of R

Please, does anybody know how to fix it?

Thank you.

2011-03-28 13:26:18 +0100 received badge  Supporter (source)
2011-03-22 17:44:58 +0100 received badge  Good Question (source)
2011-03-22 11:58:34 +0100 received badge  Nice Question (source)
2011-03-22 10:16:35 +0100 received badge  Student (source)
2011-03-22 09:28:58 +0100 asked a question can gridlines be painted at sqrt(2) ?

In this simple plot


the gridline is plotted alright. However, if I put sqrt(2) instead of 1


does not work. It is strange, because I think that gridlines should behave similar as ticks. For instance, the following both two expressions work

plot(x,0,2,ticks=([sqrt(2)],[])) plot(x,0,2,ticks=([sqrt(2)],[]),gridlines=true)

Does anybody know what is the reason or how to fix it? Thanks. Javier Pérez.