vv

12530 Reputation

19 Badges

8 years, 214 days

MaplePrimes Activity


These are answers submitted by vv

You probably mean:

xn:=n^2/(n^2+31*n+228):

x0:=limit(xn,n=infinity);
     1
asympt(xn-x0,n,2):
r:=abs(convert(%,polynom)) assuming n>0:
solve(r<eps/2, n, useassumptions) assuming n>0,eps>0:
N:=lhs(%[]);

is( abs(xn-x0)<eps ) assuming eps>0, n>=N;

       true

# For integer N, take  N := floor(N)+1

So, you have a homogeneous linear system of ODEs with constant coefficients.
If you know a fundamental system for the solutions:

exp(p*t), exp(q*t), ...

where p,q, ... are distinct complex numbers
then the characteristic polynomial in variable y is

(y - p)(y - q) ...

[if there are multiple roots, the situation is a bit more complicated]

Note that c(t) = 0 cannot appear in a fundamental system
(because of the linear independence).

indets(eq,anyfunc(identical(t)));

If you must use fsolve, try to restrict the domain.

fsolve({f, g}, {a, c}, a = 10000 .. infinity, c = 0 .. infinity);

Edit.
1. You may use
plots[implicitplot]([f,g], a=-20..20,c=-20..20,color=[red,blue]);
to localize the roots
2. The system seems to be intentionally constructed to have "non-intuitive" solutions.

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

First 102 103 104 105 106 107 108 Last Page 104 of 112