MaplePrimes Questions

Error, (in unapply) variables must be unique and of type name

The command

fd:=fopen("C:/temp/",'WRITE');

suddenly does not work. I keep getting a 'permission denied' error message. I haven't had to write anything to a file for a while so do you think the recent windows update screwed something up? In fact, I can't seem to write any file anywhere. It was working weeks ago. My apology if this ends up being a lame question. :)

 

Hi , I have question about poincare's theorem which needs to change the veriable and that transform the coordinates , but when I change the variable from x to y if doesn't defined any suggestion ? Please 

How do I assume variables as  Matrixs for calculation?
Please help me to solve this problem :

assume(M11::Matrix);
assume(M12::Matrix);
assume(M21::Matrix);
assume(M22::Matrix);
assume(A::Matrix);


A := M12*M21+M11;
                         M12 M21 + M11
solve(A = 0, M12);
Warning, solve may be ignoring assumptions on the input variables.
                               M11
                             - ---
                               M21
solve(A = 0, M12, useassumptions = true);
                               M11
                             - ---
                               M21


How can I get solution being a matrix?
Thank you very much !!!

Each day
a:=a+5% of a -(0.1% of a+b)-10

b:=b+5%of b -(0.1% of a+b)-10
In how many days i have a+b=0?

Sirs.

Probably a brain fade, but I cant seem to code what i want.

constraints.mw
 

Tour2:=[[[1, 2, 3, 4]], [[1, 2], [1, 3, 4]], [[1, 3], [1, 2, 4]], [[1, 4], [1, 2, 3]], [[1, 2], [1, 3], [1, 4]]];M:=nops(Tour2):

[[[1, 2, 3, 4]], [[1, 2], [1, 3, 4]], [[1, 3], [1, 2, 4]], [[1, 4], [1, 2, 3]], [[1, 2], [1, 3], [1, 4]]]

(1)

interface(rtablesize=M):
  maxEnt:=max([seq(nops(Tour2[i]),i=1..M)]):
  Tours_Distances := Matrix
                     ( maxEnt,
                       M,
                       [ seq
                         ( [ seq
                             ( `if`( numelems(Tour2[i])>=j,
                                     d[i]*x[op(Tour2[i,j])]<=K,
                                    0
                                   ),
                               i=1..M
                             )
                           ],
                           j=1..maxEnt
                         )
                       ]
                     );

Tours_Distances := Matrix(3, 5, {(1, 1) = d[1]*x[1, 2, 3, 4] <= K, (1, 2) = d[2]*x[1, 2] <= K, (1, 3) = d[3]*x[1, 3] <= K, (1, 4) = d[4]*x[1, 4] <= K, (1, 5) = d[5]*x[1, 2] <= K, (2, 1) = 0, (2, 2) = d[2]*x[1, 3, 4] <= K, (2, 3) = d[3]*x[1, 2, 4] <= K, (2, 4) = d[4]*x[1, 2, 3] <= K, (2, 5) = d[5]*x[1, 3] <= K, (3, 1) = 0, (3, 2) = 0, (3, 3) = 0, (3, 4) = 0, (3, 5) = d[5]*x[1, 4] <= K})

(2)

convert( (2), 'list', 'nested' );

[[d[1]*x[1, 2, 3, 4] <= K, d[2]*x[1, 2] <= K, d[3]*x[1, 3] <= K, d[4]*x[1, 4] <= K, d[5]*x[1, 2] <= K], [0, d[2]*x[1, 3, 4] <= K, d[3]*x[1, 2, 4] <= K, d[4]*x[1, 2, 3] <= K, d[5]*x[1, 3] <= K], [0, 0, 0, 0, d[5]*x[1, 4] <= K]]

(3)

 

But what I want is:

d[1]*x[1,2]+d[2]*x[2,3]+d[3]*x[3,4]<=K,d[1]*x[1,2]<=K,d[1]*x[1,3]+d[3]*x[3,4]<=K;      #.....etc.

 

 

 

 

 

d[1]*x[1, 2]+d[2]*x[2, 3]+d[3]*x[3, 4] <= K, d[1]*x[1, 2] <= K, d[1]*x[1, 3]+d[3]*x[3, 4] <= K

(4)

NULL


 

Download constraints.mw

 

Hello guys,

I´ve a little bit problem by plotting an pyramid with an triangle in it. When I want to display both

parts, in the drawing the left and the right part and the top of the pyramid is missing. What is the problem ???
Abituraufgabe_2016_B2_Pyramide.mw

Thanks

