MaplePrimes Questions

Hi, I'm currently studying the dynamics of a system of ODEs and I would like to plot a bifurcation diagram using Maple.

 

The system is:

diff(x(t), t) = -y(t)-z(t)

 diff(y(t), t) = x(t)+a*y(t)

diff(z(t), t) = b+x(t)*z(t)-c*z(t).

 

Can anyone help me with a procedure to output a bifurcation diagram for the system?
Thanks.

Dear Users,

Recently, I started using Maple2017. In Maple 18, I have used the following commands for import/export and it worked fine.

 

Digits := 50;

Rhs:= ImportVector("/home/15_degree_3izto1_fixed/Vec.txt", source = delimited);

MatA:=ImportMatrix("/home/15_degree_3izto1_fixed/Mat.txt", source = delimited) ;

Note : Vec.txt contains float with 50 digits, and Mat.txt contains algebraic equation eg. 123456716798271394816*y+173974937*10^(-16)

 

While maple 18 used to import all the informations with 50 digits of accuracy, Maple2017 only import float[8] ?It only imports first 20 digits and so on..? What has changed in 2017?

Thanks and regards,

 

1.

with(Groebner):
K := {r-x^4,u-(x^3)*y,v-x*y^3,w-y^4};
G := Basis(K, 'tord', degrevlex(r,u,v,w));
R1 := eliminate(G, {r,u,v,w}); # eliminate is the reverse of Basis
Ga := Basis({a*G[1],a*G[2],a*G[3],a*G[4],a*G[5],a*G[6],a*G[7],a*G[8],a*G[9],a*G[10],a*G[11],a*G[12],a*G[13],a*G[14], (1-a)*K[1], (1-a)*K[2], (1-a)*K[3], (1-a)*K[4]}, 'tord', deglex(a,r,u,v,w));
Ga := remove(has, Ga, [x,y,a]);
eliminate(Ga, [r,u,v,w]);

how to eliminate Ga to find back K ?

2.

A1A2 and A3A4 parallel
A(0,0), B(u1,0), D(u2,u3), C(x1,x2), E(x3,x4)
#BC = A1A2
xx1 := u1:
xx2 := x1:
yy1 := 0:
yy2 := x2:
#AD = A3A4
xx3 := 0:
xx4 := u2:
yy3 := 0:
yy4 := u3:
eq1 := (xx2 - xx1)*(yy4 - yy3) - (yy2 - yy1)*(xx4 - xx3);
(x1-u1)*u3-x2*u2;
#CD = A1A2
xx1 := x1:
xx2 := u2:
yy1 := x2:
yy2 := u3:
#AB = A3A4
xx3 := 0:
xx4 := u1:
yy3 := 0:
yy4 := 0:
eq2 := (xx2 - xx1)*(yy4 - yy3) - (yy2 - yy1)*(xx4 - xx3);
-(u3-x2)*u1;
with(LinearAlgebra):
#E is on the same line of AC
xx1 := x3:
yy1 := x4:
xx2 := 0:
yy2 := 0:
xx3 := x1:
yy3 := x2:
eq3 := Determinant(Matrix([[xx1,yy1,1],[xx2,yy2,1],[xx3,yy3,1]]));
-x3*x2+x1*x4;
#E is on the same line of BD
xx1 := x3:
yy1 := x4:
xx2 := u1:
yy2 := 0:
xx3 := u2:
yy3 := u3:
eq4 := Determinant(Matrix([[xx1,yy1,1],[xx2,yy2,1],[xx3,yy3,1]]));
-x3*u3+u1*u3-u1*x4+u2*x4;
 

sol := eliminate({eq1,eq2,eq3,eq4},[x1,x2,x3,x4]);

with(Groebner):
K := {(rhs(sol[1][1])-lhs(sol[1][1])),(rhs(sol[1][2])-lhs(sol[1][2])),(rhs(sol[1][3])-lhs(sol[1][3])),(rhs(sol[1][4])-lhs(sol[1][4]))};
G := Basis(K, 'tord', degrevlex(x1,x2,x3,x4));
R1 := eliminate(G, {x1,x2,x3,x4}); # eliminate is the reverse of Basis
Ga := Basis({a*G[1],a*G[2],a*G[3],a*G[4], (1-a)*K[1], (1-a)*K[2], (1-a)*K[3], (1-a)*K[4]}, 'tord', deglex(a,x1,x2,x3,x4));
Ga := remove(has, Ga, [u1,u2,u3,u4,a]);

