hendriksdf5

50 Reputation

One Badge

0 years, 234 days

MaplePrimes Activity


These are questions asked by hendriksdf5

I want to substitute a variable r' =sqrt(x^2 + y^2 + z^2).

But how do I change my output so that r' is displayed instead of sqrt(x^2+y^2+z^2)?

E.g. line (5) D(g)(r')x/r' and not D(g)(sqrt(x^2 + y^2 + z^2))*/sqrt(x^2 + y^2 + z^2). 

And one more question. How can I make sure that my output in (6) is only the result on the right side and the left side of the equal sign is not displayed? 


 

restart

with(Physics)

__________________________________________________________________

(1)

with(Vectors)``

Setup(spacetimeindices = greek, spaceindices = lowercaselatin, su2indices = uppercaselatin, signature = `- - - +`, coordinates = cartesian)

[coordinatesystems = {X}, signature = `- - - +`, spaceindices = lowercaselatin, spacetimeindices = greek, su2indices = uppercaselatin]

(2)

diff(r(x), x) := sqrt(x^2+y^2+z^2)

(x^2+y^2+z^2)^(1/2)

(3)

``

g(diff(r(x), x))

g((x^2+y^2+z^2)^(1/2))

(4)

diff(g(diff(r(x), x)), x)

(D(g))((x^2+y^2+z^2)^(1/2))*x/(x^2+y^2+z^2)^(1/2)

(5)

NULL

NULL

H := (x*Psigma[1, matrix]+y*Psigma[2, matrix]+z*Psigma[3, matrix]).Vector(2, {1 = 0, 2 = U(diff(r(x), x))})

(x*Physics:-Psigma[1]+y*Physics:-Psigma[2]+z*Physics:-Psigma[3]).Vector[column](%id = 36893490180036880732) = Vector[column](%id = 36893490180036881092)

(6)

NULL


 

Download representation_of_code.mw

What exactly is the difference between the differential operator d_[] from the physics package and diff() ? Why is it not possible for me to differentiate a scalar function g or a coordinate r with the help of the operator? d_[1] should correspond to d/dx (X = (x, y, z, t)) or not? 

restart

with(Physics)

with(Vectors)NULL

Setup(coordinates = cartesian)

[coordinatesystems = {X}]

(1)

r = sqrt(x^2+y^2+z^2)

r = (x^2+y^2+z^2)^(1/2)

(2)

d_[1](g(r))

0

(3)

diff(g(r), x)

(D(g))((x^2+y^2+z^2)^(1/2))*x/(x^2+y^2+z^2)^(1/2)

(4)

d_[1](r)

0

(5)

diff(r, x)

x/(x^2+y^2+z^2)^(1/2)

(6)

d_[1](x)

1

(7)

diff(x, x)

1

(8)

NULL

Download example_d_[].mw

I would like to solve this system of differential equations y_1 , y_2. However, there should be no exact solutions for this problem. Is there a way to get a numerical solution of such coupled equations in maple and if so, how? I know the dsolve() command, but it did not work here. The boundary conditions are f(0)-1 = K(0) = 0 and f'(inf) = K'(inf) = 0. It would be nice if someone could help me or tell me where to look to solve something like this.

restart

with(Physics)NULL

[coordinatesystems = {X}, signature = `+ + + -`, spaceindices = lowercaselatin, spacetimeindices = greek, su2indices = uppercaselatin]

(1)

``Setup(realobjects = {a, g, v, K(diff(rho(x), x)), f(diff(rho(x), x))})

[realobjects = {a, g, v, K(`rho'`), f(`rho'`)}]

(2)

-(`rho'`^2*(diff(K(`rho'`), `rho'`, `rho'`))+2*`rho'`*(diff(K(`rho'`), `rho'`))+K(`rho'`)*(K(`rho'`)^2*a*`rho'`^2*v^2+(1/2)*f(`rho'`)^2+(-2*`rho'`-1)*f(`rho'`)-a*v^2*`rho'`^2+2*`rho'`-3/2))*v^2 = 0

-(`rho'`^2*(diff(diff(K(`rho'`), `rho'`), `rho'`))+2*(diff(K(`rho'`), `rho'`))*`rho'`+K(`rho'`)*(K(`rho'`)^2*a*`rho'`^2*v^2+(1/2)*f(`rho'`)^2+(-2*`rho'`-1)*f(`rho'`)-a*v^2*`rho'`^2+2*`rho'`-3/2))*v^2 = 0

(3)

2*(diff(f(`rho'`), `rho'`, `rho'`))/g^2+(-4*f(`rho'`)^3+24*f(`rho'`)^2+(-`rho'`^2*v^2*g^2*K(`rho'`)^2-44)*f(`rho'`)+24+(2*(`rho'`+1/2))*g^2*`rho'`^2*v^2*K(`rho'`)^2)/(2*`rho'`^2*g^2) = 0

2*(diff(diff(f(`rho'`), `rho'`), `rho'`))/g^2+(1/2)*(-4*f(`rho'`)^3+24*f(`rho'`)^2+(-`rho'`^2*v^2*g^2*K(`rho'`)^2-44)*f(`rho'`)+24+2*(`rho'`+1/2)*g^2*`rho'`^2*v^2*K(`rho'`)^2)/(`rho'`^2*g^2) = 0

(4)

y_1 := -(`rho'`^2*(diff(diff(K(`rho'`), `rho'`), `rho'`))+2*`rho'`*(diff(K(`rho'`), `rho'`))+K(`rho'`)*(K(`rho'`)^2*a*`rho'`^2*v^2+(1/2)*f(`rho'`)^2+(-2*`rho'`-1)*f(`rho'`)-a*v^2*`rho'`^2+2*`rho'`-3/2))*v^2 = 0

-(`rho'`^2*(diff(diff(K(`rho'`), `rho'`), `rho'`))+2*(diff(K(`rho'`), `rho'`))*`rho'`+K(`rho'`)*(K(`rho'`)^2*a*`rho'`^2*v^2+(1/2)*f(`rho'`)^2+(-2*`rho'`-1)*f(`rho'`)-a*v^2*`rho'`^2+2*`rho'`-3/2))*v^2 = 0

(5)

y_2 := 2*(diff(diff(f(`rho'`), `rho'`), `rho'`))/g^2+(1/2)*(-4*f(`rho'`)^3+24*f(`rho'`)^2+(-`rho'`^2*v^2*g^2*K(`rho'`)^2-44)*f(`rho'`)+24+2*(`rho'`+1/2)*g^2*`rho'`^2*v^2*K(`rho'`)^2)/(`rho'`^2*g^2) = 0

2*(diff(diff(f(`rho'`), `rho'`), `rho'`))/g^2+(1/2)*(-4*f(`rho'`)^3+24*f(`rho'`)^2+(-`rho'`^2*v^2*g^2*K(`rho'`)^2-44)*f(`rho'`)+24+2*(`rho'`+1/2)*g^2*`rho'`^2*v^2*K(`rho'`)^2)/(`rho'`^2*g^2) = 0

(6)

NULL

Download coupled_deq.mw

I would like to calculate the following quantity: 

 

Where F is the SU(2) field strength tensor given by:

The gauge field V (in my code A) is defined as

 

where rj is the unit vector in spherical coordinates.

I tried to calculate it with maple, however, the result is not correct. I should get a scalar function, but my result still contains dependencies on x,y,z. And I really don't know why. I have defined the gauge field in (11) and the field strength tensor in (14). I could imagine that SumOverRepeatedIndices() in (16) does not work as I think (For each a = (1,2,3) I would like a summation over mu and nu). Greek letters are my spacetime indices and lowercase letters are my space indices. Do I perhaps have to use SU(2) indices instead of the space indices? But how exactly does a SU(2) index differ from a space index?    

restart

with(Physics)

__________________________________________________________________

(1)

with(Vectors)NULL

Setup(spacetimeindices = greek, spaceindices = lowercaselatin, su2indices = uppercaselatin, signature = `+++-`, coordinates = spherical)

[coordinatesystems = {X}, signature = `+ + + -`, spaceindices = lowercaselatin, spacetimeindices = greek, su2indices = uppercaselatin]

(2)

Setup(realobjects = {g, diff(x, x), diff(y(x), x), diff(z(x), x), f__A(X[1])})

[realobjects = {g, phi, r, rho, theta, x, `x'`, y, `y'`, z, `z'`, f__A(r)}]

(3)

"x'(r,theta,phi)  :=  r * sin(theta) * cos(phi)"

proc (r, theta, phi) options operator, arrow, function_assign; Physics:-`*`(r, sin(theta), cos(phi)) end proc

(4)

"y'(r,theta,phi) := r * sin(theta) * sin(phi)"

proc (r, theta, phi) options operator, arrow, function_assign; Physics:-`*`(r, sin(theta), sin(phi)) end proc

(5)

"z'(r,theta,phi)  := r * cos(theta)"

proc (r, theta, phi) options operator, arrow, function_assign; Physics:-`*`(r, cos(theta)) end proc

(6)

 

This ist my unit vector:

Define(R[a] = [(diff(x, x))/r, (diff(y(x), x))/r, (diff(z(x), x))/r]) 

{Physics:-Dgamma[mu], Physics:-Psigma[mu], R[a], Physics:-d_[mu], Physics:-g_[mu, nu], Physics:-gamma_[a, b], Physics:-LeviCivita[alpha, beta, mu, nu], Physics:-SpaceTimeVector[mu](X)}

(7)

R[definition]

R[a] = [`x'`/r, `y'`/r, `z'`/r]

(8)

Parse:-ConvertTo1D, "first argument to _Inert_ASSIGN must be assignable"

r^2

(9)

"Define(A[mu,~a] =(1-`f__A`(X[1]) )/(g*X[1])*LeviCivita[a, mu,j,4]* R[j] )  "

{A[mu, `~a`], Physics:-Dgamma[mu], F[mu, nu, a], Physics:-Psigma[mu], R[a], Physics:-d_[mu], Physics:-g_[mu, nu], Physics:-gamma_[a, b], Physics:-LeviCivita[alpha, beta, mu, nu], Physics:-SpaceTimeVector[mu](X)}

(10)

A[definition]

A[mu, `~a`] = (1-f__A(r))*Physics:-LeviCivita[4, a, j, mu]*R[j]/(g*r)

(11)

A[]

A[mu, a] = Matrix(%id = 36893489989479580364)

(12)

Define(F[mu, nu, a] = d_[nu](A[mu, a])-d_[mu](A[nu, a])+LeviCivita[a, b, c, 4]*A[mu, `~b`]*A[nu, `~c`])

{A[i, `~a`], Physics:-Dgamma[mu], F[mu, nu, a], Physics:-Psigma[mu], R[a], Physics:-d_[mu], Physics:-g_[mu, nu], Physics:-gamma_[a, b], Physics:-LeviCivita[alpha, beta, mu, nu], Physics:-SpaceTimeVector[mu](X)}

(13)

F[definition]

F[mu, nu, a] = -Physics:-d_[nu](A[a, mu], [X])+Physics:-d_[mu](A[a, nu], [X])-Physics:-LeviCivita[4, a, b, c]*A[mu, `~b`]*A[nu, `~c`]

(14)

simplify(F[])

F[mu, nu, a] = _rtable[36893489989585113204]

(15)

"-1/(4)Simplify(SumOverRepeatedIndices(F[mu,nu,a]*F[~mu,~nu,a])); "

-(1/4)*((2*(-1+f__A(r))*`z'`*r*g-(diff(f__A(r), r))*`z'`*r^2*g-(-1+f__A(r))^2*`z'`*`x'`)^2+4*(-1+f__A(r))^4*`y'`^2*`z'`^2+((diff(f__A(r), r))*`x'`*r^2*g+2*(1-f__A(r))*`x'`*r*g+(1-f__A(r))*(-1+f__A(r))*`z'`^2)^2+((diff(f__A(r), r))*`y'`*r^2*g+2*(1-f__A(r))*`y'`*r*g+(-1+f__A(r))^2*`y'`*`x'`)^2+(2*(-1+f__A(r))*`x'`*r*g-(diff(f__A(r), r))*`x'`*r^2*g-(-1+f__A(r))*(1-f__A(r))*`y'`^2)^2+(-2*(-1+f__A(r))*`z'`*r*g+(diff(f__A(r), r))*`z'`*r^2*g+(-1+f__A(r))^2*`z'`*`x'`)^2+(-(diff(f__A(r), r))*`x'`*r^2*g-2*(1-f__A(r))*`x'`*r*g-(1-f__A(r))*(-1+f__A(r))*`z'`^2)^2+2*(-1+f__A(r))^4*`x'`^4+2*(-1+f__A(r))^4*`y'`^2*`x'`^2+2*(-1+f__A(r))^4*`z'`^2*`x'`^2+(-(diff(f__A(r), r))*`y'`*r^2*g-2*(1-f__A(r))*`y'`*r*g-(-1+f__A(r))^2*`y'`*`x'`)^2+(-2*(-1+f__A(r))*`x'`*r*g+(diff(f__A(r), r))*`x'`*r^2*g+(-1+f__A(r))*(1-f__A(r))*`y'`^2)^2)/(r^8*g^4)

(16)

L__FST := simplify(-(1/4)*((2*(-1+f__A(r))*`z'`*r*g-(diff(f__A(r), r))*`z'`*r^2*g-(-1+f__A(r))^2*`z'`*`x'`)^2+4*(-1+f__A(r))^4*`y'`^2*`z'`^2+((diff(f__A(r), r))*`x'`*r^2*g+2*(1-f__A(r))*`x'`*r*g+(1-f__A(r))*(-1+f__A(r))*`z'`^2)^2+((diff(f__A(r), r))*`y'`*r^2*g+2*(1-f__A(r))*`y'`*r*g+(-1+f__A(r))^2*`y'`*`x'`)^2+(2*(-1+f__A(r))*`x'`*r*g-(diff(f__A(r), r))*`x'`*r^2*g-(-1+f__A(r))*(1-f__A(r))*`y'`^2)^2+(-2*(-1+f__A(r))*`z'`*r*g+(diff(f__A(r), r))*`z'`*r^2*g+(-1+f__A(r))^2*`z'`*`x'`)^2+(-(diff(f__A(r), r))*`x'`*r^2*g-2*(1-f__A(r))*`x'`*r*g-(1-f__A(r))*(-1+f__A(r))*`z'`^2)^2+2*(-1+f__A(r))^4*`x'`^4+2*(-1+f__A(r))^4*`y'`^2*`x'`^2+2*(-1+f__A(r))^4*`z'`^2*`x'`^2+(-(diff(f__A(r), r))*`y'`*r^2*g-2*(1-f__A(r))*`y'`*r*g-(-1+f__A(r))^2*`y'`*`x'`)^2+(-2*(-1+f__A(r))*`x'`*r*g+(diff(f__A(r), r))*`x'`*r^2*g+(-1+f__A(r))*(1-f__A(r))*`y'`^2)^2)/(r^8*g^4))

(-g^2*r^4*(`x'`^2+(1/2)*`y'`^2+(1/2)*`z'`^2)*(diff(f__A(r), r))^2+4*g^2*r^3*(`x'`^2+(1/2)*`y'`^2+(1/2)*`z'`^2)*(-1+f__A(r))*(diff(f__A(r), r))-4*((1/8)*(`x'`^2+`y'`^2+`z'`^2)^2*f__A(r)^2-(1/4)*(`x'`^2+`y'`^2+`z'`^2)^2*f__A(r)+(1/8)*`x'`^4+(g^2*r^2+(1/4)*`y'`^2+(1/4)*`z'`^2)*`x'`^2+(1/2)*(g^2*r^2+(1/4)*`y'`^2+(1/4)*`z'`^2)*(`y'`^2+`z'`^2))*(-1+f__A(r))^2)/(r^8*g^4)

(17)

 

Download SU(2)-field-strength-tensor_.mw

Is there a way to apply Intc() and Fundiff() in spherical coordinates? If I initialize a spherical coordinate system X and then want to calculate the effect with Intc(), r, theta phi and t are integrated from -inf to inf but  thtea:(0, pi) phi:(0, 2Pi). I would also need a second spherical coordinate system Y, if I have understood Fundiff() correctly, but how can I define this Coordinates(X = spherical, Y = spherical) does not work.  

I would like to vary my Lagrange density (16) with respect to f_A(r). Where r is the radial coordinate of the spherical coordinate system.

YANG-MILLS-Theorie.mw

1 2 Page 1 of 2