Let $U_1$ and $U_2$ be two open sets in $\Bbb R^n$ for some $n ≥ 1$ such that $U_1 \cap U_2 = ∅$. Let $\alpha= (\alpha_1, . . . , \alpha_n)$ be a multiindex. Let $u ∈ L^1_{loc}(U1 ∪ U2)$. Assume that the $\alpha$-weak partial derivatives of $u$ in $U_1$ and $U_2$ exist, and denote them by $v_1$ and $v_2$, respectively.
(1) Prove that $v_1=v_2$ a.e. in $U_1 \cap U_2$.
(2) Define $v$ by $v=v_1$ in $U_1$\ $U_2$, $v =v_2$ in $U_2$\ $U_1$, and $v= v_1$ in $U_1\cap U_2$. Prove that $v$ is the $\alpha$-weak partial derivative of $u$ in $U_1\cup U2$.
I solved part 1, but can someone tell me how to solve part 2 please?
Let $\varphi\in C^{\infty}_c(U_1\cup U_2)$ with support $K$. Write $K=K_1\cup K_2$ for $K_1\subseteq U_1$ and $K_2\subseteq U_2$ compact. Pick open sets $K_j\subseteq V_j\subseteq \bar{V_j}\subseteq U_j$ and let $\psi_1$ and $\psi_2$ be a partition of unity subordinate to this cover (i.e., let $V_3$ be open such that $V_1\cup V_2\cup V_3=\mathbb{R}^n$ and $V_3\cap K_1=V_3\cap K_2=\emptyset$ and let $\psi_1,\psi_2,\psi_3$ be a partition of unity subordinate to that cover).
Then, we have
\begin{align} \int_{U_1\cup U_2} v\varphi=\int_{V_1} v\psi_1\varphi+\int_{V_2} v\psi_2\varphi&=(-1)^{|\alpha|} \left(\int_{V_1} u\partial^{\alpha}(\psi_1 \varphi)+\int_{V_2} u\partial^{\alpha}(\psi_2 \varphi)\right)\\ &=(-1)^{|\alpha|}\int_{U_1\cup U_2} u\partial^{\alpha}((\psi_1+\psi_2)\varphi) \\&=(-1)^{|\alpha|}\int_{U_1\cup U_2} u\partial^{\alpha}\varphi, \end{align}
where, of course, we've used that $v$ is the weak derivative of $u$ in both $U_1$ and in $U_2$.