guru kido

60 Reputation

4 Badges

3 years, 218 days

MaplePrimes Activity


These are questions asked by guru kido


 

with(Physics)

Setup(mathematicalnotation = true)

[mathematicalnotation = true]

(1)

Setup(dimension = 3, coordinates = (X = [x1, x2, x3]), metric = 2*F6(X)*dx2*dx3+2*F5(X)*dx1*dx3+2*F4(X)*dx1*dx2+F1(X)*dx1^2+F2(X)*dx2^2+F3(X)*dx3^2)

`* Partial match of  'coordinates' against keyword 'coordinatesystems'`

 

`Default differentiation variables for d_, D_ and dAlembertian are: `*{X = (x1, x2, x3)}

 

`Systems of spacetime Coordinates are: `*{X = (x1, x2, x3)}

 

[coordinatesystems = {X}, dimension = 3, metric = {(1, 1) = F1(X), (1, 2) = F4(X), (1, 3) = F5(X), (2, 2) = F2(X), (2, 3) = F6(X), (3, 3) = F3(X)}]

(2)

g_[]

Physics:-g_[mu, nu] = Matrix(%id = 18446746167581484926)

(3)

Weyl[alpha, beta, mu, nu, nonzero]

`[Length of output exceeds limit of 1000000]`

(4)

Weyl tensor is identically equal to zero in 3D and I have tried to show this by inputting an arbitrary metric and calculating components of Weyl tensor. Thus this answer should give me the empty set but I am not getting that, thanks in advance.

CODE:

with(Physics):

Setup(mathematicalnotation = true)

Setup(dimension = 3, coordinates = (X = [x1, x2, x3]), metric = 2*F6(X)*dx2*dx3+2*F5(X)*dx1*dx3+2*F4(X)*dx1*dx2+F1(X)*(dx1^2)+F2(X)*(dx2^2)+F3(X)*(dx3^2))


g_[]

Weyl[alpha, beta, mu, nu, nonzero]

 

Download Weyltensor0in3d.mw


 

with(LinearAlgebra)

A := Matrix(4, 4, {(1, 1) = 1, (1, 3) = -1, (1, 4) = 3, (2, 2) = 2, (2, 3) = 1, (3, 1) = -1, (3, 2) = 1, (3, 3) = 6, (3, 4) = -1, (4, 1) = 3, (4, 3) = -1, (4, 4) = 10}, fill = 0)

Matrix(%id = 18446746512315154430)

(1)

b := Matrix(4, 1, {(1, 1) = 0, (2, 1) = -2, (3, 1) = -1, (4, 1) = -1})

Matrix(%id = 18446746512315153574)

(2)

x := Matrix([[x1], [x2], [x3], [x4]])

Matrix(%id = 18446746512315146838)

(3)

f := proc (x) options operator, arrow; (1/2)*Transpose(x).A.x+Transpose(b).x end proc

proc (x) options operator, arrow; Typesetting:-delayDotProduct(Typesetting:-delayDotProduct((1/2)*LinearAlgebra:-Transpose(x), A), x)+Typesetting:-delayDotProduct(LinearAlgebra:-Transpose(b), x) end proc

(4)

(1/2)*Transpose(x).A.x+Transpose(b).x

Matrix(%id = 18446746512315132494)

(5)

while g(vk) < 10^(-6) do k end do

Error, cannot determine if this expression is true or false: (Matrix(4, 4, {(1, 1) = 1, (1, 2) = 0, (1, 3) = -1, (1, 4) = 3, (2, 1) = 0, (2, 2) = 2, (2, 3) = 1, (2, 4) = 0, (3, 1) = -1, (3, 2) = 1, (3, 3) = 6, (3, 4) = -1, (4, 1) = 3, (4, 2) = 0, (4, 3) = -1, (4, 4) = 10})) . vk+(Matrix(4, 1, {(1, 1) = 0, (2, 1) = -2, (3, 1) = -1, (4, 1) = -1})) < 1/1000000

 

v0 := Matrix([[0], [1], [0], [0]])

Matrix(%id = 18446746512315172734)

(6)

g := proc (x) options operator, arrow; A.x+b end proc

proc (x) options operator, arrow; Typesetting:-delayDotProduct(A, x)+b end proc

(7)

alpha0 := solve(diff(f(v0-g(v0)*alpha)[1, 1], alpha) = 0)

1/10

(8)

v1 := v0-alpha0*g(v0)

Matrix(%id = 18446746512315163582)

(9)

v(k+1) := vk-`&alpha;k`*g(vk)

vk-`&alpha;k`*(Matrix(%id = 18446746512315154430).vk+Matrix(%id = 18446746512315153574))

(10)

`&alpha;k` := solve(diff(f(vk-g(vk)*alpha)[1, 1], alpha) = 0)

