{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

class18 - PHYS 5900 Class 18 Zi-Wei Lin Manipulating...

Info icon This preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
PHYS 5900 Class 18 (10/05/2009) Zi-Wei Lin Manipulating Equations Example A projectile in the x-y plane has an initial speed of v0 and angle theta0 . A) Derive its vertical position y as a function of x ; B) Derive the range in x ; C) Plot y as a function of x and find the numerical value of the range for the following initial condition: v0=10 m/s, theta0=30° (note: g=9.8 m s 2 ). A) In[1]:= myEqns = 8 x'' @ t D == 0, y'' @ t D == - g, x' @ 0 D == v0 * Cos @ theta0 D , y' @ 0 D == v0 * Sin @ theta0 D , x @ 0 D == 0, y @ 0 D == 0 < ; In[2]:= DSolve @ myEqns, 8 x @ t D , y @ t D< , t D Out[2]= :: x @ t D fi tv0Cos @ theta0 D , y @ t D fi 1 2 I - gt 2 + 2tv0Sin @ theta0 DM>> In[3]:= sol = 8 x, y < == 8 x @ t D , y @ t D< . % @@ 1 DD Out[3]= 8 x, y < : tv0Cos @ theta0 D , 1 2 I - gt 2 + 2tv0Sin @ theta0 DM> We now express y in terms of x by eliminating t : In[4]:= ?Solve Solve @ eqns , vars D attempts to solve an equation or set of equations for the variables vars . Solve @ eqns , vars , elims D attempts to solve the equations for vars , eliminating the variables elims . Solve[eqns, vars, elims] solves eqns for vars , eliminating the variables elims In[5]:= yxRule = Solve @ sol, y, t D Simplify Out[5]= :: y fi - gx 2 Sec @ theta0 D 2 2v0 2 + xTan @ theta0 D>>
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
We now need to replace fi by == in order to get the equation for y(x) : In[6]:= FullForm @ % D Out[6]//FullForm= List @ List @ Rule @ y, Plus @ Times @ Rational @ - 1, 2 D , g, Power @ v0, - 2 D , Power @ x, 2 D , Power @ Sec @ theta0 D , 2 DD , Times @ x, Tan @ theta0 DDDDDD In[7]:= Position @ % , Rule D Out[7]= 88 1, 1, 0 << In[8]:= yxRule @@ 1, 1 DD Out[8]= y fi - gx 2 Sec @ theta0 D 2 2v0 2 + xTan @ theta0 D In[9]:= yxRelation = Apply @ Equal, yxRule @@ 1, 1 DDD Out[9]= y - gx 2 Sec @ theta0 D 2 2v0 2 + xTan @ theta0 D or In[10]:= yxRule . 8 Rule fi Equal < Out[10]= :: y - gx 2 Sec @ theta0 D 2 2v0 2 + xTan @ theta0 D>> B) we need to find the value of x at y=0 (the range): In[11]:= Solve @ yxRelation . y -> 0, x D Out[11]= :8 x fi 0 < , : x fi 2v0 2 Cos @ theta0 D Sin @ theta0 D g >> In[12]:= Simplify @ % D Out[12]= :8 x fi 0 < , : x fi v0 2 Sin @ 2theta0
Image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern