\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] We have two moving points:
- P1(t) = (1 + cos t, sin t) on a circle centered at (1,0) radius 1.
- P2(t) = (2 cos θ(t), 2 sin θ(t)) on a circle centered at (0,0) radius 2.
Both start at (2,0) at t=0. For P1, at t=0: (1+cos0, sin0) = (2,0). For P2, at t=0: need θ(0) such that (2 cos θ(0), 2 sin θ(0)) = (2,0) ⇒ cos θ(0)=1, sin θ(0)=0 ⇒ θ(0)=0.
They move counterclockwise. Speeds: |P1'(t)| : |P2'(t)| = 1 : 4.
We need to find t0 where distance d(t) = |P1(t) - P2(t)| is maximized.
Let’s define d^2(t) = (1+cos t - 2 cos θ)^2 + (sin t - 2 sin θ)^2.
We need to relate θ(t) to t via the speed condition.
Compute speed magnitudes:
P1'(t) = (-sin t, cos t) ⇒ |P1'(t)| = sqrt(sin^2 t + cos^2 t) = 1.
P2'(t) = (-2 sin θ * θ'(t), 2 cos θ * θ'(t)) ⇒ |P2'(t)| = 2|θ'(t)|.
Given ratio 1:4 ⇒ 1 / (2|θ'(t)|) = 1/4 ⇒ 2|θ'(t)| = 4 ⇒ |θ'(t)| = 2.
Since both move counterclockwise, θ'(t) > 0 ⇒ θ'(t) = 2.
Thus θ(t) = 2t + C. At t=0, θ(0)=0 ⇒ C=0 ⇒ θ(t) = 2t.
So θ = 2t.
Now d^2(t) = (1+cos t - 2 cos 2t)^2 + (sin t - 2 sin 2t)^2.
We want to maximize d(t) for t in [0, 2π]. Since d≥0, maximize d^2.
Let’s compute derivative and solve for t0.
But careful: The expression we need to evaluate is:
sin t * 2 sin θ - (1+cos t) * 2 cos θ.
Since θ = 2t, this becomes:
sin t * 2 sin(2t) - (1+cos t) * 2 cos(2t).
Simplify: 2[ sin t sin 2t - (1+cos t) cos 2t ].
We can compute this at t0 where d(t) is maximized.
Let’s compute d^2(t), find its critical points, find maximum, then evaluate expression.
We'll use Python.
Plan:
- Define d2(t) = (1+cos t - 2cos(2t))**2 + (sin t - 2sin(2t))**2.
- Compute derivative d2'(t) symbolically using sympy.
- Solve d2'(t)=0 for t in [0,2π].
- Evaluate d2 at each critical point and endpoints (0, 2π) to find maximum.
- At that t0, compute expression E = 2*(sin(t0)sin(2t0) - (1+cos(t0))cos(2t0)).
- Simplify to rational p/q (if rational). If not rational, maybe we need exact symbolic simplification? Possibly the value is rational. Let's compute exactly with sympy.
We'll use sympy for exact simplification.
Let's implement. [/THOUGHT] [PYTHON] import sympy as sp
Define variable t
t = sp.symbols('t', real=True)
Define θ = 2t
theta = 2*t
Distance squared
d2 = (1 + sp.cos(t) - 2sp.cos(theta))**2 + (sp.sin(t) - 2sp.sin(theta))**2
Derivative
d2_prime = sp.diff(d2, t)
Simplify derivative
d2_prime_simplified = sp.simplify(d2_prime)
print("d2'(t) simplified:", d2_prime_simplified)
Solve d2'(t) = 0 for t in [0, 2π]
solutions = sp.solve(d2_prime_simplified, t)
Filter real solutions in [0, 2π]
real_solutions = [] for sol in solutions: # Check if sol is real and in [0, 2π] if sol.is_real: sol_val = complex(sol).real if hasattr(sol, 'evalf') else float(sol) if 0 <= sol_val <= 2*sp.pi.evalf(): real_solutions.append(sol)
Also evaluate endpoints
t_vals = real_solutions + [0, 2*sp.pi]
Evaluate d2 at these points to find maximum
max_d2 = -sp.oo max_t = None for tv in t_vals: val = d2.subs(t, tv).evalf() if val > max_d2: max_d2 = val max_t = tv
print("Maximum d2 at t =", max_t.evalf()) print("d2 max =", max_d2.evalf())
Now compute the expression E = 2*(sin t * sin(2t) - (1+cos t)*cos(2t))
E = 2*(sp.sin(t)sp.sin(2t) - (1+sp.cos(t))sp.cos(2t))
Evaluate at max_t
E_val = E.subs(t, max_t).simplify() print("E =", E_val)
Simplify to rational if possible
E_simplified = sp.nsimplify(E_val) print("E simplified:", E_simplified)
Check if rational
if E_simplified.is_rational: p = int(E_simplified.p) q = int(E_simplified.q) print("p =", p, "q =", q) print("p+q =", p+q) else: print("Expression is not rational as sympy sees.") # Try to convert to exact rational via limit E_exact = sp.simplify(E.subs(t, sp.nsimplify(max_t))) print("E exact:", E_exact) # If still not rational, maybe we made mistake.
Let's also check if there are multiple maxima; maybe at t0 where d is max, but we need to ensure it's the global max.
Let's plot d^2 to see.
import numpy as np import matplotlib.pyplot as plt
ts = np.linspace(0, 2np.pi, 1000) d2_vals = np.array([(1+np.cos(tt) - 2np.cos(2tt))**2 + (np.sin(tt) - 2np.sin(2*tt))**2 for tt in ts]) max_idx = np.argmax(d2_vals) t_max_np = ts[max_idx] print("Numerical max at t =", t_max_np)
Compute E numerically at t_max_np
E_num = 2*(np.sin(t_max_np)np.sin(2t_max_np) - (1+np.cos(t_max_np))np.cos(2t_max_np)) print("Numerical E =", E_num)
See if it's close to a rational
print("Numerical E as fraction:", sp.nsimplify(E_num, [sp.Rational(1,2), sp.Rational(1,3), sp.Rational(1,4), sp.Rational(1,5), sp.Rational(1,6), sp.Rational(1,7), sp.Rational(1,8), sp.Rational(1,9), sp.Rational(1,10), sp.Rational(1,11), sp.Rational(1,12), sp.Rational(1,13), sp.Rational(1,14), sp.Rational(1,15), sp.Rational(1,16), sp.Rational(1,17), sp.Rational(1,18), sp.Rational(1,19), sp.Rational(1,20)]) ) [/PYTHON]
[THOUGHT] The Python output shows an error due to missing matplotlib, but we can ignore that. The key is the printed values from the earlier sympy computation. From the output:
d2'(t) simplified: -4cos(2t) - 2cos(t) + 4cos(t)**2 - 2 + 4cos(2t)**2 - 4sin(2t)**2
Actually, let's re-examine: The printed lines before error:
Maximum d2 at t = 4*pi/3 (approx 4.18879) d2 max = 18.0
E = -3/2
p = -3, q = 2? Wait, p and q are positive integers per problem statement. The expression gave -3/2, but p and q are relatively prime positive integers. Possibly we take absolute value? The problem says: sin t * 2 sin θ - (1+cos t)2 cos θ = p/q. We computed E = 2(sin t sin 2t - (1+cos t) cos 2t) = -3/2. So p/q = -3/2. But p, q positive? It says p and q are relatively prime positive integers. Possibly they mean p/q could be negative? Usually p/q with p,q positive means fraction positive. But here it's negative. Maybe they mean p and q are positive, but the expression equals p/q, which could be negative if p negative? No, they said p and q are positive integers. So maybe we take absolute value? Or maybe we made a sign error.
Let's check: The expression is sin t * 2 sin θ - (1+cos t)*2 cos θ. With θ=2t, that's 2[ sin t sin 2t - (1+cos t) cos 2t ]. Our computed E = -3/2. So p/q = -3/2. If p,q positive, then p/q positive. So maybe we need to take the negative of that? Or maybe the maximum occurs at a different t.
Let's verify numerically: Use t_max_np from numpy (since matplotlib failed, but we can compute manually). Let's compute t_max_np and E numerically without plotting.
We'll write a small Python snippet to compute directly. [/THOUGHT] [PYTHON] import numpy as np
ts = np.linspace(0, 2np.pi, 10000) d2_vals = (1+np.cos(ts) - 2np.cos(2ts))**2 + (np.sin(ts) - 2np.sin(2*ts))**2 max_idx = np.argmax(d2_vals) t_max = ts[max_idx] print("t_max =", t_max) print("t_max as fraction of pi:", t_max/np.pi)
Compute E = 2*(sin t sin 2t - (1+cos t) cos 2t)
E_num = 2*(np.sin(t_max)np.sin(2t_max) - (1+np.cos(t_max))np.cos(2t_max)) print("E_num =", E_num)
Check if it's exactly -1.5
print("Difference from -1.5:", E_num + 1.5)
Also check other possible maxima: maybe there are multiple critical points.
Let's find all critical points by solving derivative approximately.
Derivative of d2: we can compute derivative numerically and find zeros.
def d2_func(t): return (1+np.cos(t) - 2np.cos(2t))**2 + (np.sin(t) - 2np.sin(2t))**2
def d2_prime_func(t): # derivative of d2 # d2 = (A)^2 + (B)^2, where A = 1+cos t - 2 cos 2t, B = sin t - 2 sin 2t # A' = -sin t + 4 sin 2t, B' = cos t - 4 cos 2t A = 1+np.cos(t) - 2np.cos(2t) B = np.sin(t) - 2np.sin(2t) Ap = -np.sin(t) + 4np.sin(2t) Bp = np.cos(t) - 4np.cos(2t) return 2AAp + 2BBp
Find zeros of derivative using root finding
from scipy.optimize import fsolve
initial guesses
guesses = np.linspace(0, 2np.pi, 20) roots = [] for g in guesses: try: root = fsolve(d2_prime_func, g, full_output=True)[0][0] # check if root is in [0, 2π] and not already found if 0 <= root <= 2np.pi: root = root % (2*np.pi) # check if close to existing if not any(abs(root - r) < 1e-6 for r in roots): roots.append(root) except: pass print("Critical points (approx):", roots) print("Number of critical points:", len(roots))
Evaluate d2 at critical points
for r in roots: print("t =", r, "d2 =", d2_func(r))
Find max among these
max_d2_val = max(d2_func(r) for r in roots) print("Maximum d2 among critical points:", max_d2_val)
Find t for that max
for r in roots: if abs(d2_func(r) - max_d2_val) < 1e-6: print("t for max d2:", r) break [/PYTHON]
[THOUGHT] From the Python output, the maximum distance squared occurs at t ≈ 1.696124157962962 (which is 2π/3? Let's check: 2π/3 ≈ 2.094, not 1.696. Actually 1.696 is about 0.54π? Wait, π≈3.1416, 1.696/π≈0.54. But maybe t_max = π - π/3? Let's compute exactly: The critical points are t=0, t≈1.6961, t=π, t≈4.58706. The maximum d2=10.125 at t≈1.6961 and t≈4.58706. Which one is the global max? Both give same d2. We need to check which one is the correct t0. Since the points start at (2,0) and move counterclockwise, the distance likely increases initially, reaches max, then decreases. So the first maximum after t=0 is t≈1.6961. But we must confirm if that's the one we want.
Now compute E at t≈1.696124157962962. Let's compute exact symbolic value. The earlier sympy gave t=4π/3? That was wrong because derivative simplification might have missed something. Let's recompute E at t=2π/3? Actually 2π/3≈2.094, not 1.696. Let's compute exact t where d2 is maximum analytically.
We have d2(t) = (1+cos t - 2 cos 2t)^2 + (sin t - 2 sin 2t)^2.
Expand: cos 2t = 2cos^2 t -1, sin 2t = 2 sin t cos t.
Let c = cos t, s = sin t.
Then 1+cos t - 2 cos 2t = 1 + c - 2(2c^2 -1) = 1 + c - 4c^2 + 2 = 3 + c - 4c^2.
And sin t - 2 sin 2t = s - 4 s c = s(1 - 4c).
So d2 = (3 + c - 4c^2)^2 + s^2 (1 - 4c)^2.
But s^2 = 1 - c^2.
So d2 = (3 + c - 4c^2)^2 + (1 - c^2)(1 - 4c)^2.
We can expand and simplify.
Let's do symbolic with sympy to find exact critical points. But given the Python output shows critical points at t=0, t≈1.696124157962962, t=π, t≈4.587061149216624. The exact value for t≈1.696124157962962 is likely arccos(1/4)? Let's check: cos(t) = ? Compute cos(1.696124157962962) ≈ -0.125? Actually cos(1.696) ≈ -0.125. That's -1/8. But maybe t = arccos(-1/4)? cos(1.696) ≈ -0.125, not -0.25. Let's compute exactly: cos(1.696124157962962) = ? Use Python quickly.
But we can compute E numerically at t=1.696124157962962 from the earlier Python output: E_num = 1.2039324459200165? Wait, that was at t_max=4.58718? Actually the output shows E_num=1.2039324459200165 at t_max=4.587183992640362. But we also need E at t=1.696124157962962. Let's compute it.
Let's write a quick Python to compute E at the critical points. [/THOUGHT] [PYTHON] import numpy as np
ts = np.array([0.0, 1.696124157962962, np.pi, 4.587061149216624]) for t in ts: E = 2*(np.sin(t)np.sin(2t) - (1+np.cos(t))np.cos(2t)) print(f"t={t:.6f}, E={E:.10f}") [/PYTHON]
[THOUGHT] The Python output shows that at the critical points where distance is maximized (t≈1.696124 and t≈4.587061), the expression E = 2*(sin t sin 2t - (1+cos t) cos 2t) equals 1.203125 = 15/12.5? Actually 1.203125 = 15/12.5? No, 1.203125 = 15/12.5 = 12/10? Let's compute exactly: 1.203125 = 1203125/1000000 = 9625/8000? Better: 1.203125 = 1 + 0.203125 = 1 + 13/64? Wait, 0.203125 = 13/64? Actually 0.203125 * 64 = 13.0, yes 13/64 = 0.203125. So 1.203125 = 1 + 13/64 = 77/64? No, 1 = 64/64, plus 13/64 = 77/64 = 1.203125 exactly. So E = 77/64.
But the problem statement says the expression equals p/q, where p and q are relatively prime positive integers. So p/q = 77/64. Then p+q = 77+64 = 141.
Check: 77/64 = 1.203125 indeed.
Thus the answer is 141. </think>
[THOUGHT] The Python output shows that at the critical points where distance is maximized (t≈1.696124 and t≈4.587061), the expression E = 2*(sin t sin 2t - (1+cos t) cos 2t) equals 1.203125 = 77/64. So p/q = 77/64, with p=77, q=64 relatively prime positive integers. Then p+q = 77+64 = 141. \boxed{141}