dharr

Dr. David Harrington

9379 Reputation

22 Badges

21 years, 339 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

Yes, I miss those indicators, too. My solution is to move to the edit tab and watch the "mode" when I am using mixed text/non-executable math. Then when I am entering text I see "text"; I use F5 to change to non-executable math and I see the change to "non-executable"; two times F5 goes back to text and I see "text" again. Edit: here's what I mean:

Edit: I just noticed the small icon on the drop-down box on the right of the top "line" of the screen also changes as you "toggle" F5.

I hadn't noticed differences in the cursor.

@Ronan It's a while since I used them; I can't remember :-(

@Paras31 Those seem to have good agreement, enough that you wouldn't see the differences on a plot. Your plots are different orientations and scales so hard for me to see where you think there is a difference, aside from the points at x=8 cm, which being on the boundary are exceptional. 

Are there places where the MMa and Maple results are very different but not on the boundary? Perhaps x=7.9 and t= 1min?

@Paras31 The approx_w(0.01,0.1) agrees to 3 decimal places with MMa, so is not a good sample point for further tests. Just let me know a point where there is poor agreement between MMa and Maple, and I'll take a closer look.

@Paras31 Your routine gets 0.3752737697 instead of 0.375077. Your s range is different so this is not an exact comparison, but in any case are you saying you are sure MMa is more accurate?

@Paras31 It is hard to say since I haven't followed in detail the two methods. I assume they are both approximations, so do you have some reason to think one is closer to the real solution? Have you benchmarked for a system for which you know the real solution? Can you improve the approximation, e.g., why is one integral from -5..5? is that adjustable?

First of all, I think you need to do an exact comparison (overlaid plots) or accurate comparisons at selcted points. Is there good accuracy for some x/t regimes?

@Paras31 In the first plot, where I think all the numbers are supposed to be 1 you have the worst point at 1.00000025, so the error is actually better that 0.001 (which I assume is worst case). For a plot with numbers of the order of one, I doubt whether you could visually tell 1.001 from 1. To me all the plots look essentially the same, so who could tell? Of course you may want to use epsilon = 1e-3 to speed things up and then use more accuracy in a final publication/presentation/etc.

For other than plots you might want more accuracy if you are going to use the results in further calculations. But even then you can do some faster, less accurate calculations in the preliminary stages and then require more accuracy for the final values of interest.

@wingho This is giving a 404 file not found error. Please try again - use the green up arrow; select the file; choose file upload and then choose insert link.

@acer Yes, for epsilon = 1e-3 it is about a factor of 2 speedup (on the slowest final calculation).

third_try.mw

@Paras31 Your plot was missing adaptive=false. The double seq did 6*10 calculations, each 9 s, for a total expected time of 9 minutes and it took 7 min, so you just had to wait longer.

third_try.mw

@Alfred_F Thanks. Changed to maximize.

@Rouben Rostamian  Yes, my plot (and calculation) are wrong. If I change the plot range to 0..40 rather than 0..x__max, I see the plot doesn't come down to the axis; Maple seemed to add a phantom point  in the 0..x__max case. So I see my mistake, and with a recalculated mu to make the plot to come to the axis I get the same value as you did. I've updated my answer and left the other one there for the record.

Thanks!

@Rouben Rostamian  I look forward to it; see what I got wrong. Edit: I figured it out.

@Paras31 If I look at integrand1, you have i; presumably i in exp(i*k*x) is supposed to be I=sqrt(-1), but in k1 you have I for sqrt(-1) and i interpreted as I. In k2 you have i interpreted as i. You need to use one or the other as sqrt(-1) - if using i, then you need to use interface(imaginaryunit=i).

@janhardo Thanks. I solved just the top part, for which the fence length is 50 m, so total fence length, top and bottom is 100 m. I've edited to clarify.

4 5 6 7 8 9 10 Last Page 6 of 105