Carl Love

Carl Love

28055 Reputation

25 Badges

12 years, 364 days
Himself
Wayland, Massachusetts, United States
My name was formerly Carl Devore.

MaplePrimes Activity


These are replies submitted by Carl Love

@Preben Alsholm I have no doubt that your Answer is correct---the results can be verified with intsolve---but I wonder What's the rule of calculus that lets you change the limits of integration from x= 0..y to x= t..y

A variable is used in the algorithm, in exponents only. I don't see where its value is set. So, what is p?

@J F Ogilvie Your reputation is next to your name on every post, next to your name at the top of the page (if you're logged in), and next to your name in many other places. Yours is currently 63.

@Preben Alsholm Thanks. Noted and corrected.

@Axel Vogt 

The links to a Mathematica marketing page and to a blog posted by Acer in a Reply to the Answer below suggest that Mathematica has implemented a general algorithm for highly oscillatory integrals rather than an ad hoc method to address the contest problem. I'm not a Mathematica user, so I can't test this.

@michjoh 

My primary purpose in the Answer above was to explain how to do a double break because sometimes it can't reasonably be avoided, and it also seemed to be the way that your thinking was headed. However, your code above uses an explicit loop to search through a table. This is not an efficient way to search. The time complexity is O(M*N^2) or possibly even O(M*N^2*ln(N)) (with the extra ln(N) because of the possibility of table indices not being stored linearly---I'm not sure how they're stored). Tom Leslie came up with a better way to do it: He uses an array for storage and the built-in member for the searches. Search by member still uses time proportional to the size of the object being searched, but is significantly faster than a for loop because it's built-in. I think that I can reduce the search time to logarithmic by using a table to mark the visited spots (kind of like marking your trail when you're lost in the woods so that you know when you've crossed your own trail). I'll probably have a chance to code it later today. It'll have time complexity O(M*N*ln(N)).

@michjoh I'm sorry that I didn't see this "Follow-up question" at the time that you posted it. On a quick reading, I think that this question has subsequently been answered in your subsequent thread "Break to form new lines". So, before I delve into this, please let me know if an answer is needed here.

You have one equation with 14 variables. If you can't come up with some numeric values for these so-called "constants", then the situation is hopeless.

@want to be a permanent vegan 

You say that "it" doesn't work. I want to make it clear that "it" refers to your functions, not my solution to your previous problem. My solution does indeed work in the sense that it corrects the error that you were getting before, which was a Maple error. This new error is a deeper more-mathematical error in your functions, which I'm too tired to delve into right now.

One way of achieving the piecewise plot that you want is this:

plots:-display([plot(I1, 0..100), plot(I2, 100..200)]);

Once again, the above will work if and only if your functions can be evaluated to real values in their respective intervals, which I haven't checked.

@Markiyan Hirnyk 

I was a member of one of the perfect-score teams in the contest, and the only member of that team who was expert in Maple. I completed four of the problems in Maple, one of which was the problem we're discussing now.

All of the problems were, by design, probably impossible to do directly with any CAS in existence at the time. I'm not sure that Prof. Lloyd N. Trefethen (the one who posed the problems) actually checked every CAS, but he was (is) a renown expert in such matters. By "doing the problem" I mean, for all ten problems, obtaining ten decimal digits of approximation; symbolic solutions are not wanted. All of the problems required (at that time) a significant amount of computation and a significant amount (many hours or days) of "by hand" work to get the ten digits. Much faster solutions have subsequently been found for most of the problems.

It's possible that Mathematica has made good use of the wealth of knowledge provided by the many published solutions to the problems (a whole book has been written about these solutions); I believe that Maple has failed to make use of that knowledge. The book is The SIAM 100-Digit Challenge: A Study in High-Accuracy Numerical Computing by Folkmar Bornemann, Dirk Laurie, Stan Wagon, and Jorg Waldvogel; 2004 SIAM (the Society for Industrial and Applied Mathematics); ISBN 0-89871-561-X.

@Markiyan Hirnyk Yes, if a Maple table is truly desired, it would be done like that. I was just guessing that the OP was using table colloquially, not in the Maple sense of the word. But you may be right.

@Markiyan Hirnyk Nice use of DirectSearch to find complex roots of a complex-valued function. I converted your Reply into an Answer so that I could vote it up.

Regarding your inability to upload the file to MaplePrimes: MaplePrimes has a problem with certain special characters in filenames.

Regarding my Answer: My main purpose was to show the OP how to improve his code that filtered the roots given by fsolve. I'm not at all surprised that fsolve missed many roots. I am suprised by the abyssmal failure of RootFinding:-Analytic to find any roots at all.

@Markiyan Hirnyk With fsolve, I found 16 roots in just the third quadrant of the OP's rectangle. These are shown in my Answer below. My first attempt was also to use RootFinding:-Analytic. I tried many different ways, but couldn't find a single root with it. I tried several smaller regions over which the function is indeed analytic.

Regarding your plot, I believe that the function is too "wavy" for its behavior to be adequately captured on the coarse grid of your plot. The magnitude has many very steep and narrow "valleys", as shown on my plots in my Answer.

@acer I don't know if this is a 2D-input difference, but don't you mean Shift-Enter rather than Ctrl-Enter? For me (using Maple Input (1D)), Ctrl-Enter inserts a page break.

I appreciate that you uploaded your worksheet for us to read. It'd be helpful if you'd also attach it to your post so that we could download it to work with it in our own Maple.

First 448 449 450 451 452 453 454 Last Page 450 of 709