ecterrab

14540 Reputation

24 Badges

20 years, 21 days

MaplePrimes Activity


These are replies submitted by ecterrab

@Steve Roper 

with(Physics:-Vectors)

In your first post you asked about square of the norm of

a*`#mover(mi("r"),mo("∧"))`+b*`#mover(mi("θ",fontstyle = "normal"),mo("∧"))`+c*`#mover(mi("φ",fontstyle = "normal"),mo("∧"))`

_phi*c+_r*a+_theta*b

(1)

And this following result is correct because the three unit vectors form a basis and are orthogonal.

(_phi*c+_r*a+_theta*b).(_phi*c+_r*a+_theta*b)

a^2+b^2+c^2

(2)

In your second post you asked about something different

_i*x+_j*y+_k*z

_i*x+_j*y+_k*z

(3)

Of course the square of the norm of this one is

(_i*x+_j*y+_k*z).(_i*x+_j*y+_k*z)

x^2+y^2+z^2

(4)

BUT: if you express this result in spherical coordinates you have

ChangeBasis(_i*x+_j*y+_k*z, spherical, alsocomponents)

r*_r

(5)

r*_r.(r*_r)

r^2

(6)

That is understandable, because

ChangeCoordinates(r^2, cartesian)

x^2+y^2+z^2

(7)

So you see (4) and (6) are of course the same result. Summarizing: all these results are correct, and in (2) to expect something different is wrong.

 

You can see the same going the other way around: from shperical to Cartesian. Take the vector of your original post and change the basis to Cartesian

_phi*c+_r*a+_theta*b

_phi*c+_r*a+_theta*b

(8)

ChangeBasis(_phi*c+_r*a+_theta*b, cartesian)

(a*cos(phi)*sin(theta)+b*cos(phi)*cos(theta)-c*sin(phi))*_i+(a*sin(theta)*sin(phi)+b*cos(theta)*sin(phi)+c*cos(phi))*_j+(-sin(theta)*b+cos(theta)*a)*_k

(9)

So now you have your orginal vector in the Cartesian orthogonal basis. Take now the scalar product

((a*cos(phi)*sin(theta)+b*cos(phi)*cos(theta)-c*sin(phi))*_i+(a*sin(theta)*sin(phi)+b*cos(theta)*sin(phi)+c*cos(phi))*_j+(-sin(theta)*b+cos(theta)*a)*_k).((a*cos(phi)*sin(theta)+b*cos(phi)*cos(theta)-c*sin(phi))*_i+(a*sin(theta)*sin(phi)+b*cos(theta)*sin(phi)+c*cos(phi))*_j+(-sin(theta)*b+cos(theta)*a)*_k)

(a*cos(phi)*sin(theta)+b*cos(phi)*cos(theta)-c*sin(phi))^2+(a*sin(theta)*sin(phi)+b*cos(theta)*sin(phi)+c*cos(phi))^2+(-sin(theta)*b+cos(theta)*a)^2

(10)

simplify((a*cos(phi)*sin(theta)+b*cos(phi)*cos(theta)-c*sin(phi))^2+(a*sin(theta)*sin(phi)+b*cos(theta)*sin(phi)+c*cos(phi))^2+(-sin(theta)*b+cos(theta)*a)^2)

a^2+b^2+c^2

(11)

You see you again arrive at (2) For experimentation, you can try changing also the vector components, not just that basis, so that instead of seeing theta and phi in (9) you see x, y, z.

ChangeBasis(_phi*c+_r*a+_theta*b, cartesian, alsocomponents)

((x^2+y^2)^(1/2)*a*x-(x^2+y^2+z^2)^(1/2)*c*y+b*x*z)*_i/((x^2+y^2+z^2)^(1/2)*(x^2+y^2)^(1/2))+((x^2+y^2)^(1/2)*a*y+(x^2+y^2+z^2)^(1/2)*c*x+b*y*z)*_j/((x^2+y^2+z^2)^(1/2)*(x^2+y^2)^(1/2))+((x^2+y^2)^(1/2)*a*z-b*(x^2+y^2))*_k/((x^2+y^2+z^2)^(1/2)*(x^2+y^2)^(1/2))

