Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

Hello all

when i tried to use the library "with(VLA)" i always have this problem :

 with(VLA);
Error, invalid input: with expects its 1st argument, pname, to be of type {`module`, package}, but received LA
 

but i have sow in many videos that its working and they applied it in same way.

 

any help please > >  

Hello dear!

I want to find the vector field of a vector field my approch is below:

with(VectorCalculus);
SetCoordinates(cartesian[x, y, z]);
V := VectorField(<(u(x, y, z), v(x, y, z), w(x, y, z))>);
Gradient(V);

I want answer as bellow:

Matrix(3, 3, {(1, 1) = Diff(u, x), (1, 2) = Diff(u, y), (1, 3) = Diff(u, z), (2, 1) = Diff(v, x), (2, 2) = Diff(v, y), (2, 3) = Diff(v, z), (3, 1) = Diff(w, x), (3, 2) = Diff(w, y), (3, 3) = Diff(w, z)});

Please help me to fix this problem. I am waiting the quick answer.

THANKS in advance

 I accidentally stumbled on this problem in the list of tasks for mathematical olympiads. I quote its text in Russian-English translation:

"The floor in the drawing room of Baron Munchausen is paved with the identical square stone plates.
 Baron claims that his new carpet (made of one piece of a material ) covers exactly 24 plates and
 at the same time each vertical and each horizontal row of plates in the living room contains 
exactly 4 plates covered with carpet. Is not the Baron deceiving?"

At first glance this seems impossible, but in fact the Baron is right. Several examples can be obtained simply by hand, for example

                                        or        

 

The problem is to find all solutions. This post is dedicated to this problem.

We put in correspondence to each such carpet a matrix of zeros and ones, such that in each row and in each column there are exactly 2 zeros and 4 ones. The problem to generate all such the matrices was already discussed here and Carl found a very effective solution. I propose another solution (based on the method of branches and boundaries), it is less effective, but more universal. I've used this method several times, for example here and here.
There will be a lot of such matrices (total 67950), so we will impose natural limitations. We require that the carpet be a simply connected set that has as its boundary a simple polygon (non-self-intersecting).

Below we give a complete solution to the problem.


restart;
R:=combinat:-permute([0,0,1,1,1,1]);
# All lists of two zeros and four units

# In the procedure OneStep, the matrices are presented as lists of lists. The procedure adds one row to each matrix so that in each column there are no more than 2 zeros and not more than 4 ones

OneStep:=proc(L::listlist)
local m, k, l, r, a, L1;
m:=nops(L[1]); k:=0;
for l in L do
for r in R do
a:=[op(l),r];
if `and`(seq(add(a[..,j])<=4, j=1..6)) and `and`(seq(m-add(a[..,j])<=2, j=1..6)) then k:=k+1; L1[k]:=a fi;
od; od;
convert(L1, list);
end proc:

# M is a list of all matrices, each of which has exactly 2 zeros and 4 units in each row and column

L:=map(t->[t], R):
M:=(OneStep@@5)(L):
nops(M);

                                            67950

M1:=map(Matrix, M):

# From the list of M1 we delete those matrices that contain <1,0;0,1> and <0,1;1,0> submatrices. This means that the boundaries of the corresponding carpets will be simple non-self-intersecting curves

k:=0:
for m in M1 do
s:=1;
for i from 2 to 6 do
for j from 2 to 6 do
if (m[i,j]=0 and m[i-1,j-1]=0 and m[i,j-1]=1 and m[i-1,j]=1) or (m[i,j]=1 and m[i-1,j-1]=1 and m[i,j-1]=0 and m[i-1,j]=0) then s:=0; break fi;
od: if s=0 then break fi; od:
if s=1 then k:=k+1; M2[k]:=m fi;
od:
M2:=convert(M2, list):
nops(M2);

                                             394

# We find the list T of all segments from which the boundary consists

T:='T':
n:=0:
for m in M2 do
k:=0: S:='S':
for i from 1 to 6 do
for j from 1 to 6 do
if m[i,j]=1 then
if j=1 or (j>1 and m[i,j-1]=0) then k:=k+1; S[k]:={[j-1/2,7-i-1/2],[j-1/2,7-i+1/2]} fi;
if i=1 or (i>1 and m[i-1,j]=0) then k:=k+1; S[k]:={[j-1/2,7-i+1/2],[j+1/2,7-i+1/2]} fi;
if j=6 or (j<6 and m[i,j+1]=0) then k:=k+1; S[k]:={[j+1/2,7-i+1/2],[j+1/2,7-i-1/2]} fi;
if i=6 or (i<6 and m[i+1,j]=0) then k:=k+1; S[k]:={[j+1/2,7-i-1/2],[j-1/2,7-i-1/2]} fi; 
fi;
od: od:
n:=n+1; T[n]:=[m,convert(S,set)];
od:
T:=convert(T, list):

# Choose carpets with a connected border

