A method of [[Quadrature]] such that for each step we aproximate the [[Integration|Integral]] using rectangles that match the [[Function]] $f$ at its *left* endpoint.
![[Pasted image 20260223154002.png|invert_B]]
$\begin{align}
A = hf(a)+h(a+h)+hf(a+2h) + \cdots + hf(b-h)
\end{align}$
Where we draw rectangles of width $h$ from $a$ to $b$.
$\huge \begin{align}
\int_{a}^{b} f(x)\d x \approx h \sum_{i=0}^{ \pa{\frac{b-a}{h} -1}} f(a+ih)
\end{align}$
For smaller values of $h$, this will will be more accurate.
### [[Numerical Analysis Error Bounds|Error Bound]]
This method tends to be less accurate when the [[Derivative]] of $f$ is high.
For a trivial example, $f(x)=kx$
$\large \begin{align}
\int_{0}^{h}f(x)\d x &= \int_{0}^{h}kx\d x = \frac{kh^{2}}{2}
\end{align}$
$\huge \begin{align}
\epsilon = \frac{h^{2}}{f'}
\end{align}$
![[Left-endpoint Method .excalidraw.svg]]
%%[[Left-endpoint Method .excalidraw.md|🖋 Edit in Excalidraw]]%%
To extend to non-linear functions,
The error for one step is $\le \frac{h^{2}}{2}f'_{ext}$, where $f'_{ext}$ is the largest absolute value of $f'$ in the interval.
$\huge \begin{align}
\epsilon &\leq \frac{h^{2}}{2}f'_{\op{ext}} \\
f'_{\op{ext}} &= \max_{x\in[a,b]}|f'(x)|
\end{align}$
$\huge
\frac{h(b-a)}{2}f'_{\op{ext}}
$
#### Formal Proof
Let $g(x)$ be such that $g'(x)=f(x)$ and $g(a)=0$.
[[Universal Quantifier|For any]] $x\in [a,b]$, the [[Truncated Taylor Series]] is:
$\huge \begin{align}
g(x)&= g(a)+ (x-a)g'(x) + \frac{1}{2}(x-a)^{2}g''(\xi) \\
\xi &\in [a,b]
\end{align}$