Find all solutions $(x, y, z)$ ∈ $\mathbb N^+ ×\mathbb N^+ ×\mathbb N^+$ for the following equations in $\mathbb Z$:
(a) $3x^2 + 4y^2 = z^2$
(b) $3x^2 + 6y^2 = z^2$
My attempt:
a) If I divide the equation by $z^2$, I will get: $3(\frac xz)^2$+$4(\frac yz)^2$ = $1$
If I let A = $\frac xz$ and B = $\frac yz$ then $3A^2+4B^2=1$. But then how do I continue?
and what about part b? Any help please?
Without loss of generality, we may assume that $\gcd(x,y,z)=1$. First, observe that $x$ is even (otherwise $z^2\equiv -1\pmod{4}$, which is impossible). Note that $$(z-2y)(z+2y)=3x^2\,.$$ Since $x$ is even, $z$ is also even. Then, write $x=2u$ and $z=2w$ for some integers $u,w\geq 0$, which gives $$(w-y)(w+y)=3u^2\,.$$ We have two cases as $\gcd(w-y,w+y)\in\{1,2\}$.
If $\gcd(w-y,w+y)=1$, then either $$w-y=s^2\text{ and }w+y=3t^2\,,$$ or $$w-y=3t^2\text{ and }w+y=s^2\,,$$ for some odd $s,t\in\mathbb{Z}_{\geq 0}$ such that $\gcd(s,t)=1$. That is, $$(x,y,z)=(2u,y,2w)=\left(2st,\frac{3t^2-s^2}{2},s^2+3t^2\right)\,,$$ or $$(x,y,z)=(2u,y,2w)=\left(2st,\frac{s^2-3t^2}{2},s^2+3t^2\right)\,.$$ Hence, we can rewrite these families of solutions as $$(x,y,z)=\Biggl(2st,\left|\frac{s^2-3t^2}{2}\right|,s^2+3t^2\Biggr)\,,$$ where $s$ and $t$ are odd coprime positive integers. Note that $3\nmid s$ must hold.
If $\gcd(w-y,w+y)=2$, then either $$w-y=2s^2\text{ and }w+y=6t^2\,,$$ or $$w-y=6t^2\text{ and }w+y=2s^2\,,$$ for some $s,t\in\mathbb{Z}_{>0}$ with different parity such that $\gcd(s,t)=1$. Solving this in a similar manner, we get $$(x,y,z)=\Big(4st,\left|s^2-3t^2\right|,2s^2+6t^2\Big)$$ for some coprime $s,t\in\mathbb{Z}_{>0}$ with different parity. Note that $3\nmid s$ must hold.