Yes, there is a simple algorithm. By here we can reduce the linear Diophantine equation to an equivalent linear congruence $\!\bmod 5,\,$ then apply well-known methods using modular arithmetic.
Reducing the equation $\!\bmod 5,\,$ noting $\color{#4bf}{47}\bmod 5 = \color{#4bf}{-3}\,$ yields an equivalent congruence, viz.
$$\begin{align} 3x+5y=\color{#4bf}{47}\iff 3x&\equiv \color{#4bf}{-3}\!\!\pmod{\!5}\\[.2em]
\iff\,\ x&\equiv -1\!\!\pmod{\!5}\\[.2em]
\iff\, \ x&\in\!\!\!\! \underbrace{-1\,+\,5\:\!\Bbb Z}_{\!\!\!\textstyle \ldots \color{#c00}{{-}1},\,\color{#0a0}4,\,9\,\ldots}\end{align}\qquad\qquad\!\!$$
The "simplest" solution $\,x\,$ depends on the definition: the least $\rm\color{#0a0}{nonegative}$ solution is $\,\color{#0a0}{x\equiv 4},\,$ but the least $\rm\color{#c00}{magnitude}$ solution is $\,\color{#c00}{x\equiv -1}.\,$ Given any solution $\,x_0\equiv -1\pmod{5}\,$ the least nonnegative solution is simply its remainder $\,r = x_0\bmod 5,\,$ which is also a least magnitude solution if $\, r \le 2\, (= \lfloor 5/2\rfloor)$; else it is $\,r-5,\,$ e.g. $\,r = 3\,$ has $\,3-5 = -2\,$ as least magnitude.
If we seek to do further arithmetic $\!\bmod 5\,$ with $x$ then "simpler" may be context dependent, e.g. calculating $\,x^n\equiv (\color{#c00}{-1})^n$ is simpler than $\,\color{#0a0}4^n,\,$ but $\,x/2\equiv \color{#0a0}4/2\,$ is simpler than $\:\!\color{#c00}{-1}/2$. This freedom to choose the most convenient residue ("remainder") is one of the advantages that $\!\bmod\!$ the congruence relation has vs. $\!\bmod\!$ the binary operation (see here for much further discussion).
Exactly the same method above works generally, e.g. see this answer.
See here on least-magnitude and other complete sets of residue systems (residue normal forms).
$a \times b$
), $a \cdot b$ ($a \cdot b$
) or simply use juxtaposition. – jjagmath May 25 '22 at 22:36