Home » L'Hopital's Rule

Tag: L’Hopital’s Rule

Test the improper integral ∫ 1 / (x1/2 log x) for convergence

Test the following improper integral for convergence:

    \[ \int_{0^+}^{1^-} \frac{dx}{\sqrt{x} \log x}. \]

The integral diverges.

Proof. First, we show that \log x < \sqrt{x} for all x> 0. To do this let

    \[ f(x) = \sqrt{x} - \log x \quad \implies \quad f'(x) = \frac{1}{2 \sqrt{x}} - \frac{1}{x} = \frac{\sqrt{x} - 2}{2x}. \]

This derivative is 0 at x = 4 and is less than 0 for x < 4 and greater than 0 for x > 4. Hence, f(x) has a minimum at x = 4. But, f(4) = \sqrt{4} - \log 4 = 2 - 2 \log 2 > 0 (since 2 < e implies \log 2 < 1). So, f(x) has a minimum at x = 4 and is positive there; thus, it is positive for all x > 0, or

    \[ f(x) = \sqrt{x} - \log x > 0 \quad \implies \quad \sqrt{x} > \log x \qquad \text{for all } x > 0. \]

So, since \log x < \sqrt{x} we know

    \[ \frac{1}{\sqrt{x} \log x} > \frac{1}{\sqrt{x} \cdot \sqrt{x}} = \frac{1}{x}. \]

But then, consider the limit

    \begin{align*}  \lim_{x \to 0^+} \frac{ \frac{1}{x} }{ \frac{1}{\sqrt{x} \log x}} &= \lim_{x \to 0^+} \frac{\log x}{\sqrt{x}} \\  &= \lim_{x \to 0^+} \frac{\log x}{x^{\frac{1}{2}}} \\[9pt]  &= 0 &(\text{by Theorem 7.11}). \end{align*}

Therefore, by the limit comparison test (Theorem 10.25), the convergence of \frac{1}{\sqrt{x} \log x} would imply the convergence of \int_{0^+}^a \frac{1}{x} (for any 0 < a < 1), but we know by Example 5 that this integral diverges. Hence, we must also have the divergence of

    \[ \int_{0^-}^{1^+} \frac{1}{\sqrt{x} \log x} \, dx. \qquad \blacksquare \]

Determine the convergence of the series 1 – n sin (1/n)

Consider the series

    \[ \sum_{n=1}^{\infty} \left( 1 - n \sin \frac{1}{n} \right). \]

Determine whether the series converges or diverges. If it converges, determine whether it converges conditionally or absolutely.

The series converges absolutely.

Proof. We know from the previous exercise (Section 10.20, Exercise #30) that the series

    \[ \sum_{n=1}^{\infty} \frac{\sin \frac{1}{n}}{n} \]

converges absolutely. Using the limit comparison test we have

    \begin{align*}  \lim_{n \to \infty} \frac{a_n}{b_n} &= \lim_{n \to \infty} \frac{1 - n \sin \frac{1}{n}}{\frac{1}{n} \sin \frac{1}{n}} \\[9pt]  &= \lim_{n \to \infty} \frac{\frac{1}{n} - \sin \frac{1}{n}}{\frac{1}{n^2} \sin \frac{1}{n}}. \end{align*}

Now we consider these as functions of a real-variable and make the substitution n = \frac{1}{x}, and use L’Hopital’s rule three times to take the limit,

    \begin{align*}  \lim_{n \to \infty} \frac{\frac{1}{n} - \sin \frac{1}{n}}{\frac{1}{n^2} \sin \frac{1}{n}} &= \lim_{x \to 0} \frac{x - \sin x}{x^2 \sin x} \\[9pt]  &= \lim_{x \to 0} \frac{1 - \cos x}{2x \sin x + x^2 \cos x} \\[9pt]  &= \lim_{x \to 0} \frac{sin x}{(2+x^2) \sin x + 4x \cos x} \\[9pt]  &= \lim_{x \to 0} \frac{\cos x}{-2x \sin x + (6+x^2)\cos x} \\[9pt]  &= \frac{1}{6}. \end{align*}

Therefore, since \sum b_n converges absolutely we have established the absolute convergence of

    \[ \sum_{n=1}^{\infty} \left( 1 - n \sin \frac{1}{n} \right). \qquad \blacksquare\]

Compute the limit of the given function

Evaluate the limit.

    \[ \lim_{x \to 0} \left( \frac{1}{\log \left( x + \sqrt{1+x^2} \right)} - \frac{1}{\log(1+x)} \right). \]

( Note: There’s a small typo in Apostol which puts a parenthesis in the wrong place. The statement above is what I assume is meant since this evaluates to the answer given in the back of the book.)

To do this we’ll need to get the expression in the limit into the indeterminate form 0/0 and then apply L’Hopital’s rule twice. (Applying L’Hopital’s is going to be a challenge since the derivatives are going to get quite messy before we get anywhere.) We start by putting things over a common denominator,

    \[ \lim_{x \to 0} \left( \frac{1}{\log \left( x + \sqrt{1+x^2} \right)} - \frac{1}{\log (1+x)} \right) &= \lim_{x \to 0} \left( \frac{ \log(1+x) - \log \left( x + \sqrt{1+x^2} \right)}{\log \left( x + \sqrt{1+x^2} \right) \log (1+x)} \right). \]

Now we want to apply L’Hopital’s. First, we take the derivative of the numerator,

    \begin{align*}  D \left( \log (1+x) + \log \left( x + \sqrt{1+x^2} \right) \right) &= \frac{1}{1+x} + \frac{1}{x+\sqrt{1+x^2}} \cdot \left( 1 + \frac{x}{\sqrt{1+x^2}} \right) \\[9pt]  &= \frac{1}{1+x} + \frac{ 1 + \frac{x}{\sqrt{1+x^2}}}{x + \sqrt{1+x^2}} \\[9pt]  &= \frac{1}{1+x} + \frac{\sqrt{1+x^2} + x}{\sqrt{1+x^2} \left( x + \sqrt{1+x^2} \right)} \\[9pt]  &= \frac{1}{1+x} + \frac{1}{\sqrt{1+x^2}}. \end{align*}

Next, we take the derivative of the denominator,

    \begin{align*}  D \left( \log \left( 1 + \sqrt{1+x^2} \right) \log (1+x) \right) &= \frac{1 + \frac{x}{\sqrt{1+x^2}}}{1+\sqrt{1+x^2}} \cdot \log(1+x) + \frac{1}{1+x} \cdot \log \left( 1 + \sqrt{1+x^2} \right) \\[9pt]  &= \frac{ (1+x) \log (1+x) + \sqrt{1+x^2} \log \left( x + \sqrt{1+x^2} \right)}{(1+x)\sqrt{1+x^2}}. \end{align*}

So, now we use proceed with L’Hopital’s. (Keep in mind that L’Hopital’s is only valid if, once we get to the end, the limits of the derivatives we have taken actually exist, so right now we’re taking derivatives and hoping that the limits exist… once we have established that they do, then the whole process was valid.)

    \begin{align*}  \lim_{x \to 0} \left( \frac{ \log(1+x) - \log \left( x + \sqrt{1+x^2} \right)}{\log \left( x + \sqrt{1+x^2} \right) \log (1+x)} \right) &= \lim_{x \to 0} \frac{ \frac{1}{1+x} + \frac{1}{\sqrt{1+x^2}}}{ \frac{ (1+x) \log (1+x) + \sqrt{1+x^2} \log \left( x + \sqrt{1+x^2} \right)}{(1+x)\sqrt{1+x^2}} } \\[9pt]  &= \lim_{x \to 0}\frac{ (1+x)\sqrt{1+x^2} \left( \frac{1}{1+x} + \frac{1}{\sqrt{1+x^2}} \right)}{(1+x)\log(1+x) + \sqrt{1+x^2} \log \left(x + \sqrt{1+x^2} \right)} \\[9pt]  &= \lim_{x \to 0} \frac{ \sqrt{1+x^2} - (1+x)}{(1+x)\log(1+x) + \sqrt{1+x^2} \log \left(x + \sqrt{1+x^2} \right)}. \end{align*}

So, we again have the indeterminate form 0/0, and again we’ll try to apply L’Hopital’s. The derivative of the numerator is

    \begin{align*}  D \left( \sqrt{1+x^2} - (1+x) \right) &= \frac{x}{\sqrt{1+x^2}} -1 \\[9pt]  &= \frac{x - \sqrt{1+x^2}}{\sqrt{1+x^2}}. \end{align*}

The derivative of the denominator is

    \begin{align*}  D &\left( (1+x)\log(1+x) + \sqrt{1+x^2} \log \left(x + \sqrt{1+x^2} \right) \right) \\[9pt]  &= \log(1+x) + (1+x) \frac{1}{1+x} + \frac{x}{\sqrt{1+x^2}} \log \left( x + \sqrt{1+x^2} \right) + \sqrt{1+x^2} \frac{1 + \frac{x}{\sqrt{1+x^2}}}{x + \sqrt{1+x^2}} \\[9pt]  &= 2 + \log(1+x) + \frac{x \log \left( x + \sqrt{1+x^2} \right)}{\sqrt{1+x^2}}. \end{align*}

Putting these back into our evaluation of the limit,

    \begin{align*}  \lim_{x \to 0} \frac{ \sqrt{1+x^2} - (1+x)}{(1+x)\log(1+x) + \sqrt{1+x^2} \log \left(x + \sqrt{1+x^2} \right)} &= \lim_{x \to 0} \frac{ \frac{x - \sqrt{1+x^2}}{\sqrt{1+x^2}} }{2 + \log(1+x) + \frac{x \log \left( x + \sqrt{1+x^2} \right)}{\sqrt{1+x^2}}}. \end{align*}

But now, we have a quotient of continuous functions with non-zero denominator when x = 0 so the limit is the value of the function at x = 0. Evaluating we then have

    \[ \lim_{x \to 0} \left( \frac{1}{\log \left( x + \sqrt{1+x^2} \right)} - \frac{1}{\log(1+x)} \right) = -\frac{1}{2}.\]

Compute the limit of the given function

Evaluate the limit.

    \[ \lim_{x \to 0^-} \left( 1 - 2^x \right)^{\sin x}. \]

First, we use the definition of the exponential, and the continuity of e^x to write,

    \begin{align*}  \lim_{x \to 0^-} \left( 1 - 2^x \right)^{\sin x} &= \lim_{x \to 0^-} e^{\sin x \log (1-2^x)} \\[9pt]  &= \exp \left( \lim_{x \to 0^-} \left( \sin x \log (1-2^x) \right) \right). \end{align*}

Next, we rewrite the term inside the limit to get it into the form \infty / \infty and apply L’Hopital’s rule,

    \begin{align*}  \exp &\left( \lim_{x \to 0^-} \left( \sin x \log (1-2^x) \right) \right) \\[9pt]  &= \exp \left( \lim_{x \to 0^-} \frac{\log (1-2^x)}{\frac{1}{\sin x}} \right) \\[9pt]  &= \exp \left( \lim_{x \to 0^-} \frac{-\frac{2^x \log 2}{1-2^x}}{-\frac{\cos x}{\sin^2 x}} \right) &(\text{L'Hopital}) \\[9pt]  &= \exp \left( \lim_{x \to 0^-} \frac{ \sin^2 x \cdot 2^x \log 2}{\cos x \cdot (1-2^x)} \right) \\[9pt]   &= \exp \left( \log 2 \cdot \lim_{x \to 0^-} \left( \frac{2^x \sin x}{(1-2^x) \cos x} \right) \right) \\[9pt]  &= \exp \left( \log 2 \cdot \lim_{x \to 0^-} \left( \frac{ 2^{x+1} \sin x \cos x + 2^x \log 2 \sin^2 x}{-2^x \cos x \log 2 - (1-2^x) \sin^2 x} \right) \right) &(\text{L'Hopital}). \end{align*}

But, this final limit is a quotient of continuous functions, and the denominator is not zero, so it is continuous. Therefore, the value of the limit at x =0 is equal to the value of the function. Since the numerator is 0 and the denominator is -1 when x = 0, we find that the limit is 0. Therefore,

    \begin{align*}   \lim_{x \to 0^-} \left( 1 - 2^x \right)^{\sin x} &= \exp \left( \log 2 \cdot 0 \right) \\  &= e^0 = 1. \end{align*}

Compute the limit of the given function

Evaluate the limit.

    \[ \lim_{x \to 0^+} x^{\left( x^x - 1 \right)}. \]

To evaluate this we’ll use the definition of a real number raised to a real power (i.e., a^x = e^{x \log a}), and use the continuity of the exponential function. Then we apply L’Hopital’s rule twice. (We also use the notation e^x = \exp x to avoid huge expressions in the exponent.)

    \begin{align*}  \lim_{x \to 0^+} x^{\left( x^x - 1 \right)} &= \lim_{x \to 0^+} e^{\left(x^x -1 \right) \log x} \\[9pt]  &= \exp \left( \lim_{x \to 0^+} \left((x^x-1) \log x \right)\right) \\[9pt]  &= \exp \left( \lim_{x \to 0^+} \frac{ \log x}{\frac{1}{x^x-1}} \right) \\[9pt]  &= \exp \left( \lim_{x \to 0^+} \frac{ \frac{1}{x}}{ \frac{x^x (\log x + 1)}{(x^x-1)^2}} \right) &(\text{L'Hopital}) \\[9pt]  &= \exp \left( \lim_{x \to 0^+} \frac{(x^x-1)^2}{x^x(x \log x + x)} \right) \\[9pt]  &= \exp \left( \lim_{x \to 0^+} \frac{2(x^x-1) x^x (\log x + 1)}{x^x (x \log x + x)(\log x + 1) + x^x(\log x+ 2)}\right) &\text{L'Hopital} \\[9pt]  &= \exp \left( \lim_{ x \to 0^+} \frac{2(x^x-1)(\log x + 1)}{(x \log x + x)(\log x + 1) + \log x + 2} \right) \\[9pt]  &= \exp \left( \lim_{x \to 0^+} \frac{2(x^x -1)}{x(\log x + 1) + 1 + \frac{1}{\log x + 1}} \right) \\[9pt]  &= e^0 \\  &= 1. \end{align*}

The second to last line follows since \lim_{x \to 0} x^x = 1 by Example #3 on page 302 of Apostol, which means the numerator is going to 0 as x \to 0^+. However, in the denominator both the terms x (\log x+ 1) and \frac{1}{\log x + 1} go to 0 as x \to 0^+, but then the +1 in the denominator means the denominator is going to 1 as x \to 0^+. Hence, the whole expression is going to 0.