lagrange.20100226.4b87e8b6bb76d2.41528386

lagrange.20100226.4b87e8b6bb76d2.41528386 - FullForm...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: FullForm Derivative 2 Derivative 2 x x t t FullForm D x t , t, 2 Derivative 2 x t FullForm D x t, s , t, 2 Derivative 2, 0 x t, s Derivative 2, 0 x t, s x 2,0 t, s ? Get name reads in a file, evaluating each expression in it, and returning the last one. x, y, z .x z z, y, z x z z x 1 1 x 1 x 1 Solve x x 1, x 1 1, 2, 3 1, 2, 3 hej 2, 3, 4 2, 3, 4 hej 1 2, 3, 4 hej 2, 3, 4 2, 3, 4 hej 2 x. 1 Flatten 2 Lagrange.nb x 2 False x. x, y, z z, y, z x^2 x2 y^2 y2 Quit ; x. ? /. expr . rules applies a rule or list of rules in an attempt to transform each subpart of an expression expr. Assuming x 0, Sqrt x2 Simplify x Table i2 t , i, 5 1 t , 4 t , 9 t , 16 t , 25 t Length Out 10 5 temp 2, 2 2 x 2 2 x 2 D x, y, z 1 t ,t xt Map D 2 , t &, x, y, z 0, 0, 0 ? harry arg_ ? harry : Module , Return 2 arg Lagrange.nb 3 Global`harry harry arg_ : Module x , Print 2 arg harry 2 4 x 4 ? Map Map f , expr or f expr applies f to each element on the first level in expr. Map f , expr, levelspec applies f to parts of expr specified by levelspec. hej this is a piece of code that you should be worried about... Quit ; Lagrange kinetic_ , genforce_ , transf_ , outcoords_ : Module incoords , incoords2 , outcoords2 , transf2 , veltransf , outkinetic , outforce , incoords Table transf i, 1 , i, Length transf ; incoords2 Table incoords i t , i, Length incoords ; outcoords2 Table outcoords i t , i, Length outcoords ; transf2 Table incoords2 j incoords j . transf . Table outcoords i outcoords2 i i, Length outcoords , j, Length incoords ; veltransf D transf2 , t ; outkinetic kinetic . Table incoords j ' D incoords2 j , t , j, Length incoords . veltransf Simplify ; outforce genforce .D incoords . transf , outcoords . transf . Table outcoords i outcoords2 i , i, Length outcoords ; Return Map D D outkinetic , ' t , t D outkinetic , t &, outcoords outforce ; Lagrange x ' ^ 2, 1 , x 1 2y eqs x y, y t Lagrange m 2 x ' ^ 2 y ' ^ 2 z ' ^ 2 , 0, 0, m g , r Sin Θ Cos , y r Sin Θ Sin , z r Cos Θ , r, Θ, g m Cos Θ t mr t Θt 2 Sin Θ t 2 t 2 mr t, g m r t Sin Θ t 2mr t r t Θ t m Cos Θ t r t 2 Sin Θ t 2 m r t Sin Θ t 2 r t t 2 m Cos Θ t r t 2 Sin Θ t Θ t t m r t 2 Sin Θ t 2 t Lagrange m Fx Cos Θ t Fy Cos Θ t 2 x'^2 y'^2 Fy Sin Θ t rt z ' ^ 2 , Fx, Fy, Fz , x mr t Θ t Fx r t Sin Θ t 2 mr r Cos Θ , y t 2 mr t r Sin Θ , z 2 Θ h , r, Θ, h t, 2mr t r t Θ t mr t 2 Θ t, Fz t, mh t , 4 Lagrange.nb Lagrange m 2 x'^2 Fy r Cos Θ t eqs mx transf t, m r2 Θ 2 y' 2 t, Fz mh , Fx, Fy , x r Sin Θ , z h , Θ, h t x, y y , x, y t r Sin Θ t ,y t r Sin Θ t ,y t D transf , t acctransf Θ t ,y t r Cos Θ t Θt D veltransf , t r Cos Θ t t Fx my r Sin Θ t xt eqs2 Fy r Cos Θ t veltransf x' r Cos Θ t xt xt x 2 r Cos Θ , y z ' ^ 2 , Fx, Fy, Fz , x Fx r Sin Θ t Lagrange m Fx y'^2 Θt 2 r Sin Θ t Θ t ,y 2 r Sin Θ t Θ t r Sin Θ t t Θt 2 r Cos Θ t r Cos Θ t m Θt Sin Θ t 1 Fy Cos Θ t Lagrange m 2 r x' 2 , y' mrΘ 2 Cos Θ t Fy m r Sin Θ t Θt 2 r Cos Θ t t 2 x' Fy Cos Θ t ParametricPlot3D mr t Θ t Fx Sin Θ t 2 y' 2 Simplify , Fx, Fy , x Fy Sin Θ t Fy Cos Θ t Lagrange m 2 eqs2 Fx Sin Θ t Fx Cos Θ t rt t eqs . acctransf In Fx is magnitude times Cos[theta]. In Fy is magnitude times Sin[theta]. Magnitude is unknown! eqs2 Θ 2 mr mrΘ mr t Θ r Cos Θ , y t 6 Π, 6 Π 3 Cos q , 2 Sin q , q , q, 2 0 2 r Sin Θ , r, Θ Simplify t, 2mr t Θ t , Fx, Fy , x Fx Sin Θ t r Cos Θ , y t r Sin Θ ,Θ Simplify Θ t Lagrange.nb 10 0 5 6 Lagrange.nb 10 2 1 0 1 2 Lagrange m 2 x ' ^ 2 y ' ^ 2 z ' ^ 2 , 0, 0, m g , x a Cos q , y b Sin q , z 1 m 2cg a2 b2 Sin 2 q t qt 2 a2 cq , q b2 2 c2 Simplify a2 b2 Cos 2 q t q 2 Cos Ω t , Sin Ω t , 0 , Sin Ω t , Cos Ω t , 0 , 0, 0, 1 . Cos Α , 0, Sin Α , 0, 1, 0 , Sin Α , 0, Cos Α . a Cos Θ , a Sin Θ , 0 a Cos Α Cos Θ Cos t Ω a Sin Θ Sin t Ω , a Cos t Ω Sin Θ a Cos Α Cos Θ Sin t Ω , a Cos Θ Sin Α t Lagrange.nb a Cos Α Cos Θ Cos t Ω a Cos Θ Sin Α , Θ Lagrange m 2 x ' ^ 2 y ' ^ 2 z ' ^ 2 , 0, 0, m g , x y a Cos t Ω Sin Θ a Cos Α Cos Θ Sin t Ω , z Sin Α am transf a Ω2 Cos Θ t g x1 t Sin Α x1 t , y1 t veltransf D t l Cos Θ t x1 t , y2 t l Sin Θ t y1 t D veltransf , t ; jactransf y1 t , x2 t aΘ a Sin Θ Sin t Ω , FullSimplify D transf , t ; acctransf Sin Θ t T m1 x1 t , y1 t , x2 t , y2 t 2 x1 ' t 2 1 m1 m2 x1 t y1 ' t 2 m1 2 m2 2 x2 ' t m2 y1 t x1 t , y1 t , Θ t . transf , 2 2 y2 ' t . veltransf ; Expand Simplify 2 2 2 l m2 Sin Θ t pt Map D T, x1 t Θ t 't m1 m2 x1 t l m2 Sin Θ t &, x1, y1, Θ Fy2 m1 x1 m2 t , Fy1 l Sin Θ t m1 y1 '' t , Fx2 m1 y1 Θt t , Fx2 2 y1 lagrange 's equations Map D D T, ' t , t D T, t Fx1, Fy1, Fx2, Fy2 .jactransf Fx1 l Fx2 l m2 Cos Θ t Θt Fy1 Fy2 l m2 Sin Θ t Θ t Fy2 Cos Θ t Fx2 Sin Θ t l2 m2 Θ t y1 t Θ t 2 Simplify l m2 Sin Θ t Θ t , m1 x1 t Cos Θ t y1 t Newton 's 2nd law Fx1 m1 x1 '' t , Fy1 Fx1 2 l m2 Cos Θ t l Cos Θ t l Cos Θ t t l m2 Cos Θ t m2 y1 t lΘ t m2 x2 '' t , Fy2 m2 Θ m2 y2 '' t Θt 2 x1 t Θ t, . acctransf l Sin Θ t Θ t l m2 Θ t t &, x1, y1, Θ Simplify 2 m1 2 m1 m2 y1 m2 Sin Θ t m2 x1 t 7 l m2 Sin Θ t Θ t l m2 Cos Θ t Θ x1 t m2 Cos Θ t t, t, y1 t , ; ...
View Full Document

This note was uploaded on 11/17/2011 for the course TAM 412 taught by Professor Weaver during the Spring '08 term at University of Illinois, Urbana Champaign.

Ask a homework question - tutors are online