How to graph $\int_0^ \pi \int_0^{2\cos(\theta)}r\, dr\,d\theta$

290 Views Asked by At

I want to graph the region that the integral $\int_0^ \pi \int_0^{2\cos(\theta)}r\, dr\,d\theta$ integrates over, which is a little weird because I don't understand how $\theta$ goes from $0$ to $\pi$.

It would be obvious if $\theta$ goes from $-\frac{\pi}{2}$ to $\frac{\pi}{2}$.

I checked answers in the back of the book and it was a full circle with center of $(1,0)$ and radius of $1$.

3

There are 3 best solutions below

0
On BEST ANSWER

When $\theta$ passes above $\pi/2$, $r=2\cos\theta$ becomes negative and the vector therefore reverses from the second quadrant to the fourth. This causes the $\pi/2\le\theta\le\pi$ region to match the $-\pi/2\le\theta\le0$ region, and so you get the same graph with $\theta\in[0,\pi]$ as you would have gotten with $\theta\in[-\pi/2,\pi/2]$. ●

0
On

For the original problem, i.e. graphing the integral, I would recommend the following steps:

  1. Combine the integrals to get: $$ \int_{R} r dR $$, where $R=$cut rectangle with $(\theta,r) \in (0..\pi,0..2\cos{\theta})$.
  2. Separate the function from the integral: $$ \int_{R}f(R) dR $$, $f(R)=r \Rightarrow f((\theta,r)) = r$
  3. Build a matrix of $f$ values(sampling with 20 samples) $$ \begin{matrix} 0,0,0,0,0,0,0,0,0,...,0\\ ... \\ \\ 2,2,2,2,2,2,2,2,2,...,2\\ \\ ...\\ 0,0,0,0,0,0,0,0,0,...,0\\ \end{matrix}$$
  4. Notice that the numbers in the table are independent of $\theta$, and thus we get: $$ \int_{R} r dR = 20\int_{r} r dr $$ => can reduce the dimension, as long as \theta is considered when calculating the 2d area. It's kinda odd that our "sampling constant" 20 becomes visible in this expression. And we end up with $$ f(r) = 0, ..., 2, ..., 0 $$

For this kind of 1d integrals, there is easy solution. Decide $\Delta r=\frac{2\cos{\frac{\pi}{2}}}{20}$, with $\frac{\pi}{2}$ is the largest value of $\cos{\theta}$ and then use the standard $$f'(r) = \lim_{\Delta r\rightarrow 0} \frac{f(r+\Delta r)-f(r)}{\Delta r}$$. These $f(r)$ values we had in the 1d table.

Let $r=[0,\Delta r, 2\Delta r, 3\Delta r, ..., 20\Delta r]$. From the lim, we can get values for $$ f'(r) = [\lim_{\Delta r \rightarrow 0} \frac{f(0+\Delta r)-f(0)}{\Delta r}, ...]$$, i.e. 20 numbers representing $f'(r)$. We can do the same for the whole sequence: $$ C, f(r), f'(r), f''(r), f'''(r), f''''(r), f'''''(r) , ...$$.

Now this triangular 2d table is interesting since we can find coefficient's for Taylor Series with it to get the function for the integral $\int_r r dr$ to recover the polynomial representing the integral.

This can be easiest done with the binomial coefficient (this is actually gregory-newton, not taylor series): $$ \int_r r dr \simeq g(k) = {{k}\choose{0}}C + {{k}\choose{1}}f(r) + {{k}\choose{2}}f'(r) + ... $$. ((Note: $\simeq$ is for several reasons: 1) we do not know if the integral is polynomial/that decision requires knowing that $r$ is polynomial and that the integral is linear operator, but the right-side expression is clearly a polynomial and the linearity came here as a suprise. Also the "infinite sum" can be reduced to finite sum because $f'''''''$s are going zero information is not available here either))

with ${{k}\choose{n}} = \frac{k!}{n!(k-n)!}$ we can get values out from the expression. (note variables k and n are swapped in this expression compared to standard notations, but that changes nothing).

This $g(k)$ is a polynomial with $C$ as freely chosen constant. Then we'll just recover the original integral with $\int_{R} r dR = 20\int_{r}r dr = 20g(k)$. QED.

It is left as excersize for the reader to complete the tables and calculate numerical values for the coefficient of the polynomial g(k).

You'll need the g(k) to graph the integral and then some innovative steps to expand it to 2d.

NOTE that the sampling constant earlier was chosen to be 20 simply because the binomial co-efficients at the end will grow larger than normal integer/long integer range in normal computers, and if you implement the algorithm with computer, 21 is the biggest number you can use before binomial-coefficient overflows.

1
On

Note that the boundary of the region you are trying to find will be $r=2 \cos \theta.$ Indeed, for every $\theta \in [0,\pi]$, the other end of the integral gives $r=0$, so the inverval will always be $[0, 2 \cos \theta$] (Note have $0<2\cos \theta$ for $\theta > \frac{\pi}{2}$.)

We can convert to Cartesian coordinates via the substitutions $r=\sqrt{x^2+y^2}$, $ \cos \theta=\frac{x}{r}=\frac{x}{\sqrt{x^2+y^2}}$.

This gives

$$\sqrt{x^2+y^2}=\frac{2x}{\sqrt{x^2+y^2}}$$

so

$$x^2+y^2=2x.$$

We can complete the square to get

$$(x-1)^2+y^2=1$$

which is indeed the circle you are seeing.

it remains to check that we get the whole circle for $\theta \in [0, \pi$].

At $\theta=0, \pi$, we have $r=2 \cos \theta =2,-2$ respectively, so we get the point $(0,2)$ on the circle both times.

The curve is continuous and varies over an interval of length $\pi$. Since the circle $r=2\cos\theta$ has its angle with the origin vary from $[-\pi/2, \pi/2]$ (as you noted) we get the whole circle.