limit $\lim_{k \to \infty} \int_{0}^{1} \frac{kx^k}{1+x} dx$ Consider the following sequence of functions and their integrals on $[0,1]$. Evaluate the limit of the following integral if possible
$$\lim_{k \to \infty} \int_{0}^{1} \frac{kx^k}{1+x} dx$$
At first glance, I do not know if the limit exists or not. Wolfram alpha will not take the limit for me, but it did evaluate the integral. The result is terms of a function I do not understand, but from looking at the series expansion:
$$x^k \left(\frac{kx}{k+1} - \frac{kx^2}{k+2} + \frac{kx^3}{k+3} - \dots\right)$$
it appears as though the limit is $0$ since $x \in [0,1]$. However, I have attempted the problem two different ways, and I am getting that the result is infinity. I am curious where I maybe going wrong.
Note: I am not looking for an answer. I just want to see where my logic is wrong (mainly in my 2nd attempt) so that I can try to make the correction.
Attempt 1: I can pull the $k$ outside the integral and get
$$\lim_{k \to \infty} k \int_{0}^{1} \frac{x^k}{1 + x} dx$$.
Now, $|\frac{x^k}{1+x}| \leq \frac{1}{1+x} = g(x)$ since we are on $[0,1]$. Since $g(x)$ is integrable, and dominates $f(x)$, the dominated convergence theorem tells me I can pass the limit inside.
$$\int_{0}^{1} \lim_{k \to \infty} \frac{kx^k}{1+x} dx = \infty $$ due to the factor of $k$.
Now, outside of the fact that I have not done measure theory for quite some time, I am uncertain about this for two reasons. One, DCT refers to Lebesgue integrable functions. I am always hesitant when I use it during a discussion of Riemann integration. Secondly, while I am definitely allowed to pull the $k$ outside of the integral, I am not sure I am allowed to apply DCT on the result without $k$, and then put the $k$ back inside along with the limit. If I had to dominate $\frac{kx^k}{1 + x}$, I am not sure it would work. These uncertainties made me want to try to brute force this with Riemann integration.
Attempt 2:
I will rewrite the integral as
$$\lim_{k \to \infty} k \int_{0}^{1} \frac{x^k}{(\sqrt{1 + x})^2}dx$$ so that I can apply Trigonometric substitution. I would get
$\sec(\theta) = \sqrt{1 + x}$
$\tan(\theta) = \sqrt{x}$
$\tan^2(\theta) = x$
$2\tan(\theta)\sec^2(\theta)d\theta = dx$
Substituting,
$$\lim_{k \to \infty} k \int \frac{\tan^{2k}(\theta)}{\sec^2(\theta)} 2 \tan(\theta) \sec^2(\theta) d\theta$$
Cleaning this up,
$$\lim_{k \to \infty} 2k \int \tan^{2k+1}(\theta) d\theta$$
Now, I can pull out 2 of the tangents.
$$\lim_{k \to \infty} 2k \int \tan^{2k - 1}(\theta) \tan^2(\theta)d\theta$$
Using the identity $\tan^2(\theta) = \sec^2(\theta) - 1$,
$$\lim_{k \to \infty} 2k \int \tan^{2k-1}(\theta) \sec^2(\theta) d\theta - \lim_{k \to \infty} 2k \int \tan^{2k-1}(\theta) d\theta$$
The first integral can be done with $u$-substitution. Let $u = \tan(\theta)$. Then, $du = \sec^2(\theta) d\theta$
$$\lim_{k \to \infty} 2k \left[\frac{u^{2k}}{2k}\right] - \lim_{k \to \infty} 2k \int \tan^{2k-1}(\theta) d\theta$$
Now, I can back substitute.
$$\lim_{k \to \infty} 2k \left[\frac{\tan^{2k}(\theta)}{2k}\right] - \lim_{k \to \infty} 2k \int \tan^{2k-1}(\theta) d\theta$$
Again,
$$\lim_{k \to \infty} 2k \left[\frac{x^k}{2k}\right]_{0}^{1} - \lim_{k \to \infty} 2k \int \tan^{2k-1}(\theta) d\theta$$
Evaluating,
$$\lim_{k \to \infty} 2k \frac{1}{2k} - \lim_{k \to \infty} 2k \int \tan^{2k-1}(\theta) d\theta$$
At this point, I can say the first limit is $1$. Now, I still have an odd power of tangent in the second integral. So, I can repeat this process again
$$1 - \lim_{k \to \infty} 2k \int \tan^{2k - 3}(\theta) \sec^2(\theta) d\theta + \lim_{k \to \infty} 2k \int \tan^{2k - 3}(\theta) d\theta$$
Then,
$$1 - \lim_{k \to \infty} 2k \left[\frac{u^{2k-2}}{2k-2}\right] + \lim_{k \to \infty} \int \tan^{2k - 3}(\theta)$$
Again,
$$1 - \lim_{k \to \infty} 2k \left[\frac{\tan^{2k-2}(\theta)}{2k-2}\right] + \lim_{k \to \infty} \int \tan^{2k - 3}(\theta)$$
Then,
$$1 - \lim_{k \to \infty} 2k \left[\frac{x^{k-1}}{2k-2}\right]_{0}^{1} + \lim_{k \to \infty} \int \tan^{2k - 3}(\theta)$$
Evaluating,
$$1 - \lim_{k \to \infty} 2k \frac{1}{2k-2} + \lim_{k \to \infty} \int \tan^{2k-3}(\theta) d\theta$$
Then, this limit is also $1$
$$1 - 1 + \lim_{k \to \infty} 2k \int \tan^{2k-3}(\theta) d\theta)$$
So,
$$\int \tan^{2k-3}(\theta) d\theta)$$
Well, this is very nice. I have ended up with a single integral with an odd power of tangent. So, I can repeat these two steps over and over until I am left with.
$$\lim_{k \to \infty} 2k \int \tan(\theta) d\theta$$
after going through all of the powers. Well, this integral I know
$$\lim_{k \to \infty} 2k \left[- \ln|\cos(\theta)| \right]$$
Going back to our trig sub, we can see that
$$\cos(\theta) = \frac{1}{\sqrt{1 + x}}$$. Therefore,
$$\lim_{k \to \infty} 2k \left[ -\ln|\frac{1}{\sqrt{1+x}}|\right]_{0}^{1}$$
Evaluating,
$$\lim_{k \to \infty} -2k\ln|\frac{1}{\sqrt{2}}| = \infty$$
This matched the result I got before, and I will much better about this because I just used straight up integration rather than a sophisticated tool that I don't know very well, the dominated convergence theorem.
My uncertainty lies in that the answer does not appear to be $\infty$ based on the power series wolfram alpha gave. Does anyone see where I am going wrong?
 A: $$
