Thanks.  I tried that but it's causing different problems:
-----------------------
from sympy import atan2
var('omega,t,x,y,r,Theta')
Theta(t)=omega*t
x(t)=r*cos(Theta(t))
y(t)=r*sin(Theta(t))
dx=diff(x,t)
ddx=diff(dx,t)
dy=diff(y,t)
ddy=diff(dy,t)
v_a(t)=atan2(dy(t),dx(t))
v_a
--------------------------

I get: AttributeError: 'atan2' object has no attribute '_sage_'

My original code had this for that second last line:
v_a(t)=atan2(dy(t),dx(t)).substitute(r=10,omega=(2*pi/60))


and it throws: AttributeError: 'atan2' object has no attribute
'substitute'

The code with the .substitute line seems to work for (t%30 <> 0) so I
think I've formatted my equations properly.

Apologies if I'm doing something horribly hackish-- I'm new to Sage.

Any other ideas?

Thanks--
 Greg



On Mar 18, 1:40 pm, Alec Mihailovs <alec.mihail...@gmail.com> wrote:
> On Mar 17, 8:38 pm, G B <g.c.b.at.w...@gmail.com> wrote:
>
> > atan2(-pi,0) -->  RuntimeError: power::eval(): division by zero
>
> > Any ideas how to get around this?
>
> A simple workaround is
>
> sage: from sympy import atan2
> sage: atan2(-pi,0)
>
> -pi/2
>
> Alec Mihaiovs

-- 
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
URL: http://www.sagemath.org

To unsubscribe from this group, send email to 
sage-support+unsubscribegooglegroups.com or reply to this email with the words 
"REMOVE ME" as the subject.

Reply via email to