Preben Alsholm

MaplePrimes Activity


These are replies submitted by Preben Alsholm

I tried using the procedure Joe Riel posted in the link

http://www.mapleprimes.com/questions/129377-There-Were-Problems-During-The-Loading

Unfortunately, his procedure DeleteBadCharacters reported
"no errors in file"

@sharena2 Actually I chose the (roughly) highest N that gave results.
To extend the result to a larger interval, you could make a change of variables eta=N*t (with N unassigned).
The resulting system will have N as a parameter. The idea then is to use continuation in N:
Assuming that for the given parameters (B and what else) the system can be solved for t=0..1 using N=N1, say. N1=4.5 would work in the situation originally considered. Say you want to see the solution on eta=0..N2. You can then use the continuation option:
'continuation' = c, where you replace N in your system by (1-c)*N1+c*N2. dsolve will start with c=0, where it will have success (since then N=N1) and use that to go forward until c=1 corresponding to N=N2.
Remember though that the results are results in the variable t. But eta=N2*t so that is basically no problem.

Added.
I just tried the continuation idea. Although I have had success with that in the past, I didn't have any success with your system.

@JEBland I changed to

x1:=unapply(<diff(X[1], u), diff(X[2], u), diff(X[3], u)>,u,v);
x2:=unapply(<(diff(X[1], v), diff(X[2], v), diff(X[3], v))>,u,v);

and defined V as

V := <v*cos(u), v*sin(u), v^2+1>;

Then executed
Christoff(V);
and
L:= dsolve({sys1,inits},numeric);
plots:-odeplot(L,[u(t),v(t)],0..500); #Just to see if there is anything there

Alternatively, keep
V := (u,v)-><v*cos(u), v*sin(u), v^2+1>;
and do
x1 :=(u,v)-><diff(X(u,v)[1], u), diff(X(u,v)[2], u), diff(X(u,v)[3], u)>;
x2 :=(u,v)-><diff(X(u,v)[1], v), diff(X(u,v)[2], v), diff(X(u,v)[3], v)>;
Christoff(V):
etc.


@sharena2 Try this very simple example, which illustrates my point. In eq1 I use dot and in eq2 I use *.
The first doesn't work, the second does.
The dot (period) is intended for matrix multiplication and should not be used if that is not what you got.

eq1 := f(x).diff(f(x), x,x)+f(x) = 1;
eq2 := f(x)*diff(f(x), x,x)+f(x) = 1;
dsolve({eq1,f(0)=3,D(f)(0)=0},numeric);
res:=dsolve({eq2,f(0)=3,D(f)(0)=0},numeric);
plots:-odeplot(res,[x,f(x)],0..10);

See
?.

 

@mehdi jafari I think the answer would depend on for what purpose 1 and 2 will be used.
Is the first an equation to be solved for B knowing X and D?
Using the name D is not a good idea, since it is likely to conflict with its use as the differentiation operator.

E:=eulermac(1/(1+k/n),k=0..n,18) assuming n::posint;
asympt(E,n,19);

@Markiyan Hirnyk And you don't think that I verified it? It is straightforward to anybody with any knowledge of fourier series.

@Carl Love You are right. I tried it and forgot to remove it. Had it worked I wouldn't have produced two animations.
I commented that version out above.

@Markiyan Hirnyk Thanks for the kind words.

I toke a quick glance at your worksheet.
First you define D13 as one system, then you define it as another system. That second system surely is different from the first. So why expect the same?
I don't see any limit cycle in the first case (and in fact not even in the second case).
Your first system:

Your second system:

@Carl Love I agree about the fourier sine series except for a factor. I think it should be 
4*Sum(....)= ln((1+sin(2*Pi*x))/(1-sin(2*Pi*x))).

How is Trajectoire defined (if at all)?

The answer for X>0 is clearly wrong (in Maple 17), even if you start by using a concrete a.
For positive a and in a range on which a*x^3+1 is positive INT is an increasing function of X whether or not X>0 or X<0.

INT:=Int(1/sqrt(a*x^3+1),x=0..X);

value(eval(INT,a=0.1)) assuming X>0;
plot(%,X=0..1); #Decreasing
#For X<0 OK:
value(eval(INT,a=0.1)) assuming X<0;
plot(%,X=-1..0); #Increasing

@bwarga Sorry. I might as well have said that inits was

inits:=[[x(0) = 0.1e-1, y(0) = .99], [x(0) = -.1, y(0) = -.9], [x(0) = 1.1, y(0) = 0], [x(0) = 0, y(0) = .2], [x(0) = 0, y(0) = .6], [x(0) = .6, y(0) = 0], [x(0) = .75, y(0) = 1], [x(0) = .1, y(0) = .1], [x(0) = .5, y(0) = 1.0], [x(0) = -.5, y(0) = 1], [x(0) = .5, y(0) = -1], [x(0) = -.5, y(0) = -1], [x(0) = -0.1e-1, y(0) = .99], [x(0) = 0.1e-1, y(0) = -.99], [x(0) = -0.1e-1, y(0) = -.99], [x(0) = .5, y(0) = -1], [x(0) = -.5, y(0) = -1], [x(0) = 0.1e-1, y(0) = .9]];

#Thus with that and

with(DEtools);
L := -1.576674; MU := 0; DE13 := {(D(x))(t) = x(t)*(1+4*x(t)*x(t)-y(t)*y(t))+MU*y(t)*(x(t)*x(t)-.43*y(t)*y(t)-L), (D(y))(t) = y(t)*(1+x(t)*x(t)-.5*y(t)*y(t))+MU*x(t)*(x(t)*x(t)-.43*y(t)*y(t)-L)};

#you get

DEplot(DE13, [x(t), y(t)], t = -5 .. 2, inits,x=-5..5,y=-2..2,
stepsize = 0.1e-1, title = "phaseplane 3 prime plot", linecolor = black, thickness = 1);

@Carl Love Having taken a second look, I found unevaluated integrals in Maple 15 and 16.The reason I didn't see them the first time was that I just executed the whole worksheet with no error error messages appearing and the two plots produced in the 3 Maple versions (15,16,17) I have available here.
The unevaluated integral used for f(tau) in Maple 16 (and 15) doesn't get in the way of finding
diff(f(tau),tau) explicitly
nor would it be a problem to plot f(tau) (even if still unevaluated):
plot(f(tau),tau=0..5);

I don't know what the questioner meant by "the code does not converge".


First 148 149 150 151 152 153 154 Last Page 150 of 231