Skip to main content

7.5b String-problem labs

Source: Lab ideas from Computational Physics (Landau, Páez, Bordeianu), §7.5. Rewritten as original drills with a self-contained Newton toy. Continues 7.5 Two masses on a string.

Explorer​

Pure Python. Stubs fail until filled.

Model reminder. Full three-string statics has six unknowns. These labs drill c=±1−s2c=\pm\sqrt{1-s^{2}} and 2D Newton on the circle/line toy (root (0.6,0.8)(0.6,0.8)).

Formula refresh​

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

Labs​

Activity: Cosine from sine

Given s=0.6s=0.6, compute c=+1−s2c=+\sqrt{1-s^{2}} and c=−1−s2c=-\sqrt{1-s^{2}}. Print both with 6 decimals, space-separated (positive first).

No input.

Write-ups​

0/4 solved
7.5b.W1

Using “sqrt”, “sign”, and “geometry”, explain:

When replacing cos θ by ±√(1−sin²θ), how do you choose the sign for a typical hanging-mass sketch with cos θ > 0?

Minimum 3 words. Your answer must include: “sqrt”, “sign”, “geometry”.

0 words/ 3 min

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

Explorers​

# string_newton_ref.py — 2D Newton on unit circle ∩ line (original sketch)
def newton2d(x=0.5, y=0.5, tol=1e-14):
for _ in range(50):
f1 = x * x + y * y - 1.0
f2 = 3.0 * x - y - 1.0
a, b, c, d = 2.0 * x, 2.0 * y, 3.0, -1.0
u, v = -f1, -f2
det = a * d - b * c
dx = (u * d - b * v) / det
dy = (a * v - u * c) / det
x, y = x + dx, y + dy
if abs(dx) + abs(dy) < tol:
break
return x, y

Next: 7.6 Spin states and hyperfine.