From: rusin@vesuvius.math.niu.edu (Dave Rusin) Subject: Re: Semi-nasty integral Date: 5 Oct 2001 00:26:38 GMT Newsgroups: sci.math Summary: Computing areas of planar regions bounded by algebraic curves In article <9phc7h$2st$1@rzsun03.rrz.uni-hamburg.de>, Hauke Reddmann asked for a number, which is to be computed with a lot of definitions. I believe the number is (3 pi + 8 sqrt(2) - 18)/(3 pi - 8 sqrt(2) + 2 ) = 24.65562012... Let us take this in steps from his definitions. > y1=+sqr[2+10*x-x^2-2*{(1-2*x)^(3/2)}] > y2=+sqr[2+10*x-x^2+2*{(1-2*x)^(3/2)}] Square, subtract, and square again: each of these is part of the curve 3 2 2 4 x (x + 4) + (2 x - 4 - 20 x) y + y Translate and dilate with x=(1-z)/2, y=u/2; note that this will not change the ratio of the two areas below. The equation now is 3 2 2 4 0 = (z - 1) (z - 9) + (-54 + 36 z + 2 z ) u + u Now, in order to perform some algebraic stunts, it will be useful to parameterize this curve. (It is possible to do so rationally only because this curve happens to have genus 0. In other words: don't try this at home, kids!) Note that the original equations refer to the square root of 1-2x, which means this z must be positive; writing z = v^2 we discover that this equation factors into two: 3 2 3 2 (v + 1) (v - 3) + u = 0, (v - 1) (v + 3) + u = 0 Observe that for any combination (u,v) of numbers satisfying the first equation, (u,-v) satisfies the second, so we actually have a one-to-one correspondence between the points of the original curve and the points on, say, the first of these two. But this curve is easily parameterized; writing it as (u / (v-3))^2 + (v - 1)^2 = 4, we see that the pairs ( u/(2*v-6), (v-1)/2 ) lie on the unit circle, and so we may recover them all with this parameterization: u/(2*v-6) = -2*t/(1+t^2), (v-1)/2 = (1-t^2)/(1+t^2) that is, v = -(-3+t^2)/(1+t^2), u = 16*t^3/(1+t^2)^2 where, inversely, t = -u/(v^2-2*v-3). Working our way backwards we get a parameterization of that z-u curve using z = (-3+t^2)^2/(1+t^2)^2, and, if you'd like, of the first x-y curve: x = 4*(t^2-1)/(1+t^2)^2 , y = 8* t^3 /(1+t^2)^2 By the way, using this parameterization you can very easily plot "the rest of the story": the two curves given by the OP just show a couple of arcs which meet at a point. In fact, the graph of the algebraic curve I listed in the x-y plane is a very pretty three-sided figure with cusps replacing the vertices of a triangle. Now, why do I care about parameterization? It is because it is possible to compute the area of a plane region by integrating certain 1-forms around its boundary. For example, we may use the 1-form x dy for the curve in the x-y plane, or z du for the curve in the z-u plane. Using the parameterization z=z(t), u=u(t) in the previous paragraph, this becomes z(t) u'(t) dt, which in our case is -16*t^2*(-3+t^2)^3/(1+t^2)^5 dt And this anti-differentiates easily: an indefinite integral is F(t) = 8/3*t*(-3+43*t^2+7*t^4+9*t^6)/(1+t^2)^4 + 8*arctan(t) : 2 4 6 t (-3 + 43 t + 7 t + 9 t ) F(t) = 8 arctan(t) + 8/3 ---------------------------- 2 4 (1 + t ) Stick in endpoints and you're done. OK, well, what points are we interested in? The points in x-y coordinates: > P1=(0,0) > P2=(0,2) > P3=(V2-1,V2+1) > P4=(1/2,V3*3/2) correspond to points on our parameterization with, respectively, t=\infty, t=1, t=sqrt(2) + 1, and t=sqrt(3). Thus we can traverse three of the arcs using our parameterization: > c3 is the curve y=y1(x) between P1 and P3 use sqrt(2) + 1 <= t < infinity > c4 is the curve y=y1(x) between P3 and P4 use sqrt(3) <= t <= sqrt(2) + 1 > c5 is the curve y=y2(x) between P2 and P4 use 1 <= t <= sqrt(3) The other two arcs are straight lines: > c1 is the y axis between P1 and P2 use (z,u) = (1, t) , 0 <= t <= 4, to traverse upwards > c2 is the line y=x+2 between P2 and P3 use (z,u) = (t, 5-t), 3 - 2*sqrt(2) <= t <= 1 This traverses the line from left to right. (We also need to traverse this one from right to left.) So we can integrate z du over these arcs. For c3, c4, c5 use the antiderivative computed above: we compute F(infinity) = 4 pi F(sqrt(2)+1) = (10/3) sqrt(2) + 2 + 3 pi F(sqrt(3)) = (9/2 sqrt(3) + (8/3) pi ) F(1) = (28/3) + 2 pi So the integral over c3 is pi - (10/3) sqrt(2) - 2, and the integrals over c4 and c5 together add to (10/3) sqrt(2) - 22/3 + pi. The other two are trivial, e.g. over c1, we integrate z du = 1 dt over [0,4] to get 4, and similarly get 8 - 6 sqrt(2) travelling c2 from left to right. > F1 is the area enclosed by c1,c2,c3. > F2 is the area enclosed by c2,c4,c5. So F1 is (4) - (8 - 6 sqrt(2)) + ( pi - (10/3) sqrt(2) - 2 ) = pi + (8/3) sqrt(2) - 6 = .912828820 . Similarly F2 is ( (10/3) sqrt(2) - 22/3 + pi ) + (8 - 6 sqrt(2)) = pi - (8/3) sqrt(2) + (2/3) = .0370231547. > v=F1/F2 is wanted That's what I gave at the outset. You asked about doing this numerically. In a more general setting that might be easier. You can simply shoot darts at the plane and count the fractions of time the darts lie in one region or the other (or neither) and compute the corresponding ratio. I haven't done so. dave ============================================================================== From: Hauke Reddmann Subject: Re: Semi-nasty integral Date: 5 Oct 2001 08:03:08 GMT Newsgroups: sci.math Hmmm, the idea with the darts I could have found myself, as I somewhere back wrote a BASIC program to visualize the area by plotting random dots. (If anyone cares, these curves come from the parametrization of triangle shapes: Let s be the half circumference, p the incircle and r the circumcircle radius and plot x=p/r against y=s/r. The fact that a triangle can't be isosceler than isosceles limits y to lie between y1 and y2. The line y=x+2 separates obtuse and acute triangles.) -- Hauke Reddmann <:-EX8 Private email:fc3a501@math.uni-hamburg.de For our chemistry workgroup,remove "math" from the address For spamming, remove anything else