dharr

Dr. David Harrington

8235 Reputation

22 Badges

20 years, 341 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

@felixiao You mean you want to find that there are three peaks? This is a nontrivial task - you need to numerically differentiate the data and then find where it crosses zero. It is easiest to do this visually - use the plot probe to see the max values and where they occur. I just split the data into ranges and did the max on each. You can use max[index] to find which N value the maximum occurs at.

MMSE_2re.mw

@felixiao Please upload the worksheet finding the maximum of KR[N].

I don't know an automatic way to get the indenting. I usually do this manually within the startup code window, with a bunch of "enter", "tab" and "delete". As a bonus, the diagnostics pane at the bottom tells you about unused variables etc (no errors in this case though).

For killing command completion, look at the choices under tools -> options -> interface.

@emendes try

procnames:=select(type,[anames('user')],procedure)[];
save procnames, cat(currentdir(),"/myprocs.mpl");

 

@FDS I think @Thomas Richard is asking you what happens if you use his method on your Excel file.

Here it is. Note that i+(j-1)*N was only used for the ordering of of the c[i,j](t) variables to save having the large list Vars in memory and passed to makeproc; the indexing of j11 was as in your original code and was not using i+(j-1)*N. But this is safer in the sense that if you change the ordering in Vars, the code will still work.

makeproctestnew2.mw

Although my codes are more stable in the sense I can get them working to higher N, they still lose connection to the kernel for some combinations of the task size and N, even though they do not output to the global arrays j11 and Equation, so it seems @Carl Love's conjecture is not correct, or is only part of the story. 

@C_R OK, I see you know it is in procedurelist form. I think the simplest is going to be sln(0) and look at the output. At least for an initial value problem you can enter any value, e.g., sln(-75), so long as it doesn't hit a singularity. It seems the sort of thing that infolevel[dsolve] might output, but no luck there.

Edit: If output = listprocedure, you see the variables in the output of dsolve, but perhaps changing the dsolve command is not allowed.

I have a vague recollection of having this issue, and the solution was to run the update from an administrator account (not just running as administrator from a non-administrator account).

@MaPal93 Looks OK. You need local gamma;

@MaPal93 Nice progress on making it simpler. Here is a note on using the multivariate chain rule to see some of the structure in terms of derivatives, though this may be obvious.

compact_derivatives2.mw

In 2024 I am not getting this warning. (Typesetting level is extended.)

restart;

interface(version);

`Standard Worksheet Interface, Maple 2024.1, Windows 11, June 25 2024 Build ID 1835466`

for k from 1 to 4 do
    A[k] := Matrix(k, k, (i, j) -> local m; ifelse(i + j < k + 2, add(Y[i - m + j - 1]*binomial(i - 1, m)*(-1)^m, m = 0 .. i - 1), 0));
end do

Vector(1, {(1) = Y[1]})

Matrix(2, 2, {(1, 1) = Y[1], (1, 2) = Y[2], (2, 1) = Y[2]-Y[1], (2, 2) = 0})

Matrix(3, 3, {(1, 1) = Y[1], (1, 2) = Y[2], (1, 3) = Y[3], (2, 1) = Y[2]-Y[1], (2, 2) = Y[3]-Y[2], (2, 3) = 0, (3, 1) = Y[3]-2*Y[2]+Y[1], (3, 2) = 0, (3, 3) = 0})

Matrix(%id = 36893490017533568292)

NULL

Download warning.mw

@MaPal93 Apologies. You are right, and the expression doesn't have any of the alias in it. I must have created it out of sequence. I haven't used Veil much, so can't comment. It should be possible to use it on X_2 before differentiation, and then differentiate.


 

restart;

interface(version);

`Standard Worksheet Interface, Maple 2023.2, Windows 10, November 24 2023 Build ID 1762575`

Physics:-Version();

`The "Physics Updates" package is not installed`

restart;

ode:=a*(1 + diff(y(x), x)^3)^(1/3) + x*diff(y(x), x) - y(x) = 0;

a*(1+(diff(y(x), x))^3)^(1/3)+x*(diff(y(x), x))-y(x) = 0

dsolve(ode,y(x),singsol=all)

y(x) = a*(c__1^3+1)^(1/3)+x*c__1, y(x) = (x^(3/2)*c__1+a^3-x^3)^(1/3), y(x) = -(1/2)*(x^(3/2)*c__1+a^3-x^3)^(1/3)-((1/2)*I)*3^(1/2)*(x^(3/2)*c__1+a^3-x^3)^(1/3), y(x) = -(1/2)*(x^(3/2)*c__1+a^3-x^3)^(1/3)+((1/2)*I)*3^(1/2)*(x^(3/2)*c__1+a^3-x^3)^(1/3)

 

Download strange_warning_message_from_dsolve.mw

@Rio I mainly just played around trying different things. The two simplest things to note are: 

If you just want to add things up and not find some formula for the sum, use add not sum (though, against this rule the formula for f runs more slowly with add than sum, for some reason I didn't analyze).

In general, floats introduce inaccuracy, so avoid them as long as possible; just use them right ar the end. This is critical here, where in A and B you are adding ca 20,000 terms, so errors accumulate to destroy any meaningful answer (unless the terms are all of comparable magnitude).

@Carl Love Nice analysis. Vote up.

First 19 20 21 22 23 24 25 Last Page 21 of 85