2. General Physics

Setup

\(Clear["Global`*`"]; 
Off[General::spell]; 
Off[General::spell1]; 
    \)

Get["D:\Mma\Inits\ch1init.m"]

Get["D:\Mma\Inits\ch2init.m"]

2.4 Problems

2.4.1  Projectile Motion in a Constant Gravitational Field

Problem 4:  Rocket with Varying Mass

Part (a)  Equation of motion

\(pi\  = \ m[t]\ v; 

    pf\  = \ \((m[t] + dm)\) \((v + dv)\)\  + \ \((\(-dm\))\) \((v - ve)\); 
    \)

\(dv\  = \ \(\(x'\)'\)[t]\ dt; 
dm\  = \ \(m'\)[t] dt; \)

dp  =  (pf - pi)/dt  // ExpandAll

eq1  =  -m[t] g  ==  dp  /.  {dt -> 0}

Part (b)  Find position and velocity with constant mass loss

dsol1  =  
      DSolve[{m'[t] == -rate,  m[0] == m0}, m, t] // Flatten

eq2 = eq1 /. dsol1 // Simplify

eq3  =  
      Solve[eq2, x''[t]][[1, 1]] /. {Rule -> Equal} // 
        Simplify

\(dsol2\  = \ 
      \(DSolve[{eq3, x[0] == 0, \(x'\)[0] == 0}, x, t]\)[\([1]\)]; 

    x[t] /. dsol2\)

\(\(logRules = {c_. \ \ Log[a_]\  + \ c_. \ Log[b_] :> c\ Log[a\ b], 

        		\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ 
        c_. \ \ Log[a_]\  - \ c_. \ Log[b_] :> c\ Log[a/b]\ }; \)\)

\(position\  = 
	
      \((\((\(x[t] /. dsol2\) //. logRules // Simplify)\) //. logRules)\)\)

\(\(		
    position\  = 
      position /. {
            Log[m0/\((m0 - rate\ t)\)] -> \(-Log[1 - \((rate\ t)\)/m0]\)}

        	\  // Collect[#, Log[1\  - \ rate\ t/m0]]&\)\)

speed  =  x'[t] /. dsol2 //. logRules // Simplify

height  =  
      Limit[position,  t -> m0/rate] //. logRules // Simplify

Part (c)  Plot distance vs height for range of ve

values1 = {m0 -> 100, rate -> 10, g -> 9.81};

tf = (m0/rate) /. values1

\(Clear[plot1]; 

    plot1[veIn_] := 
	
      ParametricPlot[
		
        Evaluate[\({position, speed} /. values1\) /. {ve -> veIn}]

        	, {t, 0, tf \((1.0 - 10^\(-6\))\)}
	, DisplayFunction -> Identity]
        \)

\(Clear[endPoint]; 

    endPoint[veIn_] := 
	
      Graphics[{PointSize[0.05]
		, 
          Point[\((
              \(\({position, speed}

                    				 //. {t -> tf \((1.0 - 10^\(-6\))\)}\)

                  					 /. values1\)
					 /. {ve -> veIn})\)

            			]
		}
	, DisplayFunction -> Identity]\)

\(\(Show[Table[{plot1[ve], endPoint[ve]}, {ve, 100, 400, 100}]
\ \ , 
      PlotRange -> All
	, Frame -> True
	, 
      FrameLabel -> {"position", "speed", "distance", " "}

      	, RotateLabel -> False
	, GridLines -> Automatic
	, 
      DisplayFunction -> $DisplayFunction]; \)\)

Part (d)  Expand eq3 in a time series and solve for coefficients

initial = {x[0] -> 0, x'[0] -> 0}; order = 4;

eq4  =  
      ((eq3[[1]] - eq3[[2]]  + O[t]^order) /. initial // 
          Simplify)

variables = Table[D[x[t], {t, n}], {n, 0, order + 1}] /. {t -> 0}

sol1  =  Solve[eq4 == 0, variables][[1]]

series1  =  
      x[t]  + O[t]^order  /. sol1 /. initial // ExpandAll

term[n_] = ve (rate/m0)^n  t^(n + 1) /((n + 1) n);

\(\(series2\  = \ 
      \(-\((1/2)\)\) g\ \ t^2\  + \ Sum[term[n], {n, 1, order - 2}]; 

    \(series1 == series2\  // Normal\)\  // ExpandAll\ \)\)

exact2 = 
      (-(1/2) g t^2  +  Sum[term[n], {n, 1, Infinity}] // 
          Collect[#, Log[1 - rate t/m0]]&)

exact2 == position