Unanswered Questions

This page lists MaplePrimes questions that have not yet received an answer

delete this post, not maple related

 

apologies

how to make a table of newton raphson ? 
working is below 
printf("No           root                   x[i+1]                 abs(x[i+1]-x[i])\n"); for i to n do y[i] := evalf(x[i]+(-D1(x[i])+sqrt(D1(x[i])^2-2*f(x[i])*D2(x[i])))/D2(x[i])); x[i+1] := evalf(y[i]-f(y[i])/sqrt(D1(x[i])^2-2*f(x[i])*D2(x[i]))); printf("%d         %10.10f     %10.10f       %10.10e \n", i+1, x[i+1], f(x[i+1]), abs(x[i+1]-x[i])); if abs(x[i+1]-x[i]) < tol then print("approximate solution" = x[i+1]); print("No of iterations" = i+1); break end if end do
please help me 

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:

Hello.

I am novice here and I have an question about export animations frames into sequence of postscript files. I don't googled nothing about this theme.
Here is my question:

Is there an option to convert the animated picture into  sequence of separate images and then (eg using the program cycle) save this images as separate PostScript images? I know the possibility of exporting to GIF file and then converting them into PS file. But I do not have a PS file with a sequence of bitmap images. I would sufficed for me to be able to see a separate frame of animation (through any index).

Thanx Jaroslav Hajtmar

Using the fsolve commmand how does one solve for just the positive solutions and remove the dublicate values?

Thanks

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

Greetings to all.

I have run into a curious numeric event while computing Master theorem recurrences at this math.stackexchange.com link.

I do have to say that this one has me worried. I am referring to Maple 15 (X86 64 LINUX).

Try the following program in a new Maple session.

T := proc(n)
option remember;
    if n = 0 then return 0 end if; 9*T(floor(1/3*n)) + n*(1 + ilog[3](n))^3
end proc;

T_ex := proc(n)
local m, d;
option remember;
    d := convert(n, base, 3);
    m := ilog[3](n);
    add(3^j*(1 + m - j)^3*add(d[k + 1]*3^k, k = j .. m), j = 0 .. m)
end proc;

T(3^22-1)-T_ex(3^22-1);

The result is the following error message:

Error, (in T_ex) invalid subscript selector

Now try it again, in a new Maple session, but enter the following command first.

Digits := 50;

Now the result is

0

Consider the following program:

T := proc(n)
option remember;
    if n = 0 then return 0 end if; 9*T(floor(1/3*n)) + n*(1 + ilog[3](n))^3
end proc;

T_upper := proc(n)
local m;
option remember;
    m := ilog[3](n); 3^(2*m + 2)*sum(3^(-j)*j^3*(1 - 3^(-j)), j = 1 .. m + 1)
end proc;

T(3^22-1)-T_upper(3^22-1);

The result is

-30454808964204479209326

But if you precede the program with the command

Digits:=50;

the result is once more

0

This is reproducible (restart Maple every time) and quite frankly, seems rather serious to me. Could someone please look into this.

 

Marko Riedel

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

Hi every one,

Q1:

I tried to get the max $ min of a following function:

 

l:=1:alpha:=1:b:=100:k:=20:

eq1 := (alpha+(l+alpha)*u+alpha*k*u^2)*a =
u*(alpha+(l+alpha)*u+alpha*k*u^2)*(1+l*alpha*b/((alpha+(l+alpha)*u+alpha*k*u^2))):

I did this code but it seems it didnt work for this equation

maximize(eq, u=1..12, location);

minimize(eq, u=1..12, location);

Also, I think about solving the cubic i feel i'm so close to the solve but couldn't

factor((rhs-lhs)(eq1));

eq:=collect(%,u);

Q:=(a,u)->eq;sol:=evalf(solve(Q(a,u),u)): S:=array([],1..3): S[1]:=sol[1]:S[2]:=sol[2]:S[3]:=sol[3]:

Q2:

the same thing wanted to get the maximum and the minimum of the function v

here the code

restart;
eq1:=(alpha+(l+alpha)*u+alpha*k*u^2)*a=
u*(alpha+(l+alpha)*u+alpha*k*u^2)*(1+l*alpha*b/((alpha+(l+alpha)*u+alpha*k*u^2)));
eq2:=v=alpha*b*(1+u+k*u^2)/(alpha+(l+alpha)*u+alpha*k*u^2);
factor((rhs-lhs)(eq1));
eq1:=collect(%,u);
params:={l=10,alpha=0.5,b=100,k=20};
U:=[solve(eval(eq1,params),u)]; #3 solutions for u
#plots:-complexplot(U,a=0..20,style=point); #plot in the complex u-plane
vua:=eval(solve(eq2,v),params): #v expressed in terms of u and a
V:=eval~(vua,u=~U): #the 3 solutions for v in terms of a

## PLOT the function V
plot(V,a=0..75,v=0..100,color=black,labels=[a,v],axes=boxed,numpoints=90,linestyle=1,font=[1,1,18],thickness=2,tickmarks=[4,4],view=[0..65,25..100]);

I do appricaited any advises

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

http://homepages.lboro.ac.uk/~makk/MathRev_Lie.pdf

ode1 := Diff(f(x),x$2)+2*Diff(f(x),x)+f(x);
with(DEtools):
with(PDETools):
gen1 := symgen(ode1);
with(PDEtools):
DepVars := ([f])(t);
NewVars := ([g])(r);
SymmetryTransformation(gen1, DepVars, NewVars);

Error, invalid input: too many and/or wrong type of arguments passed to PDEtools:-SymmetryTransformation; first unused argument is [_xi = -x, _eta = f*x]


generator1 := rhs(sym1[3][1])*Diff(g, x)+ rhs(sym1[3][2])*Diff(g, b)

what is X1 and X2 so that [X1, X2] = X1*X2 - X2*X1 = (X1(e2)-X2(e1))*Diff(g, z) ?

is it possible to use lie group to represent a differential equation, and convert this group back to differential equation ? how do it do?

 

how to find symmetry z + 2*t*a, when you do not know before taylor calcaulation?

fza := z + 2*t*a;
fza := x;
fza := z + subs(a=0, diff(fza,a))*a;

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?

 

First 249 250 251 252 253 254 255 Last Page 251 of 334