## MA101.17 Continuity of functions of two variables

We can say that $f(x,y)\to L$ as the $(x,y) \to (a,b)$, or $\displaystyle \lim_{(x,y)\to (a,b)} f(x,y) = L$.

If, intuitively speaking, by going close enough to (a,b) we can get f(a,b) as close as we like to L.

f(x,y) is said to be continuous at (a,b) if $\displaystyle \lim_{(x,y)\to (a,b)} f(x,y) = f(a,b)$.

Just as with one variable limits from below and above may be different, with two variables we may get various limits coming in from different paths.

##### Example

$\displaystyle f(x,y)=\frac{xy}{x^2+y^2} \qquad (x,y) \neq (0,0)$

Consider coming in to (0,0) along the line y=mx (m fixed). Along this line we have:

$\displaystyle f(x,y) = f(x,mx) = \frac{xmx}{x^2 + m^2x^2} = \frac{m}{1+m^2}$

Thus along y=mx,

$\displaystyle \lim_{(x,y)\to (0,0)} f(x,y) = \lim_{x\to 0} \frac{m}{1+m^2} = \frac{m}{1+m^2}$

If we come in along the line $y=x^2$,

$\displaystyle \lim_{along y=x^2} f(x,y) = \lim_{x\to 0} \frac{x^3}{x^2+x^4} = \lim_{x\to 0}\frac{1}{\frac{1}{x}+x} = 0$.

## MA101.15 A bit more on limits

For

\begin{aligned} x&>0 \\ \frac{e^x}{x^n}&=\frac{1+x+\frac{x^2}{2}+...}{x^n} \\ &> \displaystyle\frac{\frac{x^m}{m!}}{x^n} \end{aligned}

for any possible integer m we care to choose.

Choose $m_0>n$ then $\displaystyle \frac{e^x}{x^n} > \frac{x^{m_0-n}}{m_0!}$.

But $\displaystyle \frac{x^{m_0-n}}{m_0!} \to \infty$ as $x \to \infty$.

So, $\displaystyle \frac{e^x}{x^n}\to\infty$ as $x\to\infty$.

So it can be said that $e^x$ increases more rapidly than any power of x.

Also (for $n>0$).

\begin{aligned} \displaystyle \lim_{x\to\infty} \frac{\ln{x}}{x^n} &= \lim_{y\to\infty}\frac{y}{e^{ny}} \\&= \lim_{z\to\infty} \frac{z}{ne^z} = 0 \;\mbox{from above.} \end{aligned}

Where $x=e^y$ as $x\to\infty, y\to\infty$, and $z=ny$ as $y\to\infty, z\to\infty$ as $n>0$.

So it can be said that $\ln{x}$ increases more slowly than any positive power of x.

Also (for $n>0$).

\begin{aligned} \displaystyle \lim_{x\to 0^+} x^n\cdot\ln{x} &= \lim_{y\to\infty}\frac{1}{y^n}\cdot\ln{\frac{1}{y}} \\&= \lim_{y\to\infty}\frac{-\ln{y}}{y^n} = 0 \;\mbox{from above.} \end{aligned}

Where $x=\frac{1}{y}, y=\frac{1}{x}, x\to0^+, y\to\infty$.

##### Examples

\begin{aligned} \displaystyle \lim_{x\to\infty}(e^x-x^4) &= \lim_{x\to\infty}(e^4(\frac{e^x}{x^4}-1)) \\&= \infty \end{aligned}

\begin{aligned} \displaystyle \lim_{x\to\infty}\frac{e^x(-2x^2+3)}{3x^4+2x^2+6} &= \lim_{x\to\infty}\frac{e^x(-2+\frac{3}{x^2})}{3x^2+2+\frac{6}{x^2}} \\&= -\infty \end{aligned}

\begin{aligned} \displaystyle \lim_{x\to\infty}\frac{2e^{2x}+x^2+2}{3e^{3x}+7} &= \lim_{x\to\infty}\frac{2e^{-x}+\frac{x^2}{e^{3x}}+\frac{2}{e^{3x}}}{3+\frac{7}{e^{3x}}} \\&= 0 \end{aligned}

