Carl Love

Carl Love

28055 Reputation

25 Badges

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

MaplePrimes Activity


These are replies submitted by Carl Love

@Kertab24 Notice that 1/Pi appears as an overall coefficient in F1, and Pi doesn't appear at all in F2. How can that possibly happen with indefinite integration? On the other hand, if the integral was done as a definite integral in polar coordinates (which would be natural for an integrand like sqrt(x^2+y^2)), that would account for the Pi.

@Kertab24 I'm sorry, I can't help anymore. The concept of an indefinite double integral is not very meaningful to me. Since Maple apparently allows it, I guess that it's meaningful to someone, and they may be able to help you further. If you can come up with limits of integration so that it becomes a definite integral, then I can continue to help.

Or, if you can provide a plaintext form of F2 so that I don't have to retype it, then I'll help by 1) substituting B= 2*x, b= 2*y, 2) differentiating with respect to x and y, and 3) comparing to F1 without its integral signs.

@Kertab24 Yes, there are easy solutions, but it's not clear to me what you're really trying to do. Are you

  1. trying to integrate the new expression---which is in terms of b and B and contains no x or y---with respect to x and y, so that you'd be integrating a constant?
  2. trying to make a variable substitution, like a u-substitution, which requires that the differentials be adjusted accordingly?
  3. trying to integrate the new expression with respect to b and B?

All of the above have easy solutions.

@Mac Dude You didn't do what I said: Measure it before and after running the suspect code and take the difference. I guess that I need to be more explicit:

MU:= proc({noGC::truefalse:= false})
   if not noGC then 
      gc(); 
      while kernelopts(gcbytesreturned) > 0 do gc() od
   fi;
   Matrix(kernelopts(memusage))  
end proc:

DeltaMU:= (MU0::Matrix(63,3))-> 
   sort(
      remove(
         r-> r[2..3] = [0,0], 
         convert(<MU0[..,1] | (MU() - MU0)[.., 2..3]>, listlist)
      ),
      key= (r-> r[3])
    )
:
   
MU0:= MU(): 
# Run suspect code here.
DeltaMU(MU0);

I don't know why the total of the third column doesn't equal what's reported on the status bar, but I'll note that the same thing happens for me and that kernelopts(bytesalloc) also doesn't equal what's on the status bar. This kernelopts(memusage) technique only reports legitimate memory usage, i.e., what the kernel has accounts for. If the problem is truly a "leak" rather than a coding error, it won't be directly reported. Some experiments posted on MaplePrimes in the past showed strong evidence that the kernel has memory leaks, such as garbage that doesn't get collected.

Of the 63 categories, at least 62 are documented (minimally!) in Appendix 1 "Internal representations" of the Maple Programming Guide. On a quick re-read, I couldn't find anything about category "temporary".

Yes, words are 64-bit words, unless you're one of the few who still has a 32-bit system. If a procedure is called a thousand times, and each time it "uses" a thousand words, that gets counted as a million words towards the total reported in the profile and by kernelopts(bytesused); but that means very little about your (legitimate) overall allocation (what's reported by kernelopts(bytesalloc)) because the vast majority is locals collected as garbage.

I'm sorry to say that your best source of information about all of this is likely a few old-timers (me included) here on MaplePrimes. My knowledge is based on about 90% extreme black-box experimentation, about 9% reading every available bit of documentation, and about 1% communication with others (including some of those old-timers) whose knowledge is more direct and less black-box. Those few who have intimate knowledge of the Maple kernel are notoriously tight-lipped about it, I guess because it's a trade secret.

