Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

expect to export a series of graphs, but no diagram,

 

then i debug to export one diagram, it is success, why in this case not export

https://drive.google.com/file/d/0B2D69u2pweEvcDZVZ0tsRTc2dTg/edit?usp=sharing

restart;
with(combinat):
list1 := permute([a, b, a, b, a, b], 3);
list1a := subs(b=1,subs(a=0, list1));
n := 3;
list1a := permute([seq(seq(k,k=0..1),k2=1..n)], n);
list2 := permute([a, b, c, d, e, f, g, h, a, b, c, d, e, f, g, h, a, b, c, d, e, f, g, h], 3);
list3 := subs(h=18,subs(g=17,subs(f=16,subs(e=15,subs(d=14,subs(c=13,subs(b=12,subs(a=11,list2))))))));
list3 := permute([seq(seq(k,k=11..18),k2=1..3)], 3);
Iter:= iterstructs(Permutation([seq(seq(k,k=11..(10+nops(list1a))),k2=1..3)]), size=3):
list3b := [];
while not Iter[finished] do
p:= Iter[nextvalue]();
list3b := [p, op(list3b)];
end do:
list5 := Matrix(nops(list1a)*nops(list3), 1);
count := 1;
for n from 1 to nops(list3) do
temp1 := subs(1=list1a[1],list3[n]);
for k from 11 to nops(list1a)+10 do
temp1 := subs(k=list1a[k-10],temp1);
od;
list5[count] := temp1;
count := count + 1;
od;
Lfh := proc(numoflevel, hx, fx, varx)
if numoflevel = 1 then
hello := 0;
for kk from 1 to nops(var) do
hello := hello + diff(hx[kk], varx[kk])*fx[kk];
od;
return hello;
else
hello := 0;
for kk from 1 to nops(var) do
hello := hello + diff(Lfh(numoflevel-1, hx, fx, varx), varx[kk])*fx[kk];
od;
return hello;
end if;
end proc:
CheckRelativeRankZero := proc(h1, f1, g1,variables1,Count)
IsFinish := 0;
Result := 0;
for ii from 1 to 8 do
if IsFinish = 0 then
Lf2h := Lfh(ii,h1,f1,variables1);
Print(“Lf2h=”);
Print(Lf2h);
Lgf2h := Lfh(1,[seq(Lf2h,n=1..nops(variables1))],g1,variables1);
if Lgf2h = 0 then
print(“Lgf2h = 0”)
print(f1);
print(Lf2h);
print("find at ", ii);
IsFinish := 1;
Result :=Lf2h;
end if;
end if;
od;
return Result;
end proc:
IsZeroMatrix := proc(h1)
Iszero := 1;
for ii from 1 to 3 do
for jj from 1 to 3 do
if h1[ii][jj] <> 0 then
Iszero := 0;
end if
od;
od;
return Iszero;
end proc:
with(combstruct):
list6:= convert(list5, list):
list7 := [];
for ii from 1 to nops(list6) do
if list6[ii] <> 0 then
list7 := [list6[ii], op(list7)];
end if;
od;
with(LinearAlgebra):
with(VectorCalculus):
varlist := [x1, x2, x3];
Iter:= iterstructs(Permutation(list7), size=2):
Count := 1;

with(DEtools):
Iter:= iterstructs(Permutation(list7), size=2):
Count := 1;
list8 := [];
while not Iter[finished] do
p:= Iter[nextvalue]();
I1 := 0;
I2 := 0;
if IsZeroMatrix(p[1]) = 0 and IsZeroMatrix(p[2]) = 0 then
group1 := Matrix(p[1]);
for ii from 1 to 3 do
for jj from 1 to 3 do
if group1[ii][jj] = 1 then
I1 := I1 + varlist[ii]*varlist[jj];
end if;
od;
od;
group2 := Matrix(p[2]);
for ii from 1 to 3 do
for jj from 1 to 3 do
if group2[ii][jj] = 1 then
I2 := I2 + varlist[ii]*varlist[jj];
end if;
od;
od;
f2:=[I1, I2];
g2:=[0,-1,1];
h2:=[x1,0,0];
Lf2h := CheckRelativeRankZero(h2,f2, g2, varlist, Count);
print(“Lf2h=”);
print(Lf2h);
RightSide := MatrixMatrixMultiply(Matrix([[0,diff(I2, varlist[3]),-diff(I2,varlist[2])],[-diff(I2, varlist[3]),0,diff(I2, varlist[1])],[diff(I2, varlist[2]),-diff(I2, varlist[1]),0]]), Matrix([[diff(I1, varlist[1])],[diff(I1, varlist[2])],[diff(I1, varlist[3])]]));
print(“RightSide”);
print(RightSide);
Lf2_h := Lfh(1, Lf2h, f2, varlist);
LgLf_h := Lfh(1,Lfh(1,h2,f2,varlist),g2, varlist);
if LgLf_h = 0 then
u:=0;
else
u := -Lf2_h/LgLf_h;
end if;
newsys := [Diff(x1(t),t) = subs(x3=x3(t),subs(x2=x2(t),subs(x1=x1(t),RightSide[1][1]))) + g[1]*u,
Diff(x2(t),t) = subs(x3=x3(t),subs(x2=x2(t),subs(x1=x1(t),RightSide[2][1]))) + g[2]*u,
Diff(x3(t),t) = subs(x3=x3(t),subs(x2=x2(t),subs(x1=x1(t),RightSide[3][1]))) + g[3]*u];
eval(plotsetup):
`plotsetup/devices`[jpeg]:=[jpeg,`plot.jpg`,[],[],``]:
plotsetup(jpeg, plotoutput=cat(cat(`testhamiplot`, Count),`.jpg`),plotoptions=`height=700,width=800`);
DEplot3d(value(newsys), [x1(t), x2(t), x3(t)], t = 0..1,[[x1(0) = 1, x2(0) = 1, x3(0) = 1]]);

