Preben Alsholm

13728 Reputation

22 Badges

20 years, 255 days

MaplePrimes Activity


These are replies submitted by Preben Alsholm

@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);

@Rouben Rostamian  It couldn't hurt to report it.
I remembered seeing this error sometime ago and found out that I have a very short worksheet from March 28 2014 exibiting the error.
My guess is that I filed an SCR at the time.
Incidentally, it would be nice if one received an acknowledgment of receipt and a copy of what was filed as an SCR.

The file contains the lines:
restart;
p:=piecewise(x<1,67,0);
solve(p=a/b(0),a);
solve(p=a/b,a);
solve(p=a/exp(1),a);

####To which I now added
solve(p=a*Pi,a);

If the bug was reported at the time it would be too late for correction as Maple 18 was already released (as I recall).
The bug is not present in Maple 16.

@syilalala Without shooting I had success with adding an approximate "solution". As you will notice it is not very sophisticated.

bcs:={G(0) = 0,f(0)=0, f1(10) = 1, f1(0) = -0.5, g(0) = 1, g(10) = 0};

res:=dsolve(ODE union bcs,numeric,approxsoln=[f(eta)=eta,f1(eta)=1,f2(eta)=0,g(eta)=1,g1(eta)=0,G(eta)=eta]);

plots:-odeplot(res,[eta,f1(eta)],0..10);
plots:-odeplot(res,[eta,f(eta)],0..10);
plots:-odeplot(res,[eta,g(eta)],0..10);
plots:-odeplot(res,[eta,G(eta)],0..10);
res(10);


To get reasonable and not just responses based on guesses about what you actually did, you could tell us just that. What did you do to solve the system? What was lambda? What did you use in place of infinity?
How did you get g from the results of the ode system?
Why don't you just include G as G(eta)=int(g(t),t=0..eta) in the system in the form of
diff(G(eta),eta)=g(eta) with G(0)=0 ?

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