(12)

(((x^2+y^2)^(1/2)*a*x-(x^2+y^2+z^2)^(1/2)*c*y+b*x*z)*_i/((x^2+y^2+z^2)^(1/2)*(x^2+y^2)^(1/2))+((x^2+y^2)^(1/2)*a*y+(x^2+y^2+z^2)^(1/2)*c*x+b*y*z)*_j/((x^2+y^2+z^2)^(1/2)*(x^2+y^2)^(1/2))+((x^2+y^2)^(1/2)*a*z-b*(x^2+y^2))*_k/((x^2+y^2+z^2)^(1/2)*(x^2+y^2)^(1/2))).(((x^2+y^2)^(1/2)*a*x-(x^2+y^2+z^2)^(1/2)*c*y+b*x*z)*_i/((x^2+y^2+z^2)^(1/2)*(x^2+y^2)^(1/2))+((x^2+y^2)^(1/2)*a*y+(x^2+y^2+z^2)^(1/2)*c*x+b*y*z)*_j/((x^2+y^2+z^2)^(1/2)*(x^2+y^2)^(1/2))+((x^2+y^2)^(1/2)*a*z-b*(x^2+y^2))*_k/((x^2+y^2+z^2)^(1/2)*(x^2+y^2)^(1/2)))

((x^2+y^2)^(1/2)*a*x-(x^2+y^2+z^2)^(1/2)*c*y+b*x*z)^2/((x^2+y^2+z^2)*(x^2+y^2))+((x^2+y^2)^(1/2)*a*y+(x^2+y^2+z^2)^(1/2)*c*x+b*y*z)^2/((x^2+y^2+z^2)*(x^2+y^2))+((x^2+y^2)^(1/2)*a*z-b*x^2-b*y^2)^2/((x^2+y^2+z^2)*(x^2+y^2))

(13)

simplify(((x^2+y^2)^(1/2)*a*x-(x^2+y^2+z^2)^(1/2)*c*y+b*x*z)^2/((x^2+y^2+z^2)*(x^2+y^2))+((x^2+y^2)^(1/2)*a*y+(x^2+y^2+z^2)^(1/2)*c*x+b*y*z)^2/((x^2+y^2+z^2)*(x^2+y^2))+((x^2+y^2)^(1/2)*a*z-b*x^2-b*y^2)^2/((x^2+y^2+z^2)*(x^2+y^2)))

a^2+b^2+c^2

(14)

``

 

Download scalar_product_in_spherical_coordinates.mw


Edgardo S. Cheb-Terrab
Physics, Differential Equations and Mathematical Functions

 

@Axel Vogt 

No, the definition is not the same, neither there is only one in use in the literature. Maple and Mathematica definitions are related via JacobiSN(a, z) = JacobiSN[a, z^2]and the two solutions shown are actually the same after you translate from Maple to Mathematica. By the way entering convert("JacobiSN[a, z^2]", FromMma) shows how the definitions in both systems are related.

The issue mentioned by Rouben Rostamian is standard in Computer Algebra differential equations solvers when the DE has  square roots of the unknown of the problem. That results in branches directly in the DE. Semantics to the side, I tend to think of these problems as: remove the square root and you have a well-defined problem, otherwise, the symbolic solution will be correct only in some region of the complex plane. Basically, most of the time the symbolic solution you receive is the one that corresponds to the DE after removing those square roots. In this example, take for instance ODE^2, then call dsolve, and there you see the JacobiSN solution.

Edgardo S. Cheb-Terrab
Physics, Differential Equations and Mathematical Functions, Maplesoft

@deniscr 

Curious how minds interpret written language differently ... It confused me your comment about inner products. From your last reply, you only wanted to have one of the Killing vectors (tensors of 1 index) defined as a tensor. Do it the usual way using Define, for example with the first one:

