[proofplan]
We prove the Poincare inequality in two stages. First, for smooth compactly supported functions $\phi \in C_c^\infty(U)$, we recover $\phi$ from its partial derivative $\partial_{x_n}\phi$ via the Fundamental Theorem of Calculus along the $x_n$-direction, apply Holder's inequality to bound the resulting one-dimensional integral, raise to the $p$-th power, and integrate over $U$ to obtain $\|\phi\|_{L^p(U)} \le d\,\|\nabla \phi\|_{L^p(U)}$. Second, we extend to arbitrary $u \in W_0^{1,p}(U)$ by approximating with a sequence in $C_c^\infty(U)$ and passing the inequality to the limit.
[/proofplan]
[step:Recover $\phi$ from $\partial_{x_n}\phi$ via the Fundamental Theorem of Calculus]
Let $\phi \in C_c^\infty(U)$. Extend $\phi$ by zero to $\mathbb{R}^n \setminus U$. Since $U$ is contained in the slab $\{x \in \mathbb{R}^n : a < x_n < a + d\}$, the extension satisfies $\phi(x', a) = 0$ for all $x' \in \mathbb{R}^{n-1}$. By the [Fundamental Theorem of Calculus](/theorems/632) applied along the segment $t \mapsto (x', t)$ for $t \in [a, x_n]$:
\begin{align*}
\phi(x', x_n) = \int_a^{x_n} \partial_{x_n} \phi(x', t) \, d\mathcal{L}^1(t).
\end{align*}
Taking absolute values and enlarging the domain of integration from $[a, x_n]$ to $[a, a+d]$ (valid since the integrand is non-negative after taking absolute values and $x_n \le a + d$):
\begin{align*}
|\phi(x', x_n)| \le \int_a^{a+d} |\partial_{x_n} \phi(x', t)| \, d\mathcal{L}^1(t).
\end{align*}
[guided]
The key idea is that the zero boundary condition (which comes from $\phi$ having compact support inside $U$, and $U$ being contained in the slab) allows us to write $\phi$ as an integral of its own derivative. Since $\phi$ vanishes at $x_n = a$, we have
\begin{align*}
\phi(x', x_n) = \int_a^{x_n} \partial_{x_n} \phi(x', t) \, d\mathcal{L}^1(t).
\end{align*}
Why do we integrate in the $x_n$-direction specifically? Because the width $d$ of $U$ is measured in that direction, and we want the constant in the final inequality to be $d$. The triangle inequality for integrals gives
\begin{align*}
|\phi(x', x_n)| \le \int_a^{x_n} |\partial_{x_n} \phi(x', t)| \, d\mathcal{L}^1(t).
\end{align*}
We then enlarge the integration domain from $[a, x_n]$ to $[a, a+d]$. This is valid because the integrand $|\partial_{x_n}\phi(x',t)| \ge 0$ and $x_n \le a + d$, so the integral can only increase.
[/guided]
[/step]
[step:Apply Holder's inequality to bound the pointwise estimate in $L^p$]
If $p = 1$, the bound $|\phi(x', x_n)| \le \int_a^{a+d} |\partial_{x_n}\phi(x',t)| \, d\mathcal{L}^1(t)$ already suffices. Assume $p > 1$ and let $q = p/(p-1)$ be the conjugate exponent, so that $1/p + 1/q = 1$. Apply Holder's inequality to the product $1 \cdot |\partial_{x_n}\phi(x',t)|$ on $[a, a+d]$ with exponents $q$ and $p$:
\begin{align*}
\int_a^{a+d} |\partial_{x_n} \phi(x', t)| \, d\mathcal{L}^1(t) \le \left(\int_a^{a+d} 1^q \, d\mathcal{L}^1(t)\right)^{1/q} \left(\int_a^{a+d} |\partial_{x_n} \phi(x', t)|^p \, d\mathcal{L}^1(t)\right)^{1/p} = d^{1/q} \left(\int_a^{a+d} |\partial_{x_n} \phi(x', t)|^p \, d\mathcal{L}^1(t)\right)^{1/p}.
\end{align*}
Raising both sides to the $p$-th power:
\begin{align*}
|\phi(x', x_n)|^p \le d^{p/q} \int_a^{a+d} |\partial_{x_n} \phi(x', t)|^p \, d\mathcal{L}^1(t).
\end{align*}
[guided]
We want to pass from the pointwise bound on $|\phi|$ to an $L^p$ bound. The right-hand side is a one-dimensional integral of $|\partial_{x_n}\phi|$, and we need to convert it into an $L^p$ norm. Holder's inequality is the tool: we pair the constant function $1$ (in $L^q$) with $|\partial_{x_n}\phi|$ (in $L^p$) over the interval $[a, a+d]$. Holder's inequality requires $1/p + 1/q = 1$, which holds by construction. The $L^q$ norm of $1$ on $[a,a+d]$ is $d^{1/q}$, so
\begin{align*}
\int_a^{a+d} |\partial_{x_n} \phi(x', t)| \, d\mathcal{L}^1(t) \le d^{1/q} \left(\int_a^{a+d} |\partial_{x_n} \phi(x', t)|^p \, d\mathcal{L}^1(t)\right)^{1/p}.
\end{align*}
Raising to the $p$-th power:
\begin{align*}
|\phi(x', x_n)|^p \le d^{p/q} \int_a^{a+d} |\partial_{x_n} \phi(x', t)|^p \, d\mathcal{L}^1(t).
\end{align*}
The exponent $p/q = p(p-1)/p = p - 1$ will combine with the next integration step to produce $d^p$.
[/guided]
[/step]
[step:Integrate over $U$ to obtain $\|\phi\|_{L^p(U)} \le d\,\|\nabla \phi\|_{L^p(U)}$]
Integrate the pointwise bound over $x_n \in [a, a+d]$. Since the right-hand side does not depend on $x_n$:
\begin{align*}
\int_a^{a+d} |\phi(x', x_n)|^p \, d\mathcal{L}^1(x_n) \le d \cdot d^{p/q} \int_a^{a+d} |\partial_{x_n} \phi(x', t)|^p \, d\mathcal{L}^1(t) = d^{1 + p/q} \int_a^{a+d} |\partial_{x_n} \phi(x', t)|^p \, d\mathcal{L}^1(t).
\end{align*}
Since $1 + p/q = 1 + (p-1) = p$, this gives $d^p$ on the right. Integrating over $x' \in \mathbb{R}^{n-1}$:
\begin{align*}
\int_{\mathbb{R}^{n-1}} \int_a^{a+d} |\phi|^p \, d\mathcal{L}^1(x_n) \, d\mathcal{L}^{n-1}(x') \le d^p \int_{\mathbb{R}^{n-1}} \int_a^{a+d} |\partial_{x_n} \phi|^p \, d\mathcal{L}^1(t) \, d\mathcal{L}^{n-1}(x').
\end{align*}
The left-hand side equals $\|\phi\|_{L^p(U)}^p$ and the right-hand side equals $d^p \|\partial_{x_n}\phi\|_{L^p(U)}^p$. Taking the $p$-th root and noting $|\partial_{x_n}\phi| \le |\nabla \phi|$ pointwise:
\begin{align*}
\|\phi\|_{L^p(U)} \le d\,\|\nabla \phi\|_{L^p(U)}.
\end{align*}
[/step]
[step:Extend to $W_0^{1,p}(U)$ by density]
Let $u \in W_0^{1,p}(U)$. By definition, $W_0^{1,p}(U)$ is the closure of $C_c^\infty(U)$ in the $W^{1,p}$ norm, so there exists a sequence $\{\phi_k\}_{k=1}^\infty \subset C_c^\infty(U)$ with $\phi_k \to u$ in $W^{1,p}(U)$. This convergence implies $\|\phi_k\|_{L^p(U)} \to \|u\|_{L^p(U)}$ and $\|\nabla \phi_k\|_{L^p(U)} \to \|\nabla u\|_{L^p(U)}$. Applying the established inequality to each $\phi_k$:
\begin{align*}
\|\phi_k\|_{L^p(U)} \le d\,\|\nabla \phi_k\|_{L^p(U)}.
\end{align*}
Taking $k \to \infty$:
\begin{align*}
\|u\|_{L^p(U)} \le d\,\|\nabla u\|_{L^p(U)}.
\end{align*}
[/step]