Redefining an integral using different variables but the same logic and getting inconsistent results

56 Views Asked by At

This has been on my mind for long time now, and I'm nowhere near to understanding it as I was when I first started.

Suppose you have $\int_a^b(x^2+2x)\,dx$, ($a$ and $b$ are defined) and this gives you some answer.

Now suppose that $x=\cos(\theta)$ and you replace the interval $[a,b]$ with $[c,d]$ such that $\cos(c) = a$ and $\cos(d)=b$.

$\int_c^d(\cos^2(\theta) +2\cos(\theta))\,d\theta$ will not give the same answer.

Somebody pointed me to "The Jacobian" or "Jacobian transformation", however researching this has been... confusing.

I first came about this when trying to prove the formula for the volume of a sphere.

I used the method where you slice the sphere into increasingly thin discs and take the sum of the area of each of these discs to accumulate the volume. The area of one of these discs was equal to $\pi(r^2-x^2)$ where $r$ is the radius of the sphere and if you assume $r$ is the hypotenuse of a right triangle inside the sphere, $x$ is the length of one of its other sides. Integrating this with respect to $x$ over the interval $[0,r]$, gave the correct answer i.e. half of the sphere; multiplied by $2$ it gave $\frac{4\pi r^3}{3}$.

However, if you take the angle $\theta$ inside the triangle such that $\cos(\theta)= \frac{x}{r}$, you can create another definition for $x$ where $x=r\cos(\theta)$. Now replace $\pi(r^2-x^2)$ with $\pi(r^2-(r\cos(\theta))^2)$ and integrate over $[0,\frac{\pi}{2}]$ and then multiply by $2$. The answer is incorrect.

I understand that the variables have changed and so has the interval for the integral, but the logic of the discs still applies, no? For example, even though it changed, $\pi(r^2-(r\cos(\theta))^2)$ still gives you the area of an infinitesimal slice of the sphere. And taking this over the new interval, with respect to $\theta$, would give you the area of the smallest slice to the biggest. So after accumulating this and multiplying it by 2, why doesn't it give the correct answer?

While I'm decent in English, It's still not my first language, therefor it is hard for me to articulate complex problems like this one in a good manner. I hope my question is concise enough to understand. Any help would be appreciated and help me finally sleep.

1

There are 1 best solutions below

4
On

The problem is that you cannot perform a change of variables "$x = \cos(\theta)$" like this. This is a u-substitution. So, for the equation $x = \cos\theta$, I will differentiate both sides with respect to $\theta$.

$$x = \cos\theta\implies \frac{\text{d}x}{\text{d}\theta} = -\sin(\theta).$$

Next, I will multiply both sides by $\text{d}\theta$, because I want to transform the $\text{d}x$ in my integral. So,

$$dx = -\sin(\theta) \, \text{d}\theta.$$

So,

$$\int_a^b (x^2+2x) \, \text{d}x = \int_c^d (\cos^2(\theta) + 2\cos(\theta))\cdot (-\sin(\theta)) \, \text{d}\theta$$

The problem is that you didn't change $\text{d}x$ into the proper $\text{d}\theta$.

Here's how you'd apply this logic to your sphere question. Your integral starts as:

$$\int_0^r ( \pi (r^2 - x^2)) \, \text{d}x$$

And you would like to perform the transformation:

$$x = r\cos(\theta)$$

Notice $x$ is a function of $\theta$, so $r$ is treated as a constant. It's independent of $r$. I will now differentiate both sides of the equation "$x(\theta) = r\cos(\theta)$". I've just used the notation $x(\theta)$ to make it explicitly clear that it's a function, so the derivative is clearer. Here goes:

$$x(\theta) = r\cos(\theta)\implies \frac{\text{d}x}{\text{d}\theta} = -r\sin\theta$$

Whomever told you that the extra factor you need is $r\sin(\theta)$ is incorrect, it should be $-r\sin(\theta)$. This is because the derivative of $\cos$ is $-\sin$. So, your integral becomes:

$$\int_0^r (\pi(r^2 - x^2)) \, \text{d}x = \int_{\frac{\pi}{2}}^0 (\pi(r^2 - (r\cos\theta)^2)\cdot (-r\sin\theta) \, \text{d}\theta$$

Notice the bounds become $\frac{\pi}{2}$ and $$ because if $x = 0,$ you want to solve the equation $0 = r\cos(\theta)$, which means $\theta$ must be $\frac{\pi}{2}$. If $x = r,$ then you want to solve the equation $r = r\cos\theta$, or $\cos\theta = 1$, which means $\theta = 0$. You can switch the bounds of integration on this at the cost of a $-$ sign, though.