Application of Dominated Convergence Theorem and Monotone Convergence Theorem 
*

*Find the limit $$\lim_{n \rightarrow \infty} \int _0^n (1 - \frac{x}{n})^n \log (2 + \cos(\frac{x}{n})) dx$$ and justify the answer.


I think that the Dominated Convergence Theorem can be applied to this problem.
Since $$\int _0^n (1 - \frac{x}{n})^n \log (2 + \cos(\frac{x}{n})) dx = \int _0^\infty (1 - \frac{x}{n})^n \log (2 + \cos(\frac{x}{n}))1_{[0, n]}(x)  dx,$$
if I can find the dominating function, I will then apply DCT. 
After applying DCT, we will have $$\lim \int _0^\infty (1 - \frac{x}{n})^n \log (2 + \cos(\frac{x}{n}))1_{[0, n]}(x)  dx = \int _0^\infty \lim (1 - \frac{x}{n})^n \log (2 + \cos(\frac{x}{n}))1_{[0, n]}(x)  dx = \int _0^\infty e^{-x} \log (3)  dx = \log(3)e^{-x}|_{x=\infty, x=0} = - \log (3).$$
But I am not sure if $$\Big| (1 - \frac{x}{n})^n \log (2 + \cos(\frac{x}{n})) \Big| \leq 3e^{-x}$$ with $3e^{-x}$ integrable on $[0, \infty).$ Can someone check if my dominating function is alright ?


*Prove that $$\sum_{k = 1}^\infty \frac{1}{(p + k)^2} = - \int_0^1 \frac{x^p}{1-x}\log (x) dx$$ for $p>0.$
(This problem is allow to use the Fundamental Theorem of Calculus)


I suppose that I should apply FTC with DCT. But I have no ideas about doing this, any hints please ?
 A: As Moya stated in the comment section, your dominating function is correct. Indeed it can be shown (and it is in fact well known) that $$\Big(1 - \frac xn\Big)^{n} \uparrow e^{-x}.$$
For the other term notice that the argument in the $\log$ is allowed to range from in $[1,3]$ and $\log x$ in this interval is a positive increasing function, so that you can estimate it with $\log 3$ (you have $3$ multiplying the exponential which is fine, the estimate doesn't have to be sharp.) 
Notice that you missed a minus sign when evaluating the integral, the result indeed should be $\log 3$
To answer your second question, notice that for $x \in (0,1)$ we can write $\frac{1}{1 - x}$ as a geometric series, indeed
\begin{align}
 - \int_0^1\frac{x^p}{1 - x}\log x\,dx = &\ - \int_0^1\sum_{k = 0}^{\infty}x^{k + p}\log x\,dx \\
= &\ \sum_{k = 0}^{\infty} \int_0^1-x^{k + p}\log x\,dx \tag 1\\
= &\ \sum_{k = 0}^{\infty}\frac{1}{(k + p + 1)^2} \\
= &\ \sum_{k = 1}^{\infty}\frac{1}{(k + p)^2}
\end{align}
Notice that the crucial step here is $(1)$: to move the sum out of the integral you need to apply the Monotone convergence theorem to the partial sums. This can be done since $-x^{k + p}\log x$ is positive making the partial sums a nonnegative increasing sequence.
A: Since we know that $\left(1-\frac xn\right)^n$ is an increasing function of $n$ with limit $e^{-x}$ for $x>0$, then clearly $\left(1-\frac xn\right)^n \le e^{-x}$ for $x\ge 0$.
And since $-1\le \cos x\le 1$, then clearly $\log \left(2+\cos \left(\frac xn\right)\right)\le \log 3$
Putting these together gives
$$\left(1-\frac xn\right)^n\log \left(2+\cos \left(\frac xn\right)\right)\le \log (3)e^{-x}$$
and we have the dominating function since the indicator function is bounded by $1$.
