## 94 Reputation

16 years, 94 days

## Thanks you...

Thanks you everybody all of  yours  comments are right .  I am a primer in Maple and I have one more question.

I suppose Global Optimization Toolbox is inside Maple. I follows the way of Robert but it does not work  to me .

In my worksheet does not show me the final number that Robert obtain. (M, k and q)

I  would like to know what happens?. I just did in  this way

>restart;

>DATA:=

[[13.2621 , 0.0012],

[14.0740 , 0.0017],

[15.4272 , 0.0031],

[16.7803 , 0.0063],

[18.1335 , 0.0174],

[19.2161 , 0.0317],

[20.5692 , 0.0598],

[21.6518 , 0.0821],

[23.0049 , 0.1501],

[24.0875 , 0.2061],

[25.1700 , 0.2742],

[26.5232 , 0.3534],

[27.3351, 0.4852],

[28.6883 , 0.5337],

[29.2295 , 0.6059],

[30.5827, 0.7565],

[32.4772 , 1.0723],

[34.1010 , 1.1068],

[34.6422 , 1.2173]]:

f:= x -> M*( (1 - ( 1 - q*(0.0012/M)^(1-q))*exp(-k*q*x)) /q)^(1/(1-q)) :

residuals := map(p -> (f(p[1])-p[2]), DATA):

k=0..1, q=0.001 ..1, M=40..1000);

Do I also define  after restart  with(GlobalOptimization) but did not give me any number.

Do I have to install something to work Tool Box Optimization ?

What do I have to do ?

## other way...

In Linux you  can use  xmaple -cw  in order to work in a classic form

## How can I plot this solutions ?...

Thanks Robert ,

the program runs .  so now I need to plot this numerical  solutions , I did this but I think is not correct.

restart;
with(PDEtools):
PDE:= [diff(u(x,t),t)= u(x,t)*(1-u(x,t))*(u(x,t) -v(x,t))+ diff(u(x,t),x,x), diff(v(x,t),t)=u(x,t)-v(x,t)];
IBC := {u(x, 0) = tanh(x), v(x, 0) = 0, u(-10,t) = 0, u(10,t) = 0};

pds := pdsolve(PDE,IBC,[u,v],numeric);
p1:=pds:-plot(t=10,numpoints=50);
plots[display]({p1});

I would like to plot e.g:  u(x,t) vs v(x,t) and so on. Any coment will be so usefull, in maple's help there is not any examples for PDE system.

## How can I plot this solutions ?...

Thanks Robert ,

the program runs .  so now I need to plot this numerical  solutions , I did this but I think is not correct.

restart;
with(PDEtools):
PDE:= [diff(u(x,t),t)= u(x,t)*(1-u(x,t))*(u(x,t) -v(x,t))+ diff(u(x,t),x,x), diff(v(x,t),t)=u(x,t)-v(x,t)];
IBC := {u(x, 0) = tanh(x), v(x, 0) = 0, u(-10,t) = 0, u(10,t) = 0};

pds := pdsolve(PDE,IBC,[u,v],numeric);
p1:=pds:-plot(t=10,numpoints=50);
plots[display]({p1});

I would like to plot e.g:  u(x,t) vs v(x,t) and so on. Any coment will be so usefull, in maple's help there is not any examples for PDE system.

## Irving Rondon In this...

Irving Rondon

In this problem , we can solve numerically a PDE (in this case nonlinear),  then we can save it in a data file.
Thanks for the comment and improvement.

restart;
g:=0.2:
PDE := diff(u(x,t),t,t) -diff(u(x,t),x,x) + g*diff(u(x,t),t) - 1/2*(u(x,t)-u(x,t)^3)=0 ;
IBC := {u(x,0)= tanh(x),u(-15,t)= -1,u(15,t)= 1 ,D[2](u)(x,0)= -1/(cosh(x))^2}:
sol := pdsolve(PDE,IBC,'numeric',u(x,t)):
ut:=sol:-value(u(x,t),output=listprocedure):
file := "/home/irving/mydatos.dat":
for tt from 0.2 to 10 by 0.2 do
for xx from -15 to 15 by 0.5 do
fprintf(file,"%f %f %lf\n",tt,xx,rhs(ut[3])(xx,tt)):
end do:
end do:
fclose(file):

Hi  David