Maple 18 Questions and Posts

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

Dear all

I have  Lie commutations for vectors e1, e2, e3, e4, e5, e6 as follow:

[e1, e3] = e3, [e1, e4] = e4, [e1, e5] = e5, [e1, e6] = e6, [e2, e3] = -e5, [e2, e4] = e6, [e3, e5] = e6

for which the command 

Query("Jacobi")

returns the false result, which means, the vectors are not closed under Jacobi's identity. How can I find vector triplets for which Jacobi's identity does not hold?

Please find Maple file.Jacobi_identity.mw

Hey everyone!
I have to solve this nonlinear system of equations . For small N (N=8), I tried to do it using solve but it is run forever. I have choosed \gamma to be equal to Pi/4.
test.mw


 

  restart:

  interface(rtablesize=10):


  local gamma:local pi:



if false then
 theta := 0.987: betae := 0.231: betay := 0.112: rho := 0.17: muh := 0.05 : sigma2 := 0.0411: sigma1 := 0.212: alpha1 := 0.111: alpha2 := 0.131 : eta := 0.134: thetaa := 0.7271: betaf := 0.00954: betah := 0.008220: gamma := 0.0012: mua := 0.0023: sigma3 := 0.203: d := 0.451: z := 0.072:
end if:

#
# D() is Maple's differential operator replated D(T)
# with DD(T) in the following to avoid confusion
#

  ODE1 := diff(B(T), T) = theta-(betae*C(T)+betay*rho*G(T))*B(T)-muh*B(T)+sigma2*E(T):
  ODE2 := diff(C(T), T) = (betae*C(T)+betay*rho*G(T))*B(T)-(muh+sigma1+alpha1)*C(T):
  ODE3 := diff(E(T), T) = sigma1*C(T)-(muh+sigma2)*E(T):
  ODE4 := diff(G(T), T) = alpha1*C(T)+alpha2*K(T)-eta*G(T):
  ODE5 :=  diff(H(T), T) = thetaa-(betaf*H(T)+betah*gamma*G(T))*H(T)-mua*H(T)+sigma3*K(T):
  ODE6 :=  diff(J(T), T) = (betaf*H(T)+betah*gamma*G(T))*H(T)-(mua+d+z+alpha2)*J(T):
  ODE7 :=  diff(K(T), T) = z*J(T)-(mua+sigma3)*K(T):

 
if false then
  B0 := 100: C0 := 60: E0 := 50: G0 := 55: H0 := 80: J0 := 80: K0 := 80:  

end if:

# system + ic


sys := { ODE1, ODE2, ODE3, ODE4, ODE5, ODE6, ODE7,
                   B(0) = B0, C(0) = C0, E(0) = E0, G(0) = G0, H(0) = H0, J(0) = J0, K(0) = K0

                 }:

params := convert(indets(sys, name) minus {T}, list);

[B0, C0, E0, G0, H0, J0, K0, alpha1, alpha2, betae, betaf, betah, betay, d, eta, gamma, mua, muh, rho, sigma1, sigma2, sigma3, theta, thetaa, z]

(1)

#
# Solve system
#
  ans := dsolve( { ODE1, ODE2, ODE3, ODE4, ODE5, ODE6, ODE7,
                   B(0) = B0, C(0) = C0, E(0) = E0, G(0) = G0, H(0) = H0, J(0) = J0, K(0) = K0
               
                 },
                 parameters = params,
                 numeric
               );

Error, (in dsolve/numeric) 'parameters' must be specified as a list of unique unassigned names

 

NULL


 

Download sim.mw

Hello  i have this pb i don't now what to do :
 

Error, (in simplify/tools/_zn) too many levels of recursion

thank you 

I have a set of curves  :   plot({seq((6*x-2*t)/x^2, t = 1 .. 3)}, x = -1 .. 5, y = -1 .. 6)

and   a function           :   plot(3/x, x = 0 .. 5, y = -1 .. 6).

How is the calling sequence to plot the set and the function in the same graph ?

