Let $X$ be the complex obtained by gluing two discs to $S^1$ via maps of relatively prime degree, say by $f:\partial D_1 \rightarrow S^1$ of degree $p$, and $g:\partial D_2 \rightarrow S^1$ of degree $q$.
I would like to show that $X$ is simply connected. (It is easy to see that $H_1(X) \cong \{e\}$ using cellular homology).
Pick points $x_i \in D_i - \partial D_i$, and let $U_i = X - x_i$.
Then $U_1$ is homotopy equivalent to the space formed by attaching a disc to $S^1$ via a degree $q$ map and $U_2$ is homotopy equivalent to the space formed by attaching a disc to $S^1$ via a degree $p$ map. We also have $U_1 \cap U_2 \simeq S^1$.
Then $\pi_1(U_1) \cong <a\ | \ a^q>, \pi_1(U_2) \cong <b \ | \ b^p >, \pi_1(U_1 \cap U_2) \cong < c >$.
By Van Kampen's theorem, we have
$\pi_1(X) \cong <a, b \ | \ a^q =e,\; b^p=e,\; b^p = a^q \ >$
since including $c$ into $U_1$ is $b^p$ and $c$ into $U_2$ is $a^q$.
This group is not trivial, but I am unable to see what's wrong (I think it's in the relations from inclusion.)
Thanks in advance!
How do you know the group is nontrivial? (Just because a group has a non-trivial presentation doesn't imply the group itself is.)
Let's get the van Kampen right. The inclusion of $S^1$ into $U_1$ and $U_2$ induce the maps $c\mapsto a$ and $c\mapsto b$, rather than the powers of $a$ and $b$ you have. Thus, the amalgamated product is $\langle a,b\mid a^q=1,b^p=1,a=b\rangle\cong\langle a\mid a^q=1,a^p=1\rangle$.
Since $p,q$ are relatively prime, there are $c,d\in\mathbb{Z}$ such that $cp+dq=1$. Then, $a=a^{cp+dq}=(a^p)^c(a^q)^d=e$.