Problem 1

Find the vertical asymptotes, holes, and horizontal asymptotes of

$\huge \frac{x-3}{(x^2-9)(x-2)} $

In [1]:
f = (x-3)/((x^2-9)*(x-2))
In [3]:
plot(f, (x, -5, 5), ymin=-5, ymax=5)
Out[3]:

As we can see above, there are two vertical asymptotes: one at $x = -3$ and one at $x = 2$. One may be tempted to conclude that $x=3$ is an asymptote as well, but this leads to a 0/0, so as the code below shows, there is actually a hole there. In particular, evaluating this will lead to a division by zero

In [5]:
f(3) 
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-5-ad76cca94a49> in <module>()
----> 1 f(Integer(3))

/home/ctralie/anaconda3/lib/python3.7/site-packages/sage/symbolic/expression.pyx in sage.symbolic.expression.Expression.__call__ (build/cythonized/sage/symbolic/expression.cpp:31347)()
   5465             z^2 + x^y
   5466         """
-> 5467         return self._parent._call_element_(self, *args, **kwds)
   5468 
   5469     def variables(self):

/home/ctralie/anaconda3/lib/python3.7/site-packages/sage/symbolic/ring.pyx in sage.symbolic.ring.SymbolicRing._call_element_ (build/cythonized/sage/symbolic/ring.cpp:11156)()
    985                     raise ValueError("the number of arguments must be less than or equal to %s"%len(vars))
    986 
--> 987         return _the_element.subs(d, **kwds)
    988 
    989     def subring(self, *args, **kwds):

/home/ctralie/anaconda3/lib/python3.7/site-packages/sage/symbolic/expression.pyx in sage.symbolic.expression.Expression.substitute (build/cythonized/sage/symbolic/expression.cpp:30469)()
   5319             smap.insert(make_pair((<Expression>self.coerce_in(k))._gobj,
   5320                                   (<Expression>self.coerce_in(v))._gobj))
-> 5321         res = self._gobj.subs_map(smap, 0)
   5322         return new_Expression_from_GEx(self._parent, res)
   5323 

ValueError: power::eval(): division by zero

Problem 2

Find the following limit

$ \huge \lim_{x \to -\infty} \frac{5 x^3 - 4 x^2 + 3x + 4}{4x^2 + 10x - 1} $

In [12]:
f = (5*x^3 - 4*x^2 + 3*x + 4)/(4*x^2 + 10*x - 1)
In [19]:
N(f(-1000000))
Out[19]:
-1.25000412501137e6

There are some vertical asymptotes near the origin, but if we zoom out enough, we actually see that the function is growing towards $+\infty$ as we go to the right, and towards $-\infty$ as we go to the left

In [22]:
plot(f, (x, -200, 200))
Out[22]:

Problem 3

Find the following limit

$ \huge \lim_{x \to \infty} \frac{3 x^4 - x^3 + 2}{9x^2 - 9x^4 + 3x} $

In this case, the leading terms in the numerator and denominator are of the same degree (degree 4), so we can simply divided their coefficients and ignore everything else, since they dominate. So the final answer is $3/-9 = -1/3$ for both limits towards $\infty$ and $-\infty$

In [23]:
f = (3*x^4 - x^3 + 2)/(9*x^2 - 9*x^4 + 3*x)
In [26]:
plot(f, (x, -1000, 1000), ymin=-0.5, ymax=0.5)
Out[26]:

Problem 4

Find the following limit

$ \huge \lim_{x \to \infty} \frac{\sin(10x)}{12x} $

In this case, we can use the squeeze theorem to define two other functions, $h(x) = \frac{-1}{12x}$ and $g(x) = \frac{1}{12x}$ so that $\h(x) \leq f(x) \leq g(x)$ and $\lim_{x \to \infty} h(x) = \lim_{x \to \infty} g(x) = 0$

In [1]:
f = sin(10*x)/(12*x)
h = -1/(12*x)
g = 1/(12*x)
In [7]:
p1 = plot(f, (x, 0, 5), ymin=-1, ymax=1, color='blue', legend_label='$f(x)$')
p2 = plot(h, (x, 0, 5), ymin=-1, ymax=1, color='red', legend_label='$h(x)$')
p3 = plot(g, (x, 0, 5), ymin=-1, ymax=1, color='green', legend_label='$g(x)$')
In [8]:
show(p1+p2+p3)

Problem 5

Find the horizontal asymptotes of the following function

$\huge f(x) = \frac{3 x^3 + x}{4 x^3 - x^2 + |x^3|} $

We should redefine this function separately for positive $x$ and negative $x$. In particular, we can write

$\huge f(x) = \left\{ \begin{array}{cc} \frac{3 x^3 + x}{4 x^3 - x^2 + x^3}, & x > 0 \\ \frac{3 x^3 + x}{4 x^3 - x^2 - x^3}, & x < 0 \end{array} \right\} $

Using the fact that

$ |x^3| = \left\{ \begin{array}{cc} x^3, & x > 0 \\ -x^3, & x < 0 \end{array} \right\} $

This means that $\lim_{x \to \infty} f(x) = 3/5$ and $\lim_{x \to -\infty} f(x) = 1$

In [9]:
f = (3*x^3 + x)/(4*x^3 - x^2 + abs(x^3))
In [13]:
plot(f, (x, -100, 100), ymin=0, ymax=1)
Out[13]:

Problem 6

Find the horizontal asymptotes of the following function

$\Large f(x) = \frac{4 x^5}{\sqrt{x^{10} - 4x^2}} $

If we look at $ \lim_{x \to \infty} f(x)$ then the $x^{10}$ term in the denominator wins over, so we can just look at

$\Large \lim_{x \to \infty} \frac{4 x^5}{\sqrt{x^{10}}} = \lim_{x \to \infty} \frac{4 x^5}{|x^5|}$

This is using the fact that $\sqrt{a^2} = |a|$ (you can check this fact with some examples, or just memorize the rule). Therefore, we have that

$\Large \lim_{x \to \infty} f(x) = \lim_{x \to \infty} \frac{4 x^5}{x^5} = 4$

and that

$\Large \lim_{x \to -\infty} f(x) = \lim_{x \to -\infty} \frac{4 x^5}{-x^5} = -4$

We verify below that the horizontal asymptotes are at $y = -4$, $y = 4$

In [16]:
f = (4*x^5)/(sqrt(x^10 - 4*x^2))
In [15]:
plot(f, (x, -100, 100))
Out[15]:
In [ ]: