Maple 17 Questions and Posts

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

Dear Maple users,

My problem is as follows:

I have a factor base [2,3,5,7,11,33,34,35,36,37,38,39,40]

The numbers from 2 till 11 are primes, the rest is not. 

Then I have to factor (H+c1)(H+c2) in numbers of the factor base , where c1 and c2 go from 1 to some pre-defined limit. H=32 in my case.
And then I have to put the powers of the numbers of the factor base in a matrix. For example: (H+1)(H+1)=33² but also (H+1)(H+1)=3²*11².

That will become in matrix form [0 , 2, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0 ] but also (!) [0 , 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0 ].

This is not what I want! I want no double representations....

What I want is that (H+c1)(H+c2) should be represented in primes in the matrix if possible and else just represented as the other numbers.

 

hope you guys can help me!

Please I need someone to help out with how to solve the below ODE numerically using finite difference method with the necessary maple code:

 

█( S〗_h〗^' (t)=Λ_h-αβ_m I_v S_h-μ_h S_h+πI_m,  

〖I_m〗^' (t)=αβ_m I_v S_h-(σ_m+π+μ_h ) I_m

〖 S〗_v〗^' (t)=Λ_v-αβ_v I_m S_v-μ_v S_v

〖I_v〗^' (t)=αβ_v I_m S_v-μ_v I_v )

The initial conditions can be assumed. Suppose i want to include controls, how do I solve the problem and equally plot the graph.

 

Thank you.

ADENIYI MICHAEL

 

error in( dsolve/numeric/bvp) unable to achieve the requested accuracy of 0.1e-5 with maximum 128 point mesh (was able to get 0.22e-4), consider increasing `maxmesh` or using larger `abserr`

 

The above is the error message displayed by maple 17. How do I correct this.

Thank you.

 

Adeniyi Michael

I am numerically solving a nonlinear system of nine equations. How long can I expect it to take?

I have run it for 30 minutes and it has not solved yet.

Here is the system of equations:

0=Lambda-mu.*S-beta.*(H+C+C1+C2).*(S./N)-tau.*(T+C).*(S./N);

0=tau.*(T+C).*(S./N)-beta.*(H+C+C1+C2).*(T./N)-(mu+mu_T).*T;

0=beta.*(H+C+C1+C2).*(S./N)-tau.*(T+C).*(H./N)-(mu+mu_A).*H;

0=beta.*(H+C+C1+C2).*(T./N)+tau.*(T+C).*(H./N)-(mu+psi.*mu_A+mu_T+lambda_T).*C;

0=lambda_T.*C-(mu+mu_A+rho_1+eta_1).*C1;

0=rho_1.*C1-(mu+mu_A+rho_2+eta_2).*C2;

0=eta_1.*C1-(mu+rho_1+gamma).*CT1;

0=eta_2.*C2-(mu+rho_2+gamma.*(rho_1)./(rho_1+rho_2)).*CT2+(rho_1).*CT1;

0 = N - S - T - H - C - C1 - C2 - CT1 - CT2;

and I have numeric values for Lambda, beta, tau, mu, mu_T, mu_A, rho_1, rho_2, psi, gamma. The only parameters left are eta_1, eta_2.

Thank you.

I have used the command "op" in a code that I have written with Maple 17. When I restart the maple server and run the whole code again, the result of the "op" command changes! why is this happening?

As I am trying to solve this integration:

restart; with(linalg); with(stats); with(plots); with(Statistics); with(LinearAlgebra); with(Optimization);
lambda0 := proc (t) options operator, arrow; gamma0+gamma1*t+gamma2*t^2 end proc;
lambda := lambda0(t)*exp(beta*s);
t1 := 145; t3 := 250; t2 := (t1+t3)*(1/2);
s := 1/(273.16+50); s1 := 1/(273.16+t1); s3 := 1/(273.16+t3); s2 := 1/(273.16+t2); gamma0 := 0.1e-3; gamma1 := .5; gamma2 := 0; beta := -3800;
c := 300; n := 200;
Theta := solve(1-exp(-(gamma0*tau1+(1/2)*gamma1*tau1^2+(1/3)*gamma2*tau1^3)*exp(beta*s1)) = 1-exp(-(gamma0*a+(1/2)*gamma1*a^2+(1/3)*gamma2*a^3)*exp(beta*s2)), a);

a := Theta[1];

Delta := solve(1-exp(-(gamma0*(a+tau2-tau1)+(1/2)*gamma1*(a+tau2-tau1)^2+(1/3)*gamma2*(a+tau2-tau1)^3)*exp(beta*s2)) = 1-exp(-(gamma0*b+(1/2)*gamma1*b^2+(1/3)*gamma2*b^3)*exp(beta*s3)), b);

b := Delta[1];

A1 := `assuming`([unapply(int(exp(beta*s1)*exp(-(gamma0*t+(1/2)*gamma1*t^2+(1/3)*gamma2*t^3)*exp(beta*s1))/(gamma0+gamma1*t+gamma2*t^`2`), t = N .. M), N, M)], [N > 0, M > 0]);
A2 := unapply(int(exp(beta*s2)*exp(-(gamma0*(a+t-tau1)+(1/2)*gamma1*(a+t-tau1)^2+(1/3)*gamma2*(a+t-tau1)^3)*exp(beta*s2))/(gamma0+gamma1*(a+t-tau1)+gamma2*(a+t-tau1)^2), t = N .. M), N, M);
A3 := unapply(int(exp(beta*s3)*exp(-(gamma0*(b+t-tau2)+(1/2)*gamma1*(b+t-tau2)^2+(1/3)*gamma2*(b+t-tau2)^3)*exp(beta*s3))/(gamma0+gamma1*(b+t-tau2)+gamma2*(b+t-tau2)^2), t = N .. M), N, M);
B1 := `assuming`([unapply(int(t^2*exp(beta*s1)*exp(-(gamma0*t+(1/2)*gamma1*t^2+(1/3)*gamma2*t^3)*exp(beta*s1))/(gamma2*t^2+gamma1*t+gamma0), t = N .. M), N, M)], [N > 0, M > 0]);
B2 := unapply(int((a+t-tau1)^2*exp(beta*s2)*exp(-(gamma0*(a+t-tau1)+(1/2)*gamma1*(a+t-tau1)^2+(1/3)*gamma2*(a+t-tau1)^3)*exp(beta*s2))/(gamma0+gamma1*(a+t-tau1)+gamma2*(a+t-tau1)^2), t = N .. M), N, M);
B3 := unapply(int((b+t-tau2)^2*exp(beta*s3)*exp(-(gamma0*(b+t-tau2)+(1/2)*gamma1*(b+t-tau2)^2+(1/3)*gamma2*(b+t-tau2)^3)*exp(beta*s3))/(gamma0+gamma1*(b+t-tau2)+gamma2*(b+t-tau2)^2), t = N .. M), N, M);

F0 := A1(0, tau1)+A2(tau1, tau2)+A3(tau2, c);
F1 := B1(0, tau1)+B2(tau1, tau2)+B3(tau2, c);

NLPSolve(1/(n^3*(F0*F1-F1)), tau1 = 115 .. 201, tau2 = 237 .. 273);

I need to have tau1 tau2 as varibles to get there optimal values ..

But this error keeps coming :


Error, (in Optimization:-NLPSolve) integration range or variable must be specified in the second argument, got HFloat(1.0) = HFloat(158.0) .. HFloat(255.0)

Please Help ..

I am a problem with solve differential equation, please help me: THANKS 

g := (y^2-1)^2; I4 := int(g^4, y = -1 .. 1); I5 := 2*(int(g^3*(diff(g, y, y)), y = -1 .. 1)); I6 := int(g^3*(diff(g, y, y, y, y)), y = -1 .. 1); with(Student[Calculus1]); I10 := ApproximateInt(6/(1-f(x)*g)^2, y = -1 .. 1, method = simpson);

dsys3 := {I4*f(x)^2*(diff(f(x), x, x, x, x))+I5*f(x)^2*(diff(f(x), x, x))+I6*f(x)^3 = I10, f(-1) = 0, f(1) = 0, ((D@@1)(f))(-1) = 0, ((D@@1)(f))(1) = 0};

dsol5 := dsolve(dsys3, numeric, output = array([0.]));

              Error, (in dsolve/numeric/bvp) system is singular at left endpoint, use midpoint method instead

****************FORMAT TWO ********************************************************

g := (y^2-1)^2; I4 := int(g^4, y = -1 .. 1); I5 := 2*(int(g^3*(diff(g, y, y)), y = -1 .. 1)); I6 := int(g^3*(diff(g, y, y, y, y)), y = -1 .. 1); with(Student[Calculus1]); I10 := ApproximateInt(6/(1-f(x)*g)^2, y = -1 .. 1, method = simpson);
dsys3 := {I4*f(x)^2*(diff(f(x), x, x, x, x))+I5*f(x)^2*(diff(f(x), x, x))+I6*f(x)^3 = I10, f(-1) = 0, f(1) = 0, ((D@@1)(f))(-1) = 0, ((D@@1)(f))(1) = 0};

dsol5 := dsolve(dsys3, method = bvp[midrich], output = array([0.]));
%;
                                   Error, (in dsolve) too many levels of recursion

I DONT KNOW ABOUT THIS ERROR

PLEASE HELP ME

THANKS A LOT

 

Hi,

Code was computed on two different PC:
1) Win 8.1, Maple 17.02 x64
2) Win 8.1, Maple 18.01 x64

