Module Expr Str ImportFrom alias ImportFrom alias alias alias alias alias alias alias ImportFrom alias alias alias ImportFrom alias alias alias ImportFrom alias alias ImportFrom alias Assign TupleStore NameStore NameStore NameStore NameStore Call NameLoad Str Assign TupleStore NameStore NameStore NameStore NameStore Call NameLoad Str keyword Num Assign TupleStore NameStore NameStore NameStore NameStore Call NameLoad Str Assign TupleStore NameStore NameStore NameStore NameStore Call NameLoad Str Assign TupleStore NameStore NameStore NameStore Call NameLoad Str Assign NameStore Call NameLoad Str Assign NameStore Call NameLoad Str Expr Call AttributeLoad NameLoad attr NameLoad Num Assign NameStore Call AttributeLoad NameLoad attr Str BinOpMult BinOpDiv NameLoad Num BinOpAdd BinOpMult Call NameLoad NameLoad AttributeLoad NameLoad attr BinOpMult Call NameLoad NameLoad AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Str BinOpMult BinOpDiv NameLoad Num BinOpAdd BinOpMult Call NameLoad NameLoad AttributeLoad NameLoad attr BinOpMult Call NameLoad NameLoad AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Str BinOpMult BinOpDiv NameLoad Num BinOpSub BinOpMult Call NameLoad NameLoad AttributeLoad NameLoad attr BinOpMult Call NameLoad NameLoad AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Str BinOpMult BinOpDiv NameLoad Num BinOpSub BinOpMult Call NameLoad NameLoad AttributeLoad NameLoad attr BinOpMult Call NameLoad NameLoad AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Str BinOpMult BinOpDiv NameLoad Num BinOpAdd BinOpMult Call NameLoad NameLoad AttributeLoad NameLoad attr BinOpMult Call NameLoad NameLoad AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Str BinOpMult BinOpDiv NameLoad Num BinOpAdd BinOpMult Call NameLoad NameLoad AttributeLoad NameLoad attr BinOpMult Call NameLoad NameLoad AttributeLoad NameLoad attr Assign NameStore ListLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr NameLoad NameLoad Assign NameStore ListLoad BinOpSub NameLoad BinOpMult NameLoad NameLoad BinOpSub NameLoad BinOpMult NameLoad NameLoad BinOpSub NameLoad BinOpMult NameLoad NameLoad Assign NameStore Call NameLoad NameLoad NameLoad For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body Assign SubscriptStore NameLoad Index Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr NameLoad Assign NameStore ListLoad TupleLoad NameLoad BinOpMult BinOpMult BinOpMult Num NameLoad NameLoad AttributeLoad NameLoad attr TupleLoad NameLoad BinOpAdd BinOpMult NameLoad AttributeLoad NameLoad attr BinOpMult BinOpMult BinOpMult Num NameLoad NameLoad AttributeLoad NameLoad attr TupleLoad NameLoad BinOpMult BinOpMult BinOpMult Num NameLoad NameLoad AttributeLoad NameLoad attr TupleLoad NameLoad BinOpAdd BinOpMult UnaryOpUSub NameLoad AttributeLoad NameLoad attr BinOpMult BinOpMult BinOpMult Num NameLoad NameLoad AttributeLoad NameLoad attr TupleLoad NameLoad BinOpMult BinOpMult BinOpMult Num NameLoad NameLoad AttributeLoad NameLoad attr TupleLoad NameLoad BinOpAdd BinOpMult NameLoad AttributeLoad NameLoad attr BinOpMult BinOpMult BinOpMult Num NameLoad NameLoad AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad NameLoad NameLoad NameLoad Assign NameStore ListComp Call NameLoad Call AttributeLoad Str attr NameLoad NameLoad BinOpMult BinOpMult NameLoad NameLoad NameLoad comprehension TupleStore NameStore NameStore NameStore Call NameLoad Call NameLoad Num Num NameLoad BinOpMult ListLoad Num Num Num Assign TupleStore NameStore NameStore Call NameLoad NameLoad NameLoad NameLoad Assign NameStore Call NameLoad Call NameLoad Lambda arguments args NameParam defaults Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore Call NameLoad NameLoad NameLoad NameLoad NameLoad Assign NameStore BinOpDiv Call AttributeLoad Call NameLoad GeneratorExp BinOpMult AttributeLoad NameLoad attr Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad comprehension NameStore NameLoad attr NameLoad Num Assign NameStore Call NameLoad Lambda arguments args NameParam defaults UnaryOpUSub Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad NameLoad FunctionDef arguments args NameParam defaults body For TupleStore NameStore NameStore Call NameLoad NameLoad Num body Print Call AttributeLoad Str attr NameLoad Call NameLoad Call NameLoad Call NameLoad NameLoad decorator_list Print Str Expr Call NameLoad NameLoad Print Str Expr Call NameLoad NameLoad Print Str Expr Call NameLoad NameLoad For TupleStore NameStore NameStore Call NameLoad NameLoad NameLoad body Assert CompareEq Call NameLoad BinOpSub NameLoad NameLoad Num For TupleStore NameStore NameStore Call NameLoad NameLoad NameLoad body Assert CompareEq Call NameLoad BinOpSub NameLoad NameLoad Num
N/A N/A Exercise 10.15 from Kane 1985. __future__ division sympy expand sin cos solve symbols trigsimp together sympy.physics.mechanics ReferenceFrame Point Particle sympy.physics.mechanics dot dynamicsymbols msprint util generalized_inertia_forces generalized_inertia_forces_K util partial_velocities N/A N/A q1 q2 q3 q N/A dynamicsymbols q1:4 N/A N/A q1d q2d q3d qd N/A dynamicsymbols q1:4 level 1 N/A N/A u1 u2 u3 u N/A dynamicsymbols u1:4 N/A N/A g m L t N/A symbols g m L t N/A N/A Q R S N/A symbols Q R S N/A N N/A ReferenceFrame N N/A pO N/A Point O N/A N/A N/A pO set_vel N 0 N/A pP1 N/A N/A pO locatenew P1 N/A N/A L 2 N/A N/A N/A cos q1 N/A N x N/A N/A sin q1 N/A N y N/A pP2 N/A N/A pP1 locatenew P2 N/A N/A L 2 N/A N/A N/A cos q1 N/A N x N/A N/A sin q1 N/A N y N/A pP3 N/A N/A pP2 locatenew P3 N/A N/A L 2 N/A N/A N/A cos q2 N/A N x N/A N/A sin q2 N/A N y N/A pP4 N/A N/A pP3 locatenew P4 N/A N/A L 2 N/A N/A N/A cos q2 N/A N x N/A N/A sin q2 N/A N y N/A pP5 N/A N/A pP4 locatenew P5 N/A N/A L 2 N/A N/A N/A cos q3 N/A N x N/A N/A sin q3 N/A N y N/A pP6 N/A N/A pP5 locatenew P6 N/A N/A L 2 N/A N/A N/A cos q3 N/A N x N/A N/A sin q3 N/A N y N/A points N/A pP1 pP2 pP3 pP4 pP5 pP6 N/A p points N/A N/A N/A N/A p set_vel N N/A N/A N/A N/A p pos_from pO diff t N N/A kde N/A N/A u1 N/A L q1d N/A u2 N/A L q2d N/A u3 N/A L q3d N/A kde_map N/A solve kde qd N/A N/A k v N/A N/A kde_map items N/A N/A N/A kde_map N/A N/A N/A k diff t N/A N/A v diff t N/A forces N/A N/A pP1 N/A N/A N/A 6 m g N/A N x N/A pP2 N/A N/A S N/A N y N/A N/A N/A 5 m g N/A N x N/A pP3 N/A N/A N/A 6 m g N/A N x N/A pP4 N/A N/A N/A Q N/A N y N/A N/A N/A 5 m g N/A N x N/A pP5 N/A N/A N/A 6 m g N/A N x N/A pP6 N/A N/A R N/A N y N/A N/A N/A 5 m g N/A N x N/A partials N/A partial_velocities points u N kde_map N/A system N/A N/A Particle N/A N/A P{0} format i p N/A N/A x m g N/A N/A i p x N/A zip N/A range 1 7 points N/A N/A 6 5 3 N/A N/A Fr_star_a _ N/A generalized_inertia_forces partials system kde_map N/A K N/A sum N/A map N/A N/A N/A x N/A N/A N/A x kinetic_energy N system N/A Fr_star_b N/A generalized_inertia_forces_K K q u kde_map N/A G N/A N/A N/A N/A sum N/A N/A N/A P mass N/A dot N/A N/A N/A P point acc N N/A N/A N/A P point acc N N/A P system subs kde_map 2 N/A Fr_star_c N/A map N/A N/A N/A u_r N/A N/A N/A N/A G diff N/A N/A u_r diff t u print_fr_star N/A N/A fr_star N/A N/A N/A N/A i f N/A enumerate fr_star 1 N/A N/A N/A N/A F{0}* = {1} format i N/A msprint N/A trigsimp N/A together f N/A N/A part a N/A N/A print_fr_star Fr_star_a N/A 
part b N/A N/A print_fr_star Fr_star_b N/A 
part c N/A N/A print_fr_star Fr_star_c N/A N/A x y N/A zip Fr_star_a Fr_star_b N/A N/A N/A N/A expand N/A x y 0 N/A N/A x y N/A zip Fr_star_a Fr_star_c N/A N/A N/A N/A expand N/A x y 0