MaplePrimes Questions

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. 

For instance, I'd like to find the integer solutions of the following system (unknowns: k[1], k[2], k[3], k[4], k[5], and k[6]): 

eqs:=eval~(k[1]*x^3+k[2]*x^2*y+k[5]*x^2*z+k[3]*x*y^2+k[6]*x*y*z+k[8]*x*z^2+k[4]*y^3+k[7]*y^2*z+k[9]*y*z^2+k[10]*z^3,{{x=1,y=1,z=1},{x=RootOf(_Z^3-4*_Z^2+_Z+1,index=1),y=RootOf(_Z^3-4*_Z^2+_Z+1,index=2),z=RootOf(_Z^3-4*_Z^2+_Z+1,index=3)},{x=RootOf(_Z^3-4*_Z^2+_Z+1,index=2),y=RootOf(_Z^3-4*_Z^2+_Z+1,index=3),z=RootOf(_Z^3-4*_Z^2+_Z+1,index=1)},{x=RootOf(_Z^3-4*_Z^2+_Z+1,index=3),y=RootOf(_Z^3-4*_Z^2+_Z+1,index=1),z=RootOf(_Z^3-4*_Z^2+_Z+1,index=2)}}):
{isolve}(eqs=~0);

It seems that the isolve command cannot solve such a system of linear equations, but its integer solutions do exist: 

sol := [k[1] = _Z1, k[2] = _Z2, k[3] = _Z3, k[4] = _Z4, k[5] = _Z5, k[6] = _Z1 + 2*_Z3 + 2*_Z4 + _Z5 + 3*_Z6, k[7] = 2*_Z1 + _Z3 + 8*_Z4 - _Z6, k[8] = -21*_Z1 + 2*_Z2 - _Z4 - 4*_Z5 + _Z6, k[9] = 24*_Z1 - 4*_Z2 - 5*_Z3 - 12*_Z4 + 3*_Z5 - 4*_Z6, k[10] = -7*_Z1 + _Z2 + _Z3 + 2*_Z4 - _Z5 + _Z6]: (*results from Mathematica*)
evala(subs(sol, eqs));
 = 
                              {0}

Here _Z1, _Z2, _Z3, _Z4, _Z5, and _Z6 are integer parameters. However, how do I get this result in Maple?

I am trying to solve a nonlinear equation frequently and use the solution result to draw a plot. I was wondering when some solutions are complex numbers (I), how Maple treats them. Can we add a condition saying that if the solution is complex, it should be replaced by a real number (e.g., zero)

dear all:

    here I try to repeat the results as follows:

 (23) is my target

my 2 solving processes are included in the attachment.

using LinearSolve(A, b) and regular solve command can not generate results as (23)

Please take a look.

question_DHT.mw

thanks for your help.

best regards

I need help please. This is Maple 2019. I want to run through all possible bipartite tournaments with exactly 4 vertices in each partite set, and for each bipartite tournament compute the number of pair of vertices which has at least one common out-neighbor. 
1) The following code stops after two lines of output. Please advise how the code can be fixed.  
2) The printing of the adjaceny matrix using WeighMatrix(G) seems wrong too.

Thank you very much.😭😭

@nm I can see that working for a signal that has a starting point other than 0 and no other shifts involved, but I am wondering about signals built from shifted steps / ramps / etc.  If the forcing function is something like r(t) - u(t-1) - r(t-1) with u(t)=Heaviside(t) and r(t) = t Heaviside(t).  I won't have time to see if I can break Maple with that until this weekend, but I plan to try!

Hi,

I would like to plot this function from x= 2pi to 4pi.  I entered this into the plotting command, and nothing happened.  How do I plot this from 2pi to 4pi?

plot_from_two_pi_to_4_pi.mw

Is it possible to have the results of a MapleFlow container wrap to the next line as opposed to just extending off the page?

Thanks.

restart;
kp := .3;

Pr := .3; N := .5; g := .5; A := 1; B := 0; M := .5; lambda := .5; Ec := .5;

rf := 997.1; kf := .613; cpf := 4179; `σf` := 0.5e-1;
p1 := 0.1e-1; sigma1 := 2380000; rs1 := 4250; ks1 := 8.9538; cps1 := 686.2;
p2 := 0.5e-1; sigma2 := 3500000; rs2 := 10500; ks2 := 429; cps2 := 235;

