<div class="row g-3"> <div class="col-sm"> <div class="input-group"> <div class="input-group-text">\(x_0\)</div> <input type="number" class="form-control" v-model="x0" value="0"> <div class="input-group-text">\(m\)</div> </div> </div> <div class="col-sm"> <div class="input-group"> <div class="input-group-text">\(y_0\)</div> <input type="number" class="form-control" v-model="y0" value="50"> <div class="input-group-text">\(m\)</div> </div> </div> <div class="col-sm"> <div class="input-group"> <div class="input-group-text">\(v_{0,x},v_{0,y}\)</div> <input type="number" class="form-control" v-model="v0" value="50"> <div class="input-group-text">\(m.s\)</div> </div> </div> <div class="col-sm"> <div class="input-group"> <div class="input-group-text">\(g\)</div> <input type="number" class="form-control" v-model="g"> <div class="input-group-text">\(m.s^{-2}\)</div> </div> </div> <div class="col-auto"> <button class="btn btn-primary" onClick="refresh()">Refresh</button> </div> </div> <br /><br /><br /> <h3>Projectile Motion</h3> <p>To determine to position of the projectile we should compute the position vector \(\vec{r}(t)=x(t)\vec{i}+y(t)\vec{i}\).</p> <h5>\(x(t)\):</h5> <p>We know from Newton second law that \(\sum \vec{F} = m\times \vec{a}_x = m\times a_x(t)\vec{i}\)</p> <p>However, the projectile as a constant speed along \(\vec{i}\). Hence, \(a_x(t) = 0 \).</p> <p>Thus:</p> \[ x(t) = \int_{t_0}^t v_{0,x}dt = v_{0,x}t + C = v_{0,x}t + x_0\] <h5>\(y(t)\):</h5> <p>We know from Newton second law that \(\sum \vec{F} = m\times \vec{a}_y = m\times a_y(t)\vec{i}\)</p> <p>The projectile is under the influence of the gravity that is oriented <em>downward</em>. Hence, \(a_y(t) = -g \).</p> <p>Thus:</p> \[ v_y(t) = \int_{t_0}^t a_{y}(t)dt = -gt+C = -gt + v_{0,y}\] \[ y(t) = \int_{t_0}^t v_y(t)dt = -\frac{1}{2}gt^2 + v_{0,y}t+C=-\frac{1}{2}gt^2 + v_{0,y}t+y_0\] <h5>\(\vec{r}(t)\):</h5> Finally knowing \(x(t)\) and \(y(t)\) we have \( \vec{r}(t) = \left(\begin{smallmatrix}x(t)\\y(t)\end{smallmatrix}\right) = \left(\begin{smallmatrix}v_{0,x}t + x_0\\-\frac{1}{2}gt^2 + v_{0,y}t+y_0\end{smallmatrix}\right)\)