Show that $\ln\left(1+\frac1n\right)=\frac1n-\frac{\theta_n}{2n^2}$ I've been asked to show that for any natural number $n$, there exists $\theta_n\in (0,1)$ such that
$$\ln\left(1+\frac1n\right)=\frac1n-\frac{\theta_n}{2n^2}$$
I've tried to use integral identities in order to convert the logarithm into something easier to handle but it didn't work, so I would appreciate some hints. Thanks in advance.
 A: $$\ln\left(1+\frac1n\right) = \frac1n + \frac{\theta_n}{2n^2}$$
Write $f(x) = \ln(1+x)$. Then by definition of the derivative $$f(x) = f(0) + f'(0)x + \frac{f''(0)}{2}x^2 + o(x^2).$$ Where $o(x^2)/x^2 \to 0$ as $x \to 0$.
$f(0)= \ln(1+0) = 0$.
$f'(x) = \frac{1}{1+x}$ so $f'(0) = 1/(1+0) = 1$.
$f''(x) = \frac{-1}{(1+x)^2}$ and $f''(0) = -1$.
Thus $$f(1/n) = \frac{1}{n} - \frac{1}{2n^2} + o\left( \frac{1}{n^2} \right).$$
$o(1/n^2)$ represents a function for which $n^2o(1/n^2) \to 0$ as $n \to \infty$. Hence $o(1/n^2) \to 0$ as $n \to \infty$, and $$f(1/n) = \frac{1}{n} - \frac{1 - 2n^2o\left( \frac{1}{n^2} \right)}{2n^2}.$$
Now we must employ the taylor theorem to estimate the size of $o(1/n^2)$, henceforth write $E(x)=o(x^2)$.
If we constrain $f(x)$ to the interval $[0,1/n]$, $E(x)$ can be determined via bounds on $f'''(x)$. Note that $f'''(x) = \frac{2}{(1+x)^3}$. This function is decreasing and is bounded below by $0$. Thus $2/(1+1/n)^3 \le f'''(x) \le 2$ on $[0,1/n]$.
By the Remainder theorems for Taylor's formula (arising from the Mean Value Theorem), we have
$$0 < E(1/n) \le 2 \frac{1}{n^3 3!}.$$
Thus $$0< 2n^2 o\left(\frac{1}{n^2}\right) = 2n^2 E(1/n) \le \frac{4n^2}{n^3 3!} = \frac{2}{3n} < 1.$$
This yields $0 < \theta_n = 1-2n^2 E(1/n) < 1$.
A: For $x>0$ let
$$y(x)=\frac{2x-2\ln(1+x)}{x^2}$$
Then, $y(x)$ is a real number. So, define $\theta_n$ as $$\theta_n=y\left(\frac{1}{n}\right)$$
A: Applying Taylor's theorem
(with the mean-value form of the remainder)
 to $f(x) = \log(1+x)$ gives for $x > 0$
$$
 \log(1+x) = f(0) + x f'(0) + \frac 12 x^2f''(t)
 = x - \frac 12 x^2 \frac{1}{(1+t)^2}
$$
for some $t \in (0, x)$. With $x = \frac 1n$ you get
$$
 \log(1+ \frac 1n) = \frac 1n - \frac{1}{2n^2} \frac{1}{(1+t_n)^2}
$$
for some $0 < t_n < \frac 1n$. This is the desired estimate
because 
$$
  \theta_n :=  \frac{1}{(1+t_n)^2} \in (0, 1) \, .
$$

If you already know the Taylor series for $\log(1+x)$
then you can also argue as follows: For $0 < x \le 1$,
$$
 \log (1+x) = \sum_{k=1}^\infty  \frac {(-1)^{k+1}x^k}{k} =
 x - \frac{x^2}{2} + \frac{x^3}{3} - \frac{x^4}{4} \pm \ldots
$$
is an alternating series and therefore
$$ 
  x - \frac{x^2}{2} < \log (1+x) < x \, .
$$
It follows that 
$$
   \log (1+x) = x - \frac{x^2}{2} \, t
$$
for some $t \in (0, 1)$ and therefore
$$
   \log (1+\frac 1n) = \frac 1n - \frac{1}{2n^2} \theta_n
$$
for some $\theta_n \in (0, 1)$.
A: Hint: You're trying to bound a function of $1/n$ for large $n$, so consider a substitution of the form $x=1/n$ and think about how you might arrive at a comparable bound for small $x$.
[this assumes that the condition is $\theta_n \in [0,1]$]
A: we have $$\begin{align}\ln\left(1 + \frac 1n\right) &= \frac 1n -\int_1^{1 + 1/n}\left(1 - \frac 1 x\right)\, dx \\
&=\frac 1n - \theta\frac 1n\left(1-\frac 1{\frac 1 n+1}\right)\text{ where } 0 < \theta < 1 \\
&= \frac 1n - \theta\frac 1{n(n+1)}\end{align}$$ 
