Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

I'm fairly new to using Maple and am having a bit of a hard time calculating the following inner product. Firstly, I define the tensors (which to this end I'm not certain they are correctly defined), 

with(Physics):

Setup(mathematicalnotation=true)

Setup(coordinatesystems=spherical):

ds2 := - dt^2 + a(t)^2 /( 1-k*r^2)*dr^2 + a(t)^2*r^2*dtheta^2 + a(t)^2*r^2*sin(theta)^2*dphi^2;
Setup(coordinates = spherical, metric = ds2);

e[mu, `~nu`] = Matrix(4, {(1,1)= a(t)/sqrt(1-k*r^2), (2,2)=a(t)*r, (3,3)=a(t)*r*sin(theta), (4,4)=1}, fill=0); (15) 
Define((15))
f[`~mu`, nu] = Matrix(4, {(1,1)=sqrt(1-k*r^2)/(a(t)), (2,2)= 1/(a(t)*r), (3,3)=1/(a(t)*r*sin(theta)), (4,4)=1}, fill=0); (28)
Define((28))

Thus, I defined two mixed tensors e[mu, `~nu`] (one covariant and one contravariant index ) and f[`~mu`, nu] (one contravariant and one covariant index).

Then, I try to take the following inner product between the two mixed tensors and the Christoffel symbols of the second kind, namely,

e[nu, `~alpha`].f[`~sigma`, beta].Christoffel [`~nu`, sigma, mu];

where I used the Physics['.'] command . However, when I try taking this inner product, it returns unevaluated.

 

Did I define the mixed tensors incorrectly? Does it matter how you define the indices when you're gonna take the inner product? Because taking the inner product of simply e[mu, `~nu`].f[`~mu`, nu] also returns unevaluated. Also, I should mention that  e[mu, `~nu`] and f[`~mu`, nu] are inverses of each other, is there any way to define one and get the other, since, simply changing the way in which the indices are raised and lowered doesn't take the reciprocal of the components. 

Do you agree this solution given by Maple is not correct?

restart;
pde := diff(u(x,t),t)+diff(u(x,t),x)=0;
bc  := D[1](u)(0,t)=0;
ic  := u(x,0)=exp(-x^2);
sol:=pdsolve([pde,ic,bc],u(x,t)) assuming x>0,t>0;
pdetest(sol,pde)

Result of pdetest should be zero.

I think the PDE itself is not well posed (I copied it from different forum to see what Maple does with it). But still the solution clearly does not satisfy the PDE itself for x not zero. 

Maple 2019.2.1 with Physics version 573

 

 The Joint Mathematics Meetings are taking place next week (January 1518) in Denver, CO. This meeting is a must-attend for anyone interested in learning about innovative mathematical research, advancing mathematical achievement, providing the communication and tools to progress in the field, encouraging mathematical research, and connecting with the mathematical community.

Maplesoft will at booth #1100  in the networking area (located just outside the exhibit hall doors). Stop by our booth or the networking area to chat with me and other members of the Maplesoft team, pick up some free Maplesoft swag or win some prizes. We’ve got some good ones!

There are also several interesting Maple-related talks and events happening this week. 

Attend our Workshop - Maple: Math Software for Teaching, Learning and Research

Thursday January 16th, 2020

Centennial Ballroom AHYATT Denver Colorado

Catered Reception: 6:00PM6:30PM
Training Workshop: 6:30PM8:00PM

Are you new to the Maple world and interested in finding out what Maple can do for you? Are you an old hand at Maple but curious about the many new features we’ve added in the past few years? Come join us for an interactive workshop that will guide you through Maple’s capabilities, with an emphasis on our latest additions.

The topics we’ll be covering include:

  • Our natural math notation for input and output
  • Tools for creating interactive documents that incorporate math, text and graphics
  • An overview of our vast library containing packages for advanced mathematics research scientific and engineering applications
  • A brief look at Maple’s powerful programming language|
  • Online and mobile tools that augment the Maple experience

Register herewww.com/ 

We are also 3 show floor talks, at the end of Aisle 600 inside the exhibits:

The Maple Companion App

 January 15

3:00 pm -3:55 pm

Using Maple to Enhance Teaching and Learning

 January 16

11:00 am-11:55 am

The Maple Companion App

January 17

11:00 am- 11:55 am

 

If you are attending the Joint Math Meetings and plan on presenting anything on Maple, please let me know and I'll add it to our list!


