tomleslie

13876 Reputation

20 Badges

15 years, 164 days

MaplePrimes Activity


These are answers submitted by tomleslie

Two worksheets below one executed in Maple 2020 and one in Maple 2021. As far as I can tell the outputs are identical - so what exactly is your issue??

And it looks like the ability to display worksheets inline on this site is broken - AGAIN!!

Download M2020.mw

Download M2021.mw

is that the OP does not upload a worksheet which demonstrates the problem.

I have no idea why posters seem incapable of using the big green up-arrow in the Mapleprimes toolbar, but since it happens so often, I have to conclude that this is a problem with the "user interface" on this site. The default method of posting a problem should be obvious - but apparently, it isn't.

Just to illustrate, the attached worksheet operates perfectly, which begs the question: what *else* is the OP doing which would stop this executing as intended??

  restart:
  plots:-animate( plots:-arrow,
                  [ < cos(theta),
                      sin(theta)
                    >,
                    width = [ 0.05,
                              relative
                            ],
                    view = [ -1 .. 2,
                             -1 .. 2
                           ],
                    color = "blue"
                  ],
                  theta = 0 .. Pi/2
                );

 

 

Download anim.mw

I left this problem running when I went to bed,

ifactor(1522605027922533360535618378132637429718068114961380688657908494580122963258952897654000350692006139);

and woke up to

(37975227936943673922808872755445627854565536638199)  (40094690950920881030683735292761468389214899724061)

 

 

 

a few extra digits can make - see the attached for the difference between s(26.88163506) and  s(26.88);

  g:=9.8;
  v0:=128;
  s0:=100;
  t0:0;
  s:=t->-0.5*g*t^2+v0*t+s0;
  s(t);
  solve(s(t)=0, t);
  t1:=%[2];
  s(t1);
  s(26.88163506);
  s(26.88);

9.8

 

128

 

100

 

0

 

proc (t) options operator, arrow; -.5*g*t^2+v0*t+s0 end proc

 

-4.90*t^2+128*t+100

 

-.7591860844, 26.88163506

 

26.88163506

 

0.1e-5

 

0.1e-5

 

.221440

(1)

 


 

Download digits.mw

the animation in the attached maybe?

  restart;
  with(plots):
  p1:=implicitplot(x^2 + y^2 = 1, x = -2 .. 2, y = -2 .. 2, color = black):
  animate
  ( implicitplot,
    [ abs(x + y*I - a) = 2*(1 - abs(x + y*I)),
      x = -1 .. 1,
      y = -1 .. 1,
      coloring=[red, white],
      filledregions=true
    ],
    a = -1.75 .. 1.75,
    frames = 100,
    background=p1
  );

 

 



Download anim2.mw
 

 

then I can come up with the attached, in which the general solution is

F(x, y, t, u, v) = _F1(y)*u, G(x, y, t, u, v) = _F1(y)*v

for the  "arbitrary" function  _F1(y) . The attached also shows that if I select pretty much any function for _F1(y), then the pdetest() command confirms the solution

restart

with(PDEtools)

sys2 := [diff(F(x, y, t, u, v), v, v) = 0, diff(F(x, y, t, u, v), u, u) = 0, diff(G(x, y, t, u, v), v, v) = 0, diff(F(x, y, t, u, v), u, v) = 0, diff(G(x, y, t, u, v), u, v) = 0, diff(G(x, y, t, u, v), u, u) = 0, diff(F(x, y, t, u, v), x, v) = 0, diff(G(x, y, t, u, v), x, v) = 0, diff(F(x, y, t, u, v), x, u) = 0, diff(G(x, y, t, u, v), x, u) = 0, diff(F(x, y, t, u, v), v)+diff(G(x, y, t, u, v), u) = 0, -(diff(G(x, y, t, u, v), v))+diff(F(x, y, t, u, v), u) = 0, -(diff(G(x, y, t, u, v), v))+diff(F(x, y, t, u, v), u) = 0, -(diff(F(x, y, t, u, v), v))-(diff(G(x, y, t, u, v), u)) = 0, -(2*(gamma*u^2+3*gamma*v^2+alpha*delta))*F(x, y, t, u, v)+2*u^3*gamma*(diff(G(x, y, t, u, v), v))+2*u*(2*v*gamma*G(x, y, t, u, v)+v^2*gamma*(diff(G(x, y, t, u, v), v))+alpha*delta*(diff(G(x, y, t, u, v), v)))-2*u^2*v*gamma*(diff(G(x, y, t, u, v), u))-2*v^3*gamma*(diff(G(x, y, t, u, v), u))-2*(diff(G(x, y, t, u, v), t))+diff(F(x, y, t, u, v), x, x) = 0, (2*(gamma*v^2+alpha*delta))*G(x, y, t, u, v)+2*u^3*gamma*(diff(F(x, y, t, u, v), v))+2*u*(-2*v*gamma*F(x, y, t, u, v)+v^2*gamma*(diff(F(x, y, t, u, v), v))+alpha*delta*(diff(F(x, y, t, u, v), v)))-2*v^3*gamma*(diff(F(x, y, t, u, v), u))-2*v*alpha*delta*(diff(F(x, y, t, u, v), u))+u^2*(6*gamma*G(x, y, t, u, v)-2*v*gamma*(diff(F(x, y, t, u, v), u)))-2*(diff(F(x, y, t, u, v), t))-(diff(G(x, y, t, u, v), x, x)) = 0]