@MapleMathMatt Thank you for the example. It is essentially the one that I had in mind that felt contrived to me. I'm not trying to give you a hard time about this. I think that this equivalent-equations idea can be extremely useful in matching a student's input with an instructor's template. But I think that it may need to be refined or tweaked. So, here are some ideas, not necessarily arranged in a fully coherent order (just brainstorming):

  1. I think that it may need to be specified which of the first two arguments represents the student's input and which represents the instructor's template.
  2. In your example, suppose that the second argument is the student's input. Does that mean that we allow the student to introduce arbitrary parameters as long as they cancel from both sides of the equation? It seems weird to allow that, plus we'd need to extract those parameters from the input to put into the params argument.
  3. On the other hand, suppose that the second argument is the instructor's template. Is there any good reason for the instructor to do that, to introduce a parameter?
  4. So, did you have an example of a reasonable problem that may be posed to a student in computer-generated homework or quizzes where your EquivEQ example immediately above would reasonably apply?
  5. Would it perhaps be better to pass to your procedure the symbol names that are not parameters and then let any other names be considered parameters?
  6. Would a better final criterion be indets(sol) subset {k} union params?

Here's my perspective on this: I have a good deal of experience with these systems (from various software companies) that allow students to give free-response symbolic-math answers to computer-posed problems, but my point of view is a bit unusual: neither student nor instructor nor question author nor template programmer. As a private tutor I've seen thousands of these questions from the student's point of view, mostly in statistics and calculus. I generally have a good idea what the expected form of the answer is and by how much the student can deviate from that form and still get marked correct. (I've never seen any of these systems give partial credit. These systems are usually used for homework, and the student is required to work on a problem until a correct answer is given regardless of how much time that takes, although you can set aside unfinished problems for later.) Of course, I have an excellent knowledge of computer-algebra and hence I'm aware of when those systems see (or can see) expressions as being equal. But I'm also well aware of Richardson's Theorem, which places severe theoretical limitations on the extent to which symbolic expressions can be proven equal, let alone equivalent.

Now, I can't recall any of these problems that required or allowed the student to introduce some symbol (which I guess we'll call a parameter) that wasn't already specified in the problem. But that doesn't mean that we shouldn't allow those things. We just need the appropriate template matching.

 

@MapleMathMatt Can you give an example of your intended use of a non-empty params parameter in your procedure EquivEQ? I can come up with examples where that parameter makes a difference, but they seem contrived and contrary to the intention of matching student input to a template.

@vv You're using indets, map, convert, and subs. It's a perfect situation to use subsindets:

subsindets(ex, function, convert, Diff);

@Goysa2 I added code to allow the user to change the rounding mode, which is controlled by the environment variable Rounding (see ?Rounding). The updated code is in the Answer above. This will definitely change the results for this example for some values of Digits because the critical number of terms is often exactly what will make the first unused digit 5. The second argument, the rounding mode, is optional.

@tomleslie You're right. I meant n > 2. I was posting from memory having just woken up.

@Dim What do you mean by "now" in the phrase "now need to put"? Has there ever been a Maple-related product that accepted sY(s) as a product? I doubt it. You at least need a space between the factors.

@tomleslie The OP's first expression is a Maple product command entered in 2D form. If that expression is entered with the assuming clause, the evaluation will still be in terms of GAMMA functions, but their arguments will be completely different and will never be negative when n >= 2

Please try it. I'd post a worksheet, but I'm currently stuck in an AirBnB with broken WiFi, so I'm posting this from my phone.

@ssllys I'm confused by your simultaneous use of D in both its indexed (D[i]) and non-indexed (D@@2) forms. The non-indexed form only makes sense for functions of exactly 1 independent variable. The indexed form only makes sense for functions of 2 or more variables, except possibly in a degenerate case where all the indices equal 1.

I think (but I'm not sure) that you may be making the common mistake of thinking that D[2] means the second derivative. It doesn't: It means the first derivative with respect to the second variable.

I'm glad that you highlighted normal mathematical function. That the resulting object would behave like a normal Maple mathematical function would be quite an achievement. I think that that documentation should be changed to normal numerical function.

@vv Why is your f, sin(x), "more relevant" than sqrt(1+x^2)?

@mark128384 If you got the correct answer, it's just happenstance. The planes aren't parallel, as VV pointed out, and that makes the problem nonsensical. Are you sure that you transcribed all of the coefficients correctly?

If you want to display 1/sqrt(6) without it changing to sqrt(6)/6, enter

1/'sqrt'(6);

First 337 338 339 340 341 342 343 Last Page 339 of 709