import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
= np.linspace(-0.1,0.1,20)
xs = xs[xs != 0] # remove x=0
xs def f(x): return (x)/(np.abs(x))
= f(xs)
ys
plt.scatter(xs,ys)True) plt.grid(
Jupyter Notebooks Available
Ex2.2.5: \(\lim_{x\to0}\frac{x}{|x|}\)
Ex2.2.11: \(lim_{x\to-3}(x^2-13)\)
= np.linspace(-3.1, -2.9, 50)
xs def fx(x): return (x**2-13)
= fx(xs)
ys = fx(-3)# at x=-3
y_x_at_c
y_x_at_c
plt.scatter(xs,ys)True)
plt.grid(=-3, ymax=100, ymin=-100, linestyles="dotted") plt.vlines(x
Ex2.2.13: \(\lim_{x\to6}8(x-5)(x-7)\)
= 6,0.1
x_at_c, abt_x = (x_at_c - 0.1, x_at_c + 0.1)
x_abt_c = np.linspace(x_abt_c[0],x_abt_c[1], 20) # same as np.linspace(5.9, 6.1)
xs def fx(x): return 8*(x-5)*(x-7)
=fx(xs)
ys
plt.scatter(xs,ys)True)
plt.grid(= fx(x=x_at_c)
y_x_at_c =x_at_c, ymax=10,ymin=-10, linestyles='dotted') plt.vlines(x
Ex2.2.15: \(\lim_{x\to2}\frac{2x+5}{11-x^3}\)
import numpy as np
import matplotlib.pyplot as plt
= 2
x_at_c = 0.1
abt_c = x_at_c - abt_c
xs_min = x_at_c + abt_c
xs_max = np.linspace(xs_min,xs_max,20)
xs def fx(x): return (2*x+5)/(11-x**3)
= fx(xs)
ys ="+")
plt.scatter(xs, ys, markerTrue)
plt.grid(=x_at_c,linestyles="dotted", ymax=fx(xs_max),ymin=fx(xs_min)) plt.vlines(x
Ex2.2.19: \(\lim_{x\to-3}(5-x)^{\frac{4}{3}}\)
import numpy as np
import matplotlib.pyplot as plt
= -3
x_at_c = 0.1
abt_c = x_at_c - abt_c
xs_min = x_at_c + abt_c
xs_max = np.linspace(xs_min,xs_max,20)
xs def fx(x): return (5-x)**(4/3)
= fx(xs)
ys ="+")
plt.scatter(xs, ys, markerTrue)
plt.grid(=x_at_c,linestyles="dotted", ymax=fx(xs_max),ymin=fx(xs_min)) plt.vlines(x
Ex2.2.21: \(\lim_{x\to0}\frac{3}{\sqrt{3x+1}+1}\)
import numpy as np
import matplotlib.pyplot as plt
= 0
x_at_c = 0.1
abt_c = x_at_c - abt_c
xs_min = x_at_c + abt_c
xs_max = np.linspace(xs_min,xs_max,20)
xs def fx(x): return 3/(np.sqrt(3*x+1)+1)
= fx(xs)
ys ="+")
plt.scatter(xs, ys, markerTrue)
plt.grid(=x_at_c,linestyles="dotted", ymax=fx(xs_max),ymin=fx(xs_min)) plt.vlines(x