From Question1, is it possible to find from sol to eq1, eq2, eq3 and eq4 ?

restart;
with(PDEtools);
assume(k::real, x::real, omega::real, t::real, theta::real, c::real);
u := phi(c*(t*upsilon+x))*exp(I*(k*x+omega*t+theta));
PDE := proc (u) options operator, arrow; I*(diff(u, t))+diff(u, x, x)-I*sigma*u*(conjugate(u)*(diff(u, x))-u*conjugate(diff(u, x))) end proc;
Eq1 := PDE(u)

For example

if x*y*z+ x*y^2

after filter 

x*y*z

I have resolved the roots of a series both numerically & analytically.  Let me qualify numerical  versus analytical.  Analytically I evaluate the series without substituting values for the various parameters of the series.  I then differentiate the series, then substitute in the appropriate parametric values, & then solve.  By this method I obtained 5 complex roots.

The numerical approach has values already assigned to the parameters of the series.  I then differentiate & solve.  I obtain only REAL roots in this instance.  I then restricted these results to obtain the solution I believe to be correct given by result (7).

I cannot seem to steer the solver in the analytic case to obtain the correct REAL result that I am expecting.  Can anyone help on this?

Before any website moderator thinks this is the same question as Error-in-Isinternal-Too-Many-Levels, it is not.  I have resolved that question.  This is a different question, but on the same problem!

reconcile_solns.mw

hi, i have an expression "f" and i want to substitute the expression with Square root with another namee like phi, how should i do that? i should not use solve commands since the expression is more complicated and i have just pick part of it. tnx in advance.

 

restart

f:=(3*beta[11]^2-4*beta[11]*sigma[11]+6*beta[12]^2-12*beta[12]*sigma[12]+2*sigma[11]^2+6*sigma[12]^2)*(1/sqrt(6*beta[11]^2-8*beta[11]*sigma[11]+12*beta[12]^2-24*beta[12]*sigma[12]+4*sigma[11]^2+12*sigma[12]^2))*(1/omega^2);

(3*beta[11]^2-4*beta[11]*sigma[11]+6*beta[12]^2-12*beta[12]*sigma[12]+2*sigma[11]^2+6*sigma[12]^2)/((6*beta[11]^2-8*beta[11]*sigma[11]+12*beta[12]^2-24*beta[12]*sigma[12]+4*sigma[11]^2+12*sigma[12]^2)^(1/2)*omega^2)

(1)

subs(sqrt(6*beta[11]^2-8*beta[11]*sigma[11]+12*beta[12]^2-24*beta[12]*sigma[12]+4*sigma[11]^2+12*sigma[12]^2)=phi,f);

(3*beta[11]^2-4*beta[11]*sigma[11]+6*beta[12]^2-12*beta[12]*sigma[12]+2*sigma[11]^2+6*sigma[12]^2)/((6*beta[11]^2-8*beta[11]*sigma[11]+12*beta[12]^2-24*beta[12]*sigma[12]+4*sigma[11]^2+12*sigma[12]^2)^(1/2)*omega^2)

(2)

factor(simplify(f,{sqrt(6*beta[11]^2-8*beta[11]*sigma[11]+12*beta[12]^2-24*beta[12]*sigma[12]+4*sigma[11]^2+12*sigma[12]^2) = phi}));

Error, (in simplify/siderels:-simplify/siderels) side relations must be polynomials in (name or function) variables

 

simplify(algsubs(sqrt(6*beta[11]^2-8*beta[11]*sigma[11]+12*beta[12]^2-24*beta[12]*sigma[12]+4*sigma[11]^2+12*sigma[12]^2)=phi,  f))

Error, (in algsubs) no variables appearing rationally in pattern

 

# i want sth like this :

(3*beta[11]^2-4*beta[11]*sigma[11]+6*beta[12]^2-12*beta[12]*sigma[12]+2*sigma[11]^2+6*sigma[12]^2)/(phi*omega^2)

(3)

``


 

Download problem.mw

Hi,

I tried a Animation with 10 randoms HeatMaps:

restart:

with(Statistics): with(LinearAlgebra); randomize(): with(plots):

f:= rand( 1..2 ):

for n to 10 do :
RM := Matrix(10, 10, proc (i, j) options operator, arrow; (-1)^f() end proc);
G[n] := HeatMap(RM, axis = [gridlines = [10, color = blue], thickness = 2]) ;
end do
display(seq(G[n], n = 1 .. 10), insequence = true);


