<jupyter_start><jupyter_text>Autoparametric resonance System of equations of motion for the system:\begin{aligned}\ddot{R}&=R\dot{\theta}^2-\frac{k}{m}(R-l)+g\cos\theta+a\cos\Omega t\\\ddot{\theta}&=-\frac{2}{R}\dot{R}\dot{\theta}-\frac{g}{m}\sin\theta\end{aligned}Find stationary point for linearization $\theta=0$, all derivatives are zero:$$-\frac{k}{m}(R-l)+g=0\quad\implies\quad R=l+\frac{mg}{k}$$linearize equations around stable point$$R=R_0+r,\quad R_0=l+mg/k,\quad\theta_0=0$$where $r/R_0\ll0$ and $\theta\ll0$. Scale time to get rid of frequencies $t'=\omega_1t$ assuming $\omega_1=2\omega_2$.\begin{aligned}\ddot{r}+\frac{1}{Q_1}\dot{r}+r&=l\dot{\theta}^2+a\cos\Omega t\\\ddot{\theta}+\frac{1}{Q_2}\dot{\theta}+\frac{1}{4}\theta&=-2\dot{r}\dot{\theta}\end{aligned}Following to the averaging method:\begin{aligned}r &= u_1\cos\Omega t+v_1\sin\Omega t\\\theta &= u_2\cos\frac{\Omega}{2}t+v_2\sin\frac{\Omega}{2}t\\\dot{r} &= \Omega (-u_1\sin\Omega t+v_1\cos\Omega t)\\\dot{\theta} &= \frac{\Omega}{2} (-u_2\sin\frac{\Omega}{2}t+v_2\cos\frac{\Omega}{2}t)\end{aligned}with additional constraints\begin{aligned}\dot{u}_1\cos\Omega t+\dot{v}_1\sin\Omega t &= 0\\\dot{u}_2\cos\frac{\Omega}{2}t+\dot{v}_2\sin\frac{\Omega}{2}t &= 0\end{aligned}Introduce detuning parameters$$\xi_1=1-\Omega^2,\quad\xi_2=1-\Omega^2/4$$<jupyter_code>import sympy as sp
t, l, a, Q1, Q2 = sp.symbols('t, l, a, Q_1, Q_2')
u1, u2, v1, v2 = sp.symbols('u_1, u_2, v_1, v_2')
xi1, xi2 = sp.symbols('\\xi_1, \\xi_2')
W = sp.Symbol('\Omega', positive=True)
r  =       u1 * sp.cos(W*t) + v1 * sp.sin(W*t)
dr = W * (-u1 * sp.sin(W*t) + v1 * sp.cos(W*t))
th  =         u2 * sp.cos(W/2*t) + v2 * sp.sin(W/2*t)
dth = W/2 * (-u2 * sp.sin(W/2*t) + v2 * sp.cos(W/2*t))
F1 = -dr/Q1/W  - xi1/W * r + l/W * dth**2 + a/W *sp.cos(W*t)
F2 = -dth/Q2/W - xi2/W * th - 2/l/(W/2) * dr * dth
T = 4*sp.pi/W
du1 = (sp.integrate(-sp.sin(W*t)*F1, (t, 0, T))/T).expand()
dv1 = (sp.integrate( sp.cos(W*t)*F1, (t, 0, T))/T).expand()
du2 = (sp.integrate(-sp.sin(W/2*t)*F2, (t, 0, T))/T).expand()
dv2 = (sp.integrate( sp.cos(W/2*t)*F2, (t, 0, T))/T).expand()<jupyter_output><empty_output><jupyter_text>Get equations for the steady-state solution.<jupyter_code>eq1=du1*2
eq1
eq2=dv1*2
eq2
eq3 = du2*2
eq3
eq4=dv2*2
eq4<jupyter_output><empty_output><jupyter_text>Replace real $u$, $v$ with complex analogs to easy account for damping$$z_1=u_1+iv_1,\quad z_2=u_1-iv_1,\quad z_3=u_2+iv_2,\quad z_4=u_2-iv_2$$<jupyter_code>z1, z2, z3, z4=sp.symbols('z_1, z_2, z_3, z_4')
sbs=[(u1, z1/2+z2/2), (v1, -sp.I*z1/2+sp.I*z2/2),
     (u2, z3/2+z4/2), (v2, -sp.I*z3/2+sp.I*z4/2)]
eq5=eq1.subs(sbs).expand()
eq6=eq2.subs(sbs).expand()
eq7=eq3.subs(sbs).expand()
eq8=eq4.subs(sbs).expand()
eq9  = (eq5 + sp.I * eq6).expand()
eq10 = (eq5 - sp.I * eq6).expand()
eq11 = (eq7 + sp.I * eq8).expand()
eq12 = (eq7 - sp.I * eq8).expand()
eq9
eq10
eq11
eq12
sol1 = sp.solve((eq9,eq10),[z1,z2])
Z1 = sol1[z1].expand()
Z2 = sol1[z2].expand()
Z1
Z2<jupyter_output><empty_output><jupyter_text>Substitute them into the second couple of equations<jupyter_code>eq13 = eq11.subs([(z1,Z1),(z2,Z2)]).expand()
eq13
eq14 = eq12.subs([(z1,Z1),(z2,Z2)]).expand()
eq14<jupyter_output><empty_output><jupyter_text>Let the amplitudes of modes are$$A_1^2 = z_1z_2 = u_1^2+v_1^2,\quad A_2^2 = z_3z_4 = u_2^2+v_2^2$$The trivial solution to the system is $z_3=z_4=0$, $A_2=0$ and\begin{equation}z_{1,2}=\frac{a}{\pm\xi_1-\Omega/{iQ_1}},\quad A_1=\frac{a}{\sqrt{(1-\Omega^2)^2+\Omega^2/Q_1^2}}\end{equation} The system has nontrivial value<jupyter_code>A1, A2 = sp.symbols('A1, A2')
eq15 = Q1*W**3*z3*A2**2/(-8*sp.I*Q1*xi1 - 8*W) - 8*Q1*W*a*z4/(-8*sp.I*Q1*xi1*l - 8*W*l) - sp.I*xi2*z3/W - z3/(2*Q2)
eq16 = Q1*W**3*z4*A2**2/(8*sp.I*Q1*xi1 - 8*W) - 8*Q1*W*a*z3/(8*sp.I*Q1*xi1*l - 8*W*l) + sp.I*xi2*z4/W - z4/(2*Q2)
eq17 = eq15.collect([z3,z4])
eq18 = eq16.collect([z3,z4])<jupyter_output><empty_output><jupyter_text>The linear system of two equations for $z_3$ and $z_4$ has a nontrivial solution when determinant is zero what yields $A_2^2$ value. Since A_2 is amplitude, nontrivial solution will be stable when $A_2$ has a real positive value, otherwise the solution is trivial.<jupyter_code>eq17
eq18<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.2385906833766848, 'fraction_numerical': 0.07755970678647435, 'mean_word_length': 4.899581589958159, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 25, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '6', 'dir': 'jupyter-structured-clean-dedup', 'id': '242442', 'license': 'CC0-1.0', 'n_tokens_mistral': 2156, 'n_tokens_neox': 2083, 'n_words': 325, 'path': 'autoparametric-resonance/swing-spring-pendulum-symbolic.ipynb', 'repo_name': 'vr050714/nonlinear-vibration-seminar', 'size': '4229'}