last day (15 days later) » 

14:46
1
Q: Why does NIntegrate meet "error" when using Catch-Throw?

WateSoyanMy code is: Catch[NIntegrate[ 1, {x, y} \[Element] Triangle[{{0, 0}, {1, 2}, {2, 1}}], Method -> "MonteCarlo", EvaluationMonitor :> Throw[{x, y}]]] After intput it,a window showed below is returned: My system is Windows7,32bit.

The kernel shouldn't crash. I've let the appropriate developers know and they will be looking into it. Not sure what the input is intended to do, perhaps something like Reap[NIntegrate[ 1, {x, y} \[Element] Triangle[{{0, 0}, {1, 2}, {2, 1}}], Method -> "MonteCarlo", EvaluationMonitor :> Sow[{x, y}]]] may work?
@ilian Nice to meet you-WRI engineer.Reap-Sow works normally. But I only want the first random point in this region.
@ilian I can't translate the Chinese sentence in the window into English.
I can't translate it either, but I think it is the standard Windows "memory could not be written" crash dialog, e.g. i.stack.imgur.com/U4QK1.jpg The first point sown would be Reap[NIntegrate[...]][[2, 1, 1]]. In other threads, there are also several nice ways to generate random points in a region.
@ilian Yes,your guess is true,since I find that the meaning of sentences of two windows matches.
@ilian I need a function to generate random points in arbitary region (ranged from 0 dimension to 3 dimension) .
This functionality is coming soon, but for the time being perhaps try NIntegrate`RandomRegion[reg, n] to generate n random points.
14:46
@ilian I wonder why mathematica don't have a function to calculate the differential-Grobner basis,since I find it useful for a large number of problem.And I notice that DSolve in mathematica for PDE is relatively weaker than maple.I suggest that WRI should strength the functionality in this field in next editions.
@ilian That's a surprising exciting information for me.Thank you.
@ilian It failed when the region is Triangle[{{0, 0}, {1, 2}, {2, 1}}].In other words, NIntegrateRandomRegionTriangle[{{0, 0}, {1, 2}, {2, 1}}], 1] doesn't work
The exact input I used was
NIntegrate`RandomRegion[Triangle[{{0, 0}, {1, 2}, {2, 1}}], 1]
so the function is NIntegrate`RandomRegion, the first argument is Triangle[{{0, 0}, {1, 2}, {2, 1}}] and the second argument is 1
and I got {{0.976003, 1.2532}} as a result, which is indeed a point inside the triangle
15:04
NIntegrate`RandomRegion[Triangle[{{0, 0, 0}, {1, 0, 0}, {0, 1, 1}}],
1]
This code doesn't work.
yes, I can see it doesn't work in the released version
(already fixed in the development version)
as a workaround, I would suggest
`NIntegrate\`RandomRegion[
DiscretizeRegion@Triangle[{{0, 0, 0}, {1, 0, 0}, {0, 1, 1}}], 1]`
(sorry about the poor formatting, the only change in the input was to discretize the region first, that is use DiscretizeRegion[Triangle[{{0, 0, 0}, {1, 0, 0}, {0, 1, 1}}]])
15:21
I find it work in several regions that previously didn't work without DiscretizeRegion!
Would mathematica have a further development in symbolic solving the systems of PDEs?
Mathematica is useful in diverse fields but in symbolic solving the systems of PDEs , it often behaves weaker strangely.
yes, DSolve is under active development
by the way, please feel free to send any functionality wishes or examples that could be improved to [email protected]
feedback is always appreciated, and support can file suggestions to our development team
15:38
I can send email to [email protected]?Right?
yes, absolutely
I'm moved by your enthusiasm.
Thank you! I try to contribute to the site a bit when I have time, but there are so many experts here who've provided thousands of great answers. I hope you find it useful and enjoyable.
Since I am a Chinese student with about one-year learning experience in mathematica,I feel WRI is remote to me.I am not skilled in computer algorithm,so I tend to need good internal functions.

last day (15 days later) »