[sage-support] Re: beginner problems
On 20 Dub, 08:17, Florian Beutler florian.beut...@gmx.de wrote: if I use rho = 0.0058/((r/2.4)*(1+(r/2.4))^2) integral(rho,r,0,10) btw: your integral is divergent (behaves like 1/r near zero). R. --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: beginner problems
Hi, try this r=var('r') rho = 0.0058/((r/2.4)*(1+(r/2.4))^2) integral(rho,r,0.01,10).n() Robert Marik On 20 Dub, 08:17, Florian Beutler florian.beut...@gmx.de wrote: hallo I just installed sage today and probably the problem I have at the moment is a typical beginner problem, but unfortunately the tutorial was not helpful concerning this points. I am very in favor for sage, especially because it is written in python but I think I need a somehow better (more details) tutorial. Can anybody link me to another one (I read the tutorial provided on the sage webpage)? I define a equation which I would like to integrate... I simplified the equation to reduce the possible errors if I use rho = 0.0058/((r/2.4)*(1+(r/2.4))^2) integral(rho,r,0,10) this does not work because for r=0 rho is not defined. But anyway I want to integrate over the complete radius. What do I have to do? I can avoid the problem by using integral(rho,r,0.01,10) this gives: 0.01392*(10.6953303525 - (125003*log(500012) - 125003*log(10) - 3)/ 125003) how is it possible to force sage to give me one value and not this helpless term above? thanks regards florian --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: beginner problems
hi Florian Florian Beutler wrote: hallo I just installed sage today and probably the problem I have at the moment is a typical beginner problem, but unfortunately the tutorial was not helpful concerning this points. I was in the same situation 3 weeks ago. I have the same feeling with the manual, and as soon as I get a little bit more familiar with Sage and the programming/documentation I will try to make some contributions to the manual. I would recommend you 2 things. 1.- Take a look to Sage For Newbies. Google it, its for free and it takes approximately 20 min to read the guide and become familiar with the easy things of Sage. 2.- Log in into the Sage database (sagenb.org) and have a look to the literally thousands of worksheets there. Many people (included myself) leave its guides and ways to solve certain task with Sage. if I use rho = 0.0058/((r/2.4)*(1+(r/2.4))^2) integral(rho,r,0,10) this does not work because for r=0 rho is not defined. But anyway I want to integrate over the complete radius. What do I have to do? I can avoid the problem by using Use the following to define r as symbolic variable r=var('r') rho = 0.0058/((r/2.4)*(1+(r/2.4))^2 and solve the integral numerically with the n() method (see The Sage Tutorial page 6) sage: integral(rho,r,1E-5,1E5).n() 0.158526563291981 integral(rho,r,0.01,10) this gives: 0.01392*(10.6953303525 - (125003*log(500012) - 125003*log(10) - 3)/ 125003) how is it possible to force sage to give me one value and not this helpless term above? thanks regards florian --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---