Dear friends, please, I would like to ask for your help with the following problem. 

When I try to compile a code like the following 

P:= proc(n)
m:= floor(log[10](n));
A:= Array(1..m);
end proc:

I get the error "Error, (in CodeGeneration:-IssueError) cannot analyze non-integer range boundary m". 

Could you please assist me in overcoming this problem? Many thanks in advance. 

/Mrs.,

How can I plot "log scale base 2" instead of "log scale base 10" (plot "log2plot(x,x=0..10)" instead of "logplot(x,x=0..10)")? 

I would appreciate if you make me some help with this situation.

faithfully,


 

restart;

M__h := 0.352e-1;

0.352e-1

 

0.34e-1

 

0.8354e-1

 

0.96e-2

 

.123

 

0.7258e-1

 

0.214e-1

 

0.219e-1

 

.123

 

.7902

 

.11

 

0.136e-3

 

0.5e-1

 

0.8910e-1

 

0.45e-1

 

.7

 

.7214

 

1.354

 

0.235e-1

(1)

pdes := [diff(B(t, x), t) = M__h-beta__1*B(t, x)*G(t, x)/N__h+beta__2*B(t, x)*G(t, x)/N__h-mu__h*B(t, x)+sigma__h*E(t, x)*(diff(B(t, x), x, x)), diff(C(t, x), t) = beta__1*B(t, x)*G(t, x)/N__h-u[1]*C(t, x)/(1+C(t, x))-mu__h*C(t, x)*(diff(C(t, x), x, x)), diff(DD(t, x), t) = beta__2*DD(t, x)*G(t, x)/N__h-u[1]*DD(t, x)/(1+DD(t, x))-mu__h*DD(t, x)-delta__1*DD(t, x)*(diff(DD(t, x), x, x)), diff(E(t, x), t) = u[1]*C(t, x)/(1+C(t, x))+u[1]*DD(t, x)/(1+DD(t, x))-(mu__h+sigma__h)*E(t, x)*(diff(E(t, x), x, x)), diff(F(t, x), t) = M__b-beta__3*F(t, x)*C(t, x)/N__b+beta__4*F(t, x)*DD(t, x)/N__b-mu__b*F(t, x)*(diff(F(t, x), x, x)), diff(G(t, x), t) = beta__3*F(t, x)*C(t, x)/N__b+beta__4*F(t, x)*DD(t, x)/N__b-mu__b*G(t, x)*(diff(G(t, x), x, x))];

[diff(B(t, x), t) = 0.352e-1-0.891056911e-1*B(t, x)*G(t, x)-0.96e-2*B(t, x)+0.8910e-1*E(t, x)*(diff(diff(B(t, x), x), x)), diff(C(t, x), t) = .6791869919*B(t, x)*G(t, x)-0.45e-1*C(t, x)/(1+C(t, x))-0.96e-2*C(t, x)*(diff(diff(C(t, x), x), x)), diff(DD(t, x), t) = .5900813008*DD(t, x)*G(t, x)-0.45e-1*DD(t, x)/(1+DD(t, x))-0.96e-2*DD(t, x)-0.235e-1*DD(t, x)*(diff(diff(DD(t, x), x), x)), diff(E(t, x), t) = 0.45e-1*C(t, x)/(1+C(t, x))+0.45e-1*DD(t, x)/(1+DD(t, x))-0.9870e-1*E(t, x)*(diff(diff(E(t, x), x), x)), diff(F(t, x), t) = .7214-.1739837398*F(t, x)*C(t, x)+.1780487805*F(t, x)*DD(t, x)-1.354*F(t, x)*(diff(diff(F(t, x), x), x)), diff(G(t, x), t) = .1739837398*F(t, x)*C(t, x)+.1780487805*F(t, x)*DD(t, x)-1.354*G(t, x)*(diff(diff(G(t, x), x), x))]

(2)