But this is nor work as well. How do i this?

Regards.
 

Hello,

I want numerical randoms whose out are 1 or -1 only, how do i it?

I tried this:

with(Statistics):

RM := LinearAlgebra:-RandomMatrix(10, generator = -1 .. 1)

But this is not work as well.

Regards.

Result.mw
 

Download Result.mw

Anybody know why the graph doesnt appear and what is the error in my coding?

 

 


 

Suppose I want to do some manipulations on this inequality:

 

(1/2)*k*n <= m

(1/2)*k*n <= m

(1)

I know I can use the map() function to move terms around, like so:

 

map(proc (x) options operator, arrow; 2*x end proc, (1/2)*k*n <= m)

k*n <= 2*m

(2)

map(proc (x) options operator, arrow; x/n end proc, k*n <= 2*m)

k <= 2*m/n

(3)

map(proc (x) options operator, arrow; x/m end proc, k <= 2*m/n)

k/m <= 2/n

(4)

But this method fails if I want to multiply both sides of the inequality by a negative number, for example:

map(proc (x) options operator, arrow; -x end proc, k/m <= 2/n)

-k/m <= -2/n``

(5)

How do I get Maple to switch the inequality sign to ≥ ?


 

Download tmp.mw

restart; N := 4; de1 := A*(diff(f(eta), eta, eta, eta))+n*(-(diff(f(eta), eta, eta)))^(n-1)*(diff(f(eta), eta, eta, eta))-S*(diff(f(eta), eta))+(2-n)*eta*(diff(f(eta), eta, eta))/(1+n)+2*n*f(eta)*(diff(f(eta), eta, eta))/(1+n)-(diff(f(eta), eta))^2-g(eta)*(diff(f(eta), eta, eta))+(M*M)*(diff(f(eta), eta)) = 0, A*(diff(g(eta), eta, eta, eta))+(-(diff(f(eta), eta, eta)))^(n-1)*(diff(g(eta), eta, eta, eta))-(n-1)*(diff(g(eta), eta, eta))*(diff(f(eta), eta, eta, eta))*(-(diff(f(eta), eta, eta)))^(n-2)-S*(diff(g(eta), eta))+(2-n)*eta*(diff(g(eta), eta, eta))/(1+n)+2*n*f(eta)*(diff(g(eta), eta, eta))/(1+n)-(diff(g(eta), eta))^2+g(eta)*(diff(g(eta), eta, eta))-(M*M)*(diff(g(eta), eta)) = 0, (1+E*j(eta))*(diff(j(eta), eta, eta))+E*(diff(j(eta), eta))^2+2*Pr*n*f(eta)*g(eta)*(diff(j(eta), eta))/(1+n)-Pr*S*(2-n)*eta*(diff(j(eta), eta))/(1+n)+Pr*(Nb*(diff(j(eta), eta))*(diff(h(eta), eta))+Nt*(diff(j(eta), eta))^2)+Pr*lambda*j(eta) = 0, diff(h(eta), eta, eta)+2*Le*Pr*n*f(eta)*g(eta)*(diff(h(eta), eta))/(1+n)-Le*Pr*S*(2-n)*eta*(diff(h(eta), eta))/(1+n)+Nt*(diff(j(eta), eta, eta))/Nb = 0, f(0) = 0, (D(f))(0) = 1, g(0) = 0, (D(g))(0) = alpha, (D(j))(0) = -b*(1-j(0))/(1+E*j(0)), (D(h))(0) = -d*(1-h(0)), (D(f))(N) = 0, (D(g))(N) = 0, j(N) = 0, h(N) = 0; d1 := subs(alpha = .2, M = .4, A = 1, S = .1, n = .5, Pr = 4, E = 1.5, Nb = .5, Nt = .2, Le = 1, lambda = .2, b = 1.2, d = .5, [de1]); da1 := dsolve(d1, numeric, output = operator, maxmesh = 2048, method = bvp[midrich], abserr = 10); with(plots); restart; N := 4; de2 := A*(diff(f(eta), eta, eta, eta))+n*(-(diff(f(eta), eta, eta)))^(n-1)*(diff(f(eta), eta, eta, eta))-S*(diff(f(eta), eta))+(2-n)*eta*(diff(f(eta), eta, eta))/(1+n)+2*n*f(eta)*(diff(f(eta), eta, eta))/(1+n)-(diff(f(eta), eta))^2-g(eta)*(diff(f(eta), eta, eta))+(M*M)*(diff(f(eta), eta)) = 0, A*(diff(g(eta), eta, eta, eta))+(-(diff(f(eta), eta, eta)))^(n-1)*(diff(g(eta), eta, eta, eta))-(n-1)*(diff(g(eta), eta, eta))*(diff(f(eta), eta, eta, eta))*(-(diff(f(eta), eta, eta)))^(n-2)-S*(diff(g(eta), eta))+(2-n)*eta*(diff(g(eta), eta, eta))/(1+n)+2*n*f(eta)*(diff(g(eta), eta, eta))/(1+n)-(diff(g(eta), eta))^2+g(eta)*(diff(g(eta), eta, eta))-(M*M)*(diff(g(eta), eta)) = 0, (1+E*j(eta))*(diff(j(eta), eta, eta))+E*(diff(j(eta), eta))^2+2*Pr*n*f(eta)*g(eta)*(diff(j(eta), eta))/(1+n)-Pr*S*(2-n)*eta*(diff(j(eta), eta))/(1+n)+Pr*(Nb*(diff(j(eta), eta))*(diff(h(eta), eta))+Nt*(diff(j(eta), eta))^2)+Pr*lambda*j(eta) = 0, diff(h(eta), eta, eta)+2*Le*Pr*n*f(eta)*g(eta)*(diff(h(eta), eta))/(1+n)-Le*Pr*S*(2-n)*eta*(diff(h(eta), eta))/(1+n)+Nt*(diff(j(eta), eta, eta))/Nb = 0, f(0) = 0, (D(f))(0) = 1, g(0) = 0, (D(g))(0) = alpha, (D(j))(0) = -b*(1-j(0))/(1+E*j(0)), (D(h))(0) = -d*(1-h(0)), (D(f))(N) = 0, (D(g))(N) = 0, j(N) = 0, h(N) = 0; d2 := subs(alpha = .2, M = .4, A = 1, S = .1, n = .5, Pr = 5, E = 1.5, Nb = .5, Nt = .2, Le = 1, lambda = .2, b = 1.2, d = .5, [de2]); da2 := dsolve(d2, numeric, output = operator, maxmesh = 2048, method = bvp[midrich], abserr = 10); with(plots); p1 := odeplot([da1, da2], [eta, diff(f(eta), eta), linestyle = 1, color = "Red", thickness = 2], labels = ["&eta;", "f' g' "], labeldirections = [HORIZONTAL, VERTICAL]); p4 := odeplot(da2, [[eta, f(eta)], [eta, g(eta)], [eta, h(eta)], [eta, j(eta)]], color = [red, green, blue, black]); plots[display]({p1})

