MaplePrimes Questions

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);

[I split this off from here into a separate question. dharr]

@dharr Thanks. For the second one, an output is . Is it possible to compel Maple to attempt to simplify the second algebraic number to a less complicated expression automatically? 
Its minimal polynomial can be computed. However, this is not so convenient for the specific purpose. Actually, I want something like this: 

evalA(-4*RootOf(_Z^3 - 3*_Z^2 - 10*_Z - 1)^2 + 19*RootOf(_Z^3 - 3*_Z^2 - 10*_Z - 1) + 3);
 = 
                       /  3        2           \
               5 RootOf\_Z  + 10 _Z  + 3 _Z - 1/

Mathematica has an additional function RootReduce to do so directly, but I cannot find such functionality in Maple.

Remark. A fairly complicated one: 

evalA(-45658*RootOf(37*_Z^6 - 382*_Z^5 + 1388*_Z^4 - 2188*_Z^3 + 1475*_Z^2 - 406*_Z + 37, index = 6)^5 + 417257*RootOf(37*_Z^6 - 382*_Z^5 + 1388*_Z^4 - 2188*_Z^3 + 1475*_Z^2 - 406*_Z + 37, index = 6)^4 - 1252087*RootOf(37*_Z^6 - 382*_Z^5 + 1388*_Z^4 - 2188*_Z^3 + 1475*_Z^2 - 406*_Z + 37, index = 6)^3 + 1463384*RootOf(37*_Z^6 - 382*_Z^5 + 1388*_Z^4 - 2188*_Z^3 + 1475*_Z^2 - 406*_Z + 37, index = 6)^2 - 558475*RootOf(37*_Z^6 - 382*_Z^5 + 1388*_Z^4 - 2188*_Z^3 + 1475*_Z^2 - 406*_Z + 37, index = 6) + 69230);
 = 
            /
17991 RootOf\

       6         5          4          3          2                
  37 _Z  - 406 _Z  + 1475 _Z  - 2188 _Z  + 1388 _Z  - 382 _Z + 37, 

           \
  index = 4/


 

Convert a table in a form 

output≔table([(2,4)=["O-H",0.97234632],(1,2)=["O-O",1.44940000],(1,3)=["O-H",0.97232285]])

Table can have more elements in a similar form at (1,2) and (2,1) position 

In the new matrix converted

We should get a square matrix

With at (2,4) and (4,2) position 

0.97234632

Similarly at (1,2) and (2,1) position 1.44940000

And so on 

Remember a square matrix and it is symmetric 

(Deleted because not reproducible on a different PC)

With 1D

int(1/(sqrt(x__0 - x)*sqrt(-x^2 + 1)), x = 0 .. x__0)

Warning, unable to determine if -1 is between 0 and x__0; try to use assumptions or use the AllSolutions option

 

Warning, unable to determine if 1 is between 0 and x__0; try to use assumptions or use the AllSolutions option

 

int(1/((x__0-x)^(1/2)*(-x^2+1)^(1/2)), x = 0 .. x__0)

(1)

NULL

With 2D

int(1/(sqrt(x__0-x)*sqrt(-x^2+1)), x = 0 .. x__0)

int(1/((x__0-x)^(1/2)*(-x^2+1)^(1/2)), x = 0 .. x__0)

(1)

NULL

The root cause might be the same as for this open question.

int_warning_2D.mw

int_warning_1D.mw

Fix a plot output image size to a certain big size instead of going to each plot and then trying to maginify it where output runs through pages.

First 109 110 111 112 113 114 115 Last Page 111 of 2308