Maple 2020 Questions and Posts

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

Is there any simple way that the colored shape created in the xy plane by the uploaded code can be projected in the z direction onto the surface of the unit sphere centred at the origin?

Projection.mw

hi,

What command can I use to solve the attached equation and draw its graph?

ode := -(q2-q4)*(q2-q3)*(q1-q4)*(q1-q3)*y(w)^2+(q1+q2-q3-q4)*(2*q1*q2-q1*q3-q1*q4-q2*q3-q2*q4+2*q3*q4)*(diff(y(w), w))*y(w)+(-2*q1^2-2*q1*q2+3*q1*q3+3*q1*q4-2*q2^2+3*q2*q3+3*q2*q4-6*q3*q4)*(diff(y(w), w))^2+(q1-q2+q3-q4)*(q1-q2-q3+q4)*(diff(y(w), w, w))*y(w)+(3*q1+3*q2-3*q3-3*q4)*(diff(y(w), w, w))*(diff(y(w), w))-3*(diff(y(w), w, w))^2+(-q1-q2+q3+q4)*(diff(y(w), w, w, w))*y(w)+2*(diff(y(w), w, w, w))*(diff(y(w), w)) = 0

-(q2-q4)*(q2-q3)*(q1-q4)*(q1-q3)*y(w)^2+(q1+q2-q3-q4)*(2*q1*q2-q1*q3-q1*q4-q2*q3-q2*q4+2*q3*q4)*(diff(y(w), w))*y(w)+(-2*q1^2-2*q1*q2+3*q1*q3+3*q1*q4-2*q2^2+3*q2*q3+3*q2*q4-6*q3*q4)*(diff(y(w), w))^2+(q1-q2+q3-q4)*(q1-q2-q3+q4)*(diff(diff(y(w), w), w))*y(w)+(3*q1+3*q2-3*q3-3*q4)*(diff(diff(y(w), w), w))*(diff(y(w), w))-3*(diff(diff(y(w), w), w))^2+(-q1-q2+q3+q4)*(diff(diff(diff(y(w), w), w), w))*y(w)+2*(diff(diff(diff(y(w), w), w), w))*(diff(y(w), w)) = 0

(1)

ans := dsolve(ode, y(w))

``

Download Ode_equation.mw

I am a newbie in the use of the Physics package.
As I'm interested in modeling dynamic articulated systems, I began reading the example about Mechanics (Statics).

My question is quite simple: let F some vector force of components a * _i and b * _j , what does abs(F) represent? 

I naively thought that abs(F)  was the modulus of F and expected it to be non negative. But I get some negative values (as in the tutorial example for some values of angle alpha.

Thanks in advance

How I can ontain results without Rootof !!

Thanks

help.mw

restart

EQ1 := c[11]*exp(-n*Pi*a/b)+c[12]*exp(n*Pi*a/b) = 0

c[11]*exp(-n*Pi*a/b)+c[12]*exp(n*Pi*a/b) = 0

(1)

EQ2 := c[11]*n*Pi/b-c[12]*n*Pi/b+b^2*Q[0, 1]*sin(n*Pi*y[0, 1]/b)*(n*Pi*exp(-n*Pi*x[0, 1]/b)/b+n*Pi*exp(n*Pi*x[0, 1]/b)/b)/(n*Pi) = c[21]*n*Pi/b-c[22]*n*Pi/b

c[11]*n*Pi/b-c[12]*n*Pi/b+b^2*Q[0, 1]*sin(n*Pi*y[0, 1]/b)*(n*Pi*exp(-n*Pi*x[0, 1]/b)/b+n*Pi*exp(n*Pi*x[0, 1]/b)/b)/(n*Pi) = c[21]*n*Pi/b-c[22]*n*Pi/b

(2)

c[21] := -b^2*Q[0, 2]*sin(n*Pi*y[0, 2]/b)*exp(-n*Pi*x[0, 2]/b)/(n*Pi)

-b^2*Q[0, 2]*sin(n*Pi*y[0, 2]/b)*exp(-n*Pi*x[0, 2]/b)/(n*Pi)

(3)

EQ3 := c[11]+c[12]+b^2*Q[0, 1]*sin(n*Pi*y[0, 1]/b)*(exp(-n*Pi*x[0, 1]/b)-exp(n*Pi*x[0, 1]/b))/(n*Pi) = lambda.(c[21]+c[22])

c[11]+c[12]+b^2*Q[0, 1]*sin(n*Pi*y[0, 1]/b)*(exp(-n*Pi*x[0, 1]/b)-exp(n*Pi*x[0, 1]/b))/(n*Pi) = lambda.(-b^2*Q[0, 2]*sin(n*Pi*y[0, 2]/b)*exp(-n*Pi*x[0, 2]/b)/(n*Pi)+c[22])

(4)

solve({EQ1, EQ2, EQ3}, {c[11], c[12], c[22]})

{c[11] = RootOf(exp(-n*Pi*x[0, 1]/b)*exp(n*Pi*a/b)*b^2*sin(n*Pi*y[0, 1]/b)*Q[0, 1]-exp(n*Pi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*Pi*a/b)+_Z*n*Pi*exp(n*Pi*a/b))/(n*exp(n*Pi*a/b))))*n*exp(n*Pi*a/b))*Pi*n*exp(n*Pi*a/b))/(Pi*n*exp(n*Pi*a/b))}

(5)

``

Download help.mw

problemfilepdsolve.mw
 

eq1 := diff(p(x, t), x)-p(x, t)*(1/(p(x, t)^2*q(x, t)^(1/3)))

diff(p(x, t), x)-1/(p(x, t)*q(x, t)^(1/3))

