Dr. David Harrington

3020 Reputation

17 Badges

17 years, 310 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 professor of chemistry at the University of Victoria, BC, Canada, where 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

@Anthrazit  I don't have the right version to really comment specifically about your document (On your earlier document, I saw strange behaviour that I didn't understand, including the datatable extending briefly and then returning.) A long time ago, I wrote an app with datatables extending and reducing as required, and there was no problem - http://web.uvic.ca/~dharr/software/statmech/ I don't have any expectation that the size of the array and the number of visible columns or rows will automatically track each other - I always put the code to extend the array and to increase the visible columns together, and usually within a button code.

I do recall that forcing updates can sometimes be an issue, as @acer pointed out,

@Anthrazit  When I run that Document it leaves the number of visible columns at 1.

Adding the line SetProperty("DataTable0",VisibleColumns,8); at the end of the worksheet I uploaded before works consistently as I change the number of columns. I don't use document mode; maybe it is to do with that or a version issue (I'm using Maple 2017).

@Anthrazit  The Matrix A must exist first before the button is pressed, or the line 


gives the error message.

@GPU Programmer  the *.maple files were not successfully uploaded to Mapleprimes. .maple is a workbook extesion, so maybe your files are OK with a change of extension. I posted an answer that uses text files and does work.

@ogunmiloro Remove the ";" between the proc( ...) and local testRes: (I know; it does seem wrong)

proc( ...g)  #no semicolon here
local testRes:

@Carl Love  @nm

IMO most of the problem is trying to use Maple's D notation for something it isn't suited to. It wasn't until I read Carl's reply I actually realised what the OP wanted, because that wasn't just the conversion into D notation that the OP seemed to want (they mentioned D).

And the assymmetry in D(x) cf D(y(x)) seems strange.

Certalnly some more checking would be needed, but a different notation would be better. Something like DEtools:-de2diffop and diffop2de, where a new notation Dx can be set up (used for Linear operators, but not quite what is required here).

@GPU Programmer  I think you are agreeing with me, but I'm still not clear. If you want to incorporate a user function generated when using the module, I would do it this way.

  option package;
  export Lth;
  local Sqr;
  Sqr:=proc(A) A^2 end proc;
  Lth:=proc(A,B,usersqrt) usersqrt(Sqr(A)+Sqr(B)) end proc;
end module;



Sqr is used by Lth without the user needing to know about it. The following is a user function to be used by Lth

mysqrt:=proc(x) sqrt(x) end proc;

proc (x) sqrt(x) end proc





Download module.mw

@Hnx  Your mixed differential and algebraic equation (DAE) system can be solved by Maple's dsolve command - just give the two equations to dsolve and it will use a special DAE solver.

Since the splines are separate between each data point, I don't think there is a shortcut. But the numeric DE solver has an interpolant scheme and the derivatives up to one less that the order of the DE are already available because they are generated as part of solving the DE. If you want the highest order derivative, you can just solve an artificially higher order DE.

Suggest you upload your worksheet with the big green up arrow, so we can take a closer look.

@janhardo I could have finished it with the geometry package (FindAngle GCH, then get the area of the circular sector and subtract the area of the triangle GCD, and similarly with the other circle). For each object you can ask for details and get equations of lines, coordinates etc. So it probably can do the same things, though I have no experience with Geometry Expression. My general impression is that the geometry package is quite fussy about not doing things that might not be strictly correct, and needs appropriate combinations of assumptions - but Maple's assume facility is not always up to the task.

@Reshu Gupta  This code runs without error in Maple 2017

@DarkMath I'm guessing this has to do with the capabilities of solve. solve(x^2-9) gives 3,-3 but solve(sin(x)) is lazy and gives only 0. solve(sin(x),allsolutions) gives Pi*_Z1 with about (_Z1) showing _Z1 is an integer. So that could be used with some additional range checking. But solve(sin(x),useassumptions) assuming x>-3*Pi/2,x<3*Pi/2; returns only zero.

Maple's Dirac help page certainly suggests it uses the rule you specfied, so I think it is not unreasonable to expect Maple to do better in this case.

@vs140580  Not really your question, but perhaps the Iterator package does what you want, esp Iterator:-permute.

When I run the worksheet there us no error (Maple 2017)

First 10 11 12 13 14 15 16 Last Page 12 of 28