Skip to main content

8.5 Nonlinear oscillation solutions

Source: Ideas from Computational Physics (Landau, Páez, Bordeianu), §8.5. Original wording. Continues 8.4b. Labs: 8.5b.

Same stepper, new force​

Once (x,v)(x,v) is in dynamic form, swapping potentials is a one-line change in f\mathbf f:

F=−kxp−1(p even; odd power of x restores),F=-k x^{p-1} \quad(p\text{ even; odd power of }x\text{ restores}),

or the soft model F=−kx(1−αx)F=-kx(1-\alpha x). Integrate with RK2/RK4 exactly as for the harmonic case.

Mass–spring / anharmonic potentials.

What changes physically​

  • Period vs amplitude. For p≠2p\neq 2, larger energy ⇒ different period. Measure TT by detecting successive x=0x=0 crossings with v>0v>0 (or peaks of xx).
  • Energy still checks the ODE. For autonomous conservative F(x)F(x), E=12mv2+V(x)E=\tfrac12 mv^{2}+V(x) should stay flat if the algorithm is accurate — even when VV is not 12kx2\tfrac12 kx^{2}.
  • Soft α\alpha. Start with small amplitude; push past x∼1/αx\sim 1/\alpha and watch escape.

Slide amplitude and softness below: the measured period stretches away from the harmonic T0=2πT_0=2\pi as AαA\alpha grows.

Energy as a diagnostic​

For the harmonic benchmark, compare Euler vs RK2 energy drift at fixed final time. Nonlinear runs reuse the same plot idea with the matching V(x)V(x).

Harmonic place-markers​

Keep the p=2p=2 benchmark (ω=2π\omega=2\pi, T=1T=1) beside every nonlinear run: same IC, same hh, compare waveforms and energy drift. Nonlinear labs lock one RK2 micro-step on F=−x3F=-x^{3} so the force wiring is unambiguous before long integrations.

Takeaway​

ModelExpect
F=−kxF=-kxTT independent of AA
Soft / hard F(x)F(x)T=T(A)T=T(A)
Any conservative F(x)F(x)flat EE if the stepper is good
Quiz

Nonlinear oscillations

1 / 3

For a soft spring F=−kx(1−αx), increasing amplitude usually…

Pick an answer to see if you are right.

Next: 8.5b Nonlinear oscillation labs.