NULL;
a1 := (1-p1)^2.5*(1-p2)^2.5;
a2 := (1-p2)*(1-p1+p1*rs1/rf)+p2*rs2/rf;
a3 := 1+3*((p1*sigma1+p2*sigma2)/`σf`-p1-p2)/(2+(p1*sigma1+p2*sigma2)/((p1+p2)*`σf`)-((p1*sigma1+p2*sigma2)/`σf`-p1-p2));

a4 := (1-p2)*(1-p1+p1*rs1*cps1/(rf*cpf))+p2*rs2*cps2/(rf*cpf);
a5 := (ks1+2*kf-2*p1*(kf-ks1))*(ks2+2*kf*(ks1+2*kf-2*p1*(kf-ks1))/(ks1+2*kf+p1*(kf-ks1))-2*p2*(kf*(ks1+2*kf-2*p1*(kf-ks1))/(ks1+2*kf+p1*(kf-ks1))-ks2))/((ks1+2*kf+p1*(kf-ks1))*(ks2+2*kf*(ks1+2*kf-2*p1*(kf-ks1))/(ks1+2*kf+p1*(kf-ks1))+2*p2*(kf*(ks1+2*kf-2*p1*(kf-ks1))/(ks1+2*kf+p1*(kf-ks1))-ks2)));


OdeSys := (diff(U(Y), Y, Y))/(a1*a2)+Theta(Y)+N*(Theta(Y)*Theta(Y))-a3*(M*M)*U(Y)/a2-(kp*kp)*U(Y)/(a1*a2), a5*(diff(Theta(Y), Y, Y))/a4+Pr*Ec*((diff(U(Y), Y))^2+U(Y)^2*(kp*kp))/(a1*a2); Cond := U(0) = lambda*(D(U))(0), Theta(0) = A+g*(D(Theta))(0), U(1) = 0, Theta(1) = B; Ans := dsolve([OdeSys, Cond], numeric, output = listprocedure);
U := proc (Y) options operator, arrow, function_assign; (eval(U(Y), Ans))(0) end proc;
                 U := Y -> (eval(U(Y), Ans))(0)
Theta := proc (Y) options operator, arrow, function_assign; (eval(Theta(Y), Ans))(0) end proc;
             Theta := Y -> (eval(Theta(Y), Ans))(0)
Theta_b := (int(U(Y)*Theta(Y), Y = 0 .. 1))/(int(U(Y), Y = 0 .. 1));
Error, (in Theta) too many levels of recursion
Q := int(U(Y), Y = 0 .. 1, numeric);
Error, (in Theta) too many levels of recursion
NUMERIC := [(eval((diff(U(Y), Y))/a1, Ans))(0), (eval(-(diff(Theta(Y), Y))/(Theta_b*a5), Ans))(0)];
Error, (in Theta) too many levels of recursion

 

i need the solution  for Y=0 and Y=1

Hello,

How to factor the following polynomial : n*xn - 2*n*x(n - 1) + xn

I can't find a command to write : xn-1*((n+1)*x-2n)

Thank you for your help.

While I was elaborating on a math problem, I came across the following expression which actually should be equal to one. Maple unfortunately was unable to fully provide a simplified expression. Is there a way to do that? 

Thank you

Streamlines, isotherms and microrotations for Re = 1, Pr = 7.2, Gr = 105 and (a) Ha = 0 (b) Ha = 30 (c) Ha = 60 (d) Ha = 100.

 

Fig. 2

for Ra = 105Ha = 50, Pr = 0.025 and θ = 1 − Y

 

 