C:='C': k:=0:
for t in T do
a:=t[2]; v:=op~(a);
G:=GraphTheory:-Graph([$1..nops(v)], subs([seq(v[i]=i,i=1..nops(v))],a));
if GraphTheory:-IsConnected(G) then k:=k+1; C[k]:=t fi;
od:
C:=convert(C,list):
nops(C);
                                             
 208

# Sort the list of border segments so that they go one by one and form a polygon

k:=0: P:='P':
for c in C do
a:=c[2]: v:=op~(a);
G1:=GraphTheory:-Graph([$1..nops(v)], subs([seq(v[i]=i,i=1..nops(v))],a));
GraphTheory:-IsEulerian(G1,'U');
U; s:=[op(U)];
k:=k+1; P[k]:=[seq(v[i],i=s[1..-2])];
od:
P:=convert(P, list):

# We apply AreIsometric procedure from here to remove solutions that coincide under a rotation or reflection

P1:=[ListTools:-Categorize( AreIsometric, P)]:
nops(P1);

                                                 28


We get 28 unique solutions to this problem.

Visualization of all these solutions:

interface(rtablesize=100):
E1:=seq(plottools:-line([1/2,i],[13/2,i], color=red),i=1/2..13/2,1):
E2:=seq(plottools:-line([i,1/2],[i,13/2], color=red),i=1/2..13/2,1):
F:=plottools:-polygon([[1/2,1/2],[1/2,13/2],[13/2,13/2],[13/2,1/2]], color=yellow):
plots:-display(Matrix(4,7,[seq(plots:-display(plottools:-polygon(p,color=red),F, E1,E2), p=[seq(i[1],i=P1)])]), scaling=constrained, axes=none, size=[800,700]);

 

 

Carpet1.mw

The code was edited.

 

 

Hello people in mapleprimes

I asked a question for a similar thing before.
https://www.mapleprimes.com/questions/222751-PDEtoolsdeclare

The question I had then is not solved yet in my mind, so I think  I will ask you
again. It is about differentiation of a composite function.

with(PDEtools):
declare(f(x,y,z),g(t,y));
a:=f(x,y,z);
b:=x=g(t,y);
c:=eval(a,b);
d:=diff(c,y);
OFF;
e:=d;

h:=convert(e,diff);

For both e and d, the notation of D__1 and D__2 appear.
And, even if, with convert, I changed them to another form,
what I can get is more complicated form of h.

Is it inevitable to use D__1 and D__2 brabra in the differentiation of
composite function?

I am writing this question thinking that if there is a way of go around it,
 I want to know.

And, though this is the second question, even if I use latex( ) command,
natually, codes of Tex I can get is that of the output shown on the screen, including D__1 and D__2, even though I want it to be shown with f__x and f__y or that including prime. Then, I have to edit that tex file, changing D__1 to f__x etc. which I think is very complicated modification of the text file.
I wish there is a way to modify it in Maple so as it to be direct TeX codes which  do not require me to modify.
Is it impossible to do such a thing?

Thanks in advance.

diff_2.mw

How to find the range of poset?

i would like to search the range of range is equal to the range of domain after solve system.

it may not exactly equal but around 80% of elements in range belong to the range of domain

if it is not factorisation domain,

how to generate ideal with function in maple?

On the help page, the description says the remove function does the opposite of select.
when I run:

remove(has, D[1](xx[0]), {xx[0]})

it gives: D[1]()

while: select(has, D[1](xx[0]), {xx[0]})

produces: D[1](xx[0])

I find this during programming. 

Is there a way to remove the whole expression "D[1](xx[0])"

Many thanks!

 

 

Hi everyone.    How i can introduce an acximetric tolerance?. For example +10/-5. Thanks!

f:= z-> MeijerG([[1/2], []], [[], [1]], z);

simplify(f(z));
                               0
convert(f(z), hypergeom);
                               0
f(.2);
Error, (in evalf/MeijerG/limit) numeric exception: division by zero

f(2.2);
                         -0.4721129136

It seems that when MeijerG is not analytic on the unit circle, simplify and convert give a result that's valid only inside the unit circle.

This solve command produces both unconditional and conditional solutions.

Is there a way to have it only output unconditional solutions, or, failing that, is there a way to select the unconditional solutions from its output?

solve({2*x+y+z = 3, x^2+y^2+z^2 = 3}, [x, y, z], real, parametric)

Hello,

When i try to open my 583 KB maplefile in maple 2017, a box shows up, asking: "How do you wanna open this text file?"  with 3 options. No matter what option i pick, a white empty page shows up. I have windows 10 and office 2016 installed on my PC.

This is the second time this problem happens to me, and both times have i lost hours of work. I have red multiple chats of people with the exsact same problem trying to get support from MaplePrime, but unfortunately, you have never been able to repair the files or find the source of the problem. 

Is this problem related to Maple 2017 or why does this happen? how can I trust Maple not to "loose" my work a third time?

My file: Download Hjemmeopgavesæt_2.mw

Kind regards Anna