[diff(diff(F(x, y, t, u, v), v), v) = 0, diff(diff(F(x, y, t, u, v), u), u) = 0, diff(diff(G(x, y, t, u, v), v), v) = 0, diff(diff(F(x, y, t, u, v), u), v) = 0, diff(diff(G(x, y, t, u, v), u), v) = 0, diff(diff(G(x, y, t, u, v), u), u) = 0, diff(diff(F(x, y, t, u, v), v), x) = 0, diff(diff(G(x, y, t, u, v), v), x) = 0, diff(diff(F(x, y, t, u, v), u), x) = 0, diff(diff(G(x, y, t, u, v), u), x) = 0, diff(F(x, y, t, u, v), v)+diff(G(x, y, t, u, v), u) = 0, -(diff(G(x, y, t, u, v), v))+diff(F(x, y, t, u, v), u) = 0, -(diff(G(x, y, t, u, v), v))+diff(F(x, y, t, u, v), u) = 0, -(diff(F(x, y, t, u, v), v))-(diff(G(x, y, t, u, v), u)) = 0, -2*(gamma*u^2+3*gamma*v^2+alpha*delta)*F(x, y, t, u, v)+2*u^3*gamma*(diff(G(x, y, t, u, v), v))+2*u*(2*v*gamma*G(x, y, t, u, v)+v^2*gamma*(diff(G(x, y, t, u, v), v))+alpha*delta*(diff(G(x, y, t, u, v), v)))-2*u^2*v*gamma*(diff(G(x, y, t, u, v), u))-2*v^3*gamma*(diff(G(x, y, t, u, v), u))-2*(diff(G(x, y, t, u, v), t))+diff(diff(F(x, y, t, u, v), x), x) = 0, 2*(gamma*v^2+alpha*delta)*G(x, y, t, u, v)+2*u^3*gamma*(diff(F(x, y, t, u, v), v))+2*u*(-2*v*gamma*F(x, y, t, u, v)+v^2*gamma*(diff(F(x, y, t, u, v), v))+alpha*delta*(diff(F(x, y, t, u, v), v)))-2*v^3*gamma*(diff(F(x, y, t, u, v), u))-2*v*alpha*delta*(diff(F(x, y, t, u, v), u))+u^2*(6*gamma*G(x, y, t, u, v)-2*v*gamma*(diff(F(x, y, t, u, v), u)))-2*(diff(F(x, y, t, u, v), t))-(diff(diff(G(x, y, t, u, v), x), x)) = 0]

(1)

sol := pdsolve(sys2); pdetest(sol, sys2)

{F(x, y, t, u, v) = _F1(y)*u, G(x, y, t, u, v) = _F1(y)*v}

 

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

(2)

sol2 := subs(_F1(y) = 2*sin(3*y), sol)
pdetest(sol2, sys2)

{F(x, y, t, u, v) = 2*sin(3*y)*u, G(x, y, t, u, v) = 2*sin(3*y)*v}

 

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

(3)

sol3 := subs(_F1(y) = y*exp(3*y), sol)
pdetest(sol3, sys2)

{F(x, y, t, u, v) = y*exp(3*y)*u, G(x, y, t, u, v) = y*exp(3*y)*v}

 

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

(4)

 

Download pdeSols.mw

see the attached - what *exactly* is the problem??

plots[animate]( plot3d, [sin(A)*(x^2+y^2), x=-2..2, y=-2..2], A=0..2*Pi );

 

plots[animate]( plot, [A*sin(x), x=0..10], A=0..2 );

 

 

Download anims.mw
 

 

I find it simpler to visualize the solutions by using 3D plots for x(xi,eta) and y(xi,eta) versus the independent variables xi and eta. This is trivial to do - as shown in the attached.

I'm not sure what your problem with the boundary conditions are. Both of the dependent variables x() and y() have second-order derivatives in both of the independent variables xi and eta. Hence you need a total of eight boundary conditions: four conditions for the function x() and four for the function y(). Since the dependent variable x() is second-order in both xi and eta, there have to be two boundary condition on xi and two on eta

x(0, eta) = eta,
x(1, eta) = eta,
x(xi, 0) = sin(2.0*Pi*xi),
D[2](x)(xi, 0) = 0

The first two of the above are boundary conditions on the independent variable xi, since they supply values for the dependent variable x() at xi=0 and xi=1. The third and fourth expressions above would be interpreted as 'initial' conditions since they supply values for the dependent variable and its first derivative with respect to eta, both evaluated at eta =0.


 

alpha04 := (diff(x(xi, eta), eta))^2+(diff(y(xi, eta), eta))^2:

beta04 := (diff(x(xi, eta), xi))*(diff(x(xi, eta), eta))+(diff(y(xi, eta), xi))*(diff(y(xi, eta), eta)):

