(856,#7) Evaluate

where D is the region bounded by the spirals r = theta and r = 2 theta for 0 <= theta <= 2 Pi by changing to polar coordinates.

The domain of integration is pictured below. From it, we see that the limits of integration are theta = 0..2 Pi and r = theta ...2*theta

plot([t, 2*t], t = 0..2*Pi, coords = polar, color = [blue,red], tickmarks = [4,3]);

From it, we see that the limits of integration are theta = 0..2 Pi and r = theta ...2*theta

The value of the integral is

f := (x,y) ->x^2 + y^2:
c := t -> t: d := t ->2*t:

Integrate_rdrdt(f, 0, 2*Pi,c,d);

echo:f(r*cos(t), r*sin(t))*r = (r^2*cos(t)^2+r^2*sin(t)^2)*r c(t) = t d(t) = 2*t

int(f(r*cos(t), r*sin(t))*r, r ))= 1/4*(cos(t)^2+sin(t)^2)*r^4

int(f(r*cos(t), r*sin(t))*r, r = c(t)..d(t))= 15/4*t^4*cos(t)^2+15/4*t^4*sin(t)^2

int(int(f(r*cos(t), r*sin(t))*r, r = c(t)..d(t)),t)= 15/4*t^4*(1/2*cos(t)*sin(t)+1/2*t)-3*t^5+15/4*t^4*(-1/2*cos(t)*sin(t)+1/2*t)

int(int(f(r*cos(t), r*sin(t))*r, r = c(t) ..d(t)), t = a..b) = 24*Pi^5

by:sh