Limits#
Revised
14 Jun 2023
Programming Environment#
Show code cell source
import numpy as np
import pandas as pd
import matplotlib as mpl
import matplotlib.pyplot as plt
from matplotlib import gridspec
from mpl_toolkits.mplot3d import axes3d
from ipywidgets import interactive
plt.style.use('ggplot');
import sympy as smp
from sympy import *
import plotly
import plotly.figure_factory as ff
import plotly.graph_objects as go
from IPython.display import display, Math
from datetime import datetime as d
import locale as l
import platform as p
import sys as s
pad = 20
print(f"{'Executed'.upper():<{pad}}: {d.now()}")
print()
print(f"{'Platform' :<{pad}}: "
f"{p.mac_ver()[0]} | "
f"{p.system()} | "
f"{p.release()} | "
f"{p.machine()}")
print(f"{'' :<{pad}}: {l.getpreferredencoding()}")
print()
print(f"{'Python' :<{pad}}: {s.version}")
print(f"{'' :<{pad}}: {s.version_info}")
print(f"{'' :<{pad}}: {p.python_implementation()}")
print()
print(f"{'Matplotlib' :<{pad}}: {mpl .__version__}")
print(f"{'NumPy' :<{pad}}: {np .__version__}")
print(f"{'Pandas' :<{pad}}: {pd .__version__}")
print(f"{'Plotly' :<{pad}}: {plotly.__version__}")
print(f"{'SymPy' :<{pad}}: {smp .__version__}")
EXECUTED : 2024-05-21 15:45:35.678137
Platform : 14.4.1 | Darwin | 23.4.0 | arm64
: UTF-8
Python : 3.11.9 | packaged by conda-forge | (main, Apr 19 2024, 18:34:54) [Clang 16.0.6 ]
: sys.version_info(major=3, minor=11, micro=9, releaselevel='final', serial=0)
: CPython
Matplotlib : 3.8.4
NumPy : 1.26.4
Pandas : 2.2.2
Plotly : 5.21.0
SymPy : 1.12
\( \begin{aligned} 1=\lim_{\Delta x\to0}\frac{\sin\Delta x}{\Delta x} \end{aligned} \)
\( \begin{aligned} &\frac{2}{\sin\theta}\left(\frac{\tan\theta}{2}\ge\frac{\theta}{2}\ge\frac{\sin\theta}{2}\right) \iff \frac{1}{\cos\theta}\ge\frac{\theta}{\sin\theta}\ge1 \iff \cos\theta\le\frac{\sin\theta}{\theta}\le1 \\ &\lim_{\theta\to0}\cos\theta\le\lim_{\theta\to0}\frac{\sin\theta}{\theta}\le\lim_{\theta\to0}1 \implies 1\le\lim_{\theta\to0}\frac{\sin\theta}{\theta}\le1 \end{aligned} \)
\(\begin{aligned}\lim_{x\to\pi} \sin\left(\frac{x}{2} + \sin(x)\right)\end{aligned}\)#
\( \begin{aligned} \lim_{x\to\pi} \sin\left(\frac{x}{2} + \sin(x)\right) \end{aligned} \)
x = smp.symbols('x')
smp.limit(
e = smp.sin(x/2 + smp.sin(x)), # expression, the limit of which is to be taken
z = x, # symbol representing the variable in the limit
z0 = smp.pi, # the value toward which `z` tends
dir = '+-', # the limit is bidirectional
)
\(\begin{aligned}\lim_{x \to 0^+} \frac{2e^\frac{1}{x}}{e^\frac{1}{x} + 1}\end{aligned}\)#
\( \begin{aligned} \lim_{x \to 0^+} \frac{2e^\frac{1}{x}}{e^\frac{1}{x} + 1} \end{aligned} \)
x = smp.symbols('x')
smp.limit(2 * smp.exp(1/x) / (smp.exp(1/x) + 1), x, 0, dir='+')
\(\begin{aligned}\lim_{x \to 0^-} \frac{2e^\frac{1}{x}}{e^\frac{1}{x} + 1}\end{aligned}\)#
\( \begin{aligned} \lim_{x \to 0^-} \frac{2e^\frac{1}{x}}{e^\frac{1}{x} + 1} \end{aligned} \)
x = smp.symbols('x')
smp.limit(2 * smp.exp(1/x) / (smp.exp(1/x) + 1), x, 0, dir='-')
\(\begin{aligned}\lim_{x \to \infty} \frac{\cos(x) - 1}{x}\end{aligned}\)#
\( \begin{aligned} \lim_{x \to \infty} \frac{\cos(x) - 1}{x} \end{aligned} \)
x = smp.symbols('x')
smp.limit((smp.cos(x) - 1)/x, x, smp.oo, dir='+-')
Terms#
[W] Limit
Bibliography#
[Y] Mr. P Solver. (26 May 2021). “1st Year Calculus, But in PYTHON”. YouTube.