In brief:

n:=3: 
Grid:-Seq('f(i)', i = 1 .. n):

works well in Maple 17.02 but gives an error in Maple 18.01. Why?

However,

(j -> Grid:-Seq('f(i)', i = 1 .. j))(n):

works well for both Maple versions.

according to examples from Maple help page
http://www.maplesoft.com/support/help/Maple/view.aspx?path=Grid%2fSeq
we have to pass exactly 'f(i)' (not just f(i)) into Grid:-Seq(...). Why?

Why doesn't Digits:=30: work properly for Grid:-Seq(...)?

For details see attached file. Output was produced in Maple 17.02. In Maple 18.01 the output will differ.


restart; n := 3; f1 := proc (i) options operator, arrow; evalf(sqrt(i)) end proc; f2 := proc (i) options operator, arrow; evalf(sqrt(i+1)) end proc; f3 := proc (i) options operator, arrow; evalf(i*Pi) end proc; g1 := proc (f, n) local za, zb, zc, str; str := sprintf("g1(%a,n)", f); za := seq(f(i), i = 1 .. n); zb := Grid:-Seq(f(i), i = 1 .. n); zc := (proc (j) options operator, arrow; Grid:-Seq(f(i), i = 1 .. j) end proc)(n); print("------------------------------"); print(cat("(a):   ", str), za); print(cat("(b):   ", str), zb); print(cat("(c):   ", str), zc); print("------------------------------") end proc; g2 := proc (f, n) local za, zb, zc, str; str := sprintf("g2(%a,n)", f); za := seq('f(i)', i = 1 .. n); zb := Grid:-Seq('f(i)', i = 1 .. n); zc := (proc (j) options operator, arrow; Grid:-Seq('f(i)', i = 1 .. j) end proc)(n); print("------------------------------"); print(cat("(a):   ", str), za); print(cat("(b):   ", str), zb); print(cat("(c):   ", str), zc); print("------------------------------") end proc

