Preben Alsholm

MaplePrimes Activity


These are replies submitted by Preben Alsholm

Which one of these two (if any of them) did you mean:

ode1:=diff(U(x), x$2) + ((z+ I*y)^2/k1^2 -k2^2 + ((z+I*y)/k3)*sech(x)^2)* U(x);
ode2:=diff(U(x), x$2) + ((z+ I*y)^2/(k1^2 -k2^2) + ((z+I*y)/k3)*sech(x)^2)* U(x);

Maple 2020 solves both symbolically.

@Muhammad Usman 
1. You can make a very simple procedure (Q below) to return values of the integral for given x and y values.
2. In your original triple loop you didn't keep all values computed. fnum[i] was redefined for every new values of i11 and j11.

restart;

U := q^6*sin(p);
alpha := 1/3;
M1 := 3;
M2 := 3;
A:=Int(Int(U/((x^rho - p^rho)^alpha*(y^rho - q^rho)^alpha), p = 0 .. x), q = 0 .. y);
Q:=proc(r,xx,yy) evalf(eval(A,{'rho'=r,x=xx,y=yy})) end proc;
plot3d(Q(1,x,y),x=0..1,y=0..1); # Test
## An animation in rho with only 6 frames
plots:-animate(plot3d,[Q(rho,x,y),x=0..1,y=0..1],rho=1..6,frames=6);
## The revised loop:
printlevel:=3:
for i to 6 do
    #rho := i; #Not used
    for i11 to M1 do
        for j11 to M2 do 
            fnum[i, i11, j11] := Q(i,i11/M1,j11/M2)
        end do
    end do
end do;

 

@Muhammad Usman Could you please give the full code of what you tried to do. Perhaps upload a worksheet?
 

@Muhammad Usman Numerical integration requires x and y to be given numerical values.

So here is an example where x = 1 and y = 2:
 

for i from 1 to 6 do
   rho := i;
   fnum[i] := evalf(eval(Int(Int(U/((x^rho-p^rho)^alpha*(y^rho-q^rho)^alpha), p = 0 .. x), q = 0 .. y),{x=1,y=2}));
end do;

Compare that with:
 

evalf(eval([seq](f[i],i=1..6),{x=1,y=2}));

 

@Muhammad Usman I have revised my code above so U now is the revised U.
If you don't reverse the order of integration f[4] is not completed and other results are messier.

@Anthrazit By looking at the codes for the Standard and Simple versions of min (and by debugging both):
 

showstat(Units:-Standard:-min);
showstat(Units:-Simple:-min);
debug(Units:-Standard:-min);
debug(Units:-Simple:-min);

you will see that Units:-Simple:-min among several return statements has a return statement at the bottom 

return min(op(arguments))
where the local 'arguments' is just the list of arguments passed to Units:-Simple:-min.
What :-min gets as arguments is easily seen by doing debug(:-min);
So after a restart you can try:
 

restart;
min(15*Units:-Unit(m), 0);  # 0
max(15*Units:-Unit(m), 0); # 15*Units:-Unit(m)

 

@srikanthan It might help us if we knew the values of the parameters excepting of course R and thetaw, i.e.
{P, Pr, Q, Qc, S0, S1, S2, S4, c, lambda, n}.
Or at least an example of reasonable values.
Then we could make a procedure taking the value (Dth0) of D(theta)(0) and thetaw as input and R as output using as an extra boundary condition D(theta)(0) = Dth0.
 

If you insist on the initial conditions in dsys6 then it follows that n = 1. Simply use the connection between x and y given in the first equation together with the initial conditions.

I suppose then that there is some mistake here?

I tried (twice) asking for that helper library by writhing to physics@maplesoft.com , but I'm waiting for it to get to me.
Maybe I'm not patient enough?

@janhardo Could you upload an old Maple V Release 4 example worksheet to this forum? I have a running Maple V Release 4 on an old computer. Then I (or somebody else) might be able to do something or declare it hopeless.

@janhardo I don't understand why you consider .mws files useless. They can be read by Maple 2020 and, if modified, saved as an .mws file.
So what is the problem?

 

@janhardo Are your old files .ms files thus not .mws files?
When I saved an .mws file as a test from Robert Lopez: Advanced Engineering Mathematics the explanations didn't go away.
The worksheet appeared to be quite the same as before. 

####
On an old computer of mine I have Maple V Release 4.
I just tried to save an extremely simple worksheet in that release as an mws file. It only contained one line of pure text and one line of input. Output was removed before saving.
I then opened that file on my much newer computer in Maple 2020. No problem.
I saved again as an .mws-file with no problem.

Maybe your text includes other stuff than just pure text?

@janhardo Try to save as an .mws file instead.
I happened to have an old worksheet open. It is from a CD provided with the excellent text book by Robert J. Lopez, Advanced Engineering Mathematics (2001). It is the version using Maple 6.
I removed the output produced by me in Maple 2020 (Ctrl D) and then used Save As .mws.
It worked fine. (Now I also tried the worksheet version from Maple V, Release 5.1: Also fine).
I recall that the earlier releases used .ms files, but cannot remember when the change to .mws happened.

Without knowing the book by Robert Lopez I think you will be in for some problems using it with Maple 2020.

I have in my hand right now another book prepared using Maple V  Release 3: Robert M. Corless, Essential Maple (1995).
If you are just starting out using Maple, don't use the book now, but put it on the shelf for another time.
If you are well versed in Maple already you probably wouldn't be asking the question. Surely, you can learn something from the book, but you will have to know that important changes have happened since that release.
Among the important ones and not necessarily in sequence of priority:
1. The ditto (") in Release 3 is now (%). This happened when actual strings were introduced.
2. The linalg package has been superseded by the LinearAlgebra package, but is still availabe in 2020.
3. The appearance of readlib commands may confuse you. Not used anymore.
4. The default graphical user interface (GUI) is now set to Document mode and 2-D math input. This I advise you to set to Worksheet mode and 1-D mat input (aka. Maple input) . That way the GUI in 2020 looks more like the GUI in Release 3.

But, obviously, lots of other changes, enlargements, and improvements have been made since Release 3.

PS. Another book on my shelf, Robert B. Israel: Calculus The Maple Way has the following footnote in its Preface: " Note, however, that Release 4 requires at least 8 MB of RAM, while Release 3 can manage fairly well with 4 MB."  (Yes MB, not GB).

@Carl Love 
(Notes:
1. Actually just using ``(F) with an active * should do it.
2. To use %* in general in 2D it seems that the function form is necessary:

?)

Both you and Tom use 1D input.
I tried in 2D writing what I thought was exactly the same and got this mildly amusing result:

First 23 24 25 26 27 28 29 Last Page 25 of 229