Ask Your Question

Lunatic's profile - activity

2014-01-10 22:40:40 +0200 commented question How to solve for volume

yes, I know about max_symbolic. I've also tried getting sage to solve this symbolically and numerically, but I don't know what I'm doing wrong.

2014-01-10 22:28:53 +0200 received badge  Student (source)
2014-01-10 22:15:18 +0200 received badge  Editor (source)
2014-01-10 22:14:43 +0200 asked a question How to solve for volume

I have a function that looks like this:

def f1(x,y):
    return max(0, a * (r - x*x-y*y))

a and r are constants, with r being the radius. Given the radius, how do I get sage to tell me what a needs to be so that the volume of the function is 1?

For example, solution for radius of 1.5 is 0.28294212105225836:

r = 1.5
a = 0.28294212105225836
dblquad(lambda x, y: f1(x,y), -r, r, lambda x: -r, lambda y: r)
(1.0000000008272796, 4.581186036178006e-09)