dharr

Dr. David Harrington

8762 Reputation

22 Badges

21 years, 95 days
University of Victoria
Professor or university staff
Victoria, British Columbia, Canada

Social Networks and Content at Maplesoft.com

Maple Application Center
I am a retired professor of chemistry at the University of Victoria, BC, Canada. My research areas are electrochemistry and surface science. I have been a user of Maple since about 1990.

MaplePrimes Activity


These are replies submitted by dharr

@nm The default postscript driver from the old days does not use color. There is a "cps" driver for color, so the following modification of @sand15's workaround gives a .ps file that has a colored grid when I open it in acrobat pro.

plotsetup(cps, plotoutput = "C:/Users/dharr/Documents/test.ps", plotoptions = noborder):
p:=plot(x^3, x = -8 .. 8, color = "blue",axis=[gridlines=[10,color="red"]]):
g := seq(plot(y, x=-8..8, color=red), y=[seq](-500..500, 100)), seq(plot([[x, -500], [x, 500]], color=red), x=[seq](-8..8, 2)):
plots:-display(p, g);  

I thought to convert the plot to an image file then export the image file, to get around different driver issues. But

p:=plot(x^3, x = -8 .. 8, color = "blue",axis=[gridlines=[10,color="red"]]):
i:=convert(p,Image):
op(2,i);
ImageTools:-Write("C:/Users/dharr/Documents/test.png",i);

from cmaple outputs  1 .. 600, 1 .. 800, 1 .. 3, as the hfarray dimensions, 5662 as the bytes written and a plot with no gridlines. From a worksheet the dimensions are the same but 19684 bytes are written and the gridlines appear. cmaple also ignores the size option in plot, whereas in a worhsheet the image dimensions change according to size. I'm mystified by the interpretation of this.

@JP Howe Copying your commands to Maple.ini in a directory and then starting an existing Maple worksheet in the same directory (by double-clicking on it) successfully finds and runs the Maple.ini commands. packages() shows LinearAlgebra is loaded.

There are several places that Maple.ini can be (see the help page ?worksheet/reference/initialization), and these are searched in a specific order, so you want to check you don't have a left-over one in a higher priority location.

By the way, your time domain expression doesn't seem to correspond to your transformed expression.

restart

u1 := -a*piecewise(t < t0, 0, t >= t0, 1)*(1-exp(-k*(t-t0)))

-a*piecewise(t < t0, 0, t0 <= t, 1)*(1-exp(-k*(t-t0)))

`assuming`([inttrans:-laplace(convert(u1, Heaviside), t, s)], [positive])

-a*exp(-s*t0)*k/((k+s)*s)

u2 := a*piecewise(t < t0, 0, t >= t0, 1)*exp(-k*(t-t0))

a*piecewise(t < t0, 0, t0 <= t, 1)*exp(-k*(t-t0))

`assuming`([inttrans:-laplace(convert(u2, Heaviside), t, s)], [positive])

a*exp(-s*t0)/(k+s)

NULL

Download transfer_fn.mw

This is hard to diagnose without seeing your workheet. Please upload it using the green up-arrow in the Mapleprimes editor, select the file, click upload and the click either insert link or insert content.

@JP Howe I'm happy to help. If evaluating forever, there will be a message "Evaluating..." that replaces "Ready" along the bottom edge of the window. Enjoy Maple 2025.

@Alfred_F I made some updates since you replied, so you may wish to download the new files. algadd now properly deals with the infinity point. I assumed you were looking for integer solutions, which is a fun application, but if you are happy with the general case of rational solutions, the transformation can be simplified slightly as noted in a comment in the Elliptic2 file.

p.s. I am dharr, not dharr 8722, the number is just my reputation, which changes over time.

@salim-barzani Yes, I saw you substituted alpha with beta in pde1 to get pde. But you are only testing if you found a solution to pde. If you find it is a solution to pde, you have solved a special case of pde1 where alpha and beta are equal. But you aren't testing pde1 so I dont understand what you expect or what you think is wrong.

@JP Howe So it is a version issue. It is not clear to me what "hangs" means. Sometimes when hitting "enter" on an input region nothing happens - the solution to that can be to run the whole worksheet using the !!! icon. Or deleting that region and reentering it.
Hangs could mean just evaluating forever?
Or perhaps Maple freezes up and has to be killed from the OS?

For that integral, Maple uses the VectorCalculus package, which is not necessary. VectorCalculus redefines many common operations (like int), so I would not load that package unless you really need it. Try deleting the with(VectorCalculus) line.

A couple of tips:

To find the length of a vector, you can use numelems() rather than MTM:-size().

You have a loop to set the small values in a vector to zero. Maple's fnormal() command can do this (on the whole vector or on a number).

@JP Howe Here is the way it looks:

Rev00G_2025-11-16_dharr.mw

@JP Howe In Maple 2025.1, I can execute the document with the !!! icon and it completes successfully to the end, producing 4 plots.

@salim-barzani I do not understand what you are saying. I changed parameters and functions to better values and still the result is zero. Perhaps the full pdetest is just too hard for Maple.

C-find.mw

@JP Howe No uploaded file. Use the green up-arrow, choose the file, click "upload" and then click "insert link".

@salim-barzani So for some parameter and function values, it solves the pde. If you found ans was not zero you would know you had made a mistake. To be more certain you could try more parameter options, but you should use random values like 0.27 and not values like 1 that might be special. If you didn't have functions and just numerical parameters then after multiples sets of random parameters you can be relatively certain the answer is right.

The functions are the main problem here since they have to be simple enough for the integration, but t->t is probably too simple.

@salim-barzani 

1. I had an extra parenthesis.

2. You cannot set values for the independent variables x,y,z or t.

3. The integral signs are in a gray color, meaning they are inert, so you need value.

p-test_(2).mw

1 2 3 4 5 6 7 Last Page 1 of 93