Hi Dominique,
Sorry, I didn't intend to not be nice. In putting together the following
example I was able to solve this problem by setting the domain of the
variables to 'real'.
1) Here is a full short example:
var('h','t','px','py','pz','w','R')
P=vector([px,py,pz])
r=vector([R*cos(t*w),R*sin(t*w),h*t])
delta = (P-r).norm()
show(delta)
p1=plot(delta.substitute(h=10,w=1,R=1,px=5,py=0,pz=1),(t,0,1))
p2=plot(diff(delta,t).substitute(h=10,w=1,R=1,px=5,py=0,pz=1),(t,0,1),color='red')
show(p1+p2,gridlines=True)
2) I'm using worksheets on my own computers. On one machine I have an
older version of sagemath (I just tested it on 5.9) in which the above
works with no issue. On another machine I'm running sagemath 6.7 which is
giving me the error I've already mentioned with the above example.
When I compare the output of the 'show(delta)' line, it's clear that in
sagemath 6.7 h,t,pz,etc. are not being treated like the simple real numbers
I intended them to be. So if I change the creation of variables to the
following:
var('t,h,R,px,py,pz,w',domain='real')
The above example works with no problem.
Long story short, the problem is solved, and I need to be more explicit
when I create variables because sage can treat them more generally than I
may intend.
Thanks for the help.
Regards,
C
On Sunday, June 7, 2015 at 4:29:51 AM UTC-5, Dominique Laurain wrote:
>
> Hello Chris,
> Be nice:
> 1. post a full short example...delta is not defined
> 2. worksheet in SAGE cloud ? worksheet of your own computer, sagemath
> local install ?
> Dominique
>
>
--
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.