vv

2304 Reputation

9 Badges

1 years, 240 days

MaplePrimes Activity


These are answers submitted by vv

The residuals are much smaller using LSSolve:

eq:=[seq(lhs(EQQ[i]),i=1..36)]:
Digits:=15:
s:=Optimization:-LSSolve(evalf(eq),iterationlimit=100000);


s := [0.960968723053680e-3, [AA[1] = -.347787136052672, AA[2] = 0.510086502851874e-1, AA[3] = 1.16178642934306, AA[4] = .283780970480705, AA[5] = 0.639701227912076e-1, AA[6] = 0.167348852743906e-2, AA[7] = .970111340350232, AA[8] = 0.123075237465221e-1, AA[9] = -2.56229943109674, AA[10] = .119761186424375, AA[11] = 0.514762128059566e-1, AA[12] = 0.653686059489268e-2, AA[13] = 1.17224901537396, AA[14] = 0.123075188025341e-1, AA[15] = -3.10469172766768, AA[16] = .119761196994863, AA[17] = 0.514762189628706e-1, AA[18] = 0.653685044254999e-2, AA[19] = .970010263800571, AA[20] = 0.122243656427024e-1, AA[21] = -2.56235367446998, AA[22] = .119187577004902, AA[23] = 0.512617524055109e-1, AA[24] = 0.636735006533654e-2, AA[25] = 1.17214793882475, AA[26] = 0.122243606766083e-1, AA[27] = -3.10474597103813, AA[28] = .119187587581231, AA[29] = 0.512617585634991e-1, AA[30] = 0.636733990163037e-2, AA[31] = .516890321334600, AA[32] = 0.510086073253494e-1, AA[33] = -1.15838655820066, AA[34] = .283780982288442, AA[35] = 0.639701289588585e-1, AA[36] = 0.167348506238467e-2]]

Digits:=40:
eval( evalf(eq), s[2]);


Unfortunately LSSolve seems to get stuck for Digits>15.

 

 

Because we already know what has to be proved, it could be done like this:

 

x1 := arcsin(1/2*(2+(2+(2+2^(1/2))^(1/2))^(1/2))^(1/2))

solve(sin(32*x)=expand(sin(32*x1)),allsolutions);

(1/32)*Pi*_Z1

(1)

a:=subs( indets(%)[]=n,%);

(1/32)*Pi*n

(2)

min[index]( [seq(abs(x1 - a), n=1..16)] );

15

(3)

'x1'=eval(a, n=%);

x1 = (15/32)*Pi

(4)

 


 

restart;

sys:= [diff(f(x, y, t, u), u, t)-(diff(f(x, y, t, u), x, y)) = 0,
       diff(f(x, y, t, u), u, u) = 0,
       diff(f(x, y, t, u), u, y) = 0,
       diff(f(x, y, t, u), x, u) = 0,
       diff(f(x, y, t, u), x, x) = 0,
       diff(f(x, y, t, u), y, y, y) = 0];

[diff(diff(f(x, y, t, u), t), u)-(diff(diff(f(x, y, t, u), x), y)) = 0, diff(diff(f(x, y, t, u), u), u) = 0, diff(diff(f(x, y, t, u), u), y) = 0, diff(diff(f(x, y, t, u), u), x) = 0, diff(diff(f(x, y, t, u), x), x) = 0, diff(diff(diff(f(x, y, t, u), y), y), y) = 0]

(1)

S0:=pdsolve(sys);

{f(x, y, t, u) = (_F3(t)*y+_F4(t))*x+(_F3(t)+_C1)*u+(1/2)*_F7(t)*y^2+_F8(t)*y+_F9(t)}

(2)

pdetest(S0,sys);  # bug

[diff(_F3(t), t)-_F3(t), 0, 0, 0, 0, 0]

(3)

S00:=eval(S0, _F3(t)=c*exp(t));

{f(x, y, t, u) = (c*exp(t)*y+_F4(t))*x+(c*exp(t)+_C1)*u+(1/2)*_F7(t)*y^2+_F8(t)*y+_F9(t)}

(4)

pdetest(S00,sys);  # So, S00 is a solution.  But is it the general one?

[0, 0, 0, 0, 0, 0]

(5)

Let us try to answer this question.

 

 

#####################################

 

S1:=pdsolve(sys[2..-1]);  # remove the first PDE

{f(x, y, t, u) = (1/2)*(2*_F5(t)+y*(_F3(t)*y+2*_F4(t)))*x+_F8(t)*u+(1/2)*_F9(t)*y^2+_F10(t)*y+_F11(t)}

(6)

pdetest(S1,sys[2..-1]); #ckeck OK

[0, 0, 0, 0, 0]

(7)

pdetest(S1,sys);

[diff(_F8(t), t)-_F3(t)*y-_F4(t), 0, 0, 0, 0, 0]

(8)

solve(%,_F4(t));

{_F4(t) = -_F3(t)*y+diff(_F8(t), t)}

(9)

S2:=eval(S1,%);

{f(x, y, t, u) = (1/2)*(2*_F5(t)+y*(-_F3(t)*y+2*(diff(_F8(t), t))))*x+_F8(t)*u+(1/2)*_F9(t)*y^2+_F10(t)*y+_F11(t)}

(10)

# S2 should be the general solution of the initial system

pdetest(S2,sys);

[_F3(t)*y, 0, 0, 0, 0, 0]

(11)

# But it is not. Conclusion: the solution S1 of the system S[2..-1] is not the general one.
# So, probably S00 is not general too.
# It should be simple to check this by hand.

###########################################

 


 

