Similar questions have been asked but didn't helped me because either they didn't answer my problem, either they answered a specific case of my problem, not helping me prove the most general conclusion. The problem is the following.
Let $D$ be a commutative, integral domain. Prove that for any $a,b\in D$, if both $\text{lcm}(a,b)=:m$ and $\gcd(a,b)=:d$ exist, then $dm$ is an associate of $ab$.
I've been turning around the problem for hours, without success. Noting $a/b$ the element such that $(a/b)b = b (a/b) = a$, the further I've got was that $m = d (b/d) (m/b) = d (a/d) (m/a)$ which in turn implies that $$(b/d) m = (m/d)b$$ $$(a/d) m = (m/d) a$$ $$\Rightarrow (m/d)(b-a) = m(b/d - a/d)$$ where I'm stuck. I was trying to prove that the ideal generated by $ab$ is equal to the one generated by $dm$, or equivalently that $ab|dm,\ dm|ab$. By biggest problem, I guess, is that intuitively I don't see why the conclusion should be true. Thank you in advance for your time.