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 and 2D Newton on the circle/line toy (root ).
Formula refresh
Warm up: pick the matching equation among lookalikes (same walk as the theory lesson).
Labs
Given , compute and . Print both with 6 decimals, space-separated (positive first).
No input.
Write-ups
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”.
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