bcs := [(D[2](B))(t, 0) = 0, (D[2](B))(t, 1) = 0, (D[2](C))(t, 0) = 0, (D[2](C))(t, 1) = 0, (D[2](DD))(t, 0) = 0, (D[2](DD))(t, 1) = 0, (D[2](E))(t, 0) = 0, (D[2](E))(t, 1) = 0, (D[2](F))(t, 0) = 0, (D[2](F))(t, 1) = 0, (D[2](G))(t, 0) = 0, (D[2](G))(t, 1) = 0, B(0, x) = 100, C(0, x) = 70, DD(0, x) = 50, E(0, x) = 70, F(0, x) = 100, G(0, x) = 70]

[(D[2](B))(t, 0) = 0, (D[2](B))(t, 1) = 0, (D[2](C))(t, 0) = 0, (D[2](C))(t, 1) = 0, (D[2](DD))(t, 0) = 0, (D[2](DD))(t, 1) = 0, (D[2](E))(t, 0) = 0, (D[2](E))(t, 1) = 0, (D[2](F))(t, 0) = 0, (D[2](F))(t, 1) = 0, (D[2](G))(t, 0) = 0, (D[2](G))(t, 1) = 0, B(0, x) = .100, C(0, x) = .70, DD(0, x) = .50, E(0, x) = .70, F(0, x) = .100, G(0, x) = .70]

(3)

sol := pdsolve(pdes, bcs, numeric);

module () local INFO; export plot, plot3d, animate, value, settings; option `Copyright (c) 2001 by Waterloo Maple Inc. All rights reserved.`; end module

(4)

sol:-plot3d([B(t, x), C(t, x)], t = 0 .. 20, x = 0 .. 20)

Error, (in pdsolve/numeric/plot3d) unable to compute solution for t>HFloat(0.25):
Newton iteration is not converging

 

``


 

Download spatial_1.mw


 

restart;

M__h := 0.352e-1;

0.352e-1

 

0.34e-1

 

0.8354e-1

 

0.96e-2

 

.123

 

0.7258e-1

 

0.214e-1

 

0.219e-1

 

.123

 

.7902

 

.11

 

0.136e-3

 

0.5e-1

 

0.8910e-1

 

0.45e-1

 

.7

 

.7214

 

1.354

 

0.235e-1

(1)

pdes := [diff(B(t, x), t) = M__h-beta__1*B(t, x)*G(t, x)/N__h+beta__2*B(t, x)*G(t, x)/N__h-mu__h*B(t, x)+sigma__h*E(t, x)*(diff(B(t, x), x, x)), diff(C(t, x), t) = beta__1*B(t, x)*G(t, x)/N__h-u[1]*C(t, x)/(1+C(t, x))-mu__h*C(t, x)*(diff(C(t, x), x, x)), diff(DD(t, x), t) = beta__2*DD(t, x)*G(t, x)/N__h-u[1]*DD(t, x)/(1+DD(t, x))-mu__h*DD(t, x)-delta__1*DD(t, x)*(diff(DD(t, x), x, x)), diff(E(t, x), t) = u[1]*C(t, x)/(1+C(t, x))+u[1]*DD(t, x)/(1+DD(t, x))-(mu__h+sigma__h)*E(t, x)*(diff(E(t, x), x, x)), diff(F(t, x), t) = M__b-beta__3*F(t, x)*C(t, x)/N__b+beta__4*F(t, x)*DD(t, x)/N__b-mu__b*F(t, x)*(diff(F(t, x), x, x)), diff(G(t, x), t) = beta__3*F(t, x)*C(t, x)/N__b+beta__4*F(t, x)*DD(t, x)/N__b-mu__b*G(t, x)*(diff(G(t, x), x, x))];