Dear users!

Hope everyone should be fine. I have some query regarding to set title of the following problem in 2D

beta := 1; alpha[1] := .5

f := beta+alpha[1]+sin(x*beta);

plot(f, x = 0 .. Pi, axes = boxed, size = [300, 270], labels = [x, "f ' (x)"], labelfont = ["Arial", 10, Bold], labeldirections = [horizontal, vertical], title = "&beta; = 1, &alpha;[1] = 0.5\n", titlefont = ["Arial", 10, Bold]);

I got the following graph

but I need the following one

Want to shift title on right. Want to write alpha[1] and f like in figure 2. 

I am waiting your response. Thanks

 

I want to find the i-th root of this equation s := BesselJ(1, alpha)+a1*BesselY(1, alpha)+b1*BeselJ(1, alpha)+c1*BesselK(1, alpha)

 

When I use the Nextzero it doesnt work

Thanks

Hi,

I couldn't find a command or tool for searching a value in a multi-dimensional list/array/matrix. Does it exist?. 

I wrote this:

 

 

where

pSearch: proc for searching

A: list, array, vector or matrix


 

Examples with a list:

> ss := [[1, 2, 3], [2, 3, 5], [2, 4, 5]]
> j:=1:
># search first index i such that ss[i, j]=2

> nPos := 

# search next index i such that ss[i, j]=2

> nPos := 

 

But I am not sure if this procedure is efficient for large lists or arrays and I would suggest (if this tool does not exist yet) a more efficient one.

César Lozada

 

 

 

First 852 853 854 855 856 857 858 Last Page 854 of 2433