Defining a function for velocity in terms of external variables?

23 Views Asked by At

I want to make a machine move a distance, d, in a time period of, t. But its acceleration, a, and therefore its velocity, v, must change depending on an external variable, N.

I want the machine to slow down as N increases and to speed up as N decreases. This must imply that $a \propto - \Delta N$ and $v \propto 1/N$

Is it possible to create a function demonstrating how the velocity changes in this pre-set time period, t ? How would v be defined?

I am intending to write this for some code, but I would like to make the maths clearer for myself first.

1

There are 1 best solutions below

3
On

The question as posed is unanswerable because it is both vague and self-contradictory. That would be the topic of a comment, but it's difficult to explain in the format of a comment just how vague and self-contradictory the question is, so here is an extended comment in a space that normally would be occupied by an answer.

The statement that $v \propto 1/N$ is a very specific statement about a particular relationship between $v$ and $N$, much more specific than the statement that $v$ increases as $N$ decreases and vice versa.

Literally, $v \propto 1/N$ says there is some constant $k$ such that

$$ v = \frac kN. $$

That implies that

$$ a = \frac{\mathrm d}{\mathrm dt} v = \frac{\mathrm d}{\mathrm dt} \frac kN = -\frac1{N^2} \frac{\mathrm dN}{\mathrm dt}, $$

which doesn't look like $a \propto - \Delta N$ under any reasonable interpretation I can think of.

You might want to reconsider what you mean here:

I want the machine to slow down as N increases and to speed up as N decreases. This must imply that $a \propto - \Delta N$ and $v \propto 1/N$

There's no "must" about it; the first sentence does not imply either of the second two formulas at all (you could have something quite different) and the two formulas are mutually contradictory.

If you literally want the first sentence to be true, then $v$ is a function of $N$, but it could be any decreasing function; if there is some reason that the choice of functions should be more limited than that, you'll have to articulate an idea of what that reason would be.

Alternatively, instead of defining $v$ directly as a function of $N,$ you could first define $a$ mathematically. Slowing down as $N$ increases means $a$ is negative when $N$ is increasing; speeding up as $N$ decreases means $a$ is positive when $N$ is decreasing. That is, the sign of $a$ is opposite to the sign of $\frac{\mathrm dN}{\mathrm dt}.$ There are a lot of ways to define $a$ as a function of $\frac{\mathrm dN}{\mathrm dt}$ that satisfy this requirement, for example, $$ a = \begin{cases} -1 & \text{if $\frac{\mathrm dN}{\mathrm dt} > 0$}, \\ \phantom{-}0 & \text{if $\frac{\mathrm dN}{\mathrm dt} = 0$}, \\ \phantom{-}1 & \text{if $\frac{\mathrm dN}{\mathrm dt} < 0$}, \\ \end{cases} $$ but that's only one of a great many possible choices. Note that with this particular choice, there are a lot of different ways to vary $N$ over a period of time $t = 0$ to $t = T$ and still come up with the same value of $v$ at time $T,$ and you can't determine $v$ at time $T$ just by looking at $N$ at time $T.$

On top of all this, if the machine must travel a particular distance in a particular interval of time, that's a constraint on $v$ that will be very hard to meet, especially if $v$ is subject to the influence of some "external" variable $N$ that could vary unpredictably. You need to seriously think about what you mean by "move a distance, $d$, in a time period of, $t$" and what you mean by "depending on an external variable, $N$." Why do you need both of these things? These two things do not seem compatible within the framework of your question.