gamma04 := (diff(x(xi, eta), xi))^2+(diff(y(xi, eta), xi))^2:

PDE04 := { alpha04*(diff(x(xi, eta), xi, xi))-2*beta04*(diff(x(xi, eta), xi, eta))+gamma04*(diff(x(xi, eta), eta, eta)) = 0,
           alpha04*(diff(y(xi, eta), xi, xi))-2*beta04*(diff(y(xi, eta), xi, eta))+gamma04*(diff(y(xi, eta), eta, eta)) = 0
         }:
`union`(indets~(PDE04)[]);

IBC04 := { x(0, eta) = eta,
           x(1, eta) = eta,
           x(xi, 0) = sin(2.0*Pi*xi),
           y(0, eta) = eta,
           y(1, eta) = eta,
           y(xi, 0) = 100*xi,
           D[2](x)(xi, 0) = 0,
           D[2](y)(xi, 0) = 0
        };

pds04 := pdsolve(PDE04, IBC04, numeric);


# xCurve04 := plots[display]([seq(pds04:-plot(x, eta = i), i = 0 .. 10)]);

# yCurve04 := plots[display]([seq(pds04:-plot(y, eta = (1/10)*i), i = 0 .. 10)]);

{eta, xi, diff(diff(x(xi, eta), eta), eta), diff(diff(x(xi, eta), eta), xi), diff(diff(x(xi, eta), xi), xi), diff(diff(y(xi, eta), eta), eta), diff(diff(y(xi, eta), eta), xi), diff(diff(y(xi, eta), xi), xi), diff(x(xi, eta), eta), diff(x(xi, eta), xi), diff(y(xi, eta), eta), diff(y(xi, eta), xi), x(xi, eta), y(xi, eta)}

 

{x(0, eta) = eta, x(1, eta) = eta, x(xi, 0) = sin(6.283185308*xi), y(0, eta) = eta, y(1, eta) = eta, y(xi, 0) = 100*xi, (D[2](x))(xi, 0) = 0, (D[2](y))(xi, 0) = 0}

 

_m862687872

(1)

pds04:-plot3d( x( xi, eta), xi=0..1, eta=0..10, color=red);
pds04:-plot3d( y( xi, eta), xi=0..1, eta=0..10, color=blue);

 

 

 


 

Download pdePlots.mw

 

to do it numerically, as in the attached

  restart;
  heat:= diff(u(r, t), t) = diff(r^2*diff(u(r, t), r), r)/r^2;
  bc:= u(1, t) = 0, u(2, t) = 0:
  ic:= u(r, 0) = -sin(Pi*r):
  sol:= pdsolve(heat,[bc,ic], numeric):
  sol:-plot3d( u(r,t), r=1..2, t=0..1);

diff(u(r, t), t) = (2*r*(diff(u(r, t), r))+r^2*(diff(diff(u(r, t), r), r)))/r^2

 

 


 

 

 

Download pdeNum.mw

on Carl's solution is shown in the attached

  restart;
  A:= m-> (2*m[1] + 3*m[2])!*c0^(1 + m[1] + 2*m[2])*c2^m[1]*c3^m[2]
          /
          ((1 + m[1] + 2*m[2])!*m[1]!*m[2]!*c1^(2*m[1] + 3*m[2] + 1)):
  B:= m-> ( 2*m[1] + 3*m[2] + 4*m[3])!*c0^(1 + m[1] + 2*m[2] + 3*m[3])*c2^m[1]*c3^m[2]*c4^m[3]
          /
          ((1 + m[1] + 2*m[2] + 3*m[3])!*m[1]!*m[2]!*m[3]!*c1^(2*m[1] + 3*m[2] + 4*m[3] + 1)):

  add(A~([seq(v[], v = Iterator:-CartesianProduct( [$ i= 0..4] $ 2))]));
  add(B~([seq(v[], v = Iterator:-CartesianProduct( [$ i= 0..4] $ 3))]));

330*c0^7*c2^4*c3/c1^12+84*c0^6*c2^3*c3/c1^10+21*c0^5*c2^2*c3/c1^8+5*c0^4*c2*c3/c1^6+28*c0^6*c2*c3^2/c1^9+180*c0^7*c2^2*c3^2/c1^11+990*c0^8*c2^3*c3^2/c1^13+5005*c0^9*c2^4*c3^2/c1^15+61880*c0^11*c2^4*c3^3/c1^18+10010*c0^10*c2^3*c3^3/c1^16+1430*c0^9*c2^2*c3^3/c1^14+165*c0^8*c2*c3^3/c1^12+1001*c0^10*c2*c3^4/c1^15+10920*c0^11*c2^2*c3^4/c1^17+92820*c0^12*c2^3*c3^4/c1^19+678300*c0^13*c2^4*c3^4/c1^21+c0^3*c3/c1^4+c0/c1+c0^2*c2/c1^3+2*c0^3*c2^2/c1^5+5*c0^4*c2^3/c1^7+14*c0^5*c2^4/c1^9+55*c0^9*c3^4/c1^13+3*c0^5*c3^2/c1^7+12*c0^7*c3^3/c1^10

 