3

(1)

g1(f1, n);

"------------------------------"

 

"(a):   g1(f1,n)", 1., 1.414213562, 1.732050808

 

"(b):   g1(f1,n)", 1, 2^(1/2), 3^(1/2)

 

"(c):   g1(f1,n)", 1, 2^(1/2), 3^(1/2)

 

"------------------------------"

 

"------------------------------"

 

"(a):   g1(f2,n)", 1.414213562, 1.732050808, 2.

 

"(b):   g1(f2,n)", 1.414213562, 1.732050808, 2.000000000

 

"(c):   g1(f2,n)", 1.414213562, 1.732050808, 2.000000000

 

"------------------------------"

 

"------------------------------"

 

"(a):   g1(f3,n)", 3.141592654, 6.283185308, 9.424777962

 

"(b):   g1(f3,n)", 3.141592654, 6.283185308, 9.424777962

 

"(c):   g1(f3,n)", 3.141592654, 6.283185308, 9.424777962

 

"------------------------------"

 

"+++++++++++++++++++++++++++++++++++++++++++"

 

"------------------------------"

 

"(a):   g2(f1,n)", 1., 1.414213562, 1.732050808

 

"(b):   g2(f1,n)", 1., 1.414213562, 1.732050808

 

"(c):   g2(f1,n)", 1., 1.414213562, 1.732050808

 

