Solution (source code)

= Solution

There is a sign error in the printed synchronous line-of-sight integrand. Direct contraction of the stated decomposition gives $h'_{ij}n^in^j=(h'-h_S')/3+(\hat{\mathbf k}\cdot\mathbf n)^2h_S'$, with a \b[plus] sign in its last term. In the positive spatial-perturbation convention of part a, the <redshift> term is half this contraction. The printed minus sign cannot yield the requested Newtonian expression with the supplied transformations.

The consistent identity can be derived explicitly. Work mode by mode with $q=\mathbf k\cdot\mathbf n$, $E(\tau)=e^{iq(\tau-\tau_0)}$ along the unperturbed ray; the shift of the phase origin is immaterial. Put $A=(h-h_S)/6$. Part a gives $A=\Psi-\mathcal HT$, while $\Phi=-\mathcal HT-T'$. Therefore $A'=\Phi'+\Psi'+T''$. The corrected synchronous integral is
$$
I_S=\int_{\tau_d}^{\tau_0}E(A'+q^2T)\,d\tau=\int_{\tau_d}^{\tau_0}E(\Phi'+\Psi')\,d\tau+[E(T'-iqT)]_{\tau_d}^{\tau_0},
$$
since $[E(T'-iqT)]'=E(T''+q^2T)$. This is the <photon redshift identity with positive spatial perturbations>.

The supplied fluid shifts are $\delta_\gamma^N=\delta_\gamma+4\mathcal HT$ and $\mathbf v_\gamma^N=\mathbf v_\gamma+i\mathbf kT$. At emission, the synchronous intrinsic and Doppler terms are consequently $E_d[\delta_\gamma^N/4+\mathbf v_\gamma^N\cdot\mathbf n-\mathcal HT-iqT]_d$. Adding the lower integral endpoint cancels the velocity shift and leaves $-\mathcal HT-T'=\Phi$. The upper endpoint is the local observer monopole/dipole $[T'-iqT]_0$, removed by <temperature> calibration and the observer-rest-frame convention. With zero <anisotropic stress>, $\Phi=\Psi$, the observable higher-multipole result is
$$
\boxed{\frac{\Delta T}{T}(\mathbf n)=\left[\frac14\delta_\gamma^N+\mathbf v_\gamma^N\cdot\mathbf n+\Phi\right]_d+2\int_{\tau_d}^{\tau_0}\Phi'\,d\tau}.
$$
All fields are evaluated along the ray; the integral contains the time derivative at fixed spatial position. Retaining the printed negative angular term would leave the additional $-2q^2\int ET\,d\tau$, generally a gauge-dependent, nonzero term. It is therefore not repaired merely by discarding observer monopole and dipole.

The first term is the intrinsic <photon> <temperature> perturbation, important in acoustic compressions and rarefactions. The velocity term is the Doppler shift and is prominent near acoustic, roughly degree and subdegree, scales; it is suppressed on very large scales. The potential at emission is the ordinary <Sachs-Wolfe effect>; combined with the intrinsic term it gives the familiar large-angle adiabatic matter-era result $\Phi/3$. The final term is the <Integrated Sachs-Wolfe effect>, caused by changing potentials. It vanishes for constant matter-era potentials, receives an early contribution near radiation-matter transition, and has an important late large-angle contribution when <curvature> or dark <energy> causes potentials to evolve. The sign of the Doppler term follows the photon-propagation direction convention used in the ray; reversing that direction reverses it consistently.