Download pde-bug.mw

Edit.  I made a mistake when solving for _F4.
_F3  must be necessarily 0 (due to the presence of y)
So, actually S2 must be

So, indeed, S00 is not general (for example f = t*u+x*y is not contained in S00), but S1 could be after all correct; it would be interesting to check this by hand.
 

 

 

 

subs[eval](F = ( (x,y)->f(x)+g(y) ), F(x,x) );

(Of course [eval] is not mandatory, just to obtain th result evaluated.)

The problem reduces to find/guess  the next term(s) of the sequence:

1, -1/2, 1/12, -1/72, 1/504, -5/18144, 1/27216, -95/19813248

It should be obvious that without extra information this is impossible. Maybe Nostradamus ...

 

Edit. Example:
f := convert( series(cos(x)+x^2, x, 14), polynom):
L := [seq(coeff(f, x, n), n = 0 .. 12)];

    L := [1, 0, 1/2, 0, 1/24, 0, -1/720, 0, 1/40320, 0, -1/3628800, 0, 1/479001600]

rec := gfun:-listtorec(L, u(n));    # not the expected one
     rec := [{(n^3-26*n^2-449*n+538)*u(n+1)+(-707*n^3-1737*n^2+1283*n+393)*u(n+3), u(0) = 1, u(1) = 0, u(2) = 1/2}, ogf]

 


 

ImportMatrix("http://fs3.fex.net/get/245716150875/11071260/data.txt"):
V:=convert(%,Vector);

 

You have generated only a small number of partitions: 1401400 (=nops(P)),  the total number being bell(N-1) = 27644437.

N is too large for a brute force solution (and with your attempt to insert also the permutations, the needed memory is huge).
I think that a very good (or a heuristic) algorithm is needed here.

Optimization:-Maximize((1-y^2)/(x^2),{x^2 + y^2 <= 1, x>=1/2}, x=1/2..1,  y=-1..1  );
            [ 4., [x = 0.5, y = 0.0] ]

 

The answer should be obvious without Maple.
For f(u,v) = 1/(u+v)^2+4*u*v-1,

f(0+, 2) = - 3/4 < 0,  f(1, 1) > 0.
f being continuous in the connected domain (0,oo) x (0, oo),  f must be 0 somewhere.

inequal can be used only for two variables.

with(PolyhedralSets):
ps := PolyhedralSet({-5 <= 4*y1+2*y2+3*y3, -2 <= 3*y1+5*y2+2*y3, -1 <= y1+2*y2+y3, 0 <= y2, y1 <= 0}):
Plot(ps);

G:=convert(F,RootOf):
evala(AFactors(G));
convert(%,radical); #optional

 

#   GroupTheory:-PermParity(Perm(L));
GroupTheory:-PermParity(Perm([1,2,3,5,4]));

                               -1

 

Yes.

As a workaround:

plots:-contourplot(1/(x^2+y^2+0.001), x = -2 .. 2, y = -2 .. 2, contours = 5, grid = [500, 500]);

You need such extra variables only if max appears in the objective function.

Otherwise simply use  max(a,b) <= c   <==>  a<=c, b<=c.

Actually it's not difficult to solve a VRP via brute force (for small size problems of course).

VRP:=proc(c::Matrix(square), d::Vector, C::realcons)
local n:=upperbound(c,1),pars,p, S,Smin, minpars,k,
sumdists, permin, distpermin;

sumdists:=proc(p) c[1,p[1]]+c[1,p[-1]]+add(c[p[i],p[i+1]],i=1..nops(p)-1)  end;

permin:=proc(q)
   local P,i;
   P:=combinat:-permute(q);
   i:=min[index](sumdists~(P));
   [1,P[i][],1];
end;

distpermin:=proc(q)
   local P,i;
   if add(d[q])>C then return infinity fi;
   P:=combinat:-permute(q);
   min(sumdists~(P));
end;

pars:=combinat:-setpartition([seq(2..n)]);
minpars:=infinity; Smin:=[];
for S in pars do
  k:=add(distpermin(p), p=S);
  if minpars>k then minpars:=k; Smin:=S fi;
od;
minpars,permin~(Smin); 
end:

Examples (yours):

c := < 0, 26, 15, 20,  7, 25, 16, 24, 29;
      26,  0, 15, 23, 26, 33, 40, 38, 54;
      15, 15,  0, 24, 13, 20, 27, 35, 43;
      20, 23, 24,  0, 26, 42, 34, 15, 39;
       7, 26, 13, 26,  0, 18, 14, 31, 32;
      25, 33, 20, 42, 18,  0, 25, 49, 45;
      16, 40, 27, 34, 14, 25,  0, 32, 20;
      24, 38, 35, 15, 31, 49, 32,  0, 30;
      29, 54, 43, 39, 32, 45, 20, 30,  0 >:

d:=  < 0, 18, 26, 11, 30, 21, 16, 29, 37 >:

VRP(c,d,70);
     222, [[1, 8, 9, 1], [1, 3, 2, 4, 1], [1, 5, 6, 7, 1]]
VRP(c,d,100);
         187, [[1, 2, 3, 6, 5, 1], [1, 4, 8, 9, 7, 1]]
VRP(c,d,200);
             164, [[1, 5, 6, 3, 2, 4, 8, 9, 7, 1]]
VRP(c,d,50);
        253,   [[1, 5, 1], [1, 9, 1], [1, 2, 3, 1], [1, 4, 8, 1], [1, 6, 7, 1]]
VRP(c,d,36);
                          infinity, []

 

1 2 3 4 5 6 7 Last Page 1 of 30