See you there!

Charlotte 

test.mw

Please see the attached.

NLPSolve('f(x,y,'g(x,y)')', x=0..1,y=0..1) is not working...

How to use for loop inside unapply operator

test.mw

I am not sure why I cannot do: plot3d([f(x,y,'g(x, y)')], x=0..1,y=0..1).

And the use of single quote in Maple 2019 and 2017 are giving different results. that is, the plot (note, not plot3d) results in the attched script by Maple 2017 and 2019 are different...

I want to know whether sqp method do a local search or a global search. Thank you.

I found that i can use  simplify under assumption to gain the result :

simplify((-p^3)^(1/3), assume = negative);
                               -p

simplify((p^3)^(1/3), assume = positive);
                               p


But confusing ! I expected the simplify command just with the option=symbolic works at the same manner ?


 

My purpose :

simplify((-p^7)^(1/7), assume = negative);

-p

(1)

simplify((p^7)^(1/7), assume = positive);

p

(2)

Without negative sign the simple symbolic result appears :

simplify((p^3)^(1/3), symbolic);

p

(3)

In power 3 the Imaginary part is included too !

simplify(((-p)^3)^(1/3), symbolic);

(1/2)*p*(I*3^(1/2)+1)

(4)

NOT WORKING !

simplify((p^7)^(1/7), symbolic);

p

(5)

simplify((-p^7)^(1/7), symbolic);

p*(-1)^(1/7)

(6)

simplify((-p^7)^(1/7), symbolic, radical);

(-p^7)^(1/7)

(7)

``

``


 

Download odd_negative_powers.mwodd_negative_powers.mw

 

I create a lot of procs and functions and then find myself having to create sequences of their values. I use for loops, seq or create a new proc to do it.

 

e.g., suppose I have a proc like f := n->n^2 or whatever. I can do [seq(f(k),k=0..5)]. Is there a very simple notation that maple has to do the same? E.g., hypopthetically f($$0..5) and it handles the accumulation in to a sequence itself

e.g., I have an equation that is written like a/b*c and maple rewrites it as a*c/b.

c is a complicated expression and when it's written with b under it, it takes up far more vertical spaces than necessary giving less visual resolution even if b is just 2.

In latex notation it is the difference between \frac{a}{b} c and \frac{ac}{b}.

 

In general what is the process? I noticed I can sometimes use ` ` to block things in but this also interfers with mathamtical notation. e.g., `3^f` becomes just that rather than f writen as a superscript.

Clearly I could hack it using various things but I want something direct and simple that tells maple not to try to do it's magic tricks.

For example, sometimes I might have 2*(a + b) and maple displays it as 2a + 2b. If I write it as `2`*(a+b) then this is noted as 2*(a+b) but the 2 is different.. I guess it is treated as a string or something... For my cases it works since I'm not trying to calculate anything from the expression but just for visual purposes, other times though I might want to calculate(usually the visual doesn't matter in calculation but sometimes both are desired).

I really want to avoid having to litter the expressions with special syntax to get such simple behavior. Something to tell maple not to carry out whatever algebraic transform it is programmed to do.

 

BTW, what does ! do? !3 + 4 opens a new window with an exit code.

 

 

Hello,
the following command

collect(c4*dnub*kpbr*ksr*nur*nurdel + c4*dnur*kpbr*ksr*nub*nurdel, [nur, nub, dnur, dnub, nurdel, nubdel, dnurdel, dnubdel, c4], distributed)

returns

c4*dnub*kpbr*ksr*nur*nurdel + c4*dnur*kpbr*ksr*nub*nurdel

However, I am expecting it to return

c4*kpbr*ksr*(dnub*nur*nurdel+dnur*nub*nurdel)

Where is the error?
Thanks in advance

Hello,

Lets say I have an expression

f:=(a+b)*x1+(a^2+b^2)*(x1+x2^2)+c*(x2-x3)*a*b

and I have a list

p:=[a+b,a^2+b^2,c*b*a].

How can I get the coefficients of the element from p in f, ie,

cof=[x1,x1+x2^2, x2-x3].

such that cof[i] corresponds to p[i]?

Thanks in advance for your suggestions.


How do I remove these unwanted trailing zeros from my plot ? I have tried setting striptrailing=true from the Tyesetting package but no difference. Thanks

 

2 3 4 5 6 7 8 Last Page 4 of 1627