I am trying to evaluate the following function J(n,phi) which can be used to find out a*b(-A*J(3,Pi/6)+B*J(6,Pi/6)) but it takes too much of time whereas mathematica takes much less time for the same. The maple file is attached. Hope my problem get solve. Thank you

restart;

r := 2.8749; a := 0.7747; b := 0.3812; A := 17.4; B := 29000; R := 5.4813; Z := 2;

J := proc (n, phi) options operator, arrow; 8*Pi^(3/2)*r*R*(sum((2*r*R)^(2*i)*pochhammer((1/2)*n, i)*pochhammer((1/2)*n+1/2, i)*(sum((-1)^j*cos(phi)^(2*j)*(sum((2*r*cos(phi))^(2.*l)*pochhammer(n+2*i, 2*l)*hypergeom([2*j+2*l+1, .5], [2*j+2*l+1.5], -1)*(.5*Beta(l+.5, n+2*i+l-.5)-sin(arctan(-Z/sqrt(R^2+r^2)))^(2*l+1)*hypergeom([-n-2*i-l+1.5, l+.5], [l+1.5], sin(arctan(-Z/sqrt(R^2+r^2)))^2)/(2*l+1))/(factorial(2*l)*pochhammer(2*j+2*l+1, .5)*(R^2+r^2)^(n+2*i+l-.5)), l = 0 .. 100))/(factorial(i-j)*factorial(j)), j = 0 .. i))/factorial(i), i = 0 .. 100)) end proc;


evalf(a*b*(-A*J(3, (1/6)*Pi)+B*J(6, (1/6)*Pi)));
JJ.mw

I wish to express the Maxwell equations in potential fields deriving from a Lagrangian in cartesian coordinates, but expressed in vectorial form; But I am receiving an message error that I do not understand.

Field_A-MaplePrimes.mw
 

 

Initial Definitions:

 

``

I wish in this work to express the Maxwell equations deriving from the Lagrangian in the fields phiand "A,"

phi

(1.1)

but expressed in vectorial form;

 

restart; clear; with(Physics); with(Physics[Vectors]); with(Library)interface(imaginaryunit = I)

clear

 

I

(1.2)

Physics:-Coordinates(X = [t, x, y, z])

`Detected \`t\`, the time variable, in position 1. Changing the signature of the spacetime metric accordingly, to: + - - - `

 

`Default differentiation variables for d_, D_ and dAlembertian are: `*{X = (t, x, y, z)}

 

`Systems of spacetime Coordinates are: `*{X = (t, x, y, z)}

 

{X}

(1.3)

Physics:-Vectors:-Setup(math = true, Physics:-Vectors:-diff = X)

`* Partial match of  'math' against keyword 'mathematicalnotation'`

 

`* Partial match of  'Physics:-Vectors:-diff' against keyword 'differentiationvariables'`

 

`Default differentiation variables for d_, D_ and dAlembertian are: `*{X = (t, x, y, z)}

 

[differentiationvariables = [X], mathematicalnotation = true]

(1.4)

``

Some definitions

 

 

Defining the Maxwell tensor

 

Physics:-Define(F):``

`Defined objects with tensor properties`

(2.1)

 

Defining the field A with their components:

 

A[mu] = Vector(4, [phi(X), A__1(X), A__2(X), A__3(X)]); Define(%)

A[mu] = Vector[column](%id = 18446744074366759750)

 

`Defined objects with tensor properties`

 

{F, A[mu], Physics:-Dgamma[mu], Physics:-Psigma[mu], Physics:-d_[mu], Physics:-g_[mu, nu], Physics:-KroneckerDelta[mu, nu], Physics:-LeviCivita[alpha, beta, mu, nu], Physics:-SpaceTimeVector[mu](X)}

(2.2)

Physics:-CompactDisplay(phi(X), A__1(X), A__2(X), A__3(X))

phi(t, x, y, z)*`will now be displayed as`*phi

 

A__1(t, x, y, z)*`will now be displayed as`*A__1

 

A__2(t, x, y, z)*`will now be displayed as`*A__2

 

A__3(t, x, y, z)*`will now be displayed as`*A__3

(2.3)

 

Applying:

 

 

``

F[alpha, beta] := Physics:-Vectors:-`+`(Physics:-d_[beta](A[alpha]), -Physics:-d_[alpha](A[beta]));

Physics:-d_[beta](A[alpha], [X])-Physics:-d_[alpha](A[beta], [X])

(3.1)

``

 

NULL

NULL

Term 1:

 

 

eq1 := Physics:-d_[alpha](F[alpha, beta])

Physics:-d_[alpha](Physics:-d_[beta](A[`~alpha`], [X]), [X])-Physics:-dAlembertian(A[beta], [X])