330*c0^7*c2^4*c3/c1^12+84*c0^6*c2^3*c3/c1^10+21*c0^5*c2^2*c3/c1^8+5*c0^4*c2*c3/c1^6+28*c0^6*c2*c3^2/c1^9+180*c0^7*c2^2*c3^2/c1^11+990*c0^8*c2^3*c3^2/c1^13+5005*c0^9*c2^4*c3^2/c1^15+61880*c0^11*c2^4*c3^3/c1^18+10010*c0^10*c2^3*c3^3/c1^16+1430*c0^9*c2^2*c3^3/c1^14+165*c0^8*c2*c3^3/c1^12+1001*c0^10*c2*c3^4/c1^15+10920*c0^11*c2^2*c3^4/c1^17+92820*c0^12*c2^3*c3^4/c1^19+678300*c0^13*c2^4*c3^4/c1^21+1820*c0^12*c3^4*c4/c1^17+286*c0^10*c3^3*c4/c1^14+45*c0^8*c3^2*c4/c1^11+7*c0^6*c3*c4/c1^8+495*c0^8*c2^4*c4/c1^13+120*c0^7*c2^3*c4/c1^11+28*c0^6*c2^2*c4/c1^9+6*c0^5*c2*c4/c1^7+45*c0^8*c2*c4^2/c1^11+330*c0^9*c2^2*c4^2/c1^13+2002*c0^10*c2^3*c4^2/c1^15+10920*c0^11*c2^4*c4^2/c1^17+55*c0^9*c3*c4^2/c1^12+546*c0^11*c3^2*c4^2/c1^15+4760*c0^13*c3^3*c4^2/c1^18+38760*c0^15*c3^4*c4^2/c1^21+672980*c0^18*c3^4*c4^3/c1^25+67830*c0^16*c3^3*c4^3/c1^22+6120*c0^14*c3^2*c4^3/c1^19+455*c0^12*c3*c4^3/c1^16+193800*c0^14*c2^4*c4^3/c1^21+28560*c0^13*c2^3*c4^3/c1^19+3640*c0^12*c2^2*c4^3/c1^17+364*c0^11*c2*c4^3/c1^15+3060*c0^14*c2*c4^4/c1^19+38760*c0^15*c2^2*c4^4/c1^21+373065*c0^16*c2^3*c4^4/c1^23+3028410*c0^17*c2^4*c4^4/c1^25+3876*c0^15*c3*c4^4/c1^20+65835*c0^17*c3^2*c4^4/c1^23+885500*c0^19*c3^3*c4^4/c1^26+10360350*c0^21*c3^4*c4^4/c1^29+c0^4*c4/c1^5+c0^3*c3/c1^4+c0/c1+c0^2*c2/c1^3+2*c0^3*c2^2/c1^5+5*c0^4*c2^3/c1^7+14*c0^5*c2^4/c1^9+55*c0^9*c3^4/c1^13+3*c0^5*c3^2/c1^7+12*c0^7*c3^3/c1^10+18170460*c0^17*c2^2*c3^4*c4^2/c1^25+218718500*c0^18*c2^3*c3^4*c4^2/c1^27+2175673500*c0^19*c2^4*c3^4*c4^2/c1^29+67737852000*c0^22*c2^4*c3^4*c4^3/c1^33+6009003000*c0^21*c2^3*c3^4*c4^3/c1^31+435134700*c0^20*c2^2*c3^4*c4^3/c1^29+23023000*c0^19*c2*c3^4*c4^3/c1^27+2018940*c0^17*c2*c3^3*c4^3/c1^24+33649000*c0^18*c2^2*c3^3*c4^3/c1^26+414414000*c0^19*c2^3*c3^3*c4^3/c1^28+4206302100*c0^20*c2^4*c3^3*c4^3/c1^30+218718500*c0^18*c2^4*c3^2*c4^3/c1^27+24227280*c0^17*c2^3*c3^2*c4^3/c1^25+2238390*c0^16*c2^2*c3^2*c4^3/c1^23+155040*c0^15*c2*c3^2*c4^3/c1^21+9520*c0^13*c2*c3*c4^3/c1^18+116280*c0^14*c2^2*c3*c4^3/c1^20+1085280*c0^15*c2^3*c3*c4^3/c1^22+8580495*c0^16*c2^4*c3*c4^3/c1^24+155405250*c0^19*c2^4*c3*c4^4/c1^28+16824500*c0^18*c2^3*c3*c4^4/c1^26+1514205*c0^17*c2^2*c3*c4^4/c1^24+101745*c0^16*c2*c3*c4^4/c1^22+2018940*c0^18*c2*c3^2*c4^4/c1^25+34534500*c0^19*c2^2*c3^2*c4^4/c1^27+435134700*c0^20*c2^3*c3^2*c4^4/c1^29+4506752250*c0^21*c2^4*c3^2*c4^4/c1^31+97189092000*c0^23*c2^4*c3^3*c4^4/c1^34+8467231500*c0^22*c2^3*c3^3*c4^4/c1^32+600900300*c0^21*c2^2*c3^3*c4^4/c1^30+31081050*c0^20*c2*c3^3*c4^4/c1^28+409704750*c0^22*c2*c3^4*c4^4/c1^31+8835372000*c0^23*c2^2*c3^4*c4^4/c1^33+137684547000*c0^24*c2^3*c3^4*c4^4/c1^35+1734825292200*c0^25*c2^4*c3^4*c4^4/c1^37+51482970*c0^16*c2^4*c3^4*c4/c1^25+5969040*c0^15*c2^3*c3^4*c4/c1^23+581400*c0^14*c2^2*c3^4*c4/c1^21+42840*c0^13*c2*c3^4*c4/c1^19+5460*c0^11*c2*c3^3*c4/c1^16+61880*c0^12*c2^2*c3^3*c4/c1^18+542640*c0^13*c2^3*c3^3*c4/c1^20+4069800*c0^14*c2^4*c3^3*c4/c1^22+278460*c0^12*c2^4*c3^2*c4/c1^19+43680*c0^11*c2^3*c3^2*c4/c1^17+6006*c0^10*c2^2*c3^2*c4/c1^15+660*c0^9*c2*c3^2*c4/c1^13+72*c0^7*c2*c3*c4/c1^10+495*c0^8*c2^2*c3*c4/c1^12+2860*c0^9*c2^3*c3*c4/c1^14+15015*c0^10*c2^4*c3*c4/c1^16+406980*c0^13*c2^4*c3*c4^2/c1^20+61880*c0^12*c2^3*c3*c4^2/c1^18+8190*c0^11*c2^2*c3*c4^2/c1^16+858*c0^10*c2*c3*c4^2/c1^14+10920*c0^12*c2*c3^2*c4^2/c1^17+128520*c0^13*c2^2*c3^2*c4^2/c1^19+1162800*c0^14*c2^3*c3^2*c4^2/c1^21+8953560*c0^15*c2^4*c3^2*c4^2/c1^23+151420500*c0^17*c2^4*c3^3*c4^2/c1^26+17160990*c0^16*c2^3*c3^3*c4^2/c1^24+1627920*c0^15*c2^2*c3^3*c4^2/c1^22+116280*c0^14*c2*c3^3*c4^2/c1^20+1119195*c0^16*c2*c3^4*c4^2/c1^23+140*c0^13*c4^4/c1^17+4*c0^7*c4^2/c1^9+22*c0^10*c4^3/c1^13

