Loading [MathJax]/jax/output/HTML-CSS/jax.js

First time here? Check out the FAQ!

Ask Your Question
1

Polar coordinates with negative angle

asked 8 years ago

Mike Shulman gravatar image

updated 8 years ago

Following the sagemanifolds tutorial I can make R2 with rectangular and polar coordinates:

R2 = Manifold(2, 'R2', r'\mathbb{R}^2', start_index=1)
Rect.<x,y> = R2.chart()
U = R2.open_subset('U', coord_def={Rect : (y != 0, x < 0)})
RectU = Rect.restrict(U)
Polar.<r,th> = U.chart(r'r:(0,+oo) th:(0,2*pi):\theta')

This uses the range (0,2π) for θ, excluding the positive x-axis. But if I try to use instead the range (π,π) for θ, excluding the negative x-axis:

R2 = Manifold(2, 'R2', r'\mathbb{R}^2', start_index=1)
Rect.<x,y> = R2.chart()
U = R2.open_subset('U', coord_def={Rect : (y != 0, x > 0)})
RectU = Rect.restrict(U)
Polar.<r,th> = U.chart(r'r:(0,+oo) th:(-pi,pi):\theta')

SageMathCloud gives me "ValueError: Assumption is redundant". But strangely, SageMathCell doesn't complain at all. What is the problem?

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
0

answered 8 years ago

eric_g gravatar image

Sorry, I cannot reproduce your error on SageMathCloud: it works for me, cf.
https://cloud.sagemath.com/projects/5... Could it be that you typed the second example in the same worksheet as the first one? In this case, the error arises because one cannot have the symbolic variable theta both in (0,2pi) and (-pi,pi).

Preview: (hide)
link

Comments

Ohh... is that true even if I evaluate the first example and then edit it to change it into the second? (Not a very helpful error message, in that case...)

Mike Shulman gravatar imageMike Shulman ( 8 years ago )
1

Yes, because assumptions are kept in memory (as you can check by looking at the output of the command assumptions()). To have it work, you have to clear all assumptions by running forget() before editing to the second example. You could also run forget(th>0).

eric_g gravatar imageeric_g ( 8 years ago )

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 8 years ago

Seen: 386 times

Last updated: Aug 13 '16