(4.1)

Physics:-SumOverRepeatedIndices(Physics:-d_[alpha](Physics:-d_[beta](A[`~alpha`], [X]), [X])-Physics:-dAlembertian(A[beta], [X]))

Physics:-d_[beta](diff(phi(X), t), [X])-Physics:-d_[beta](diff(A__1(X), x), [X])-Physics:-d_[beta](diff(A__2(X), y), [X])-Physics:-d_[beta](diff(A__3(X), z), [X])-Physics:-dAlembertian(A[beta], [X])

(4.2)

Physics:-SubstituteTensorIndices(beta = 4, Physics:-d_[beta](diff(phi(X), t), [X])-Physics:-d_[beta](diff(A__1(X), x), [X])-Physics:-d_[beta](diff(A__2(X), y), [X])-Physics:-d_[beta](diff(A__3(X), z), [X])-Physics:-dAlembertian(A[beta], [X]))

diff(diff(phi(X), t), z)-(diff(diff(A__1(X), x), z))-(diff(diff(A__2(X), y), z))-(diff(diff(A__3(X), z), z))-Physics:-dAlembertian(A__3(X), [X])

(4.3)

``

Physics:-SubstituteTensorIndices(beta = 1, Physics:-d_[beta](diff(phi(X), t), [X])-Physics:-d_[beta](diff(A__1(X), x), [X])-Physics:-d_[beta](diff(A__2(X), y), [X])-Physics:-d_[beta](diff(A__3(X), z), [X])-Physics:-dAlembertian(A[beta], [X]))

diff(diff(phi(X), t), t)-(diff(diff(A__1(X), t), x))-(diff(diff(A__2(X), t), y))-(diff(diff(A__3(X), t), z))-Physics:-dAlembertian(phi(X), [X])

(4.4)

SubstituteTensorIndices(beta = 2, Physics[d_][beta](diff(phi(X), t), [X])-Physics[d_][beta](diff(A__1(X), x), [X])-Physics[d_][beta](diff(A__2(X), y), [X])-Physics[d_][beta](diff(A__3(X), z), [X])-Physics[dAlembertian](A[beta], [X]))

Error, (in dchange/info) the number of new and old independent variables must be the same. Found {x, y} as new, while {} as old

 

SubstituteTensorIndices(beta = 3, Physics[d_][beta](diff(phi(X), t), [X])-Physics[d_][beta](diff(A__1(X), x), [X])-Physics[d_][beta](diff(A__2(X), y), [X])-Physics[d_][beta](diff(A__3(X), z), [X])-Physics[dAlembertian](A[beta], [X]))

Error, (in dchange/info) the number of new and old independent variables must be the same. Found {x, y} as new, while {} as old

 

Physics:-SubstituteTensorIndices(beta = 4, Physics:-d_[beta](diff(phi(X), t), [X])-Physics:-d_[beta](diff(A__1(X), x), [X])-Physics:-d_[beta](diff(A__2(X), y), [X])-Physics:-d_[beta](diff(A__3(X), z), [X])-Physics:-dAlembertian(A[beta], [X]))

diff(diff(phi(X), t), z)-(diff(diff(A__1(X), x), z))-(diff(diff(A__2(X), y), z))-(diff(diff(A__3(X), z), z))-Physics:-dAlembertian(A__3(X), [X])

(4.5)

``

What is the origin of the two error messages above? I did some wrong definition? Why this works in t and z but not in x and y?

 

NULL


 

Download Field_A-MaplePrimes.mw

 

 

 

I want to maximize a total profit (TP) function which is dependent on five independent variables (E,W,T, theta, tp). All these five variables can have non negative values. The TP function is given below- ( first TP is directly copied from maple worksheet and than copied again as a picture for clear viewing).

 

 TP = (p1*(Q-q)+p1*(1-theta)*(q-E)+s*E-c*Q-o-h*((1/6)*alpha*W^beta*a*p1^(-b)*tp^3/m-(1/2)*alpha*W^beta*a*p1^(-b)*tp^2+Q*tp)-(t1-tp)*h*((1/2*(-(2/3)*t1+m-(1/3)*tp))*W^beta*a*alpha*(t1-tp)*(-p1*(-1+theta))^(-b)+W*m)/m-(1/2)*h*(W+E)*(T-t1))/T-u*W

 