Count := Count +1;
end if;
end do:

when i got this error, i am confused i guess t is independant variable, x1,y1,z1 are dependant variables

 

x11 := [0.208408965651696e-3, -0.157194487523421e-2, -0.294739401402979e-2, 0.788206708183853e-2, 0.499394753201753e-2, 0.191468321959759e-3, 0.504980449104750e-2, 0.222150494088535e-2, 0.132091821964287e-2, 0.161118434883258e-2, -0.281236534046873e-2, -0.398055875132037e-2, -0.111753680372819e-1, 0.588868146012489e-2, -0.354191562612469e-2, 0.984082837373291e-3, -0.116041186868374e-1, 0.603027845850267e-3, -0.448778128168742e-2, -0.127561485214862e-1, -0.412027655195339e-2, 0.379387381798949e-2, -0.602550446997765e-2, -0.605986284736216e-2, -0.751396992404410e-2, 0.633613424008655e-2, -0.677581832613623e-2]:
y11 := [ -21321.9719565717, 231.709204951251, 1527.92905167191, -32.8508507060675, 54.9408176234139, -99.4222178124229, -675.771433486265, 42.0838668074923, -12559.3183308951, 5.21412214166344*10^5, 1110.50031772203, 3.67149699000155, -108.543878970269, -8.48861069398811, -521.810552387313, 26.4792411876883, -8.32240296737599, -1085.40982521906, -44.1390030597906, -203.891397612798, -56.3746416571417, -218.205643256096, -178.991498697065, -42.2468018350386, .328546922634921, -1883.18308996621, 111.747881085748]:
z11 := [ 1549.88755331800, -329.861725802688, 8.54200301129155, -283.381775745327, -54.5469129127573, 1875.94875597129, -16.2230517860850, 6084.82381954832, 1146.15489803104, -456.460512914647, 104.533252701641, 16.3998365630734, 11.5710907832054, -175.370276462696, 33.8045539958636, 2029.50029336951, 1387.92643570857, 9.54717543291120, -1999.09590358328, 29.7628085078953, 2.58210333216737*10^6, 57.7969622731082, -6.42551196941394, -8549.23677077892, -49.0081775323244, -72.5156360537114, 183.539911458475]:
a1 := Diff(x1(t),t) = k1*x1(t)+ k2*y1(t)+ k3*z1(t);
b1 := Diff(y1(t),t) = k4*x1(t)+ k5*y1(t)+ k6*z1(t);
c1 := Diff(z1(t),t) = k7*x1(t)+ k8*y1(t)+ k9*z1(t);
ICS:=x1(0)=x11[1],y1(0)=y11[1],z1(0)=z11[1];
sol:=dsolve({a1,b1,c1,ICS}, numeric, method=rkf45, parameters=[k1,k2,k3,k4,k5,k6,k7,k8,k9,k10,k11,k12]);
ans:=proc(p1,p2,p3) sol(parameters=[x1=p1,y1=p2,z1=p3]); end proc:
tim := [seq(n, n=1..27)];
FitParams:=Statistics:-NonlinearFit(ans, [x11, y11, z11], tim, initialvalues=<0.5,0.5,0.5>, output=parametervalues);

 

 

4th_order.mw Is it possible to solve this ODE with perturbation method using maple? If yes, please give the procedure.

Thanks.

Can one solve nonlinear ODE with perturbation method in maple? If yes, please the procedure.

