Is this proof that $(\mathbb{Q},+)$ has no maximal subgroups correct? I've seen different proofs on here for this result but none followed this approach so I was curious if there is an error in my reasoning or if its just not the preferred way to solve this problem.
Suppose for a contradiction that $\mathbb{Q}$ has a maximal subgroup $U$. Choose $r\in\mathbb{Q}\setminus U$. Then $\langle U,r\rangle$ generates $\mathbb{Q}$, so in particular
we can write $0 = (-1)^{e_1}a_1 + \cdots + (-1)^{e_n}a_n + (-1)^{e_{n+1}}r$ for some choice of exponents $e_i$.
This implies we can write either $r$ or $-r$ as a sum of elements in $U$, which then implies that
$r$ or $-r$ is in $U$ contradicting our choice of $r$. Hence $U$ cannot be maximal.
Any feedback is appreciated.
 A: I believe that you're assuming $a_1,\dots,a_n\in U$.
Sorry, but the proof is wrong. Note that $a=(-1)^{e_1}a_1+\dots+(-1)^{e_n}a_n\in U$, so there's no need to bother with several elements.
However, the subgroup generated by $U$ and $r$ consists of all elements of the form $a+nr$, where $a\in U$ and $n\in\mathbb{Z}$. The set you're describing is not a subgroup, because it only consists of the rationals of the form $a+r$ and $a-r$, for $a\in U$. And $0$ is definitely not in this set.

You may have be misled by the characterization of elements in the subgroup generated by a subset. Let's use multiplicative notation and let's be given the subset $F$ of the group $G$; then it is true that
$\langle F\rangle$ consists of all elements of the form
$$
x_1^{(-1)^{\varepsilon_1}}x_2^{(-1)^{\varepsilon_2}}\dotsm x_n^{(-1)^{\varepsilon_n}}
$$
where $x_i\in F$ and $\varepsilon_i\in\mathbb{Z}$. Note that $x_1,x_2,\dots,x_n$ need not be distinct.
If you add a new element $g$ to $F$, you have to reconsider all expressions above when $x_i$ can also be $g$. If the group is Abelian, then you can push all possible occurrences of $g$ at the far right, but now the exponent may be an arbitrary integer, not just $1$ or $-1$. Thus the expressions become
$$
x_1^{(-1)^{\varepsilon_1}}x_2^{(-1)^{\varepsilon_2}}\dotsm x_n^{(-1)^{\varepsilon_n}}g^k
$$
where $x_i\in F$ and $k$ is an integer. When $F$ is itself a subgroup, then we have
$$
x_1^{(-1)^{\varepsilon_1}}x_2^{(-1)^{\varepsilon_2}}\dotsm x_n^{(-1)^{\varepsilon_n}}=x\in F
$$
and so the description is much easier: the subgroup generated by the subgroup $F$ and the element $g$ consists of the elements of the form
$$
xg^k
$$
with $x\in F$ and $k\in\mathbb{Z}$.
In additive notation for your case
$$
\langle U,r\rangle=\{a+kr:a\in U,k\in\mathbb{Z}\}
$$
