Improper integrals through partitions of unity (Problem 3-37 from Spivak) Below is Problem 3-37 from Spivak's "Calculus on Manifolds". I don't know how to approach it. To begin with, I don't even understand which admissible cover should I take and which partition of unity should I take (why I need to choose these things is explained in the definition below). 

(a) Suppose that $f: (0,1)\to R$ is a nonnegative continuous function.
  Show that $\int_{(0,1)}f$ exists iff $\lim_{\epsilon \to 0}
> \int_\epsilon^{1-\epsilon} f$ exists.
(b) Let $A_n=[1-1/2^n,1-1/2^{n+1}]$. Suppose that $f: (0,1)\to R$
  satisfies $\int_{A_n}f=(-1)^n/n$ and $f=0$ for $x\notin$ any $A_n$.
  Show that $\int_{(0,1)}f$ does not exist, but $\lim_{\epsilon\to 0}
> \int_{(\epsilon,1-\epsilon)}f=\log 2$. (Note: errata says that one
  must require an additional assumption, e.g.: on each $A_n$, $f$ is
  either positive or negative, but not both.)

Also note that the integrals of the form $\int_{(a,b)}g$ are understood in "the extended sense" (please see the definition at the bottom of the following text:

 A: Without partition of unity
You can avoid the partition-of-unity formalism to prove (a). The extended integral of a nonnegative continuous function on an open interval in $\mathbb{R}$ (or more generally open rectangle in $\mathbb{R}^n$) can be defined equivalently as
$$\int_{(0,1)} f = \sup_{D \subset (0,1)} \int_D f,$$
if the supremum taken over all compact subsets of $(0,1)$ is finite.
If the extended integral exists then for the compact interval $[\epsilon,1-\epsilon]$ we have
$$\tag{1}\int_\epsilon^{1 - \epsilon}f \leqslant \sup_{D \subset (0,1)} \int_D f = \int_{(0,1)} f.$$
Since the integral on the LHS of (1) is bounded and increasing as $\epsilon \to 0$ it follows that
$$\tag{2} \lim_{\epsilon \to 0} \int_\epsilon^{1 - \epsilon}f \leqslant \int_{(0,1)}f$$
Conversely, if the limit on the LHS of (2) exists, then the integral over $I_\epsilon = [\epsilon,1-\epsilon]$ is bounded for all $\epsilon$ such that $I_\epsilon \subset (0,1)$. For any compact $D \subset (0,1)$, the collection $\{I_\epsilon\}$ is an open cover and there exists $\epsilon'$ such that $D \subset I_{\epsilon'}$and we have
$$\int_Df \leqslant \int_{\epsilon'}^{1 - \epsilon'} f \leqslant \lim_{\epsilon \to 0} \int_\epsilon^{1 - \epsilon} f.$$
Thus,
$$\int_{(0,1} f = \sup_{D \subset (0,1)}f \leqslant \lim_{\epsilon \to 0} \int_\epsilon^{1 - \epsilon} f.$$
With partition of unity
Let $\mathcal{O}$ be an admissible open cover  of $(0,1)$ and $\Phi$  be a subordinate partition of unity.
The proof relies heavily on the basic property that $\sum_{\phi \in \Phi} \phi(x) = 1$ for all $x \in (0,1).$
We have $\phi(x) \neq 0$ for only finitely many $\phi \in \Phi$ on the compact interval $\epsilon,1-\epsilon]$. Thus,
$$\tag{3}\int_\epsilon^{1 - \epsilon} f  = \int_\epsilon^{1-\epsilon} \left(\sum_{\phi \in \Phi} \phi\right) \, f =  \sum_{\phi \in \Phi} \int_\epsilon^{1-\epsilon} \phi \, f \leqslant \sum_{\phi \in \Phi} \int_{(0,1)} \phi \, f   .$$
If the RHS of (3) converges and $\int_{(0,1)}f$ exists, then the limit of the LHS as $\epsilon \to 0$ exists since $\int_\epsilon^{1-\epsilon} f $ is bounded and increasing (for $f$ nonnegative).
On the other hand, suppose $\lim_{\epsilon \to 0}\int_\epsilon^{1 - \epsilon} f$ exists.  By the properties of a partition of unity, for finitely many $\phi_1 , \ldots, \phi_n$, there exists $\epsilon > 0$ such that $\phi_k(x) = 0$ for $1 \leqslant k \leqslant n$ when $x \notin [\epsilon, 1 - \epsilon]$. Thus,
$$\sum_{k=1}^n \int_{(0,1)} \phi_k \, f = \sum_{k=1}^n \int_{\epsilon}^{1-\epsilon} \phi_k \, f = \int_{\epsilon}^{1-\epsilon} \left(\sum_{k=1}^n \phi_k\right) \, f = \int_\epsilon^{1-\epsilon}f \leqslant \lim_{\epsilon \to 0} \int_\epsilon^{1-\epsilon} f$$
Hence, the limit of the LHS as $n \to \infty$ exists since the sum is bounded and increasing and, therefore,  $\int_{(0,1)} f $ exists.