"------------------------------"

 

"------------------------------"

 

"(a):   g2(f2,n)", 1.414213562, 1.732050808, 2.

 

"(b):   g2(f2,n)", 1.414213562, 1.732050808, 2.

 

"(c):   g2(f2,n)", 1.414213562, 1.732050808, 2.

 

"------------------------------"

 

"------------------------------"

 

"(a):   g2(f3,n)", 3.141592654, 6.283185308, 9.424777962

 

"(b):   g2(f3,n)", 3.141592654, 6.283185308, 9.424777962

 

"(c):   g2(f3,n)", 3.141592654, 6.283185308, 9.424777962

 

"------------------------------"

(2)

Digits := 30;

30

 

"------------------------------"

 

"(a):   g1(f1,n)", 1., 1.41421356237309504880168872421, 1.73205080756887729352744634151

 

"(b):   g1(f1,n)", 1, 2^(1/2), 3^(1/2)

 

"(c):   g1(f1,n)", 1, 2^(1/2), 3^(1/2)

 

"------------------------------"

 

"------------------------------"

 

"(a):   g1(f2,n)", 1.41421356237309504880168872421, 1.73205080756887729352744634151, 2.

 

"(b):   g1(f2,n)", 1.414213562, 1.732050808, 2.000000000

 

"(c):   g1(f2,n)", 1.414213562, 1.732050808, 2.000000000

 

"------------------------------"

 

"------------------------------"

 

"(a):   g1(f3,n)", 3.14159265358979323846264338328, 6.28318530717958647692528676656, 9.42477796076937971538793014984

 

"(b):   g1(f3,n)", 3.14159265358979323846264338328, 6.283185308, 9.424777962

 

"(c):   g1(f3,n)", 3.14159265358979323846264338328, 6.283185308, 9.424777962

 

"------------------------------"

 

"+++++++++++++++++++++++++++++++++++++++++++"

 

"------------------------------"

 

"(a):   g2(f1,n)", 1., 1.41421356237309504880168872421, 1.73205080756887729352744634151

 

"(b):   g2(f1,n)", 1., 1.414213562, 1.732050808

 

"(c):   g2(f1,n)", 1., 1.414213562, 1.732050808

 

"------------------------------"

 

"------------------------------"

 

"(a):   g2(f2,n)", 1.41421356237309504880168872421, 1.73205080756887729352744634151, 2.

 

"(b):   g2(f2,n)", 1.414213562, 1.732050808, 2.

 

"(c):   g2(f2,n)", 1.414213562, 1.732050808, 2.

 

"------------------------------"

 

"------------------------------"

 

"(a):   g2(f3,n)", 3.14159265358979323846264338328, 6.28318530717958647692528676656, 9.42477796076937971538793014984

 

"(b):   g2(f3,n)", 3.141592654, 6.283185308, 9.424777962

 

"(c):   g2(f3,n)", 3.141592654, 6.283185308, 9.424777962

 

"------------------------------"

(3)

``

NULL


Download Grid[Seq].mw

I am not able to simplify my equation, any help would be appreciated ! I want the V[0]^2/r[0]  term to be eliminated