\begin{aligned} \displaystyle \lim_{x\to\infty} \frac{(x-1)\ln{x^2}}{x^2} &= \lim_{y\to\infty}\frac{(y^\frac{1}{2}-1)\ln{y}}{y} \\&= \lim_{y\to\infty}(\frac{\ln{y}}{y^\frac{1}{2}}-\frac{\ln{y}}{y}) \\&= 0 \end{aligned}

$x^2=y, x\to\infty, y\to\infty$.

## MA101.11 Finding Limits – Examples

A number of examples of how to find limits.

\begin{aligned} \displaystyle \lim_{x\to 1} \{ x^2 + \frac{x^3+1}{x^2 +1} + 2x\sqrt{1+x^2} \} &= 1 + \frac{1+1}{1+1}+2\cdot 1\cdot\sqrt{1+1} \\&= 2 + 2\sqrt{2} \end{aligned}

\begin{aligned} \displaystyle \lim_{x\to \infty} \frac{x^2-3x+2}{2x^2+4x-7} &= \lim_{x\to \infty} \frac{1 - \frac{3}{x} + \frac{2}{x^2}}{2 + \frac{4}{x} - \frac{7}{x^2}} \\&= \frac{1}{2} \end{aligned}

\begin{aligned} \displaystyle \lim_{x\to 2} \frac{x^2 - 4}{x^2-5x-6} &= \lim_{x\to 2} \frac{(x-2)(x+2)}{(x-2)(x-3)} \\&= \lim_{x\to 2} \frac{(x+2)}{(x-3)} \\&= -4 \end{aligned}

\begin{aligned} \displaystyle \lim_{x\to \infty} (\sqrt{x^2+6x+4}-x) &= \lim_{x\to \infty} \frac{(\sqrt{x^2+6x+4}-x)(\sqrt{x^2+6x+4}+x)}{(\sqrt{x^2+6x+4}+x)} \\&= \lim_{x\to \infty} \frac{x^2 + 6x + 4 - x^2}{(\sqrt{x^2+6x+4}+x)} \\&= \lim_{x\to \infty} \frac{6+\frac{4}{x}}{\sqrt{1+\frac{6}{x}+\frac{4}{x^2}}+1} \\&= \frac{6}{\sqrt{1}+1} = 3 \end{aligned}

\begin{aligned} \displaystyle \lim_{x\to 1^+} \frac{\sqrt{x-1}}{x^2-1} &= \lim_{x\to 1^+} \frac{1}{\sqrt{x-1}(x+1)} \\&= \infty \end{aligned}