Edgardo S. Cheb-Terrab
Physics, Differential Equations and Mathematical Functions, Maplesoft

@deniscr 

This is the original file, where I see no Killing vectors nor what is what you meant by the inner product of them with a scalar. To make your question understandable for me, you'd need to post a mw with the Killing vectors, the product you intend to do (but don't know how to) and the result you expect.

Edgardo S. Cheb-Terrab
Physics, Differential Equations and Mathematical Functions, Maplesoft

@deniscr 

I'd need to see your question with formulas visible on a worksheet in order to answer more precisely

@Carl Lovenm

I've also lost - not sure hundreds but with no doubt a hundred at least - of reputation points in an also fully mysterious way during the last two weeks mainly. I didn't look back to try to understand where it was coming from but some are visible at nude eye: the post "Vectors in Spherical Coordinates using Tensor Notation", displayed on the front-page of Mapleprimes, was with 6 votes a week ago, now it is with 5 votes.

So I assumed someone was taking votes away. I shrugged ... It didn't pass through my mind that my posts were not good, or that my answers were of no value (assuming someone took away her/his votes). To be sincere here, I evaluate my posts and answers by myself, and only present stuff that I find good.

By the way, specifically about you two Carl and Nm, I find your contributions to this website FANTASTIC, even if sometimes I may not agree with the words you use (e.g. yesterday on what one of you called a bug). Nothing of that takes away the enormous value of your contributions.

Edgardo S. Cheb-Terrab
Physics, Differential Equations and Mathematical Functions, Maplesoft

Yes. Firstly, without the original file, anyone willing to help you will need to re-type everything. Secondly, because the background for this problem is missing, the coordinates and the metric (I can deduce it from the picture you sent, but then will need to type all that deduction to reproduce - not good).

Please post the problem with a worksheet - can be by editing your original post replacing the picture by the worksheet showing its contents - and I will help you with this problem.

Edgardo S. Cheb-Terrab
Physics, Differential Equations and Mathematical Functions, Maplesoft

@maplequestions 

Yes, you need to upload the worksheet here. Not into a Google drive. First, so that others can see it, here, a forum maintained by the company, perhaps an year or two after today. Then because while most people on this website are happy to voluntarily help (this is not work for hire), on the other hand typing things for others (e.g. equations, or functions) and similar things can be done by the person who asks the question.

From your reply, being that you do not know how to input a function, I suggest you give a look at the post "Maple for Beginners". Section 2 is all about that, expressions, equations and functions. The five sections of that post constitute the basic to take off, moving you from beginner to actual user. Maybe you can learn that content in one afternoon, who knows perhaps less.

You can also give a look at the help page Physics,Tensors, Sec II.13, "Setting the spacetime metric indicating the line element", but trust me on this one: if you don't know how to input a function it is better to first go with Maple for Beginners, that is the fastest approach.

Then please write here again, posting the worksheet, this time containing your attempts to formulate the problem. Either you will have succeeded (I imagine), or the question on which to help you will be more specific.

Edgardo S. Cheb-Terrab
Physics, Differential Equations and Mathematical Functions, Maplesoft

@dglevitt 
Looking at only one image is not possible to tell why you are not reproducing the output shown in the post. So I suggest you to proceed as follows

  1. Do not retype, in a blank worksheet, each line shown in the post - that is prone to typographical mistakes not visible in the image of one formula you are showing. Instead: download the worksheet attached to the post (the link is also, always, at the end of the post).
  2. Open the downloaded worksheet and click that `!!!` icon to automatically execute the whole worksheet to the end. Look at equation (2.2). Do you see subscripts or superscripts?
  3. If you see superscripts (as expected) then please write again here, the problem is resolved. If you see subscripts, could you please save the worksheet and upload it here using the Green arrow. The whole worksheet, not just a portion of it. 

Note as well that, as mentioned in the post, you need to have installed the Maplesoft Physics Updates v.640 or higher, that only works with Maple 2020.

Edgardo S. Cheb-Terrab
Physics, Differential Equations and Mathematical Functions, Maplesoft

