vv

13080 Reputation

20 Badges

9 years, 46 days

MaplePrimes Activity


These are answers submitted by vv

Yes, obviously for the ics case Maple "forgot" the BesselJ term .

M := diff(T(r), r, r)+(diff(T(r), r))/r+u*T(r)+P*(r^4+r^2) = 0; # u includes the constant

M0 := {M, D(T)(0)=0}:
s:=dsolve(M);

s0:=dsolve(M0);


s0general:=T(r)=BesselJ(0, sqrt(u)*r)*_C2-P*(r^4*u^2+r^2*u^2-16*r^2*u-4*u+64)/u^3;

odetest(s, M);
                             
  0
odetest(s0, M0);
                             
{0}
odetest(s0general, M0);
                             
{0}

Edit. If another ics is added e.g.
M01 := {M, D(T)(0)=0, T(0)=a};
then BesselJ appears!

 

 

B:=Groebner[Basis]([x-v, y-v^2], plex(u,v,x,y)):
remove(has,B,[u,v]);

 

Here is an ad-hoc procedure.

flatt:=proc(L::{list,set})
  local a,n; a:=L; n:=-1;
  while nops(a)<>n do
    n:=nops(a);
    a:=map(x->`if`(type(x,{list,set}),op(x),x),a);
  od;
  op(a)
end:

flatt([1,2,3, {4,5,6}]);



 

 

ex:=-Omega*a*sqrt(2)*sqrt(-Omega^2*a^2-2*k*m+sqrt(Omega^2*a^2*(Omega^2*a^2+4*k*m)))/(-Omega^2*a^2+sqrt(Omega^2*a^2*(Omega^2*a^2+4*k*m))):

radnormal(ex^2);
      -1

So, ex = I or -I
Note that both values may appear, depending on the parameters: e.g. changing a to -a  ==> ex to -ex
ex = I for  e.g. Omega=1, a=2, k=-1, m=1.

Edit. As Markiyan has pointed out, OP says Omega, a, k, m are >0. (I did not see this because the horizontal scroll was absent in my browser). But in this case it is easy to see that ex = -I. In fact, the denominator is obviously >0,  so

must be <0 (because ex^2=-1).

It follows that the argument of ex is - Pi/2 ==> ex = - I.


 

 

The solution for your ODEs is very oscillatory.
Maple can easily find a series solution, but it will be almost useless.
I think that the solution itself would be useless if found.

Please look at the following similar simple example:

Digits:=30: Order:=10:
a:=10^6:
s1:=dsolve({diff(y(t),t)=cos(a*t)*y(t), y(0)=1}, y(t), series):
s2:=dsolve({diff(y(t),t)=cos(a*t)*y(t), y(0)=1}, y(t)):
ss1:=convert(rhs(s1),polynom);


ss2:=rhs(s2); #exact

plot(ss2, t=0..1);  #exact

 

plot( ss1, t=0..1); #series

 

 

 

- You must give numerical values to parameters, e.g.

omega:=1; M:=1; N:=1; N1:=1; Delta:=1;

(you probably did).

- Choose first a smaller interval, e.g.

plots[odeplot](res,[[t,(Re(w(t)))]],0..5,axes=boxed,titlefont=[SYMBOL,14],font=[1,1,18],color=black,linestyle=1,tickmarks=[3, 4],font=[1,1,14],thickness=2,titlefont=[SYMBOL,12]);

(for larger intervals it will take several minutes)

It works.

I think that unapply does not work properly if its first argument is a procedure.

So,

g := unapply(x -> theta*x, theta);

also does not work.
unapply is not builtin, so it can be examined.

A curious fact is that f and g are apparently the same, according to print or lprint,
but they have distinct internal structures according to
dismantle(eval(f)); dismantle(eval(g));

Why not simply use Diff instead of diff? Then op() works.

Otherwise, here is another (non-recursive) function:

undiff:=proc(f)
local u:=f, X:=NULL;
while op(0,u)=diff do X:=op(2,u),X; u:=op(1,u) od;
u,[X]
end;

The expressions being so complicated, Maple has problems recognizing some zero coefficients.

Workaround:

u := evecs[1][1];
simplify(numer(u)):
u1:=simplify(series(%,varepsilon=0)):
simplify(denom(u)):
u2:=simplify(series(%,varepsilon=0)):
evalc(series(u1/u2,varepsilon=0));

 

 

You have symbolic expressions containing floats. You should simplify them first do avoid possible catastrophic cancelations.

Use e.g.

Ez := simplify(Ez);

and compare with the unsimplified version.

 

Let G be the list of the polynomials obtained by Basis. E.g.

G:=[y^3+x*y, x*y^2+x^2, x^2*y-2*y^2+x, x^3-3*x*y]:

mon:=proc(p) local t; coeffs(p,indets(p),t); t end:
mon ~ (G);

convert(%,set); # remove duplicates

createModule2 := proc(A::Matrix(square))
    local dim;
    dim := RowDimension(A);
    module()
        export det;
        det := (x::Matrix(1..dim,1..dim)) -> Determinant(x);
        det :=subs('dim'=dim, eval(det));   ###
    end module
end proc;

Try with

Digits:=30;

Your polynomial ferrai contains 3 symmetric sums as coefficients. By knowing these, you can't hope to recover all 4 fundamental symmetric sums (which are in fact c1,...,c4)  simply because 3<4.

BTW, if you have a symmetric sum s, you can express it in terms of c1,...,c4 using

simplify(s, [x1+x2+x3+x4=c1,...,x1*x2*x3*x4=c4]);

pochammer function appears only because the result must be also valid for i=0.

(For integer i>0, pochhammer(1-i, i)=0.)

First 106 107 108 109 110 111 112 Last Page 108 of 116