(1)

eq2 := diff(q(x, t), x)-(-3*q(x, t))*(1/(p(x, t)^2*q(x, t)^(1/3)))

diff(q(x, t), x)+3*q(x, t)^(2/3)/p(x, t)^2

(2)

pdsolve({eq1, eq2})

Error, (in pdsolve/sys) found the element '_F2' repeated in the indication of blocks variables

 

eq3 := diff(p(x), x)-p(x)*(1/(p(x)^2*q(x)^(1/3)))

diff(p(x), x)-1/(p(x)*q(x)^(1/3))

(3)

eq4 := diff(q(x), x)-(-3*q(x))*(1/(p(x)^2*q(x)^(1/3)))

diff(q(x), x)+3*q(x)^(2/3)/p(x)^2

(4)

dsolve({eq3, eq4})

[{q(x) = -27/(_C1*x+_C2)^3}, {p(x) = (-3*(diff(q(x), x))*q(x)^(2/3))^(1/2)/(diff(q(x), x)), p(x) = -(-3*(diff(q(x), x))*q(x)^(2/3))^(1/2)/(diff(q(x), x))}]

(5)

eq5 := diff(p(x, t), x)-x = 0

diff(p(x, t), x)-x = 0

(6)

pdsolve(eq5)

p(x, t) = (1/2)*x^2+_F1(t)

(7)

eq6 := diff(p(x), x)-x = 0

diff(p(x), x)-x = 0

(8)

dsolve(eq6)

p(x) = (1/2)*x^2+_C1

(9)

NULL

``

(10)


Help me in finding the solution of system eq1 and eq2.

Download problemfilepdsolve.mw

 

Maple 2020 beginner user - matrices shows 10 rows and columns on worksheet, by default. How to increase this value up to 16 and more? Of course, there is possibility (browse matrix) to see all values and export to Excel also, but better to see all 16 on worksheet. 

I would like to know which of the more than 100 worksheets I have in a Windows 11 folder execute the events operation within dsolve numeric.

Is there a way to identify which of this large number of Maple worksheets contain a given phrase e.g. "events"?

Warning, data could not be converted to float Matrix

Hi friends

Could you please give hints to solve the integral

int(exp(I*k*x)*sech(x),x=-infinity..infinity)

Thanks

) Write a procedure that generates a plot of a ‘rose’. If the number of petals is even, have your procedure colour in the petals aquamarine, if the number of petals is odd, colour in the petals pink.

Test your procedure by generating two flowers, one with an even number of petals and one with an odd number of petals.

Why Maple returns empty solution (see eq. (5))? Also, is it possible that Maple not only gives us the explit solution but also the solution steps?

restart

with(PDEtools, TWSolutions, declare)

[TWSolutions, declare]

(1)

with(DEtools, diff_table)

[diff_table]

(2)

U := diff_table(u(x, t))

table( [(  ) = u(x, t) ] )

(3)

sys := {U[]*U[x]+U[t]-pU[x, x]+qU[x, x, x] = 0}

{u(x, t)*(diff(u(x, t), x))+diff(u(x, t), t)-pU[x, x]+qU[x, x, x] = 0}

(4)

TWS_sol := TWSolutions(sys)

(5)

map(pdetest, [TWS_sol], sys)

[]

(6)

``

Download twsol.mw

Hi,

I am fairly new to Maple and trying to figure out how to output text to a file, but nothing seems to be working. I would like to generate code files for Julia using Maple expressions.

I am in worksheet mode, using a 'code edit' region. If I do:

jlfile := fopen("./juliafunc.jl",WRITE,TEXT);

then the file is created, as intended. However, neither of the following commands seem to write any text to the file:

writeline(jlfile,"This is a test.");
fprintf(jlfile,"This is a test.\n");

(these are similar to the examples in the dcumentation)

Is there something I am doing wrong? I am using Maple 2020 on Linux.

Hi

My third-party soft is fussy: it will only accept pasted plaintext, with no spaces in between, for example:

1407,1411,2,1408,1409,0
1407,1408,2,1409,1411,0

#My input is 
ans1 := [1407, 1408, 2, 1409, 1411, 0], [1407, 1409, 2, 1408, 1411, 0], [1407, 1411, 2, 1408, 1409, 0];

#I am "trying" to remove the whitespace and convert it to plain text

with(StringTools):
for i to 3 do
seq(parse(DeleteSpace(convert(ans1[i][j],string))),j=1..6);
next i
od;

#But the whitespace is still there....

lprint(%%%);lprint(%%);lprint(%)
ans1 := [1407, 1408, 2, 1409, 1411, 0], 

  [1407, 1409, 2, 1408, 1411, 0], [1407, 1411, 2, 1408, 1409, 0]


                  1407, 1408, 2, 1409, 1411, 0

                  1407, 1409, 2, 1408, 1411, 0

                  1407, 1411, 2, 1408, 1409, 0

Please answer the commented questions in the uploaded worksheet.

Binary_search.mw

Hi

I'm trying to automate this production of doubles combinations with a set scoreline in between. The minimum is 4 players, but we could have many more players, producing many combinations. 

example: 4 players, set score 2-0 for each match

with(combinat):
DBL:=choose([Novice,Weak_Intermediate,Strong_Intermediate,Advanced], 2);
DBL[1],2,DBL[6],0;DBL[2],2,DBL[5],0;DBL[3],2,DBL[4],0

#and the reverse
DBL[6],2,DBL[1],0;DBL[5],2,DBL[2],0;DBL[4],2,DBL[3],0
 

#the output contains square brackets. How do I remove them?

1 2 3 4 5 6 7 Last Page 2 of 54