\begin{aligned} \displaystyle \lim_{x\to 0} \frac{x}{\sqrt{1-x}-\sqrt{1+x}} &= \lim_{x\to 0} \frac{x(\sqrt{1-x}+\sqrt{1+x})}{(1-x)-(1+x)} \\&= \lim_{x\to 0} \frac{x(\sqrt{1-x}+\sqrt{1+x}}{-2x} \\&= -1 \end{aligned}

\begin{aligned} \displaystyle \lim_{x\to 1} \frac{ln x}{x^2-1} &= \lim_{x\to 1} \frac{\frac{1}{x}}{2x} \:\mbox{ - (Using L'Hopital's Rule)} \\&= \frac{1}{2} \end{aligned}

\begin{aligned} \displaystyle \lim_{x\to 0} \frac{sin(2x)}{x} &= \lim_{x\to 0} \frac{2cos(2x)}{1} \\&= 1 \end{aligned}

\begin{aligned} \displaystyle \lim_{x\to 0} \frac{1-cos(x)}{x^2} &= \lim_{x\to 0} \frac{sin(x)}{2x} \\&= \frac{1}{2} \end{aligned}

\begin{aligned} \displaystyle \lim_{x\to 0} (cos(x))^\frac{1}{x} &= \lim_{x\to 0} e^{ln(cos(x)^\frac{1}{x}} \\&= \lim_{x\to 0} e^{\frac{1}{x}ln(cos(x))} \\&= e^{\displaystyle\lim_{x\to 0} \frac{ln(cos(x))}{x}} \end{aligned}

Now,

\begin{aligned} \displaystyle \lim_{x\to 0} \frac{ln(cos(x))}{x} &= \lim_{x\to 0} \frac{\frac{-sin(x)}{cos(x)}}{1} \\&= \lim_{x\to 0} -tan(x) = 0 \end{aligned}

So, $\displaystyle \lim_{x\to 0} (cos(x))^\frac{1}{x} = 1$

\begin{aligned} \displaystyle \lim_{x\to 0^+} x lnx &= \lim_{x\to 0^+} \frac{lnx}{\frac{1}{x}} \\&= \lim_{x\to 0^+} \frac{\frac{1}{x}}{-\frac{1}{x^2}} \\&= \lim_{x\to 0^+} -x = 0 \end{aligned}

\begin{aligned} \displaystyle \lim_{x\to \infty} x^3 e^{-x^2} &= \lim_{x\to \infty} \frac{x^3}{e^{x^2}} \\&= \lim_{x\to \infty} \frac{3x^2}{2x e^{x^2}} \\&= \lim_{x\to \infty} \frac{3}{4x e^{x^2}} = 0 \end{aligned}

\begin{aligned} \displaystyle \lim_{x\to \infty} (1+\frac{1}{x})^x &= \lim_{x\to \infty} e^{ln(1+\frac{1}{x})^x} \\&= \lim_{x\to \infty} e^{xln(1+\frac{1}{x})} \\&= e^{\displaystyle \lim_{x\to \infty} xln(1+\frac{1}{x})} \end{aligned}

Now,

\begin{aligned} \displaystyle \lim_{x\to \infty} x ln(1 + \frac{1}{x}) &= \lim_{x\to \infty} \frac{ln(1+\frac{1}{x})}{\frac{1}{x}} \\&= \lim_{x\to \infty} \frac{(-\frac{1}{x^2}\cdot\frac{1}{1+\frac{1}{x}})}{-\frac{1}{x^2}} \\&= \lim_{x\to \infty} \frac{1}{1+\frac{1}{x}} = 1 \end{aligned}

So, $\displaystyle \lim_{x\to \infty} (1+\frac{1}{x})^x = e^1 = e$

## MA101.10 How to find limits

If a function is know to be  continuous at $x=a$, then by the definition of continuity we have, $\displaystyle\lim_{t\to a} f(x) = f(a)$.

We will take is as known that the elementary functions – polynomial, rational (polynomial/polynomial), trigonometrical, exponential, logarithmic) – are continuous everywhere.

Therefore, although not very exciting, we are able to say such things as:

$\displaystyle\lim_{x\to \frac{\pi}{2}} sin x = sin \frac{\pi}{2}=1$

$\displaystyle\lim_{x\to 3} e^x = e^3$

$\displaystyle\lim_{x\to 2} \frac{x(x-1)}{x-3} = \frac{2(2-1)}{2-3} = -2$

A very useful rule (it’s a theorem really) for finding limits is L’Hôpitals rule (LH), which is really a collection of rules. The most comprehensive form of the rule is as follows:

Suppose you wish to find something like $\displaystyle\lim_{x\to[\;]} \frac{f(x)}{g(x)}$ where [ ] may be $a, a^+, a^-, \infty, -\infty$.

Suppose further that $\displaystyle\lim_{x\to[\;]} f(x) = \lim_{x\to [\;]} g(x) = \{\}$ where either

$\{\}=0$  – ($\frac{0}{0}$ type), or
$\{\}=\infty$ – ($\frac{\infty}{\infty}$ type).

Then the LH rule says look at $\displaystyle\lim_{x\to [\;]} \frac{f'(x)}{g'(x)}$ and if you can do it, say find it to be ( ) then the original limit is the same.

Danger: Do not use LH when it is not applicable.

For example $\displaystyle\lim_{x\to 0} \frac{sin(x) + 1}{sin(x)+2} = \frac{1}{2}$ is not the same as $\displaystyle\lim_{x\to 0} \frac{cos(x)}{cos(x)} = 1$.

The LH rule gives us with no effort some useful results. For example:

$\displaystyle\lim_{x\to 0} \frac{sin(x)}{x} = \lim_{x\to 0} \frac{cos(x)}{1} = 1$

## MA101.9 Continuity

Let a be a point in the domain of a function. The function is said to be continuous at $x=a$ if $\displaystyle\lim_{x\to a^+} f(x)= \lim_{x\to a^-} f(x) = f(a)$.

Otherwise f is said to be discontinuous at $x=a$. The function may be discontinuous at a for various reasons:

i) $\displaystyle\lim_{x\to a^-} f(x)$ may not exist, $\displaystyle\lim_{x\to a^+} f(x)$ may not exist, or both may not exist.
ii) both may exist, but may not be equal.
iii) both may exist, and be equal, but not be equal to f(a).