(1)

 


 

Download moreSums.mw

 

when you use 'sum' Maple will look for a closed-form solution, whihc it then evaluates at the supplied upper limit. The first of these processes can take a loonnngggg time. When psosible you should use add() rather than sum() - but this require a numeric upper limit.

You can write the add() expressions as functions which will accept any (numeric) upper limit. This approach will generally be much faster.

See the attached

  restart:

  a := N -> local m;
            add
            ( C2^(m - 1)*C0^m*(2*m)!
              /
              (C1^(2*m - 1)*(m + 1)!*m!),
              m = 0 .. N
            ):
  a(4);
  a(6);

C1/C2+C0/C1+2*C2*C0^2/C1^3+5*C2^2*C0^3/C1^5+14*C2^3*C0^4/C1^7

 

C1/C2+C0/C1+2*C2*C0^2/C1^3+5*C2^2*C0^3/C1^5+14*C2^3*C0^4/C1^7+42*C2^4*C0^5/C1^9+132*C2^5*C0^6/C1^11

(1)

  c := N -> local m;
            add
            ( add
              ( (-1)^(m[3] + 1)*(2*m[2] + 3*m[3])!*C0^(1 + m[2] + 2*m[3])*C2^m[2]*C3^m[3]
                /
                ((1 + m[2] + 2*m[3])!*m[2]!*m[3]!*C1^(1 + 2*m[2] + 3*m[3])),
                 m[3] = 0 .. N
              ),
              m[2] = 0 .. N
            ):
  c(4);
  c(6);

-C0/C1-C2*C0^2/C1^3-2*C2^2*C0^3/C1^5-5*C2^3*C0^4/C1^7+C0^3*C3/C1^4+12*C0^7*C3^3/C1^10-3*C0^5*C3^2/C1^7-14*C2^4*C0^5/C1^9-55*C0^9*C3^4/C1^13+5*C0^4*C2*C3/C1^6-28*C0^6*C2*C3^2/C1^9+165*C0^8*C2*C3^3/C1^12-1001*C0^10*C2*C3^4/C1^15+21*C0^5*C2^2*C3/C1^8-180*C0^7*C2^2*C3^2/C1^11+1430*C0^9*C2^2*C3^3/C1^14-10920*C0^11*C2^2*C3^4/C1^17+84*C0^6*C2^3*C3/C1^10-990*C0^8*C2^3*C3^2/C1^13+10010*C0^10*C2^3*C3^3/C1^16-92820*C0^12*C2^3*C3^4/C1^19+330*C0^7*C2^4*C3/C1^12-5005*C0^9*C2^4*C3^2/C1^15+61880*C0^11*C2^4*C3^3/C1^18-678300*C0^13*C2^4*C3^4/C1^21

 