I am trying the maximize TP with respect to above five independent variables. I tried to solve  five equations ( representing first order partial derivative of TP with respect to each of the independent variables equated to zero) simultaneously by "solve" and "fsolve" command but both these commands fail to give any output. I have also tried three other commands in optimization package ( QPSolve, NLPSolve, Maximize) but all these three commands also doesn't give any output. I want to prove the concavity of TP function with respect to five independent variables, please guide how it can be done. ( I have computed the Hessian matrix but since five first order equations doesn't give output ( through fsolve command) so I am unable to compute Hessian at these first order optimiality condition solution.). The values of the paramters in the TP equation are -

[alpha = 50, beta = .7, c = 20, h = 4, m = .4, o = 10, p1 = 40, s = 10, u = 5, a = 15000, b = 2]

Dear sir,

I tried to solve a fourth order problem. But I got the error message as better to use midpoint method. Can I know what is midpoint method and here I uploading the problem please verify it if I did anything mistake?program.mw

restart;
with(plots); with(DEtools);
`&epsilon;` := .1;
de1 := x[0](t)+`&epsilon;`*x[1](t);
ode2 := sin(t)-`&epsilon;`*t*sin(t);
MODEL := {ode1, ode2};
VARS := {x(t), y(t)};
DOMAIN := t = 0 .. 20;
RANGE := x = -3 .. 3, y = -3 .. 3; COLORS := [BLACK, BLUE];
IC1 := [x[0](0) = 0, x[1](0) = 0]; IC2 := [(D(x[0]))(0) = 1, (D(x[1]))(0) = 0];
DEplot(MODEL, VARS, DOMAIN, RANGE, [IC1, IC2], stepsize = .1, arrows = THIN, linecolor = COLORS);
Error, (in DEtools/DEplot/CheckInitial) the 'number' option must be specified before initial conditions

Hi I am new to Maple. I have 2 question:

1)I tried to run the following but I get this error as shown.pde1 is the PDE system. IBC, or you can refer bc1 to bc5 are the boundary condition given.

2)My bc4 & bc5 is suppose to be approaching 0 when y approch infinity  which is why I just put y to be equal to a large value while bc4 and bc5 equal 0. Do Maple have a function to use the approach method?

 

restart; with(PDEtools):

pde1 := [(x*y+1)*(diff(f(x, y), y, y, y))+(x+f(x, y))*(diff(f(x, y), y, y))-(diff(f(x, y), y))^2+g(x, y) = 0, (x*y+1)*(diff(g(x, y), y, y))+(x+f(x, y))*(diff(g(x, y), y))-(diff(f(x, y), y))*g(x, y) = 0];

IBC := [eval(f(x, y), y = 0) = 0, eval((D[2](f))(x, y), y = 0) = 0, eval(g(x, y), y = 0) = 0, eval((D[2](f))(x, y), y = 10000000000) = 0, eval(g(x, y), y = 10000000000) = 0];

bc1 := eval(f(x, y), y = 0) = 0

bc2 := eval((D[2](f))(x, y), y = 0) = 0

bc3 := eval(g(x, y), y = 0) = 0

bc4 := eval((D[2](f))(x, y), y = 10^10) = 0

bc5 := eval(g(x, y), y = 10^10) = 0

sol1 := pdsolve(pde1, [IBC], numeric, [f(x, y), g(x, y)], 'spacestep' = 0.1e-2, 'indepvars' = [x, y])

Error, (in pdsolve/numeric/process_IBCs) invalid initial/boundary condition: [f(x, 0) = 0, (D[2](f))(x, 0) = 0, g(x, 0) = 0, (D[2](f))(x, 1000000000000) = 0, g(x, 1000000000000) = 0]

Thanks you in advance.

Good morning sirs,

Anyone with the idea(s) on how to convert series back to its original form should please share with me. 

Take for example

a-(1/2)*beta*a^2*y^2+(1/24)*beta^2*a^3*y^4-(1/720)*beta^3*a^4*y^6+(1/40320)*beta^4*a^5*y^8-(1/3628800)*beta^5*a^6*y^10+(1/479001600)*beta^6*a^7*y^12-(1/87178291200)*beta^7*a^8*y^14+O(y^16)

is a series for a*cos(sqr(a*beta)*y)

Thanking you in anticipation for your answer.

Hi, is anyone using the Geometry Expressions software together with Maple? I've found about this software on forum and installed a free demo version. It is using symbolic geometry, which I haven't been able to find this feature on other software, and can work very well with Maple, but unfortunatelly, my demo version doesn't work properly, and their oficial website http://saltire.com/ has lots of errors 404 page not found. I have requested support, but have had no answer so far. I was so happy finding this software, but now I am thinking maybe wasting my time. If you are using it, or maybe think it would be good to give it a go, please let me know if it is working for you. A particular feature which is not working for me is 'creating angles'. Thank you.

5 6 7 8 9 10 11 Last Page 7 of 1455