Maple 17 Questions and Posts

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

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 keep getting an error about the while. It is calling it an invalid if statement.  It may relate to semi colons, but I cannot find any errors myself. Please help.

InterpolIDW2:=proc(n,rwin,mink,p,R,IR)       

local ix,iy,i,j,i0,i1,j0,j1,k;      

local count,wgt,top,bot,hp;      

print(`n=`,n,`rwin=`,rwin,`mink=`,mink,`p=`,p);      

hp:=p/2;        

for iy from 1 to n do      

for ix from 1 to n do           

if (IR(ix,iy)=0) then                

i0:=max(1,ix-rwin);  i1:=min(n,ix+rwin);                

j0:=max(1,iy-rwin);  j1:=min(n,iy+rwin);                 

k:=add(add(IR(i,j),i=i0..i1),j=j0..j1)                                                                

while (k<mink )do                              

if(i0>1) then                                       

i0:= i0-1;                                       

k:= k+ add(IR(i0,j),j=j0..j1)                              

end if;                              

if(i0<1) then                                        

i0:=i0+1;                                        

k:= k+ add(IR(i0,j),j=j0..j1)                              

end if;                              

if(j0>1) then                                        

  j0:=j0-1;                                       

  k:= k+ add(IR(i,j0),i=i0..i1)                         

  end if;                           

 if(j0<1) then                                

 j0:= j0+1;                                         

k:= k+ add(IR(i,j0),i=i0..i1)                             

end if;                         

end do;                  

top:=0;  bot:=0;                

for j from j0 to j1 do                

for i from i0 to i1 do                      

if (IR(i,j)<>0) then                           

wgt:=1/evalf[14](((ix-i)^(2)+(iy-j)^(2))^(hp));                           

top:=top+wgt*R(i,j);                           

bot:=bot+wgt;                      

end if;                

end do;                

end do;                

R(ix,iy):=top/bot;           

end if;      

end do;      

end do;  

end proc:

Hi there,

is it possible to have the legend of a pointplot accepting arguments?

Say I have an array of 3 values (e.g. p:=[1.5,2,2.5]) representing a given parameter for a function. When representing this function by means of a plot, I would like the legend (legend="Parameter " + value in array; legend=["Parameter", "Parameter", "Parameter") to accept the contents of the array, without entering the values manually:

Parameter 1.5

Parameter 2

Parameter 2.5

 

How can this be achieved?

 

Thanks,

jon

Hi! I have a matlab worksheet that i need to convert it to Maplesoft. Is it possible?

Regards

Hikmat

hi.i am a problem with following dsolve.please help me....thanks alot

dsys3 := {10*f2(x)+12*(diff(f1(x), x))+14*f3(x) = 0, 2*(diff(f1(x), x, x))+4*(diff(f2(x), x))+6*(diff(f3(x), x)) = 0, 16*(diff(f3(x), x, x, x, x))+19*(diff(f3(x), x, x))+22*(diff(f1(x), x))+25*f2(x)+27*f3(x)+29*f3(x)+31+32 = 0, f1(0) = 0, f1(1) = 0, f2(0) = 0, f2(1) = 0, f3(0) = 0, f3(1) = 0, ((D@@1)(f1))(0) = 0, ((D@@1)(f1))(1) = 0, ((D@@1)(f2))(0) = 0, ((D@@1)(f2))(1) = 0, ((D@@1)(f3))(0) = 0, ((D@@1)(f3))(1) = 0}; dsol5 := dsolve(dsys3, 'maxmesh' = 500, numeric, range = 0 .. 1, abserr = .1, output = listprocedure); fy3 := eval(f3(x), dsol5); fy2 := eval(f2(x), dsol5); fy1 := eval(f1(x), dsol5)ERROR.mw

 

 

 

the final result I want to get should be b*x

Thank you.

How can error of invalid range be corrected FDM.mw

I need create a matrix with 3 dimensions, but I don't know how can I do this. The variable that I need store could be write in this form:


>S[i,j,k];

I don't want write this with subscript but like a matrix. 

Hi all

kx,ky is the wavenumber, how can I get the 4 cases of piecewise function according to kx=0,kx≠0 and ky=0,ky≠0. Thanks

J := `assuming`([4*(int(int(JJ*exp(-I*(kx*x+ky*y))*sin(2*l*pi*x/a)*sin(2*k*pi*y/b), x = 0 .. a, AllSolutions), y = 0 .. b, AllSolutions))/(a*b)], [k::posint, l::posint, a > 0, b > 0, JJ > 0])

Hi there,

I was trying to simulate the behaviour of a one-variable, discrete-time function having three parameters.

The function reads

M[n+1]=(b·theta^(m)·R[n])/(theta^(m)+R[n]^m)

defined for b, theta, m > 0

Say I want to simulate the function for the following values

b := [seq(1 .. 10, 1)];
theta := [seq(1 .. 5, 1)];
m := [seq(1 .. 2, 1)];

for n from 1 to 10.

 

I guess I need to build a 4-dimension array. But I was not able to find the right way to do this: should I use the Array strucutre? and if yes, how would I do it? As far as I've read, indexing would be an issue: should I create special indexing functions?

If I'm not wrong Maple matrices (Matrix) are just 2D.

 

Once the values of M computed, I would like to generate the corresponding plots, varying one parameter while the other two are fixed, and drawing the different M's in the same plot.

How can I achieve this?

Furthermore, if I would like to generate all possible combinations, I guess I would need to insert the solution given to the above question within a for loop. Will Maple display all plots or will it overlap/overwrite the preceding plot if used within a loop?

 

Thanks,

jon

Hi there,

first post. I am a beginner both with Maple and this forum, so please forgive my mistakes. Just here to learn.

I could not successfully use the Maple editor here, so the code goes as plain text, although I also attach the code: MapleSimulation_test.mw.

I am trying to simulate the function below for certain values of the parameters, but when executing the loop, Maple prints just R. Can anyone tell me where my error is, please?

 

f := .25; g := 1; R[0] = 5; R[1] = 4.8; nDays := 30;

lambda1:=(1 - f + sqrt((1 - f) + 4*g*f)*1/2;

lambda2:=(1 - f - sqrt((1 - f) + 4*g*f)*1/2;


       -lambda2*R[0] + R[1]
k1:=--------------------------;
       lambda1 - lambda2

       lambda2*R[0] - R[1]
k2:=-------------------------;
      lambda1 - lambda2

R:=n-> k1*lambda1^n + k2*lambda2^n


for n from 2 to nDays
do R:=evalf(subs(n=%,R));
od;

Good day everyone, please help in writing finite difference algorithm for these coupled nonlinear ODE. See it here Algorithm.mw 

As title.

 

While  I can  decide velocity,charge and Distance.

 

 

 

Greetings to all!

Recently I encouter the following issue:

Maple (version 17) coudn't recognize that 20.0 equals with 20 and with 20.00. Believe me, this is very annoying!

Do I miss something? Is there any command that do the trick?

 

Thank you!

Giorgos K.

 

 

First 30 31 32 33 34 35 36 Last Page 32 of 61