-C0/C1-C2*C0^2/C1^3-2*C2^2*C0^3/C1^5-5*C2^3*C0^4/C1^7+C0^3*C3/C1^4-132*C0^7*C2^6/C1^13-1428*C0^13*C3^6/C1^19+273*C0^11*C3^5/C1^16+12*C0^7*C3^3/C1^10-3*C0^5*C3^2/C1^7-14*C2^4*C0^5/C1^9-42*C2^5*C0^6/C1^11-55*C0^9*C3^4/C1^13+6864396*C0^15*C2^4*C3^5/C1^24-65615550*C0^17*C2^4*C3^6/C1^27+1287*C0^8*C2^5*C3/C1^14-24024*C0^10*C2^5*C3^2/C1^17+352716*C0^12*C2^5*C3^3/C1^20-4476780*C0^14*C2^5*C3^4/C1^23+51482970*C0^16*C2^5*C3^5/C1^26-551170620*C0^18*C2^5*C3^6/C1^29+5005*C0^9*C2^6*C3/C1^16-111384*C0^11*C2^6*C3^2/C1^19+1899240*C0^13*C2^6*C3^3/C1^22-27457584*C0^15*C2^6*C3^4/C1^25+354323970*C0^17*C2^6*C3^5/C1^28-4206302100*C0^19*C2^6*C3^6/C1^31+5*C0^4*C2*C3/C1^6-28*C0^6*C2*C3^2/C1^9+165*C0^8*C2*C3^3/C1^12-1001*C0^10*C2*C3^4/C1^15+21*C0^5*C2^2*C3/C1^8-180*C0^7*C2^2*C3^2/C1^11+1430*C0^9*C2^2*C3^3/C1^14-10920*C0^11*C2^2*C3^4/C1^17+84*C0^6*C2^3*C3/C1^10-990*C0^8*C2^3*C3^2/C1^13+10010*C0^10*C2^3*C3^3/C1^16-92820*C0^12*C2^3*C3^4/C1^19+330*C0^7*C2^4*C3/C1^12-5005*C0^9*C2^4*C3^2/C1^15+61880*C0^11*C2^4*C3^3/C1^18-678300*C0^13*C2^4*C3^4/C1^21+6188*C0^12*C2*C3^5/C1^18-38760*C0^14*C2*C3^6/C1^21+81396*C0^13*C2^2*C3^5/C1^20-596904*C0^15*C2^2*C3^6/C1^23+813960*C0^14*C2^3*C3^5/C1^22-6864396*C0^16*C2^3*C3^6/C1^25

(2)

  e:= N -> local m;
           add
           ( add
             ( (-1)^(m[3] + 1)*(2*m[2] + 3*m[3])!*C0^(1 + m[2] + 2*m[3])*C2^m[2]*C3^m[3]
               /
               ((1 + m[2] + 2*m[3])!*m[2]!*m[3]!*C1^(1 + 2*m[2] + 3*m[3])),
               m[3] = 0 .. N
             ),
             m[2] = 0 .. N
           ):
  e(4);
  e(6);

-C0/C1-C2*C0^2/C1^3-2*C2^2*C0^3/C1^5-5*C2^3*C0^4/C1^7+C0^3*C3/C1^4+12*C0^7*C3^3/C1^10-3*C0^5*C3^2/C1^7-14*C2^4*C0^5/C1^9-55*C0^9*C3^4/C1^13+5*C0^4*C2*C3/C1^6-28*C0^6*C2*C3^2/C1^9+165*C0^8*C2*C3^3/C1^12-1001*C0^10*C2*C3^4/C1^15+21*C0^5*C2^2*C3/C1^8-180*C0^7*C2^2*C3^2/C1^11+1430*C0^9*C2^2*C3^3/C1^14-10920*C0^11*C2^2*C3^4/C1^17+84*C0^6*C2^3*C3/C1^10-990*C0^8*C2^3*C3^2/C1^13+10010*C0^10*C2^3*C3^3/C1^16-92820*C0^12*C2^3*C3^4/C1^19+330*C0^7*C2^4*C3/C1^12-5005*C0^9*C2^4*C3^2/C1^15+61880*C0^11*C2^4*C3^3/C1^18-678300*C0^13*C2^4*C3^4/C1^21

 

