Need an equation....
Jan. 26th, 2004 06:11 pm![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Here's a math puzzle that I'd like a solution to -- having an answer to it would make a fairly key part of my thesis work much easier.
I need an function z=f(x, y) for a surface in three-space with the following characteristics:
That, as it stands, is the easy part; it suffices to explain the general character of what I'm looking for. I have one final requirement, which makes this a far more difficult problem:
Suggestions welcomed. Needless to say, a proof that a solution does not exist will also be useful.
I need an function z=f(x, y) for a surface in three-space with the following characteristics:
- The surface is, essentially, a bump; it has a finite maximum at (x,y) = (0,0), and decreases monotonically from there down to zero as the radius increases.
- The surface is defined and continuous everywhere.
- The first-order derivatives of the surface are defined and continuous everywhere, specifically including the origin.
- The surface is radially symmetric; it can be expressed exactly as z=g(x2+y2).
- The surface has compact support; there exists some radius R such that, for x2+y2>R, z=0.
That, as it stands, is the easy part; it suffices to explain the general character of what I'm looking for. I have one final requirement, which makes this a far more difficult problem:
- The integral of this function f over any given rectangle in xy-space must have a relatively simple closed-form solution. Integrals involving special functions (e.g., Bessel functions) are acceptable if there exists a simple and accurate numerical algorithm for computing them.
Suggestions welcomed. Needless to say, a proof that a solution does not exist will also be useful.
no subject
Date: 2004-01-26 07:49 pm (UTC)no subject
Date: 2004-01-26 11:52 pm (UTC)The short version -- i.e., just this little bit of the project -- is that I'm working on programming some code that applies forces in a fluid-flow simulation. Instead of applying them all at a single point, I want to have the force spread out over an area that includes several grid points of the simulation. That's where the "bump" comes in; it's the shape of the force distribution. I want to be able to easily integrate it, because if I can do that, I can make a bump with a total integral equal to the amount of force I want to apply, and then I can assign each grid point to a rectangle surrounding it (in such a way that all the rectangles are next to each other and cover the whole area once), and give the point a force corresponding to the integral of over it's little rectangle, and then the sum of all of the bits of forces that I put on the grid points will exactly equal the total amount of force I want to apply. There are other ways to get similar results, but they don't seem nearly as elegant.
no subject
Date: 2004-01-27 12:09 am (UTC)no subject
Date: 2004-01-27 12:18 am (UTC)no subject
Date: 2004-01-27 12:19 am (UTC)At least it wasn't a parenthesis. That would require drastic measures.
no subject
Date: 2004-01-26 09:22 pm (UTC)something, but wouldn't this work?
f(x,y) = 1/4 + (x2 + y2)2/4 - (x2 + y2)/2 for x2 + y2 <= 0
f(x,y) = 0 for x2 + y2 >= 0
no subject
Date: 2004-01-26 10:49 pm (UTC)Writing the code to do all the special cases for the (x2+y2)=1 arc intersecting the rectangle isn't going to be easy, I suppose, but then it wasn't ever going to be -- and it is at least quite possible.
Thanks muchly, masked commenter, whomever you are!
no subject
Date: 2004-01-26 11:17 pm (UTC)I'm a friend of Aga's.
no subject
Date: 2004-01-26 11:22 pm (UTC)no subject
Date: 2004-01-26 11:25 pm (UTC)write "for x2 + y2 <= 0"?
no subject
Date: 2004-01-26 11:34 pm (UTC)no subject
Date: 2004-01-26 11:36 pm (UTC)(I need to do something about this bad habit I have of hijacking other people's posts. *g*)
no subject
Date: 2004-01-26 11:42 pm (UTC)Hey, the hijack of my feeesheee post wasn't entirely you.
It wasn't even mostly you!
no subject
Date: 2004-01-26 11:45 pm (UTC)It's so cozy, having everyone to talk to at 3 in the morning. (Well, Brooks doesn't get the virtu points because it's only midnight for him, but still.)
no subject
Date: 2004-01-26 11:48 pm (UTC)And I'm not cleaning the bathtub.
no subject
Date: 2004-01-26 11:58 pm (UTC)no subject
Date: 2004-01-27 12:00 am (UTC)Section 104 is perturbingly exact in its four hundred wordsness.
no subject
Date: 2004-01-27 12:08 am (UTC)Last time I cleaned a bathtub, though, I mostly used an old sponge. Also salad oil and dish soap, but that's a different story -- a story of gooey soap scum that resisted all commercial cleansers I had to hand, to be specific, but the salad oil got it off reasonably nicely, and then the dish soap and hot water did quite well at getting the salad oil off.
no subject
Date: 2004-01-27 12:11 am (UTC)There's enough crud (much of it my hair) in/on the tub that I would really like to be able to scrape it off and throw it away without having to think about it.
*ponders at 105 and whether she's awake enough to write it*
no subject
Date: 2004-01-27 12:19 am (UTC)I think I'm going to sleep pretty soon, though, as I need to be up reasonably early tomorrow....
no subject
Date: 2004-01-27 12:23 am (UTC)no subject
Date: 2004-01-27 12:25 am (UTC)no subject
Date: 2004-01-27 12:29 am (UTC)Agh.
no subject
Date: 2004-01-27 05:20 am (UTC)no subject
Date: 2004-01-26 11:54 pm (UTC)no subject
Date: 2004-01-27 05:01 am (UTC)no subject
Date: 2004-01-26 11:38 pm (UTC)