Coordinate charts, functions of one coordinate as bounds of another(?)
I have a Manifold (4,M) and its coordinate chart defined as:
M = Manifold(4, 'M', latex_name=r'\mathcal{M}', structure='Lorentzian')
X.<t,r,th,ph> = M.chart(r"t r:(0,+oo) th:(0,π):\theta ph:(0,2*π):periodic\phi")
which gives:
sage: X.coord_range()
t: (-oo, +oo); r: (0, +oo); th: (0, pi); ph: [0, 2*pi] (periodic)
What i am trying to do, unsuccessfully so far, is to pass
a function of θ as the lower bound of my r
coordinates domain.
Let's say that i have an r(th)
function r(th) = th^2 + 0.2
.
It does work if i insert it directly in the range as
X.<t,r,th,ph> = M.chart(r"t r:(th^2+0.2,+oo) th:(0,π):\theta ph:(0,2*π):periodic\phi")
but for more complex functions of r
, th
, this is not really an option.
I have an (r, th)
surface that needs to serve as my r
domain,
which unfortunately cannot be solved for r
in order to use this.
So, I need to figure out one of these two to solve the problem i currently have:
(i) somehow use a callable function in the lower r
bound, for example
X.<t,r,th,ph> = M.chart(r"t r:(K(th),+oo) th:(0,π):\theta ph:(0,2*π):periodic\phi")
which when i try i get a
TypeError: unable to simplify to float approximation
or
(ii) use a chart function of sort to restrict the r
variable with
a surface (r, th)
and keep the other 3 restrictions as they are.
Thanks in advance!
Update 1: surface i need to pass as a restriction in addition to r>2
.
f(r, th) = 0.16*sin(th)^4/r^2 - 1/256*(0.12*r^7*log(r - 2) - 30*r^6*(0.016*log(r - 2) - 0.008) + 2*r^5*(0.24*log(r - 2) - 8.36) + 32.32*r^4 + 0.16*r^3 - (0.36*r^7*log(r - 2) - 90*r^6*(0.016*log(r - 2) - 0.008) + 90*r^5*(0.016*log(r - 2) - 0.024) + 0.96*r^4 + 0.48*r^3 + 1.92*r^2 - 45*(0.008*r^7 - 0.032*r^6 + 0.032*r^5)*log(r) + 0.64*r - 3.84)*cos(th)^2 + 0.64*r^2 - 15*(0.008*r^7 - 0.032*r^6 + 0.032*r^5)*log(r) + 0.64*r - 1.28)*(0.12*r^6*log(r - 2) + 0.24*r^5 - 2*r^4*(0.12*log(r - 2) - 8.12) - 0.16*r^3 - 3*(0.12*r^6*log(r - 2) + 0.24*r^5 - 30*r^4*(0.008*log(r - 2) - 0.008) - 0.16*r^3 - 15*(0.008*r^6 - 0.016*r^4)*log(r) + 0.64*r + 1.28)*cos(th)^2 - 15*(0.008*r^6 - 0.016*r^4)*log(r) + 0.64*r + 1.28)*sin(th)^2/r^7