-C0/C1-C2*C0^2/C1^3-2*C2^2*C0^3/C1^5-5*C2^3*C0^4/C1^7+C0^3*C3/C1^4-132*C0^7*C2^6/C1^13-1428*C0^13*C3^6/C1^19+273*C0^11*C3^5/C1^16+12*C0^7*C3^3/C1^10-3*C0^5*C3^2/C1^7-14*C2^4*C0^5/C1^9-42*C2^5*C0^6/C1^11-55*C0^9*C3^4/C1^13+6864396*C0^15*C2^4*C3^5/C1^24-65615550*C0^17*C2^4*C3^6/C1^27+1287*C0^8*C2^5*C3/C1^14-24024*C0^10*C2^5*C3^2/C1^17+352716*C0^12*C2^5*C3^3/C1^20-4476780*C0^14*C2^5*C3^4/C1^23+51482970*C0^16*C2^5*C3^5/C1^26-551170620*C0^18*C2^5*C3^6/C1^29+5005*C0^9*C2^6*C3/C1^16-111384*C0^11*C2^6*C3^2/C1^19+1899240*C0^13*C2^6*C3^3/C1^22-27457584*C0^15*C2^6*C3^4/C1^25+354323970*C0^17*C2^6*C3^5/C1^28-4206302100*C0^19*C2^6*C3^6/C1^31+5*C0^4*C2*C3/C1^6-28*C0^6*C2*C3^2/C1^9+165*C0^8*C2*C3^3/C1^12-1001*C0^10*C2*C3^4/C1^15+21*C0^5*C2^2*C3/C1^8-180*C0^7*C2^2*C3^2/C1^11+1430*C0^9*C2^2*C3^3/C1^14-10920*C0^11*C2^2*C3^4/C1^17+84*C0^6*C2^3*C3/C1^10-990*C0^8*C2^3*C3^2/C1^13+10010*C0^10*C2^3*C3^3/C1^16-92820*C0^12*C2^3*C3^4/C1^19+330*C0^7*C2^4*C3/C1^12-5005*C0^9*C2^4*C3^2/C1^15+61880*C0^11*C2^4*C3^3/C1^18-678300*C0^13*C2^4*C3^4/C1^21+6188*C0^12*C2*C3^5/C1^18-38760*C0^14*C2*C3^6/C1^21+81396*C0^13*C2^2*C3^5/C1^20-596904*C0^15*C2^2*C3^6/C1^23+813960*C0^14*C2^3*C3^5/C1^22-6864396*C0^16*C2^3*C3^6/C1^25

(3)

 


 

Download sums2.mw

 

You are misunderatnding what is being plotted. The first thing to realise is that for Q__t in the range -0.6..0.6 there are two possible values for the dependent variable i__fd2, and two possible values for the dependent variable i_armature2 - so apparently four possible combinations. So which of these four combinations are you actually plotting??

Now in fact, because both i__fd2 and  i_armature2 appear to be  even functions, there are only two possible combinations - and both of these are being plotted

This situation may be easier to envisage, by considering the plots

p1:=plot([i__fd2, i_armature2, Q__t = -0.6..0.0], color=red):
p2:=plot([i__fd2, i_armature2, Q__t = 0..0.6], color=blue):

separately. Both of these are simple to understand. Then combine them with

plots:-display( [p1,p2]);

which isn't as simple to interpret!!

You can usefully spend a long time comtemplating the output of the final execution group in the attached

restart;

with(LinearAlgebra):

Digits := 6:

j := I:

L__adpu := 1.66;
L__aqpu := 1.61;
L__lpu := 0.15;
R__apu := 0.003;
E__tpu := 1.0;
MVA := 555;

1.66

 

1.61

 

.15

 

0.3e-2

 

1.0

 

555

(1)

A__sat := 0.0312500:
B__sat := 6.93147:

I__tpu_compare := (P__t - j* Q__t) / E__tpu;

-(1.00000*I)*Q__t+1.00000*P__t

(2)

I__tpu_a := abs(I__tpu_compare);

abs(-(1.00000*I)*Q__t+1.00000*P__t)

(3)

Phi := arccos(P__t / (I__tpu_a * E__tpu));

arccos(1.00000*P__t/abs(-(1.00000*I)*Q__t+1.00000*P__t))

(4)

E__a__tilde := E__tpu + (R__apu + j * L__lpu) * I__tpu_compare;

1.0+(0.3e-2+.15*I)*(-(1.00000*I)*Q__t+1.00000*P__t)

(5)

psi__at := abs(E__a__tilde);

abs(1.0+(0.3e-2+.15*I)*(-(1.00000*I)*Q__t+1.00000*P__t))

(6)

psi__I := A__sat * exp(B__sat * (psi__at - 0.8));

0.312500e-1*exp(6.93147*abs(1.0+(0.3e-2+.15*I)*(-(1.00000*I)*Q__t+1.00000*P__t))-5.54518)

(7)

K__sd := psi__at / (psi__at + psi__I);

abs(1.0+(0.3e-2+.15*I)*(-(1.00000*I)*Q__t+1.00000*P__t))/(abs(1.0+(0.3e-2+.15*I)*(-(1.00000*I)*Q__t+1.00000*P__t))+0.312500e-1*exp(6.93147*abs(1.0+(0.3e-2+.15*I)*(-(1.00000*I)*Q__t+1.00000*P__t))-5.54518))

(8)

K__sq := K__sd;

abs(1.0+(0.3e-2+.15*I)*(-(1.00000*I)*Q__t+1.00000*P__t))/(abs(1.0+(0.3e-2+.15*I)*(-(1.00000*I)*Q__t+1.00000*P__t))+0.312500e-1*exp(6.93147*abs(1.0+(0.3e-2+.15*I)*(-(1.00000*I)*Q__t+1.00000*P__t))-5.54518))

(9)

