Preben Alsholm

12985 Reputation

22 Badges

18 years, 121 days

MaplePrimes Activity

These are replies submitted by Preben Alsholm

Just downloaded your worksheet and executed the whole, but got (in Maple 2021.1):

Error, (in plottools:-rotate) invalid plot structure: wheel

What is p1 in the code for wheel in the line

p[i++] := translate(p1, 0,0,-h):


Added: It appears that d1 should be %.

Also in the code for spokes wheel should be wheel().

@Carl Love In Maple 2021.1 numerical integration of KummerM doesn't work with method=_d01ajc. Thus h[1] [1] doesn't get the double loop. I have submitted an SCR.

K:=KummerM(-0.0847656450, 5., 10.33906258*r^2);
int(K,r=0..1,numeric, method = _d01ajc);


@mmcdara To your first question: That is what I thought of first. You are right, your shorter version works too.

The type And(relation,satisfies(r->lhs(r)=t)) is satisfied by expressions that are both of type relation and also of the special type 'satisfies'. The argument to 'satisfies' is a procedure that returns true (in this example) if the relation (here t < something, or x(t)<something) has left hand side equal to t.
See type/satisfies.

@itsme You may be right. The acceptance of vector input is fairly new.

By the way there is another inconsistency: dsolve with method=laplace or type=series will not work without the variable(s) as a second argument. That I have been told is due to different people writing those parts.


sys:=Vector([diff(x(t),t),diff(y(t),t)]) = Matrix([[1,2],[0,3]]).Vector([x(t),y(t)]);
init:=<x(0),y(0)> = <x0,y0>; # vector equation
### I think the form of the following outputs are quite fine:
dsolve(sys);         # output set of eqs
dsolve({sys,init}); # output set of eqs
## Giving the second argument as a vector forces vector output:
dsolve({sys,init},<x(t),y(t)>); # output vector equation
dsolve(sys,<x(t),y(t)>);         # output vector equation

### The next outputs are also fine.
### The second argument, however, MUST be present when using method = laplace or (type=)series

dsolve(sys,[x(t),y(t)],method=laplace);   # output set of eqs
dsolve(sys,[x(t),y(t)],series);                   # output set of eqs
dsolve(sys,<x(t),y(t)>,method=laplace); # output vector equation
dsolve(sys,<x(t),y(t)>,series);                 # output vector equation


@Carl Love In the help page for seq the following two illustrations are given. Here adapted to the present discussion.

for x[4] from 1 to 10 do S:=S,u(x[4]) end do;
for x[4] in [1,2,3,4,5,6,7,8,9,10] do S:=S,u(x[4]) end do;

Here we get the assignment 11 to x[4] in the first and 10 to x[4] in the second.

This behavior is very old. Most likely goes back to the introduction of add and seq.

At least it exists in Maple 8 too. I remember noticing it years ago.

PS. I just cranked up an old computer with Maple V, Release 4.

The behavior is still an assignment to x[4]. The value assigned is, however, not 10 but 11.

That old computer also has Maple 6. That behaves as Maple 8, i.e. the assigned value is 10.


One reason might be that it has not been seen as important enough to merit attention; and I would agree.

You should provide a link to the worksheet.

I tried to copy what you posted. I had to terminate Maple with Ctrl+Delete.

@Sradharam If you insist on a symbolic solution of your ode in f alone, then you are out of luck.

If you want anything out of that equation you must use an approximate method of some kind.
The way I solved the full system with dsolve/numeric works just as well with your ode in f only.

So if you have no interest in g just use:

ode:=diff(diff(diff(f(x), x), x), x) = 1/2*(-2*diff(f(x), x)*c^2*t^2 - 6*diff(diff(f(x), x), x)*exp(c*x)*c^2*t - 6*diff(f(x), x)*f(x)*t^2 + diff(f(x), x)*t^2)/(exp(c*x)^2*c^2);
#Setting parameters (an example):


## Here is a procedure that can be used by animate:
   if not [c,t,f0,f1,f2]::list(realcons) then return 'procname(_passed)' end if;
end proc;

## Examples of use all with c, t, f1, f2 fixed

You can set c, t, f0, f1, f2 to any concrete value you like, but you won't get a formula in the usual sense for the solution.
PS. You may not be as interested in graphs or animations as I am.

If you only want numbers you can simply do this:

# Values of f:
# Values of f'
# Values of x, f, f', f'':
plots:-odeplot(RES); # even this you can plot with odeplot

Notice that I have changed the default output from dsolve/numeric to output=listprocedure.

@Carl Love Yes, Tom Leslie guesses right.

Since I use animations rather often I was surprised that that toolbar wasn't there when I clicked on the plot at the end.


P.S. On a new laptop acquired today (05/05/2021) I installed Maple 2021. No problem.

@Preben Alsholm The animation was produced in Maple 2020.

For some reason it doesn't work in Maple 2021.

I shall submit an SCR (a bug report).

PS. It works in your version Maple 17.

@acer How do you explain that f() + f() - f() + f(); returns 2*x?

@mmcdara Vectors are not accepted as input in dsolve in versions prior to Maple 18.
In versions before Maple 2018 diff wouldn't work on vectors unless you use the elementwise version diff~.

@tomleslie I use Windows 10 Home.

I didn't find any problem in my current version (beta) which is a week older than your version. I set the frame rate (FPS) at 3.

First 8 9 10 11 12 13 14 Last Page 10 of 217