x11 := Vector([0.208408965651696e-3, -0.157194487523421e-2, -0.294739401402979e-2, 0.788206708183853e-2, 0.499394753201753e-2, 0.191468321959759e-3, 0.504980449104750e-2, 0.222150494088535e-2, 0.132091821964287e-2, 0.161118434883258e-2, -0.281236534046873e-2, -0.398055875132037e-2, -0.111753680372819e-1, 0.588868146012489e-2, -0.354191562612469e-2, 0.984082837373291e-3, -0.116041186868374e-1, 0.603027845850267e-3, -0.448778128168742e-2, -0.127561485214862e-1, -0.412027655195339e-2, 0.379387381798949e-2, -0.602550446997765e-2, -0.605986284736216e-2, -0.751396992404410e-2, 0.633613424008655e-2, -0.677581832613623e-2]):
y11 := Vector([ -21321.9719565717, 231.709204951251, 1527.92905167191, -32.8508507060675, 54.9408176234139, -99.4222178124229, -675.771433486265, 42.0838668074923, -12559.3183308951, 5.21412214166344*10^5, 1110.50031772203, 3.67149699000155, -108.543878970269, -8.48861069398811, -521.810552387313, 26.4792411876883, -8.32240296737599, -1085.40982521906, -44.1390030597906, -203.891397612798, -56.3746416571417, -218.205643256096, -178.991498697065, -42.2468018350386, .328546922634921, -1883.18308996621, 111.747881085748]):
z11 := Vector([ 1549.88755331800, -329.861725802688, 8.54200301129155, -283.381775745327, -54.5469129127573, 1875.94875597129, -16.2230517860850, 6084.82381954832, 1146.15489803104, -456.460512914647, 104.533252701641, 16.3998365630734, 11.5710907832054, -175.370276462696, 33.8045539958636, 2029.50029336951, 1387.92643570857, 9.54717543291120, -1999.09590358328, 29.7628085078953, 2.58210333216737*10^6, 57.7969622731082, -6.42551196941394, -8549.23677077892, -49.0081775323244, -72.5156360537114, 183.539911458475]):
a1 := Diff(x1(t),t) = k1*x1(t)+ k2*y1(t)+ k3*z1(t)+k4*u(t);
b1 := Diff(y1(t),t) = k5*x1(t)+ k6*y1(t)+ k7*z1(t)+k8*u(t);
c1 := Diff(z1(t),t) = k9*x1(t)+ k10*y1(t)+ k11*z1(t)+k12*u(t);
ICS:=x1(0)=x11[1],y1(0)=y11[1],z1(0)=z11[1],u(0)=7;
Zt := rhs(dsolve({a1,b1,c1,ICS},[x1(t),y1(t),z1(t),u(t)]));
Params := NonlinearFit(Re(Zt),<seq(k,k=0..N)>, C, [t], parameternames=[k1,k2,k3,k4,k5,k6,k7,k8,k9,k10,k11,k12], output=parametervalues):
A := eval(a, Params):
B := eval(b, Params):
a = A;
b = B;

 

i wait for a long time for dsolve still evaluating

Hi. I'd like to find the solution closest to zero for sum(abs(f(k, m, n)+g(k, m, n)), n = i .. j) , when a < m, n < b . 

Have trouble wrapping my head around how to do that and would appreciate any help.

Even better would be to find a solution where the maximum absolute value of f(k, m, n) + g(k, m, n) is minimized for n = i .. j) and when a < m, n < b , but I'm guessing the sum would be easier, and close enough.

Maybe I'm barking up the wrong tree getting this done with Maple, but I'm hopeful.

Thank you for looking

function [y g] = ques5
% using Simpson Formula to approximate the integration
% input:
% f(x): [a b]


end
% use Euler formula to compute function y
for i = 1:N
    if i ==1

legend('numerical y','exact y','numerical g','exact g')

function g = f2g(a,b)
% f(x) = x
g = (b-a)/6*(a + 4*(a+b)/2 + b);


ican use matlab to solve this problem but not maple
please help

Two questions:

The algortihms that Groebner[Basis] uses at each step computes some "tentative" or "pseudo-basis". The "tentative" basis is not a Groebner basis but it is in the ideal generated by the original system of polynomial eq.

1) Is this correct ? Provided this is correct, then

2) How can one retrive the last "tentative" basis?
 If I just use timelimit I can abort the computations but how can one retrive the last computation?

 

Hello, I am trying to do a fourier transfrom using the package < DiscreteTransfroms >.

The function is an gaussian function for now,

Here is the code I tried

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

restart

with(DiscreteTransform):

> X := Vector(1000, proc (k) options operator, arrow; (1/200)*k-5/2 end proc);
> Y := Vector(1000, proc (k) options operator, arrow; evalf(exp(-10*((1/100)*k-5)^2)) end proc);