If f is continuous at all points of its domain it is simply said to be continuous. (Sometimes for emphasis mathematicians say f is continuous everywhere).

Note that it is a silly question to ask whether or not a function is continuous at a point which is not in the domain. For example is $\frac{x(x-1)}{x-1}$ continuous at x=1?

## MA101.8 Limits

Consider the function $f(x) = \begin{cases} \frac{-x}{2} + 4&\mbox{} x < 2 \\ -3 &\mbox{} x = 2 \\ x-1 &\mbox{} x > 2\end{cases}$

As x gets closer to 2 from above we notice that f(x) gets as close as we like to 1. We say that f has limit 1 as it tends to 2 from above (some people say from the right).

We write $\displaystyle\lim_{x\to 2^+} f(x) = 1$ or, $f(x) \rightarrow 1$ as $x \rightarrow a^+$.

Note that the value of f at x=2 is not relevant, for the concept of limits we do not even need x=2 to be in the domain for f.

In the same spirit,

$\displaystyle\lim_{x\to 2^-} f(x) = 3$.

Consider the function $f(x) = \begin{cases} \frac{1}{x} &\mbox{} x \neq 0 \\ 2 &\mbox{} x = 2\end{cases}$

As we get closer to 0 from above f(x) gets as large as you like, we say f(x) tends towards infinity.

We write, $\displaystyle\lim_{x\to 0^+} f(x) = \infty$, or
$f(x) \rightarrow \infty$ as $x \rightarrow 0^+$.

It does not mean that f(x) gets close to infinity. The value of f at x=0 is again irrelevant.

In the same spirit we have, $\displaystyle\lim_{x\to0^-} f(x) = -\infty$.

If for a function f(x) and a point x=a we have

$\displaystyle\lim_{x\to a^+} f(x) = \lim_{x\to a^-} f(x) = h \in \mathbb{R}$

then we say that f has a limit h as x tends to a, and we write $\displaystyle\lim_{x\to a} f(x) = h$ or $f(x) \rightarrow h$ as $x \rightarrow a$.

Likewise if $\displaystyle\lim_{x\to a^+} f(x) = \lim_{x\to a^-} f(x) = \infty$ we write simply $\displaystyle\lim_{x\to a} f(x) = \infty$.

For example, $\displaystyle\lim_{x\to 0} \frac{1}{x^2} = \infty$.

Consider the function $f(x) = \frac{2x+3}{x-1},x\neq 1$.

Then $f(x) = \frac{2+\frac{3}{x}}{1- \frac{1}{x}}, x \neq 0, x \neq 1$

As x gets large and positive we see that f(x) gets as close to 2 as we like.

We write $\displaystyle\lim_{x\to \infty} f(x) = 2$ or $f(x) \rightarrow 2$ as $x \rightarrow \infty$.

Likewise $\displaystyle\lim_{x\to -\infty} f(x) =2$ or $f(x) \rightarrow 2$ as $x \rightarrow -\infty$.