Is there a way in Maple to numerically integrate (with some symbolic variables retained), involving vectors?

Alternatively, is there a way to simply numerically integrate the following expression involving vectors, without any remaining symbolic variables remaining?

Integrate over vectors p1, p3
(
with vector remaining as free variable after integration)
( e-i p1 . x (p12 + p32) )  / ( (p3 - p1)2 (p32*a2 +1)2 )

If absolutely required for numerical integration, i.e. no other way to get maple to perform a semi-numerical integration, then vector x, and the scalar variable "a" can also be specified a value, but x should remain a vector. 

Of course, if the integration above can be done analytically, or even partly analytically (e.g. if the vectors are expressed in spherical polar co-ordinates, and some of the variables like Sin \theta etc. can be integrated over), that would be very useful as well. 

 

 I wand to plot the following expression involving an imaginary number. Can I get some help??

 

((1/10)*exp((2/135)*sqrt(-11)*sqrt(225)*t-(2/3*I)*x+1/15)/((3/10)*exp((2/135)*sqrt(-11)*sqrt(225)*t-(2/3*I)*x+1/5)

 

 

Hi,

I am trying to complete this assignment but I am having trouble on this question. It is asking me to use a graphical approach to estimate a 𝛿 > 0 such that for all x...

0 < | x - c | < 𝛿 implies that | f(x) - L | < ε

It says I can do this by plotting my f(x), y1, and y2 over the interval [c - 𝛿, c + 𝛿] with a y-range of [L - ε, L + ε]. y1, and y2 are banding lines defined by ( L - ε ) and ( L + ε ), respectively. The value of ε is shown below. I dont know where to start but this is what I have so far...

f(x) := ( x ( 1 - cos(x) ) ) / ( x - sin(x) );

The limit ( L ) of this function as x approaches 0 ( c = 0 ) is...

L := ( limit ( f(x), x = 0) );

The limit is 3 ( L = 3 ).

 ε = r = Student Id / 5000000   = 0621748 / 5000000   = 155337 / 1250000

 ε := 155337 / 1250000;

y1 := ( L - ε );

y2 := ( L + ε );

Originally, it had asked me to graph the function with the banding lines (y1, y2) together within the interval [-0.2, 0.2], which I have done. I just do not know how to find a value for 𝛿 in this case. Please help.

Thanks.

The Railway Challenge is a competition designed by the Institute of Mechanical Engineers (IMechE), aimed at engaging young engineers with the rail industry.  The challenge, now in its seventh successive year, brings together teams of university students, as well as apprentices and graduates working in industry across the world to test their business knowledge, design ability and technical skills in a live test environment.

The Railway Challenge at Sheffield (RCAS) is an extracurricular student-led activity within the Mechanical Engineering department at the university of Sheffield, that designs, codes and manufactures a 10 1/4 inch gauge miniature locomotive to compete in the IMechE’s  Railway Challenge.  The locomotive is assessed in accordance with a set of strict rules and a detailed technical specification, such as traction, ride comfort, and a business case. The locomotives are tested live at a competition, which takes place in June at the Stapleford Miniature Railway in Leicestershire, where several categories of winners and an overall Railway Challenge champion is crowned.

The team consists of around twenty members, and students studying Mechanical Engineering and even cross discipline can get involved as soon as they come to the University, getting into to the design of components within the suspension or braking systems for example, before proceeding to manufacture and test; allowing the students to experience all the stages of an engineering product as well as skills gained by working in the team such as effective communication, time management and financial planning.

Last year the team was granted a sponsorship from Maplesoft, and as a result, huge improvements were made within the team. Overall the team jumped from finishing in 7th place to in the summer winning the maintainability challenge and finishing in 4th place overall – mostly down to the electronics working for the first year ever!

 

Using Maplesoft’s donation the team switched form a central CRIO control system to a distributed network using I2C protocols and Arduino hardware. This did away with some of the electrical teething problems the team has suffered in previous years. It also introduced our Mechanical Engineers to coding that they would otherwise not do in their course.

This year Maplesoft have again sponsored RCAS. The team is hoping to use the licenses to perform their structures calculations in an easy way to keep track of them for use in the design report. They are also hoping to use MapleSim for dynamics modelling, to assist with suspension design, and designing any electronics or control elements, such as filter design and motor control.

abs(-((-(1/20)*sqrt(5)-1/20)*cos((1/5)*Pi)-(1/20)*sqrt(2)*sqrt(5-sqrt(5))*sin((1/5)*Pi))*24^(1/5)*5^(3/5)-I*((1/20)*sqrt(2)*sqrt(5-sqrt(5))*cos((1/5)*Pi)+(-(1/20)*sqrt(5)-1/20)*sin((1/5)*Pi))*24^(1/5)*5^(3/5))

I am trying to compute the modulus the above complex number. However, the "abs" command does not affect the complex expression. Any reason for this?

Many thanks!

First 908 909 910 911 912 913 914 Last Page 910 of 2224