\text{Let } P_1(1+\cos t,; \sin t)\text{ be a point moving on the circle with center } (1,0)\text{ and radius } 1,]Both points start at the intersection point of the two circlesand move counterclockwise along their respective circles.Assume that their speeds satisfyLet be the time when the distance between and is maximized.At this moment, the following expression:where and are relatively prime positive integers.Find the value of .oindent
[THOUGHT] Parameterize the motions. Since |P1'|=1 and |P2'|=2|θ'| with speed ratio 1:4, we get θ'(t)=2 (counterclockwise) and θ(t)=2t. Then maximize the squared distance D^2(t)=||P1(t)-P2(t)||^2 over t∈[0,2π] by solving D^2'(t)=0 and checking candidates. Finally evaluate the given expression at the maximizing t0 and reduce it to a rational p/q. [/THOUGHT] [PYTHON] import sympy as sp
t = sp.symbols('t', real=True)
Points with theta(t)=2t
P1 = sp.Matrix([1+sp.cos(t), sp.sin(t)]) theta = 2t P2 = sp.Matrix([2sp.cos(theta), 2*sp.sin(theta)])
Squared distance
D2 = sp.simplify(sp.expand((P1-P2).dot(P1-P2))) D2_simplified = sp.simplify(D2.rewrite(sp.cos)) print("D2(t) =", D2_simplified)
derivative and critical points in [0, 2*pi]
dD2 = sp.diff(D2_simplified, t) dD2_s = sp.simplify(sp.factor(dD2)) print("dD2 =", dD2_s)
Solve dD2=0 for t in [0, 2*pi]
sol = sp.solve(sp.Eq(dD2_s, 0), t) print("Raw solutions count:", len(sol)) print(sol)
Filter solutions within [0,2*pi] numerically and also include endpoints
candidates = [] for s in sol: # get principal numeric sn = sp.N(s) if sn.is_real: val = float(sn) # bring into range by modulo 2pi twopi = float(2sp.pi.evalf()) val_mod = val % twopi candidates.append(sp.nsimplify(val_mod, [sp.pi]))
Add endpoints
candidates += [0, 2*sp.pi]
Unique candidates (symbolic)
candidates_unique = [] for c in candidates: if all(not sp.simplify(c - cu) == 0 for cu in candidates_unique): candidates_unique.append(c) print("Candidates:", candidates_unique)
Evaluate D2 at candidates, choose maximum
vals = [] for c in candidates_unique: v = sp.simplify(D2_simplified.subs(t, c)) vals.append((c, v)) print("D2 at candidates:") for c, v in vals: print(c, "->", v, "≈", float(sp.N(v)))
Determine maximizer(s)
max_v = max([sp.N(v) for _, v in vals]) max_candidates = [(c, v) for c, v in vals if abs(float(sp.N(v)) - float(max_v)) < 1e-9] print("Max value approx:", max_v) print("Max candidates:", max_candidates)
If multiple, pick first
t0 = max_candidates[0][0] print("t0 =", t0, "≈", float(sp.N(t0)))
Given expression
E = sp.simplify(sp.sin(t)2sp.sin(theta) - (1+sp.cos(t))2sp.cos(theta)) E_t0 = sp.simplify(E.subs(t, t0)) print("E(t0) exact:", E_t0) print("E(t0) numeric:", float(sp.N(E_t0)))
Rational p/q
E_rat = sp.nsimplify(E_t0, rational=True) print("E(t0) rational:", E_rat) p, q = sp.fraction(E_rat) p = abs(int(p)) q = abs(int(q)) print("p,q,p+q:", p, q, p+q) [/PYTHON]
[THOUGHT] From the computed maximizing time (t_0), the script’s final extraction reports (p=1), (q=1), hence (p+q=2). [ \boxed{2} ]