In my opinion, math questions that have answers, and this one is a good example - the answers were skilled work and time by others - should not be deleted, and that should not be related to the number of votes or the like. I do realize that some new people may post the same question more than once. I would only delete repetitions that have no answers, and eventually only rename those with answers - say - as in: Question (1), Question (2), Question (3) ... Then all (same) Questions having (different) answers remain available to everybody.

Edgardo S. Cheb-Terrab
Physics, Differential Equations and Mathematical Functions, Maplesoft

Now that the Maple Student Edition is free to use, these days at home are also an excellent opportunity to discover computer algebra. Although there is superb mathematics online, there is very little on "how to do with a computer what a student already knows how to do with paper and pencil". Maple for Beginners bridges that gap.

Edgardo S. Cheb-Terrab
Physics, Differential Equations and Mathematical Functions, Maplesoft

@lastgunslinger 

Yes you can set the tetrad to any specific valid value. This is explained on the help page ?Physics,Setup, the section "tetrad". For an example of what is described in ?Physics,Setup, see eq.(10) of the help page ?Physics,Tetrads,TransformTetrad, where a tetrad is first derived (in any way, yours is also valid), then set. Something important to have in mind: The command Tetrads:-IsTetrad can check whether a matrix that you think is a tetrad, satisfies or not a tetrad definition, and tell you whether it is an orthonormal or null tetrad. Keep an eye also in the signature, whether it has the time component in position 4 or position 1, and whether the timelike component is positive or negative.

Regarding "Which brings me to my next question: would it be possible to define my own spin connection?", the four null vectors of the Newman-Penrose formalism are also commands of the Physics:-Tetrads package and the value of their components is automatically derived from the value of the tetrad. So setting a tetrad automatically sets the null vectors, and with that the Weyl and Ricci scalars related to the spin connection.

Edgardo S. Cheb-Terrab
Physics, Differential Equations and Mathematical Functions, Maplesoft

@digerdiga 

The first line is yours. The second one is the suggestion given to you. The third line is what you wanted to achieve, accomplished as shown in the link provided to you, "The hidden SO(4) symmetry of the Hydrogen Atom", where you see: first SortProducts is applied, then Simplify is applied, with regards to indices, algebras or all. Reading the help page of Physics,Simplify may also be of help for you.

I am out of this thread - won't be replying further - sorry for that.

Edgardo S. Cheb-Terrab
Physics, Differential Equations and Mathematical Functions, Maplesoft

@digerdiga 

You say an answer is not satisfying you. But nothing in what you write indicates you read these answers. E.g., that link showing how to use Library:-SortProducts and SubstituteTensor. 

No, you don't get on my nerves. I only find your approach of asking and pseudo-reading the answers not productive. 

You keep asking why it can not commute X^2[b] with X[a]. Of course it can. But being noncommutative objects, the ordering X[a]^2 X[b] or X[b] X[a]^2 has no normal form. You can impose the one you'd prefer using SortProducts. But you are not taking that answer into account.

Then look at your way of expressing yourself about what others offer you as help: "I'm already reading your tut regarding the Sort-thing" Digerdiga, I am not spending my time here to read this kind of reply. Nor this kind of sarcasm: "If not here, where should be place for discussion ! ?"

Don't take it wrong, but I suggest you revise your style of communication if you want to keep receiving help in this forum. 

Remember: none of these replies or answers for help that you see posted in MaplePrimes are part of the job of anyone participating in this form. They are just voluntary activities.

Edgardo S. Cheb-Terrab
Physics, Differential Equations and Mathematical Functions, Maplesoft

@digerdiga 
This is not for a long debate. Answers were given. You need to read them. Copying here again: "the two commands that help are Library:-SortProducts and SubstituteTensor. You can see several examples of how that is done in the post The hidden SO(4) symmetry of the Hydrogen Atom."

Edgardo S. Cheb-Terrab
Physics, Differential Equations and Mathematical Functions, Maplesoft

First 21 22 23 24 25 26 27 Last Page 23 of 64