Solution (source code)

= Solution

\b[Position-dependent density.] The density $\mathcal L_1$ remains independent of $\psi$ itself, so the shift <Noether charge> survives with its altered <canonical momentum>:
$$
\boxed{Q_{1,1}=A\int\rho(z)\dot\psi\,dz}.
$$
A prescribed generic function $\rho(z)$ supplies a fixed spatial scale and breaks <scale invariance>. For the dilation-current candidate with the corresponding $\mathcal H_1$ and $\Pi_1$, the <scale-breaking sources in derivative field theories> give
$$
\partial_t j_{D,1}^0+\partial_z j_{D,1}^z=-\frac A2z\rho'(z)\dot\psi^2.
$$
Thus \b[$Q_2$ is generally not conserved]. Constant density recovers the earlier case; specially scale-invariant profiles and suitably invariant domains would require separate treatment.

\b[Quartic strain.] The extra term $-\alpha(\psi')^4$ in $\mathcal L_2$ again preserves a uniform field shift. Its time <momentum> is unchanged, while its spatial current becomes $-AK\psi'-4\alpha(\psi')^3$. Therefore
$$
\boxed{Q_{1,2}=A\rho\int\dot\psi\,dz=Q_1}.
$$
The new <Hamiltonian density> is $\mathcal H_2=\mathcal H_0+\alpha(\psi')^4$. Under waveform dilation, the quartic term scales with $b^4$ rather than $b^2$, and
$$
\partial_\mu j_{D,2}^\mu=-2\alpha(\psi')^4.
$$
Hence \b[there is no corresponding conserved $Q_2$ for nonzero generic $\alpha$], even if the <energy> in its candidate expression is updated.

\b[Field-dependent quadratic stiffness.] In $\mathcal L_3$, the term $-\beta\psi^2(\psi')^2$ breaks the uniform field shift:
$$
\frac{d}{dt}\int\Pi\,dz=-2\beta\int\psi(\psi')^2dz
$$
when spatial flux vanishes. Thus \b[$Q_1$ is not generally conserved]. However all terms still contain exactly two derivatives in total, with a field of zero dilation weight. The factor $\psi^2$ gains no extra power of $b$, so waveform dilation remains an <action> <symmetry>. Its charge is
$$
\boxed{Q_{2,3}=\int\left[t\left(\mathcal H_0+\beta\psi^2(\psi')^2\right)+z\Pi\psi'\right]dz}.
$$
Here $\Pi=A\rho\dot\psi$ as before. Relative to the original charge, the <energy> term changes; the <symmetry> survives despite the nonlinear field dependence. These statements concern <symmetry> conservation, separately from any restrictions on parameters needed for positive elastic <energy>.