Say I have three inputs:
- a starting position $P_0 = (x_0, y_0)$,
- a function for velocity over time, $v(t)$, and
- a function for the angle between the tangent direction and the $x$-axis over time, $θ(t)$.
Is it possible to define a function of 2D-position over time, $P(t)$ (or a pair of functions $P_x(t)$ and $P_y(t)$), in terms of these three inputs?
Approaching this from my limited Calc-1 perspective it seems logical to first think of moving in discrete time steps $Δt$. Start at $P_0 = (x_0, y_0)$, point in direction $θ(0)$, and move a distance of $v(0) × Δt$ to get the new position $P(Δt)$. Then point in direction $θ(Δt)$ and move a distance of $v(Δt) × Δt$ to get the next position $P(2 × Δt)$. Repeat to infinity. The points generated by this procedure are:
- $P(0 × Δt) = (x_0, y_0)$
- $P(1 × Δt) = (x_1, y_1) = (x_0 + v(0 × Δt) × Δt × \cos(θ(0 × Δt)), y_0 + v(0 × Δt) × Δt × \sin(θ(0 × Δt)))$
- $P(2 × Δt) = (x_2, y_2) = (x_1 + v(1 × Δt) × Δt × \cos(θ(1 × Δt)), y_1 + v(1 × Δt) × Δt × \sin(θ(1 × Δt)))$
- $P(3 × Δt) = (x_3, y_3) = (x_2 + v(2 × Δt) × Δt × \cos(θ(2 × Δt)), y_2 + v(2 × Δt) × Δt × \sin(θ(2 × Δt)))$
- $P(4 × Δt) = (x_4, y_4) = (x_3 + v(3 × Δt) × Δt × \cos(θ(3 × Δt)), y_3 + v(3 × Δt) × Δt × \sin(θ(3 × Δt)))$
- $...$
- $P(n × Δt) = (x_n, y_n) = (x_m + v(m × Δt) × Δt × \cos(θ(m × Δt)), y_m + v(m × Δt) × Δt × \sin(θ(m × Δt)))$
Connect each pair of sequential points with a line segment and you have an approximation of the desired curve. Let $Δt$ tend to zero, and the line-segment-approximation will tend towards a smooth curve.
However, I don't know how to go from this discrete setup to a continuous one at the limit as $Δt$ becomes the infinitesimal $dt$. How do I find the actual smooth curve in the limit? Is there a better way to approach this?
We are looking for a curve parametrization $\boldsymbol{P}\colon \mathbb{R}\rightarrow\mathbb{R}^2$, of which we know the velocity $v(t)$, and the angle of the tangent with respect to the x-axis, $\varphi(t)$.
Since you mentioned your limited Calc 1 knowledge, I assume you do not know that the tangent to a curve $\boldsymbol{P}(t) = (p_0(t),p_1(t))$ is given by it's derivative $\boldsymbol{P}'(t)$, assuming both component functions $p_0(t)$ and $p_1(t)$ are differentiable on $\mathbb{R}$.
The velocity of a moving dot on a curve is thus given by $v(t) = \|\boldsymbol{P}'(t)\|_2$. Since we know both the angle and norm of $\boldsymbol{P}'(t)$, we get: $$ \boldsymbol{P}'(t) = (p_0'(t), p_1'(t)) = ( v(t)\cos(\varphi(t)), v(t)\sin(\varphi(t)) ) $$
Integrating, if elementary possbile, gives you unique solutions for $\boldsymbol{P}(t)$, up to a constant $\boldsymbol{c}$. Using your knowledge about $\boldsymbol{P}(0)$, we can find $\boldsymbol{c} = (c_0,c_1)$.
Edit: Addendum
Assuming $v$ and $\varphi(t)$ are given by: $$ v(t) = r_i(t) \qquad t\in[t_i,t_{i+1}]\\ \varphi(t) = s_it \qquad t\in[t_i,t_{i+1}] $$
Where $r_i$ is polynomials of degree $k$ and $s_i\in\mathbb{R}$ is constant, and $i=0,\dots,n$. Using [repeated integration by parts][1], we can express $p_0(t)$ as:
$$ p_0(t) = \sum_{j=0}^{k-1}\left((-1)^j\frac{\mathrm{d}^{k-1-j} r_i(t)}{\mathrm{d}t^{k-1-j}} \cos^{(j)}(s_it)\right) + (-1)^k \int \frac{\mathrm{d}^{k}r_i(t)}{\mathrm{d}t^k}\cos^{(0)}(q_it)\mathrm{d}t $$
Where $\cos^{(j)}$ denotes the $j$-th integral of $\cos$. Replacing $\cos$ with $\sin$ yields the form for $p_1(t)$.
Edit 2:
The expression $$ \frac{\mathrm{d}^k f(x)}{\mathrm{d}x^k} $$ denotes the $k$-th derivative of $f$.
Edit 3:
Let $v(t) = \sum_{k=0}^n t^ka_k$ be a polynomial with coefficients $a_k$. Furter let $\varphi(t) = bx^m$.
Instead of computing $p_0$ and $p_1$ seperately, we will use Euler's Identity. Based on this we get: $$ \int \sum_{k=0}^n t^ka_k \exp(\mathrm{i} bt^m)\mathrm{d}t = -\sum_{k=0}^n a_k \frac{t^{k+1}(-\mathrm{i}bt^m)^{-\frac{k+1}{m}} \Gamma(\frac{k+1}{m}, -\mathrm{i}bt^m)}{m} $$
Where $\Gamma(s,t)$ is the incomplete Gamma function.
Please note that computing the integral for $\varphi(t) = \sum_{j=0}^m t^jb_j$, you cannot use this single expression.
Edit 4: We can consider one special case, namely $\varphi'(t) = v(t)$. Then choosing a substitution $u = \varphi(t)$, we get $\mathrm{d}u = \varphi'(t)\mathrm{d}t = v(t)\mathrm{d}t$, hence: $$ p_0(t) = \int v(t)\cos(\varphi(t))\mathrm{d}t = \int \cos(u)\mathrm{d}u = \sin(\varphi(t)) + c\\ p_1(t) = \int v(t)\sin(\varphi(t))\mathrm{d}t = \int \sin(u)\mathrm{d}u = -\cos(\varphi(t)) + c $$ By our knowledge of $\mathbf{P}_0 = (p_{0,0}, p_{1,0})$: $$ p_{0,0} = \sin(\varphi(0)) + c \Leftrightarrow c = p_{0,0} - \sin(\varphi(0))\\ p_{1,0} = -\cos(\varphi(0)) + c \Leftrightarrow c = p_{1,0} +\cos(\varphi(0)) $$
Therefore the parametrization $\mathbf{P}(t)$ is given by: $$ \mathbf{P}(t) = \begin{bmatrix} \sin(\varphi(t)) + p_{0,0} - \sin(\varphi(0))\\ -\cos(\varphi(t)) + p_{1,0} + \cos(\varphi(0)) \end{bmatrix} $$ [1]: https://en.wikipedia.org/wiki/Integration_by_parts#Repeated_integration_by_parts