eqat := {M . (D(theta))(0)+2.*Pr . f(0) = 0, diff(phi(eta), eta, eta)+2.*Sc . f(eta) . (diff(phi(eta), eta))-(1/2)*S . Sc . eta . (diff(phi(eta), eta))+N[t]/N[b] . (diff(theta(eta), eta, eta)) = 0, diff(g(eta), eta, eta)-2.*(diff(f(eta), eta)) . g(eta)+2.*f(eta) . (diff(g(eta), eta))-S . (g(eta)+(1/2)*eta . (diff(g(eta), eta)))-1/(sigma . Re[r]) . ((1+d^%H . exp(-eta))/(1+d . exp(-eta))) . g(eta)-beta^%H . ((1+d^%H . exp(-eta))^2/sqrt(1+d . exp(-eta))) . g(eta) . sqrt((diff(f(eta), eta))^2+g(eta)^2) = 0, diff(theta(eta), eta, eta)+2.*Pr . f(eta) . (diff(theta(eta), eta))-(1/2)*S . Pr . eta . (diff(theta(eta), eta))+N[b] . Pr . ((diff(theta(eta), eta)) . (diff(phi(eta), eta)))+N[t] . Pr . ((diff(theta(eta), eta))^2)+4/3 . N . (diff((C[T]+theta(eta))^3 . (diff(theta(eta), eta)), eta)) = 0, diff(f(eta), eta, eta, eta)-(diff(f(eta), eta))^2+2.*f(eta) . (diff(f(eta), eta))+g(eta)^2-S . (diff(f(eta), eta)+(1/2)*eta . (diff(f(eta), eta, eta)))-1/(sigma . Re[r]) . ((1+d^%H . exp(-eta))/(1+d . exp(-eta))) . (diff(f(eta), eta))-beta^%H . ((1+d^%H . exp(-eta))^2/sqrt(1+d . exp(-eta))) . (diff(f(eta), eta)) . sqrt((diff(f(eta), eta))^2+g(eta)^2) = 0, g(0) = 1, g(6) = 0, phi(0) = 1, phi(6) = 0, theta(0) = 1, theta(6) = 0, (D(f))(0) = 1, (D(f))(6) = 0};
sys1 := eval(eqat, {M = 0, N = 2, Pr = .8, S = -2.5, Sc = .5, d = 2, sigma = .2, C[T] = .5, N[b] = .4, N[t] = .4, Re[r] = 1.1, beta^%H = .2, d^%H = 1.5});
sys2 := eval(eqat, {M = 0, N = 2, Pr = .8, S = -2.5, Sc = .5, d = 2, sigma = .2, C[T] = .5, N[b] = .4, N[t] = .4, Re[r] = 1.1, beta^%H = .4, d^%H = 1.5});
sys3 := eval(eqat, {M = 0, N = 2, Pr = .8, S = -2.5, Sc = .5, d = 2, sigma = .2, C[T] = .5, N[b] = .4, N[t] = .4, Re[r] = 1.1, beta^%H = .6, d^%H = 1.5});
sys4 := eval(eqat, {M = 0, N = 2, Pr = .8, S = -2.5, Sc = .5, d = 2, sigma = .2, C[T] = .5, N[b] = .4, N[t] = .4, Re[r] = 1.1, beta^%H = .8, d^%H = 1.5});
sys5 := eval(eqat, {M = .5, N = 2, Pr = .8, S = -2.5, Sc = .5, d = 2, sigma = .2, C[T] = .5, N[b] = .4, N[t] = .4, Re[r] = 1.1, beta^%H = .2, d^%H = 1.5});
sys6 := eval(eqat, {M = .5, N = 2, Pr = .8, S = -2.5, Sc = .5, d = 2, sigma = .2, C[T] = .5, N[b] = .4, N[t] = .4, Re[r] = 1.1, beta^%H = .4, d^%H = 1.5});
sys7 := eval(eqat, {M = .5, N = 2, Pr = .8, S = -2.5, Sc = .5, d = 2, sigma = .2, C[T] = .5, N[b] = .4, N[t] = .4, Re[r] = 1.1, beta^%H = .6, d^%H = 1.5});
sys8 := eval(eqat, {M = .5, N = 2, Pr = .8, S = -2.5, Sc = .5, d = 2, sigma = .2, C[T] = .5, N[b] = .4, N[t] = .4, Re[r] = 1.1, beta^%H = .8, d^%H = 1.5});
sys9 := eval(eqat, {M = 1, N = 2, Pr = .8, S = -2.5, Sc = .5, d = 2, sigma = .2, C[T] = .5, N[b] = .4, N[t] = .4, Re[r] = 1.1, beta^%H = .2, d^%H = 1.5});
sys10 := eval(eqat, {M = 1, N = 2, Pr = .8, S = -2.5, Sc = .5, d = 2, sigma = .2, C[T] = .5, N[b] = .4, N[t] = .4, Re[r] = 1.1, beta^%H = .4, d^%H = 1.5});
sys11 := eval(eqat, {M = 1, N = 2, Pr = .8, S = -2.5, Sc = .5, d = 2, sigma = .2, C[T] = .5, N[b] = .4, N[t] = .4, Re[r] = 1.1, beta^%H = .6, d^%H = 1.5});
sys12 := eval(eqat, {M = 1, N = 2, Pr = .8, S = -2.5, Sc = .5, d = 2, sigma = .2, C[T] = .5, N[b] = .4, N[t] = .4, Re[r] = 1.1, beta^%H = .8, d^%H = 1.5});
sys13 := eval(eqat, {M = 1.5, N = 2, Pr = .8, S = -2.5, Sc = .5, d = 2, sigma = .2, C[T] = .5, N[b] = .4, N[t] = .4, Re[r] = 1.1, beta^%H = .2, d^%H = 1.5});
sys14 := eval(eqat, {M = 1.5, N = 2, Pr = .8, S = -2.5, Sc = .5, d = 2, sigma = .2, C[T] = .5, N[b] = .4, N[t] = .4, Re[r] = 1.1, beta^%H = .4, d^%H = 1.5});
sys15 := eval(eqat, {M = 1.5, N = 2, Pr = .8, S = -2.5, Sc = .5, d = 2, sigma = .2, C[T] = .5, N[b] = .4, N[t] = .4, Re[r] = 1.1, beta^%H = .6, d^%H = 1.5});
sys16 := eval(eqat, {M = 1.5, N = 2, Pr = .8, S = -2.5, Sc = .5, d = 2, sigma = .2, C[T] = .5, N[b] = .4, N[t] = .4, Re[r] = 1.1, beta^%H = .8, d^%H = 1.5});
 