X__ad := K__sd * L__adpu:

X__d := X__ad + L__lpu:

X__aq := K__sq * L__aqpu:

X__q := X__aq + L__lpu:

delta__i := arctan((X__q * I__tpu_a * cos(Phi) - R__apu * I__tpu_a * sin(Phi))/(E__tpu + R__apu * I__tpu_a * cos(Phi) + X__q * I__tpu_a * sin(Phi))):

e__q := E__tpu * cos(delta__i):

i__d := I__tpu_a * sin(delta__i + Phi):

i__q := I__tpu_a * cos(delta__i + Phi):

i__fd := (e__q + R__apu * i__q + X__d * i__d)/(X__ad):

i_armature := sqrt(i__d^2 + i__q^2):

i_armature2 := subs(P__t = 0, i_armature):

i_armature3 := subs(P__t = 0.5, i_armature):

i_armature4 := subs(P__t = 1.0, i_armature):

plotA := plot(i_armature2, Q__t = -0.6..0.6):

plotB := plot(i_armature3, Q__t = -0.6..0.6):

plotC := plot(i_armature4, Q__t = -0.6..0.6):

plots:-display([plotA, plotB, plotC]);

 

i__fd2 := subs(P__t = 0, i__fd):

i__fd3 := subs(P__t = 0.5, i__fd):

i__fd4 := subs(P__t = 1.0, i__fd):

 

plotD := plot(i__fd2, Q__t = -0.6..0.6):

plotE := plot(i__fd3, Q__t = -0.6..0.6):

plotF := plot(i__fd4, Q__t = -0.6..0.6):

plots:-display([plotD, plotE, plotF]);

 

p1:=plot([i__fd2, i_armature2, Q__t = -0.6..0.0], color=red):
p2:=plot([i__fd2, i_armature2, Q__t = 0..0.6], color=blue):
p3:=plot( i__fd2, Q__t=-0.6..0.6, color=green):
p4:=plot( i_armature2, Q__t=-0.6..0.6, color=black):
plots:-display( [p1,p2, p3,p4]);

 

 


 

Download oddplt.mw

 

since the coefficients of the basis vectors in the vector field (ie [cos(theta__L),sin(theta__L),0,0,0,0]) do not depend on the basis vectors of the vector filed (ie [x__1,y__1,z__1,x__2,y__2,z__2]), then the Jacobina will always be identically zero.

See the attached

  with(VectorCalculus):
  f := VectorField([cos(theta__L),sin(theta__L),0,0,0,0],'cartesian'[x__1,y__1,z__1,x__2,y__2,z__2]);
  Jacobian(f, [x_1,y_1,theta_1,x_2,y_2,theta_2]);

Vector(6, {(1) = cos(`#msub(mi("&theta;",fontstyle = "normal"),mi("L"))`), (2) = sin(`#msub(mi("&theta;",fontstyle = "normal"),mi("L"))`), (3) = 0, (4) = 0, (5) = 0, (6) = 0})

 

Matrix(%id = 36893488148076680964)

(1)

 

 

Download vecF.mw

 

why you get this warning. My usual appproach to such optimization problems is to select an initialpoint which satisfies the constraints. Depending on whether or not the function has multiple minima, the choice of initialpoint can lead to very different answers

The attached shows two possibilities - the first using Maple's in-built Optimization package, and the second uses a different optimization package called 'DirectSearch' which is a (free) download from the Maple Applications Centre at

https://www.maplesoft.com/applications/index.aspx

Note that I am making no claims about which of these optimizers is 'better' - they are just 'different' !!

  restart;
  Digits:=16:
  f := (x, y, z) -> 1 - x^4 + ln(x^4) + z^4 - y^4 - y^4*(ln(z^4) - ln(y^4)):
  with(Optimization):
  constr:= {x^2 + y^2 - z^2 - 1 = 0, 0 <= x - 1, 0 <= y - x, 0 <= z - y}:

  sol1:= Minimize( f(x, y, z),
                   constr,
                   initialpoint=[ x=1.1, y=1.2, z=1.3]
                 );

  sol2:=DirectSearch:-Search( f(x,y,z),
                              constr,
                              initialpoint=[ x=1.1, y=1.2, z=1.3]
                            );

[0.7492186724e-16, [x = 1.000000000000000, y = 1.171647731468933, z = 1.171647731478657]]

 

[-0.34081e-15, [x = 1.000002639713188, y = 1.021630663020478, z = 1.021633246842248], 1447]

(1)

 


Download optim.mw

(and I don't know how!) you have managed to insert incorrect characters to delimit the Vector. these should be written as (for example) <1,2>, where the delimiters '<' and '>' are ASCII 60 and 62. These characters are normally entered directly from the keyboard.

The delimiters you have entered ⟨-2,1⟩ both(!?) map to ASCII character 226. How did you enter these??

See the attached for a corrected version

NULL

restart

with(VectorCalculus)

PlotVector([`<,>`(-2, 1), `<,>`(-1, 1)], color = [red, blue])

 

 

NULL


 

Download plvec.mw

First 49 50 51 52 53 54 55 Last Page 51 of 207