Averaged amplitude for position-dependent damping (source code)

= Averaged amplitude for position-dependent damping
{title2=$A_T=-A\langle f(A\cos\psi)\sin^2\psi\rangle$}

For $x\prime\prime+\epsilon f(x)x\prime+x=0$, write $x_0=A(T)\cos(t+\theta)$ and $T=\epsilon t$. Removing <secular terms> gives $A_T=-A\langle f(A\cos\psi)\sin^2\psi\rangle$ and $\theta_T=0$, where the brackets mean a period average. This is the first-order <solvability condition in the method of multiple scales>, with a slowly evolving amplitude and no first-order frequency correction.