\begin{align}
\lim_{k\to\infty}\int_0^1\frac{kx^k}{1+x}\,\mathrm{d}x
&=\lim_{k\to\infty}\int_0^1\frac{x}{1+x}\,\color{#C00}{kx^{k-1}\,\mathrm{d}x}\tag{1a}\\
&=\lim_{k\to\infty}\int_0^1\frac{u^{1/k}}{1+u^{1/k}}\,\color{#C00}{\mathrm{d}u}\tag{1b}\\
&=\int_0^1\lim_{k\to\infty}\frac{u^{1/k}}{1+u^{1/k}}\,\mathrm{d}u\tag{1c}\\
&=\int_0^1\frac12\,\mathrm{d}u\tag{1d}\\
&=\frac12\tag{1e}
\end{align}
$$
Explanation:
$\text{(1a):}$ $kx^k=x\cdot kx^{k-1}$
$\text{(1b):}$ substitute $u=x^k$ so that $\mathrm{d}u=kx^{k-1}\,\mathrm{d}x$
$\text{(1c):}$ Monotone Convergence or Dominated Convergence (dominated by $\frac12$)
$\text{(1d):}$ evaluate the limit
$\text{(1e):}$ evaluate the integral
A: 
Now, $|\frac{x^k}{1+x}| \leq \frac{1}{1+x} = g(x)$ since we are on $[0,1]$.

You miss the factor $k$, if you want to use dominated convergence theorem, you have to show $|\frac{kx^k}{1+x}| \leq g(x)$ on $[0,1]$, where $g(x)$ is independent of $k$.

$$\lim_{k \to \infty} \int_{0}^{1} \frac{kx^k}{1+x} dx$$

$$I_k=\int_{0}^{1} \frac{kx^k}{1+x} dx=\frac{k}{k+1}\int_{0}^{1} \frac{1}{1+x} dx^{k+1}=\frac{1}{2}\cdot\frac{k}{k+1}+\frac{k}{k+1}\int_{0}^{1} \frac{x^{k+1}}{(1+x)^2} dx$$
$$\lim_{k\to\infty}I_k=\frac{1}2+\lim_{k\to\infty}\int_0^1\frac{x^{k+1}}{(1+x)^2} dx$$
Since $$\frac{x^{k+1}}{(1+x)^2} \le\frac{1}{(1+x)^2}~~~\text{for}~~x\in[0,1]$$
and $\frac{1}{(1+x)^2}$ is integrable on $[0,1]$. So by dominated convergence theorem, we can interchange the limit and integration. Namely,
$$\lim_{k\to\infty}I_k=\frac{1}2+\int_0^1\lim_{k\to\infty}\frac{x^{k+1}}{(1+x)^2} dx=\frac{1}2$$
A: 1st attempt: You can't apply the dominated convergence theorem to the set of functions $\frac{x^k}{1+x}$ and then bring in the $k$ after you've evaluated the limit. For dominated convergence, you need a sequence of integrable functions that are bounded by an integrable function and converge pointwise to an integrable function.
So, dominated convergence does say
$$\lim_{k \to \infty} \frac{x^k}{1+x}dx = 0$$
because $\frac{x^k}{1+x}$ converges pointwise to the function $f(x) = 0$ on $(0,1)$, and indeed these functions are bounded by $\frac{1}{1+x}.$ Once you bring in the $k$ here, you have to try to apply dominated convergence to the functions
$$\frac{kx^k}{1+x},$$
which is an entirely different problem because when you look at $x = 1$, we see that these functions diverge to $+\infty.$ In general, you can't separate out limits unless you know that each of them converge.
Also, your measurability concerns are trivial: these functions are continuous, and if a function is Riemann integrable on a compact set, they are lebesgue integrable on said compact set. (The issue arises when you integrate over the real numbers.)
2nd attempt: you need to be more careful with how you apply limits. You can't just take a limit of one part of an equation and take the limit of another part of the equation years later. The terms you were throwing away make up a nontrivial part of the limit.
So, let's take your method of eventually getting to $\int \tan(\theta) d\theta.$ Let's fix $k$, apply your reductions, and see what we get.
\begin{align} 
 \int 2k \tan^{2k+1}(\theta)d\theta &= 2k \frac{x^k}{2k(1+x)} \bigg|_{x=0}^1 - 2k \int \tan^{2k-1}(\theta)d\theta
\\
&=
2k \frac{x^k}{2k(1+x)} - 2k\frac{x^{k-1}}{(2k-2)(1+x)} + 2k\int \tan^{2k-3}(\theta)d\theta...
\\
&=
2k \bigg( \frac{x^k}{2k(1+x)} - \frac{x^{k-1}}{(2k-2)(1+x)} + ... \pm \frac{x^1}{2(1+x)} \bigg)\bigg|_{x=0}^1 \pm 2k\int \tan(\theta)d\theta.
\end{align}
You see that we can't just take the limit as $k \to \infty$ because of the tail terms (i.e., $\frac{x}{1+x}$,) so you have to find some other way of obtaining this limit.
A: Note that $\lim_{k \to \infty} {kx^k}=0$ for $x\in(0,1)$, which allows the integration below
$$\lim_{k \to \infty} \int_{0}^{1} \frac{kx^k}{1+x} dx
=
\lim_{k \to \infty,\epsilon\to 1} \int_{\epsilon}^{1} \frac{kx^k}{1+x} dx
 =\lim_{k \to \infty} \int_{\epsilon}^{1} \frac{kx^k}{2} dx=\frac12
$$
