Preben Alsholm

13743 Reputation

22 Badges

20 years, 341 days

MaplePrimes Activity


These are replies submitted by Preben Alsholm

@J4James My version is Maple 18.02.

And sorry for the confusing edits, but it came as a real surprise to me that Maple 18 can handle DDEs.

I shall experiment with this, but I just noticed that it appears to handle time-dependent delays too.

@J4James I didn't see the problem, since I just let Maple 18 do it it as stated.
It replied with [Length of output exceeds limit of 1000000], which didn't disturb me. I proceeded with
plots:-odeplot(res,[t,x(t)],0..100);

which produced the following

This morning somewhat more clear-headed (apparently not much more) I noticed the delay, and as I was pretty sure that dsolve cannot handle DDEs I was sure something was wrong.
I tried your system on my own ddesolve assuming that the history for t=-10..0 is given by the constant values in the ics (tell me if the history should be something else).
The graph produced for x on the same interval was to the eye exactly the same!

Then I tried Maple 17 and I got the same error as reported by you.

Conclusion:
This feature is new in Maple 18.

As far as I know this is not documented. If I'm wrong I should like to know.

Try this simple example:
restart;
ode:=diff(x(t), t)=x(t-1);
infolevel[`dsolve/numeric`]:=1;
res:=dsolve({ode,x(0)=1},numeric);
plots:-odeplot(res,[t,x(t)],t=0..5);
#The assumption made by dsolve/numeric apparently is that the history is given by x(t)=1 for -1<t<=0.


Could you show us what you did with text, please, not images.
I'm confused about your use of x,y,x1,y1 in your vector equation. Which represents x' and y'?

@GPY Your sys_ode should be:


sys_ode:=diff(x(t),t,t)=d2v_x,diff(y(t),t,t)=d2v_y;

Besides that you need to give the radius r, rho, and C_d values, as Kitonum has already pointed out.

The initial conditions for the velocity should be given this way:
D(x)(0)=v0/sqrt(2),D(y)(0)=v0/sqrt(2)

@Kitonum I think that d2v_x is supposed to be diff(x(t),t,t) thus equal to diff(v_x,t) .

This appears to be odes for the flight of a ball shaped object including air resistance proportional to the square of the speed.

@chrtzstn I noticed that you changed the problem. p is gone.

@Chris_45 In my answer the function is assigned to q, so it is available, but q is a piecewise defined function consisting of a lot of cubic polynomials. If you want a single cubic polynomial there is no better way than LeastSquares.

@Kitonum That is nice. The same idea works on integrals:

map(simplify@Int, op(Int(a*u(k)+b*v(k), k=1..n)));

but there we also have

IntegrationTools:-Expand(Int(a*u(k)+b*v(k), k=1..n));

It would be nice with tools for sums similar to the ones in IntegrationTools. The existing SumTools has a very different purpose.


I fail to see the point.  You have a nice formula for W.
Certainly with

W:=(p,n,mu,w)->Sum(w[k] * (n-k)^p * mu^(n-k),k=1..n);
you have
combine(mu*diff(W(p,n,mu,w),mu));

but so what?

Surely you could do

restart;
W[0]:=Sum(w[k]*mu^(n-k), k = 1 .. n);
for p from 1 to 5 do W[p]:=combine(mu*diff(W[p-1],mu)) end do;

But why?

I noticed that the graphs at the end were not really showing up, so I separated the two plots, which helped:

p1:=plot(q,k_=min(y_data)..max(y_data));
p2:=plot(inverted_pairs,style=point,color=blue);
plots:-display(p1,p2);

and so did

plot([q,inverted_pairs],k_=min(y_data)..max(y_data),style=[line,point],view=0..max(x_data));


@Marcy49 If you don't see it then go to the Control Panel and there (in Windows 7 at least) you find "Clock,Language, and Region" and below "Change keyboard or other input methods". Try that. You get a window with a button "Change keyboards...".  In the window you get you will find the languages you have chosen, in my case Danish and US. Besides that you can find out where the "language bar should be. I just found out that mine was floating on desktop, which is why I now find it up on the top right.

If you only have one language then this may not be your problem. But it is worth looking into.

It is strange that using bold in Maple cures the problem, so the problem may not be related to languages.

@Marcy49 Sometimes it happens to me that my keyboard, which is Danish, switches to US. Maybe because I inadvertently hit some keys. In my case this means that (as an example) I get ) instead of = and - instead of +. I'm using Windows 7. At the bottom right there is an icon looking like a keyboard (if you look closely).
If you have a choice there then choose the keyboard you are used to.

 

In Maple with my Danish keyboard and with the US setting for a=b; I get
a)b<
and for a+b;  I get
a-b<

When you say that "=" and "+" don't work what do you mean?

When you try to write

a=b;

or

a+b;

what do you get?

@Carl Love Another fix is turning Pi into a float:

DEplot(evalf(de), h(t), t=0..300, [h(0)=10], h(t)=0..11);

First 127 128 129 130 131 132 133 Last Page 129 of 231