' File XIX_db7
' Given the 4-leaf curve, r = cos(2x), find the area of one of its leaf.
pi = 3.14159  :  p2 = 2pi
' Set r = 0 --> angles are +/- pi/4.
' Area is double integral of dA = r dr d(theta).   use x for theta angle.

F{x,r} = r  :  C{x} = 0  :  D{x} = cos[2x] :  a = -pi/4  :  b = pi/4

n = 10 : m = n   ' Panels.
ar = dblint[F, C, D, {a, b, n, m, y}]
ex = pi/8
' ************ Optional Plot ************
R{t} = cos[2t]
X{t} = R{t}*cos[t]
Y{t} = R{t}*sin[t]
P<t> = <X, Y, 0>
Plot[P, {t, 0, p2, 50}]

'@Area = @ar, square units.!
'@Exact area = pi/8 = @ex