restart:with(Student[VectorCalculus]): 

R1:=rho(diff(u(r,theta,z,t)*(V[0])^2/r[0],t)+ u(r,theta,z,t)*V[0](diff(u(r,theta,z,t)*V[0]/r[0],r))+v(r,theta,z,t)*V[0]/(r*r[0])*diff(u(r,theta,z,t)*V[0],theta)+w(r,theta,z,t)*V[0]*diff(u(r,theta,z,t)*V[0]/r[0],z)-(v(r,theta,z,t)*V[0])^2/(r*r[0])) +diff(p(r,theta,z,t)*rho*V[0]^2/r[0],r); simplify(R1*r[0]/V[0]^2);

rho((diff(u(r, theta, z, t), t))*V[0]^2/r[0]+u(r, theta, z, t)*V[0]((diff(u(r, theta, z, t), r))*V[0]/r[0])+v(r, theta, z, t)*V[0]^2*(diff(u(r, theta, z, t), theta))/(r*r[0])+w(r, theta, z, t)*V[0]^2*(diff(u(r, theta, z, t), z))/r[0]-v(r, theta, z, t)^2*V[0]^2/(r*r[0]))+(diff(p(r, theta, z, t), r))*rho*V[0]^2/r[0]

 

((diff(p(r, theta, z, t), r))*rho*V[0]^2+rho((w(r, theta, z, t)*V[0]^2*(diff(u(r, theta, z, t), z))*r+(diff(u(r, theta, z, t), t))*V[0]^2*r+u(r, theta, z, t)*V[0]((diff(u(r, theta, z, t), r))*V[0]/r[0])*r*r[0]-v(r, theta, z, t)^2*V[0]^2+v(r, theta, z, t)*V[0]^2*(diff(u(r, theta, z, t), theta)))/(r*r[0]))*r[0])/V[0]^2

(1)

 

Download 1.mw

 

 

Good day, please how can one solve these BVPs using FINITE DIFFERENCE METHOD in maple. Here is the problem FDM.mw

I have a worksheet. I edit some variables' value. I then execute the whole worksheet to see how the graphs change. But the graphs generated by display command do not appear. All other calculations update fine. 

To overcome this. I save worksheet with my new variable values. Close the worksheet. Reopen it. Execute it. And now the graphs appear fine.

 

Hi

I'm using Maple 17 on Windows 8 (64-bit).

I have noticed that when I use the 'spacecurve' command and try to display it with the 'display' command, nothing shows up. I made sure that I used 'with(plots)' and 'with(plottools)', still nothing. However 'plot3d' works fine. I think it has something to do with the version of Java I'm using but I don't know what. Any help is welcome, thx

Specifications of my laptop:

Graphics: NVIDIA Geforce GT 740m

Processor: Intel(R) Core(TM) i7-3630QM (2.40GHz)

Ram: 6,00 GB

OS: Windows 8.1

I have a plot of a sinusoidal function(cos_phi) which changes with incrementing values of variable k. When this function goes above 1 or below -1 I would like to have the range of k for which it occurs outputed somehow. Would anybody know how to do this?

Hello,

• Is there a simple way to find the domain for the real solutions of f(x)?

• And is there a way to let maple get the part of f(x) with the sqrt?
   (not by typing it by hand as I dit below)

• Is there a way to write the summary of the found domains in one line?

Thanks for your help. 





restart:
# How to find the Domain for real solutions for x?
f(x):=(x-1+sqrt(x^2-3*x+2))/(x-1);
discont_for_x=discont(f(x),x);
# x<>+1 (because the de denom=0 is not allowed)
denom(f(x))=0;
x={solve(denom(f(x))=0,x)};
# x<=1 union  2<=x (because the part under the sqrt must be >=0 to give Real solutions)
sqrt(x^2-3*x+2);
0<=x^2-3*x+2;
x=solve(0<=x^2-3*x+2,x);




5 6 7 8 9 10 11 Last Page 7 of 61