Patching up two trivial fibre bundles induces homology equivalence I was wondering to ask this question may be it's a silly one. I could not prove or disprove it.
Let $X,Y$ be smooth connected manifolds. Let $X=X_1\cup X_2$ ($X_i$'s sub-manifold of $X$) and $X_1 \cap X_2$ is empty. Let $f: Y \to X $ be a surjective submersion such that $f: f^{-1}(X_i) \to X_i$ (with fibre $F_i$, I am not assuming $F_1=F_2$) is trivial fibre bundle with $H_*(F_i; \mathbb{Z})=0$, for $i=1,2$. Then my question is whether $f:H_*(Y;\mathbb{Z})\to H_*(X;\mathbb{Z})$ is isomorphism at each level?
Note as $H_*(F_i;\mathbb{Z})=0$ it implies $f: f^{-1}(X_i) \to X_i$  induces isomorphism is homology.
Thanks in advance!!
 A: I think you can do something like this. Let $Y=D^2$ be the open disc in the plane, $X=S^1$ the circle. Let $X_1$ a point on the circle (the red point below) and $X_2=X\setminus X_1$. Define the map as in the picture below. The fiber over the red point is the red half line $\{0\}\times [0,1)$. The fibers over the other points are diffeomorphic to open intervals. The map does not induce an isomorphism in homology, but it does do so when restricted over the preimages of $X_1$ and $X_2$.
Edit: The question was changed after this answer

A: I think the answer is yes, even if the bundles are not trivial.
Assume that $\dim X_1 < \dim X_2$. $X_1$ is a closed subset of $X$ and therefore a properly embedded submanifold. Let $Y_i=f^{-1}(X_i)$.
Let $NX_1 \subset NX_1'$ denote two nested closed tubular neighborhood of $X_1$ in $X$. There is a homotopy equivalence
$$ \text{colim} ( X_1 \xleftarrow{\pi} NX_1\setminus X_1 \hookrightarrow X_2 ) \xrightarrow{\phi} X$$
(the left hand space is the quotient of $X$ obtained by collapsing each fiber of the projection $\pi\colon NX_1 \to X_1$ to its target; the map $\phi$ stretches the fibers of $NX_1'\setminus NX_1$ to fill up all of $NX_1'\setminus X_1$).
This decomposition yields a Mayer-Vietoris sequence to compute the homology of $X$ of the form
$$
\cdots \to H_*(\nu X_1\setminus 0) \to H_*(X_1) \oplus H_*(X_2) \to H_*(X) \to \cdots
$$
where $\nu X_1\setminus 0$ denotes the total space of the normal bundle of $X_1$ in $X$ minus the zero section.
As $f$ is a submersion, it induces an isomorphism between the normal bundles of $Y_1$ and $X_1$. Moreover1 given a diffeomorphism $\nu X_1 \to NX_1$ with $NX_1$ sufficiently small, we can pick a tubular neighborhood $\nu Y_1 \xrightarrow{\cong} NY_1$ such that the square
$\require{AMScd}$
\begin{CD}
\nu Y_1 @>>> NY_1 \\
@V{Df}VV @V{f}VV \\
\nu X_1 @>>> NX_1
\end{CD}
commutes.
$f$ then induces map on the colimits which is equivalent to $f\colon Y \to X$ (in the sense that the relevant square diagram commutes up to homotopy). In terms of the Mayer-Vietoris decompositions we obtain
$\require{AMScd}$
\begin{CD}
H_*(\nu(Y_1)\setminus 0) @>>>  H_*(Y_1) \oplus H_*(Y_2) @>>>  H_*(Y) \\
@V{Df_\ast}VV @V{f_*}VV @V{f_*}VV \\
H_*(\nu(X_1)\setminus 0) @>>> H_*(X_1) \oplus H_*(X_2) @>>> H_*(X)
\end{CD}
It now suffices to prove that the bundle map $Df_\ast$ is an isomorphism on homology. $Df$ expresses the normal bundle of $Y_1$ as the pullback of the normal bundle of $X_1$ along the bundle projection $f\colon Y_1 \to X_1$ so for any sufficiently small open set $U\subset X_1$ which trivializes $f$ we will have that $Df \colon \nu f^{-1}(U) \setminus 0 \to \nu U \setminus 0$ induces an isomorphism. This implies that $Df_\ast$ is an isomorphism.
1 I think this statement is true in this generality but I could not find a reference or write down a complete proof. It is not hard to give a fairly explicit diffeomorphism when $f\colon Y_1 \to X_1$ is the projection of a trivial bundle as in the original question.
