Skip to main content

8.5b Nonlinear oscillation labs

Source: Lab ideas from Computational Physics (Landau, Páez, Bordeianu), §8.5. Original drills. Continues 8.5.

Explorer​

Pure Python. No NumPy / VPython.

Formula refresh​

Warm up: pick the matching equation among lookalikes (same walk as the theory lesson).

Labs​

Activity: Anharmonic micro-step

From (x,v)=(0.5,0)(x,v)=(0.5,0), take one RK2 step with h=0.01h=0.01 and F=−x3F=-x^{3} (m=1m=1). Print x v with 10 decimals.

No input.

Write-ups​

0/4 solved
8.5b.W1

Using “period”, “amplitude”, and “anharmonic”, explain:

How can you estimate the period of a nonlinear oscillator from a numerical trajectory?

Minimum 3 words. Your answer must include: “period”, “amplitude”, “anharmonic”.

0 words/ 3 min

Meet the writing requirements, then you can open the model answer.

Explorers​

# period_detect_sketch.py — original (no textbook dump)
# Integrate RK4 with F=-x**3; record times when x crosses 0 with v>0.
# T ≈ t_cross[i+1] - t_cross[i]; compare T vs amplitude.

Next: 8.6 Friction, resonances, and beats.