> X2, Y2 := FourierTransform(X, Y);
Vector[column](%id = 18446744080244879358),

Vector[column](%id = 18446744080244879478)
> plot(X2, Re(Y2));

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

The program returns two vector, X2 and Y2 who are supposed to be the fourier transforme of a gaussian so.. a gausian but when I plot the result X2 on the horizontal and Y2 on vertical, the graph doesn't resemble a gaussian function or any function at all.

 

Please help!!

Alex

Good afternoon sir.

 

I request your kind support to the above cited query.

 

 

With thanks & Regards

 

M.Anand

Assistant Professor in Mathematics

SR International Institute of Technology,

Hyderabad, Andhra Pradesh, INDIA.

My attempt to export array data using the Browse>Export option when looking at the data fails to work as needed.

The exported data always start in cell A1 of the Excel worksheet even a different starting cell is entered into the Matrix Browser export window.

In summary, my experience is that the Matrix Browser matrix export in Maple 16 and Maple 17 ignores the information about the intended starting destination cell in the Excel file.

Does anyone find that the Matrix Browser exports to a starting Microsoft Excel cell other than A1? 

This exporting with Matrix Browser worked find in Maple 15.  It has been broken in Maple 16 and 17, including Maple 17.02.

Thanks.

 

I am to program a computation on maple.
But I get the message :

Error, unable to match delimiters

followed by the full sequence of command.

 

How can I do to fix this problem?

restart;

Lfh := proc(numoflevel, h, fx, var)

if numoflevel = 1 then

        hello := 0;

        for i from 1 to nops(var) do

                hello := hello + diff(h[i], var[i])*fx[i];

        od;

        return hello;

else

        hello := 0;

        for i from 1 to nops(var) do

                hello := hello + diff(Lfh(numoflevel-1, h, fx, var), var[i])*fx[i];

        od;

        return hello;

end if;

end proc:

f:=[x3-x2^3,-x2,x1^2-x3];

g:=[0,-1,1];

h:=[x1,0,0];

variables := [x1,x2,x3];

Lf1h := Lfh(1,h,f,variables);

Lgf1h := Lfh(1,[seq(Lf1h,n=1..nops(variables))],g,variables);

Lf2h := Lfh(2,h,f,variables);

Lgf2h := Lfh(1,[seq(Lf2h,n=1..nops(variables))],g,variables);

Lf3h := Lfh(3,h,f,variables);

Lgf3h := Lfh(1,[seq(Lf3h,n=1..nops(variables))],g,variables);

 

i doubt that my book example is wrong

it said relative rank is 2, but i can not find any zero when Lgf3h

if i continue to Lgf4h, Lgf5h, Lgf6h...etc, still no zero what does it mean?

Example

Diff(x1,t) = x2^2,
Diff(x2,t) = u,
y = x1

result in

Diff(y,t$2)-4*u^2*Diff(y,t) = 0
2*u*x2 - Diff(y,t^2) = 0
x1 - y = 0

is it possible a general and generic method to apply some steps on system below

Diff(u1, t) = u1*u2-u1*u3,
Diff(u2, t) = -u1*u2+u2*u3-(1/2)*(conjugate(u2-u3)*(u1*u2-u1*u3)+conjugate(u1)*(-u1*u2+u2*u3)-conjugate(u1)*(u1*u3-u2*u3))/conjugate(u1),
Diff(u3, t) = u1*u3-u2*u3+(1/2)*(conjugate(u2-u3)*(u1*u2-u1*u3)+conjugate(u1)*(-u1*u2+u2*u3)-conjugate(u1)*(u1*u3-u2*u3))/conjugate(u1),
y = u1

Here is the question:Prior to this question I was given f(z)=z^2+1, N(z)=(z^2-1)/(2z), T(z)=z-I/z+I such that T(N^k (z))=(T(z))^2^k. And L is a set of number on the real axis. Now the question is that given we have two regions of the complext plane as follow:

R+ = {z : Nk{z) -> i as k -> ∞}; R- = {z : Nk(z) -> -i as k -> ∞}.

Draw a diagram to illustrate these regions, the line L and the roots i and -i. We call R+ the basin of attractionfor the root +i, and similarly R-is the basin of attraction for the root -i.

 Show that if z is on the set L (the common boundary of the two regions R+ and R_, then Nk(z) stays on L for all values of k. (This is easy once you identify what L is.) So in this case iteration does not produce a root at all.

So basically my problem is that the fact I'm not very familar with the commands to draw such diagram, and I don't know much about Newton's method to compute complex roots. It would be appreciated if anyone can help me how to get start with the question. Thanks.

 

First 205 206 207 208 209 210 211 Last Page 207 of 2097