Maple 2015 Questions and Posts

These are Posts and Questions associated with the product, Maple 2015

I want to solve numerically the nonlinear pde:

 

u_x+u_t - (u_{xt})^2 = u(x,t)

 

which method do you propose me to use with maple? (I don't mine about which boundary conditions to be used here).

 

Hello.
Have a question for use Physics[TransformCoordinates] . For example, in a Cartesian coordinate system is an arbitrary tensor. As you know, in this case the covariant, contravariant and mixed components are the same. We have a coordinate transformation such as transforming our Cartesian coordinate system in the oblique coordinate system. In this simple example, correctly calculated the covariant, contravariant and mixed components (structure: covariant and contravariant), but other mixed components (structure: contravariant and covariant) are calculated is not correct. I checked by hand.



restart

with(Physics):

Setup(mathematicalnotation = true):

ds := dx[1]^2+dx[2]^2+dx[3]^2:

Setup(coordinates = (X = [x[1], x[2], x[3]]), dimension = 3, metric = ds, spacetimeindices = lowercaselatin, quiet):

g_[]:

A[a, b] = Matrix(3, 3, {(1, 1) = 2, (1, 2) = 1, (1, 3) = 3, (2, 1) = 2, (2, 2) = 3, (2, 3) = 4, (3, 1) = 1, (3, 2) = 2, (3, 3) = 1})

A[a, b] = (Matrix(3, 3, {(1, 1) = 2, (1, 2) = 1, (1, 3) = 3, (2, 1) = 2, (2, 2) = 3, (2, 3) = 4, (3, 1) = 1, (3, 2) = 2, (3, 3) = 1}))

(1)

Define(%):

`Defined objects with tensor properties`

(2)

A[]

A[a, b] = (Matrix(3, 3, {(1, 1) = 2, (1, 2) = 1, (1, 3) = 3, (2, 1) = 2, (2, 2) = 3, (2, 3) = 4, (3, 1) = 1, (3, 2) = 2, (3, 3) = 1}))

(3)

A[`~`]

A[`~a`, `~b`] = (Matrix(3, 3, {(1, 1) = 2, (1, 2) = 1, (1, 3) = 3, (2, 1) = 2, (2, 2) = 3, (2, 3) = 4, (3, 1) = 1, (3, 2) = 2, (3, 3) = 1}))

(4)

A[`~a`,b,matrix]

A[`~a`, b] = (Matrix(3, 3, {(1, 1) = 2, (1, 2) = 1, (1, 3) = 3, (2, 1) = 2, (2, 2) = 3, (2, 3) = 4, (3, 1) = 1, (3, 2) = 2, (3, 3) = 1}))

(5)

A[`a`,~b,matrix]

A[a, `~b`] = (Matrix(3, 3, {(1, 1) = 2, (1, 2) = 1, (1, 3) = 3, (2, 1) = 2, (2, 2) = 3, (2, 3) = 4, (3, 1) = 1, (3, 2) = 2, (3, 3) = 1}))

(6)

[y[1] = x[1]-x[2], y[2] = x[2]-x[3], y[3] = x[3]]

[y[1] = x[1]-x[2], y[2] = x[2]-x[3], y[3] = x[3]]

(7)

solve((7), {x[1], x[2], x[3]})

{x[1] = y[1]+y[2]+y[3], x[2] = y[2]+y[3], x[3] = y[3]}

(8)

OK

B[a,b] = TransformCoordinates((8), A[a, b], [y[1], y[2], y[3]], [x[1], x[2], x[3]], simplifier = `@`(`simplify/size`, simplify))

B[a, b] = (Matrix(3, 3, {(1, 1) = 2, (1, 2) = 3, (1, 3) = 6, (2, 1) = 4, (2, 2) = 8, (2, 3) = 15, (3, 1) = 5, (3, 2) = 11, (3, 3) = 19}))

(9)

OK

C[a,b] = TransformCoordinates((8), A[~a,~b], [y[1], y[2], y[3]], [x[1], x[2], x[3]], simplifier = `@`(`simplify/size`, simplify))

C[a, b] = (Matrix(3, 3, {(1, 1) = 2, (1, 2) = -1, (1, 3) = -1, (2, 1) = 0, (2, 2) = -2, (2, 3) = 3, (3, 1) = -1, (3, 2) = 1, (3, 3) = 1}))

(10)

OK

D[a,b] = TransformCoordinates((8), A[a,~b], [y[1], y[2], y[3]], [x[1], x[2], x[3]], simplifier = `@`(`simplify/size`, simplify))NULL

D[a, b] = Matrix(%id = 4452149890)

(11)

Bug

E[a, b] = TransformCoordinates((8), A[~a,b], [y[1], y[2], y[3]], [x[1], x[2], x[3]], simplifier = `@`(`simplify/size`, simplify))NULLNULL

E[a, b] = Matrix(%id = 4452139458)

(12)

should be

LinearAlgebra:-Transpose(rhs((12)))

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

(13)

``



Download Transformation_tensor_components.mw

I recently got myself a 64 bit computer and have noticed that I cannot use the option compile=true in dsolve/numeric. Take the following simple example:

dsolve({diff(x(t),t)=x(t),x(0)=1},numeric,compile=true);
Error, (in dsolve/numeric/SC/preproc) unable to compile (rc=1), please try again, and if that fails verify your Windows compiler installation

I'm using Windows 10, but had the same problem with Windows 8.1 on the same machine.
The Compiler:-Compile examples in the help page all work.

What do I have to do to make the option compile=true work in dsolve/numeric?

You may safely assume that I don't know any technicalities about these things.

How to change the font style, globally, the inputs and outputs of computations in Maple 2015? That is, every time a new document is started, the chosen style is automatically applied.

Oliveira.

Hi,

 

  I have the following input in order to obtain the dimension of an array, by means of the values has been assigned

 

with(ArrayTools):
with(LinearAlgebra):
f[1]:=1:
f[2]:=2:
nops(f);
Size(f);
Dimension(f);

 

  The result is 

---

1
[ 1 1 ]
Error, invalid input: LinearAlgebra:-Dimension expects its 1st argument, A, to be of type {Matrix, Vector} or coercible via `~Simplify`, but received f

 ---

 

I cannot get number "2", which is expected. Is there any way to obtain that? I looked for help and mapleprime, without any simple solution ......

 

Thank you very much!

  

Hi,

 

  Suppose I have an array

A[1]:=a;

A[2]:=b;

A[3]:=c;

 

  I would like to check if an element, e.g. "c", belong to this array. I can contrsuct a "for... end do" command to compare each element and/or construct a subroutine. 

 

  Is there any build-in function in maple can do that? Perferably return true/false

 

Thank you!

I want to display calculation steps by maple like this

k=a+b*c=2+4*4=9

How can I do so that when I enter k:=a+b*c (the value of a,b,c have been assigned) and it can show the substitution process and display the result like this

The font size in the output pane of the standard interface, interactive debugger is really, really small and I can't figure out how to increase it. (Other than drop my screen resolution from its native 2560x1440, which makes it bigger but "fuzzier" - not a huge improvement for tired eyes!!)

Hi,

  Excuse me, I have the following code

  

###########################

with(combinat);
with(LinearAlgebra);
f:=([1,2,3]);
permute(f);

n:=3;
g:=array(1..n);

for i from 1 to n do
  g[i]:=i;
end do;

permute(g);

###########################

 The output ends up with

 

Error, (in combinat:-permute) 1st argument must be a list, set or a non-negative integer

 

 It seems that maple will not generate permutation of g... How to generate the permutation of array g? i.e. by assigning all variables automatically.

 

Thank you very much!

 

Hi, 

     I was just curious about the difference between defining tensors as arrays/matricies/TensorArrays vs defining them as algebraic symbols. I found that defining them as an expression lead to the wrong answer, and I was forced to define a tensor (LKh) as an array. I've attached a worksheet demonstrating my problem.

I apologize for the amount of tensors needed to find this problem, but it is the only one I have reproduced the issue. I basically define the metric
Metric = g_
auxillary tensor = h
Killing vector = K
LieDerivative of h, wrt K = LKh (not a tensor array)
LieDerivative of h, wrt K = LKh2 (tensor array)
Then I compare two expressions, rho1 and rho2 computed from LKh and LKh2 and they disagree. 


MapleQuestion.mw

Thanks!

I have purchased Maple 2015 Student Edition a few months ago.  Now, I was about to buy MapleSim Student Edition and I saw that MapleSim include a license of Maple. 

If I buy MapleSim and Maple,  I would pay 198$ even if I could have bought only MapleSim and still get both products? 

Can I get MapleSim Student without Maple at a lower price? 

Maybe the version of Maple included in MapleSim has less features and that's why the cost of MapleSim and Maple are the same? 

Thanks in advance!  

I did some search on Google and on this website, but I haven't found anything. 

Hi,

     I was wondering if there is an easy way to define another set of indices in the Physics package. For example, usually greek indices are for all 4 spacetime dimensions. Using Setup(spaceindices = lowercaselatin), we can define 3 of those as space indices. I was hoping there is a more general command, so that I could use only 2 indices as "space indices". For example, X[i] would run over x,y while X[mu] would run over t, z. Is there such a command in the Physics package, or a simple way to implement this personally?

Second thing. I was playing with SumOverRepeatedIndices on an expression that contained both space indices and spacetime indices. Usually this seems to work, but in my attached example it does not. I tried the same thing with just spacetime indices in Maple 18 (newest Physics update) and it gave the same error.


Any help appreciated,

PhysicsBug.mw

I got a code file and i dont know how to load it in Linux. In Windows i just type:

read "E:/code.txt"

But thing now i change to use Linux and cant do the same (Maple 2015 64bit Linux ver), try to load

read "/root/Desktop/code.txt"

It show me that:

I click Cancel and it show me:

Hope can help me another ways to use and load my code to run.

Here is the function I want to find the inverse of 

 U(x):=-(s^2/(s^2+1)+1/(s^2+1)-1)*exp(sqrt(s)*x/sqrt(phi))/(s^2+1)+exp(-sqrt(s)*x/sqrt(phi))/(s^2+1);

where phi>0

Now taking the inverselaplace of U(x)

 u:=invlaplace(U(x),s,t);

which give me an unevaluated integral.

Any idea, how to get the complete inverse, maybe interms of erf?

When solving a simple assignment problem in Maple 2015.1 the bug occurs:

 

In Maple 2012 there are no problems:

A := Matrix([[1, 7, 1, 3], [1, 6, 4, 6], [17, 1, 5, 1], [1, 6, 10, 4]]):

n:=4:

z:=add(add(A[i,j]*x[i,j], j=1..n), i=1..n):

restr:={seq(add(x[i,j], i=1..n)=1, j=1..n),seq(add(x[i,j], j=1..n)=1, i=1..n)};

sol:=Optimization[LPSolve](z, restr, assume=binary); 

 

 

First 56 57 58 59 60 61 62 Page 58 of 63