ecterrab

13431 Reputation

24 Badges

19 years, 357 days

MaplePrimes Activity


These are replies submitted by ecterrab

@Steve Roper 

Just to suggest you upload the worksheet contents using the green arrow so that the contents becomes visible in Mapelprimes, without having to manually download and open the worksheet.

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

Not sure what the problem is. You do have the latest version, 669, that is what the first line shows, then you install again version 669 (that is what Physics:-Version(669) does, it install the version, that in your case it is already installed). So the first thing is that you do not need to install the Updates again.

Independent of that, I performed the same two input/output (I use macintosh) but didn't receive a kernel connection lost. I suppose clicking the restart icon should fix a problem of that kind (it is the icon to the right of the bug icon). If that doesn't work I would try closing and reopening Maple.

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

Hi

Would it be possible to post the problem itself within a worksheet? Something where it is clear what you intended to do, what is the input that you would have imagined to accomplish that, what is what you would expect to receive. Frequently, problems like this, with a clear prescription, are excellent sources for development (or otherwise, if the solution already exists, to tell you how to get that result).

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

 

@Steve Roper 

Unfortunately, form times to times development happens too fast and I forget about the help pages. I need to do one for ChangeCoordinates. Sorry for that. Meantime, its syntax is kinda natural: the same as ChangeBasis.

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

@Pascal4QM 

Indeed, defining A, B and C as noncommutative objects in general works fine for this. The possibility of defining commutator and anticommutator algebra rules for them also allows for flexible manipulation of their products. Note, additionally, that it is possible to be more specific in this case, by using matrix instead of Matrix, as discussed in Sec.5 of the Maple help page "Physics, Mini-Course". That automatically defines these as noncommutative objects, the same way quantumoperators are.

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

@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

First 16 17 18 19 20 21 22 Last Page 18 of 60