Hi, 
Essentially i am trying to programe an iterative loop where v(K+1) can be found fro v(K), I'm not sure how to programe a loop but I know this is not a hard thing to do so I am struggling, any help would be appreciated! Thanks. 
Edit: Also alpha K must be found at each stage by optimising f(v(k+1))
 

Download Optimisation_coursework.mw


 

with(Physics)

Setup(mathematicalnotation = true)

Setup(Coordinatesystem = (X = [x1, x2, x3, x4]), metric = -dx3^2*u22+2*dx3*dx4*u12-dx4^2*u11+dx1*dx3+dx2*dx4)

`* Partial match of  'Coordinatesystem' against keyword 'coordinatesystems'`

 

`Default differentiation variables for d_, D_ and dAlembertian are: `*{X = (x1, x2, x3, x4)}

 

`Systems of spacetime Coordinates are: `*{X = (x1, x2, x3, x4)}

 

[coordinatesystems = {X}, metric = {(1, 3) = 1/2, (2, 4) = 1/2, (3, 3) = -(diff(diff(u(X), x2), x2)), (3, 4) = Physics:-diff(diff(u(X), x1), x2), (4, 4) = -(diff(diff(u(X), x1), x1))}]

(1)

Setup(spacetimeindices = lowercaselatin)

u22 := diff(u(x1, x2, x3, x4), x2, x2)

Physics:-diff(Physics:-diff(u(X), x2), x2)

(2)

u12 := diff(u(x1, x2, x3, x4), x1, x2)

Physics:-diff(Physics:-diff(u(X), x1), x2)

(3)

u11 := diff(u(x1, x2, x3, x4), x1, x1)

Physics:-diff(Physics:-diff(u(X), x1), x1)

(4)

u24 := diff(u(x1, x2, x3, x4), x2, x4)

Physics:-diff(Physics:-diff(u(X), x2), x4)

(5)

u13 := diff(u(x1, x2, x3, x4), x1, x3)

Physics:-diff(Physics:-diff(u(X), x1), x3)

(6)

g_[]

Physics:-g_[a, b] = Matrix(%id = 18446745064427858870)

(7)

Define(W, quiet)

"W[~i,j,k,l]=1/(2)sqrt('g_[determinant]')g_[~i,~a]g_[~b,~c]LeviCivita[a,j,b,d]Weyl[~d,c,k,l]"

W[`~i`, j, k, l] = (1/2)*Physics:-g_[determinant]^(1/2)*Physics:-g_[`~a`, `~i`]*Physics:-g_[`~b`, `~c`]*Physics:-LeviCivita[a, b, d, j]*Physics:-Weyl[`~d`, c, k, l]

(8)

Define(W[`~i`, j, k, l] = (1/2)*Physics[g_][determinant]^(1/2)*Physics[g_][`~a`, `~i`]*Physics[g_][`~b`, `~c`]*Physics[LeviCivita][a, b, d, j]*Physics[Weyl][`~d`, c, k, l])

`Defined objects with tensor properties`

 

{Physics:-D_[a], Physics:-Dgamma[a], Physics:-Psigma[a], Physics:-Ricci[a, b], Physics:-Riemann[a, b, c, d], W[`~i`, j, k, l], Physics:-Weyl[a, b, c, d], Physics:-d_[a], Physics:-g_[a, b], Physics:-Christoffel[a, b, c], Physics:-Einstein[a, b], Physics:-KroneckerDelta[a, b], Physics:-LeviCivita[a, b, c, d], Physics:-SpaceTimeVector[a](X)}

(9)

W[definition]

W[`~e`, f, g, h] = (1/32)*16^(1/2)*Physics:-g_[`~a`, `~e`]*Physics:-g_[`~b`, `~c`]*Physics:-LeviCivita[a, b, d, f]*Physics:-Weyl[`~d`, c, g, h]

(10)

u11*u22-u12^2+u13+u24 = 0

diff(diff(u(X), x1), x3)+diff(diff(u(X), x2), x4)+(diff(diff(u(X), x2), x2))*(diff(diff(u(X), x1), x1))-(diff(diff(u(X), x1), x2))^2 = 0

(11)

u113 := diff(-u11*u22+u12^2-u24, x1)

-(diff(diff(diff(u(X), x1), x2), x4))-(diff(diff(u(X), x1), x1))*(diff(diff(diff(u(X), x1), x2), x2))-(diff(diff(u(X), x2), x2))*(diff(diff(diff(u(X), x1), x1), x1))+2*(diff(diff(u(X), x1), x2))*(diff(diff(diff(u(X), x1), x1), x2))

(12)

u123 := diff(-u11*u22+u12^2-u24, x2)

