Hi,

On 2014-05-29, SiL588 . <ch4r...@hotmail.com> wrote:
> Unfortunately I don't know the rules of Phyton language,

Sage's main language for programming is Python, and also the language for
user interaction is close to Python. We believe it is a big plus of Sage
that it uses a mainstream language!

I don't think it is needed to have in-depth knowledge of Python for using
Sage. However, in *any* computer algebra system, one has to learn the
basics of whatever language the system is using; in most other systems
it is a language that is less nice than Python...

> I think I did what you said, I assinged m a value that was the result of=20
> multiplication between real numbers.

I was reading the worksheet that you have attached. In the first cell,
you define a lot of symbolic variables (a,b,c,d,e,f,R,Rt). In the second
cell, you override most of them (a=10, b=3, ...).

Hence, at least for those variables that you override in the second
cell, the first cell is of no use.

> So, if a real number have no simplify methods, how can I simplify it?

I don't know what you mean by "simplify a real number".

Anyway, try what happens if you comment out m1.simplify() (i.e., simply
put the character "#" in front of it; that's Python syntax again).

The cell that is currently giving you the error then becomes
  m1=a*b*c*rho1
  m2=-b*e*f*rho1
  m3=(pi*R^2*b)/2*rho1
  m4=-pi*Rt^2*b*rho1
  m5=pi*Rt^2*3*b*rho2
  #m1=m1.simplify()
  show(m1)
  show(m2)
  show(m3)
  show(m4)
  show(m5)

As you will see, m1=12.0, m2=-1.8: How do you expect this to be
simplified?

On the other hand, m3 is not a real number, but a symbolic expression,
as it contains the symbolic constant pi: m3=0.6*pi
Here, you could ask for simplification, for example
  (0.6*pi).simplify()
However, the result will of course still be the same symbolic
expression, as 0.6*pi can not be further simplified.

If you want to express 0.6*pi as a real number, you can do this:
  RR(0.6*pi)
which returns 1.88495559215388. Explanation: RR denotes the field of
real numbers (with some digital precision). RR(...) converts the given
input into an element of RR, if possible.

Best regards,
Simon


-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.

Reply via email to