[diff(B(t, x), t) = 0.352e-1-0.891056911e-1*B(t, x)*G(t, x)-0.96e-2*B(t, x)+0.8910e-1*E(t, x)*(diff(diff(B(t, x), x), x)), diff(C(t, x), t) = .6791869919*B(t, x)*G(t, x)-0.45e-1*C(t, x)/(1+C(t, x))-0.96e-2*C(t, x)*(diff(diff(C(t, x), x), x)), diff(DD(t, x), t) = .5900813008*DD(t, x)*G(t, x)-0.45e-1*DD(t, x)/(1+DD(t, x))-0.96e-2*DD(t, x)-0.235e-1*DD(t, x)*(diff(diff(DD(t, x), x), x)), diff(E(t, x), t) = 0.45e-1*C(t, x)/(1+C(t, x))+0.45e-1*DD(t, x)/(1+DD(t, x))-0.9870e-1*E(t, x)*(diff(diff(E(t, x), x), x)), diff(F(t, x), t) = .7214-.1739837398*F(t, x)*C(t, x)+.1780487805*F(t, x)*DD(t, x)-1.354*F(t, x)*(diff(diff(F(t, x), x), x)), diff(G(t, x), t) = .1739837398*F(t, x)*C(t, x)+.1780487805*F(t, x)*DD(t, x)-1.354*G(t, x)*(diff(diff(G(t, x), x), x))]

(2)

bcs := [(D[2](B))(t, 0) = 0, (D[2](B))(t, 1) = 0, (D[2](C))(t, 0) = 0, (D[2](C))(t, 1) = 0, (D[2](DD))(t, 0) = 0, (D[2](DD))(t, 1) = 0, (D[2](E))(t, 0) = 0, (D[2](E))(t, 1) = 0, (D[2](F))(t, 0) = 0, (D[2](F))(t, 1) = 0, (D[2](G))(t, 0) = 0, (D[2](G))(t, 1) = 0, B(0, x) = 100, C(0, x) = 70, DD(0, x) = 50, E(0, x) = 70, F(0, x) = 100, G(0, x) = 70]

[(D[2](B))(t, 0) = 0, (D[2](B))(t, 1) = 0, (D[2](C))(t, 0) = 0, (D[2](C))(t, 1) = 0, (D[2](DD))(t, 0) = 0, (D[2](DD))(t, 1) = 0, (D[2](E))(t, 0) = 0, (D[2](E))(t, 1) = 0, (D[2](F))(t, 0) = 0, (D[2](F))(t, 1) = 0, (D[2](G))(t, 0) = 0, (D[2](G))(t, 1) = 0, B(0, x) = .100, C(0, x) = .70, DD(0, x) = .50, E(0, x) = .70, F(0, x) = .100, G(0, x) = .70]

(3)

sol := pdsolve(pdes, bcs, numeric);

module () local INFO; export plot, plot3d, animate, value, settings; option `Copyright (c) 2001 by Waterloo Maple Inc. All rights reserved.`; end module

(4)

sol:-plot3d([B(t, x), C(t, x)], t = 0 .. 20, x = 0 .. 20)

Error, (in pdsolve/numeric/plot3d) unable to compute solution for t>HFloat(0.25):
Newton iteration is not converging

 

``


 

Download spatial_1.mw

Dear friends,

I have a given number and I need to convert its digits into an array. For example: 

a:= 456;  and I need an array [4 5 6]. 

I know how to obtain such a procedure as a list

map(parse, StringTools:-Explode(convert(a, string)));

but not how to get the result as an array. Could you please help me with the right commands?

Many thanks for the help. 

How to find sgn on maple?

signum.mw

Hi, I'm solving a complicated ODEs. It is a multiple point bvp. Last time I asked a question about a similar problem(you can see https://www.mapleprimes.com/questions/230626-I-Am-Trying-To-Solve-A-Set-Of-ODEs-With). And when I use the last point 's solution to obtain the next point's solution (via approxsoln=..), it works well (it's the replicate of other people's paper). But this time I changed theoretical model, so the input parameters and the equations are some different from the previous. Some problems appears again. In the code I used a loop to calculate solutions with different lambda, but the code works on some points in front, then it appears an error "initial Newton iteration is not converging". 

Do you have some ideas to overcome it?

 

dsolveODEs.mw

How to evaluate the integration when x=[-infinity , +infinity]?

integration_24sep.mw

First 12 13 14 15 16 17 18 Last Page 14 of 85