-(diff(diff(diff(u(X), x2), x2), x4))-(diff(diff(u(X), x1), x1))*(diff(diff(diff(u(X), x2), x2), x2))-(diff(diff(u(X), x2), x2))*(diff(diff(diff(u(X), x1), x1), x2))+2*(diff(diff(u(X), x1), x2))*(diff(diff(diff(u(X), x1), x2), x2))

(13)

u133 := diff(-u11*u22+u12^2-u24, x3)

-(diff(diff(diff(u(X), x2), x3), x4))-(diff(diff(diff(u(X), x2), x2), x3))*(diff(diff(u(X), x1), x1))-(diff(diff(u(X), x2), x2))*(diff(diff(diff(u(X), x1), x1), x3))+2*(diff(diff(u(X), x1), x2))*(diff(diff(diff(u(X), x1), x2), x3))

(14)

u134 := diff(-u11*u22+u12^2-u24, x4)

-(diff(diff(diff(u(X), x2), x4), x4))-(diff(diff(diff(u(X), x2), x2), x4))*(diff(diff(u(X), x1), x1))-(diff(diff(u(X), x2), x2))*(diff(diff(diff(u(X), x1), x1), x4))+2*(diff(diff(u(X), x1), x2))*(diff(diff(diff(u(X), x1), x2), x4))

(15)

u234 := diff(u(x1, x2, x3, x4), x2, x3, x4)

Physics:-diff(Physics:-diff(Physics:-diff(u(X), x2), x3), x4)

(16)

u223 := diff(u(x1, x2, x3, x4), x2, x2, x3)

Physics:-diff(Physics:-diff(Physics:-diff(u(X), x2), x2), x3)

(17)

u133 = -u11*u223-u113*u22+2*u12*u123-u234

-(diff(diff(diff(u(X), x2), x3), x4))-(diff(diff(diff(u(X), x2), x2), x3))*(diff(diff(u(X), x1), x1))-(diff(diff(u(X), x2), x2))*(diff(diff(diff(u(X), x1), x1), x3))+2*(diff(diff(u(X), x1), x2))*(diff(diff(diff(u(X), x1), x2), x3)) = -(diff(diff(diff(u(X), x2), x3), x4))-(-(diff(diff(diff(u(X), x1), x2), x4))-(diff(diff(u(X), x1), x1))*(diff(diff(diff(u(X), x1), x2), x2))-(diff(diff(u(X), x2), x2))*(diff(diff(diff(u(X), x1), x1), x1))+2*(diff(diff(u(X), x1), x2))*(diff(diff(diff(u(X), x1), x1), x2)))*(diff(diff(u(X), x2), x2))-(diff(diff(diff(u(X), x2), x2), x3))*(diff(diff(u(X), x1), x1))+2*(diff(diff(u(X), x1), x2))*(-(diff(diff(diff(u(X), x2), x2), x4))-(diff(diff(u(X), x1), x1))*(diff(diff(diff(u(X), x2), x2), x2))-(diff(diff(u(X), x2), x2))*(diff(diff(diff(u(X), x1), x1), x2))+2*(diff(diff(u(X), x1), x2))*(diff(diff(diff(u(X), x1), x2), x2)))

(18)

Weyl[`~i`, j, k, l, nonzero]+W[`~i`, j, k, l, nonzero]

Weyl[`~i`, j, k, l, nonzero]-W[`~i`, j, k, l, nonzero]

``

(19)

`in`(half*flat*metrics, 4*D)

``

NULL

NULL

 

I require one of these Weyl + W or Weyl - W (where W is Weyl tensor with hodge star operator, the equation may be found in my code) to be identically equal to zero. The computer will not recognise that it is identally equal unless i input the original p.d.e which I have, and I have also added some partial differentials up to the third order, maybe I need to include up to the fourth order? I am unsure what to add can someone please help me make this identically equal to zero! Thanks in advance for any help!

(I have put colon's after the equations Weyl+W and Weyl-W as the output was too long, but rest assured its not looking identically equal to zero!)
 

Download NEED_11.mw

with(DifferentialGeometry): with(Tensor):

DGsetup([x1, x2, x3, x4], M)

g1 := evalDG(dx1dx3+dx2dx4-u22(dx3)^2-u11(dx4)^2+2*u12*dx3dx4)

C1 := Christoffel(g1)

 

^^^ This is my code, I know theres something wrong with the metric but I'm not sure what, any help would be appreciated thanks! (This code gives me no answer).

u11*u22-u12^2+u13+u24 = 0   - This is the original eq I was working off.

I've programmed weyl tensor before with the physics package, now I need to program weyl tensor with this hodge star operator in the front, does anyone know how this is done on maple? Thanks in advance! (I should have attatched a photo which shows the desired equation in the middle line!)

1 2 Page 1 of 2