Ask Your Question

mathematicboy's profile - activity

2019-08-29 11:26:34 -0600 received badge  Popular Question (source)
2016-08-13 14:07:29 -0600 received badge  Popular Question (source)
2015-06-14 14:58:39 -0600 received badge  Notable Question (source)
2013-11-10 08:11:25 -0600 received badge  Popular Question (source)
2013-03-21 07:52:29 -0600 received badge  Self-Learner (source)
2013-03-21 07:52:29 -0600 received badge  Teacher (source)
2013-03-19 14:48:41 -0600 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 07:39:36 -0600 asked a question unaccurate plot of a circle

Hi!

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

plot(sqrt(2-x^2),-sqrt(2),sqrt(2),aspect_ratio=1)+plot(-sqrt(2-x^2),-sqrt(2),sqrt(2))

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 03:10:14 -0600 received badge  Famous Question (source)
2012-11-23 02:01:29 -0600 commented answer mistake in a indefinite integral

Thank you!

2012-11-19 05:02:30 -0600 asked a question mistake in a indefinite integral

Hi,

I'm trying to compute the integral:

integral(log(cot(x)-1),x,0,pi/4)

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 06:48:49 -0600 asked a question strange way to simplify square roots

Hi!

Let us consider the number

a=1/sqrt(4-2*sqrt(3))-1/(sqrt(3)-1)

which is zero. If we simplify

a.simplify_full().n()

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-23 17:32:30 -0600 received badge  Notable Question (source)
2012-04-17 02:51:47 -0600 received badge  Popular Question (source)
2012-02-03 02:26:11 -0600 commented answer using 'R' in sage: can not plot. errors of X11 and PNG

Thank you! It works now.

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

Hi!

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 sagenb.org server. In both cases the result is the same, that is:

The instructions:

x=r([1,2,3,4,5])
y=r([1,2,3,2,1])
r.plot(x,y)

work fine.

However, when I write:

x<-c(1,2,3,4,5)
y<-c(1,2,3,2,1)
plot(x,y)

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 07:42:44 -0600 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 00:15:47 -0600 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:

x<-c(12,2,4)

y<-x

plot(x,y)

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 sagenb.org (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 06:26:18 -0600 received badge  Supporter (source)
2011-03-22 11:44:58 -0600 received badge  Good Question (source)
2011-03-22 05:58:34 -0600 received badge  Nice Question (source)
2011-03-22 04:16:35 -0600 received badge  Student (source)
2011-03-22 03:28:58 -0600 asked a question can gridlines be painted at sqrt(2) ?

In this simple plot

plot(x,0,2,gridlines=([1],[]))

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

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

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.