Hi,

I ploted the step response of a MIMO system in Maple using DynamicSystems object.

The plot is incorrect.

What am I doing wrong?

Thanks for your help

I have a system described by 

I want to plot Y(s)/Z(s) = ((C . (1/((s . I) - A))) . B) + D with stepped inputs on both inputs

The system above evaluates to 

My commands are 

ss_a := A__m;
ss_b := B__m;
ss_c := C__m;
ss_d := D__m;
sys4 := StateSpace(ss_a, ss_b, ss_c, ss_d);
plots:-display([ResponsePlot(sys4, [Step(), Step()], 'duration' = 5, color = red)]);

Maple is returning the incorrect plot

The correct plot is 

SYSTEM

Correct plot

Hi Everyone 

I want to to an iteration of an expression with 100 steps. To be honest I have no idea how to handle this in maple. I also didnt find much infomation on maplesoft.com 

The expression i want to iterate looks like this: 

Has someone an idea how to do this?

Thanks in advance!

I would like to solve this system of PDEs along the x-interval [0,1] in three different subintervals: from 0 to 0.35, from 0.35 to 0.6, and from 0.6 to 1. I tried to solve the system by setting these same subintervals as you might see in my script, however it is now what I need. Any help would be very appreciated.

restart;
d1 := 0.05;
d2 := 0.3;
AA := 0.2;
BB := 0.1;
PDE1 := diff(u(x, t), t) = d1*diff(u(x, t), x, x) + w(x, t)*exp(AA*u(x, t) - BB*v(x, t));
PDE2 := diff(v(x, t), t) = d2*diff(v(x, t), x, x) - w(x, t)*exp(AA*u(x, t) - BB*v(x, t));
PDE3 := 0.0001*diff(w(x, t), t) = diff(w(x, t), x) - 0.8*x + 3.3;
IBC1 := u(0, t) = 1, u(1, t) = 0, u(x, 0) = piecewise(x < 0.35, -(4*x)*x + 1, 0.35 < x and x < 0.65, 1.32958 - 1.29167*x, 0.65 < x, 4*(x - 1)^2);
IBC2 := v(0, t) = 0, v(1, t) = 1, v(x, 0) = piecewise(x < 0.35, (4*x)*x + 1, 0.35 < x and x < 0.65, 1.32958 - 1.29167*x, 0.65 < x, -4*(x - 1)^2);
IBC3 := w(0, t) = 0.5, w(x, 0) = 1 - (0.3*x)*x;
pds := pdsolve([PDE1, PDE2, PDE3], [IBC1, IBC2, IBC3], numeric, time = t, range = 0 .. 1);
p1 := pds:-plot(t = 0, numpoints = 50);
p2 := pds:-plot(t = 1/8, numpoints = 50, color = blue);
p3 := pds:-plot(t = 1/4, numpoints = 50, color = green);

First 228 229 230 231 232 233 234 Last Page 230 of 2427