Solution (source code)

= Solution

The <wave equation on a string> gives $c_j=\sqrt{T/\rho_j}$ and $\omega=c_jk_j$, hence
$$
\boxed{k_j=\omega\sqrt{\frac{\rho_j}{T}},\qquad T k_j^2=\rho_j\omega^2.}
$$
The tension is common across the join, and the frequency is unchanged by reflection and transmission at the stationary boundary.

Use the complex time convention $e^{i\omega t}$. The physical displacement is the real part of
$$
y_L=(Ae^{-ik_1x}+Be^{ik_1x})e^{i\omega t},\qquad
y_R=Ce^{-ik_2x}e^{i\omega t}.
$$
The first term is incident from the left, the second reflected to the left, and the right-side term transmitted to the right. Continuity of <displacement> gives $A+B=C$. At a massless join, continuity of the transverse <force> $T y_x$ gives $k_1(A-B)=k_2C$. Solving these two equations yields
$$
\boxed{r=\frac BA=\frac{k_1-k_2}{k_1+k_2},\qquad
 t=\frac CA=\frac{2k_1}{k_1+k_2}=1+r.}
$$
These are displacement-amplitude coefficients for <reflection at a density step on a string>, not power fractions. Since the mean incident <power> is $T\omega k_1|A|^2/2$, the reflected and transmitted power fractions are $|r|^2$ and $(k_2/k_1)|t|^2$. They sum to one, as expected for the lossless join.