Recursive acceleration-distance thing. I'm confused!

Mr. Bland

Junior Member
Joined
Dec 27, 2019
Messages
195
I knew eventually I would need to use calculus to solve something, but since I never studied it in school, I'm uncertain of how to approach the problem. I've made an attempt to boil it down into something quick and simple, and any assistance would be appreciated.

An object passes by a 2 meter wide window from left to right. At the left edge of the window, the object's speed is 30 meters per second, and at the right edge its speed is 10 meters per second. The speed changes in such a specific way that the speed of the object at any point in time happens to be linear with respect to the distance that the object has traveled... For example, when the object is 0.5 meters from the left edge of the window (one quarter of the total distance), its speed is 25 meters per second (one quarter of the total deceleration).

My problem is twofold: 1) Given some number of seconds, how far has the object traveled? 2) How many seconds does it take for the object to travel the entire distance? I'm trying to work out the formulas for this so that the exact parameters can change.

This is a tricky problem because the object's current speed depends on the distance traveled, but changing the speed consequently changes the amount of time to travel the same distance, which in turn feeds back into how fast the object is moving. I'm familiar with the fundamentals of derivatives and integrals, but to my untrained eye this appears to be a recursive problem of sorts, and I'm clueless as to how to go about solving it. If someone could walk me through the logic and algorithms to sort this out, I would be very grateful.
 
I would begin with the 2nd order IVP:

[MATH]\frac{d^2x}{dt^2}=-kx[/MATH] where x(0)=0x(0)=0 and [MATH]x'(0)=30[/MATH]
The solution to the ODE is:

[MATH]x(t)=c_1\cos(\sqrt{k}t)+c_2\sin(\sqrt{k}t)[/MATH]
Hence:

[MATH]x'(t)=-c_1\sqrt{k}\sin(\sqrt{k}t)+c_2\sqrt{k}\cos(\sqrt{k}t)[/MATH]
From our initial conditions, we obtain:

[MATH]x(0)=c_1=0[/MATH]
[MATH]x'(0)=c_2\sqrt{k}=30\implies c_2=\frac{30}{\sqrt{k}}[/MATH]
And so we have:

[MATH]x(t)=\frac{30}{\sqrt{k}}\sin(\sqrt{k}t)[/MATH]
Now, we need to determine tt such that x(t)=2x(t)=2:

[MATH]\frac{30}{\sqrt{k}}\sin(\sqrt{k}t)=2[/MATH]
[MATH]\sin(\sqrt{k}t)=\frac{\sqrt{k}}{15}[/MATH]
Choosing the smallest positive root, we have:

[MATH]t=\frac{1}{\sqrt{k}}\arcsin\left(\frac{\sqrt{k}}{15}\right)[/MATH]
And so:

[MATH]30\cos\left(\sqrt{k}\frac{1}{\sqrt{k}}\arcsin\left(\frac{\sqrt{k}}{15}\right)\right)=10[/MATH]
From this we find:

[MATH]k=200[/MATH]
And so we obtain:

[MATH]x(t)=\frac{3}{\sqrt{2}}\sin(10\sqrt{2}t)[/MATH]
 
Thank you for your help! I'm relieved to see that the problem isn't overly difficult for someone who knows what they're doing, so that's always encouraging. However, I'm not one of those people, so I'm going to need a lot of hand-holding as I wish to know how to solve this kind of problem on my own. Please bear with me, as my knowledge of broader concepts in calculus is minimal.
[MATH]\frac{d^2x}{dt^2}=-kx[/MATH] where x(0)=0x(0)=0 and [MATH]x'(0)=30[/MATH]

If I'm understanding this correctly (and let's face it, there's no guarantee that I'm understanding this correctly), the second derivative of the function of the object's position over time should be proportional to the evaluation of the function at that time and some constant? That has the recursive characteristic that I expected to see, although I'm not sure how the second derivative was determined. Will the same expression hold true for different values of [MATH]k[/MATH] given different values of the first derivative? After all, my goal is to find general formulas that have parameters for the starting velocity, the ending velocity and the width of the window.

Assuming everything in the above post is correct, I'll need some lecturing on how to go from point A to point B. For starters, I don't know how to reach that [MATH]-kx[/MATH] expression in the first step. Thanks again for your assistance.
 
An object passes by a 2 meter wide window from left to right. At the left edge of the window, the object's speed is 30 meters per second, and at the right edge its speed is 10 meters per second. The speed changes in such a specific way that the speed of the object at any point in time happens to be linear with respect to the distance that the object has traveled... For example, when the object is 0.5 meters from the left edge of the window (one quarter of the total distance), its speed is 25 meters per second (one quarter of the total deceleration).

My problem is twofold: 1) Given some number of seconds, how far has the object traveled? 2) How many seconds does it take for the object to travel the entire distance? I'm trying to work out the formulas for this so that the exact parameters can change.

I interpret the problem as [MATH]\frac{dx}{dt}=30-10x[/MATH]. That is, the velocity is a linear function of the distance traveled. This is an easy differential equation to solve. Nothing is said about acceleration at any moment, only about total deceleration, that is, change in velocity.
 
Aha, I knew it would be something simple like that. The logic is accessible and I've got a good grasp on concept, so thank you for pointing it out. Through solving the equation, I should be able to get my parameterized formulas (mindful that the [MATH]-10[/MATH] is not one of my parameters, but comes from [MATH]\frac{10 - 30}{2}[/MATH]). However, there's just one little thing:
This is an easy differential equation to solve.
This is where my deficiencies come through in full force. I'm sure it's entry-level stuff in the greater scope of differential equations, but it's still new to me, so I'm drawing a blank. Is it a simple matter to explain how to solve this? Failing that, can you recommend a resource so I can research it on my own time?
 
Can you integrate:

dx(3010x)\displaystyle \int \frac{dx}{(30 - 10*x)}
 
Sorry for the confusion...I realized shortly after I left my PC that I had made a grave error. :)
 
Aha, I knew it would be something simple like that. The logic is accessible and I've got a good grasp on concept, so thank you for pointing it out. Through solving the equation, I should be able to get my parameterized formulas (mindful that the [MATH]-10[/MATH] is not one of my parameters, but comes from [MATH]\frac{10 - 30}{2}[/MATH]). However, there's just one little thing:

This is where my deficiencies come through in full force. I'm sure it's entry-level stuff in the greater scope of differential equations, but it's still new to me, so I'm drawing a blank. Is it a simple matter to explain how to solve this? Failing that, can you recommend a resource so I can research it on my own time?
I deliberately left room for you to tell us what's "easy" for you -- hoping to give you a little challenge to try it on your own and maybe remember this. It's completely understandable that you don't.

The idea is that to solve [MATH]\frac{dx}{dt} = 30-10x[/MATH], you can "separate the variables" (a term you may want to look up) by dividing both sides by the function of x on the right, and multiplying by dt, so that x appears only on the left and t appears only on the right. Then integrating both sides gives Khan's integral. Do that, and you'll have an equation for t in terms of x (with an arbitrary constant). Solve for that constant, and then you can solve for x as a function of t. These two forms answer parts (b) and (a) respectively.

Again, don't hesitate to show how far you get, and we can help you out. Our goal is to discover what you can do on your own (as an encouragement to you!), and then help you go beyond that.
 
Aha, I knew it would be something simple like that. The logic is accessible and I've got a good grasp on concept, so thank you for pointing it out. Through solving the equation, I should be able to get my parameterized formulas (mindful that the [MATH]-10[/MATH] is not one of my parameters, but comes from [MATH]\frac{10 - 30}{2}[/MATH]). However, there's just one little thing:

This is where my deficiencies come through in full force. I'm sure it's entry-level stuff in the greater scope of differential equations, but it's still new to me, so I'm drawing a blank. Is it a simple matter to explain how to solve this? Failing that, can you recommend a resource so I can research it on my own time?
I suspect the answer to your final two questions is "No."

First, a course in differential equations has calculus as a prerequisite. It is not something that you just pick up on the side. Khan Academy has a nice course in differential equations, and you are immediately knee deep in calculus.

Second, although solving this differential equation can be done by formula, what you get is completely non-intuitive. If I applied the formula correctly, you get

[MATH]s < 3 \implies t = \dfrac{1}{10} ln \left ( \dfrac{30}{30 - 10s} \right ).[/MATH]
I cannot imagine how to make that make any sense to someone completely innocent of calculus. I admit that I firmly believe that the way calculus is currently taught involves a lot of unnecessary complication, but it is not to be learned in a day or two even if presented in an informal way.
 
I deliberately left room for you to tell us what's "easy" for you -- hoping to give you a little challenge to try it on your own and maybe remember this. It's completely understandable that you don't.

I'm certainly grateful that you didn't simply do it for me, since there's not much to be learned from that. A complication is that I simply don't have the background to work through it, but I was hopeful it wasn't overly complicated to get to where I wanted to get. Pointing out that the derivative of position incorporates the position function within itself was exactly the direction I needed to be pushed in, since it gives a starting point where I otherwise had none.

"Easy" for me is the scalar and matrix algebra I use for graphical engineering, but that has never dipped into the calculus side of the spectrum. Seems the best course of action is "go enroll in a calculus course". That being said, I won't turn down a lengthy step-by-step lecture on how this problem is ultimately solved, but that falls in the realm of tutoring and I don't want to force anyone to do that.

The idea is that to solve [MATH]\frac{dx}{dt} = 30-10x[/MATH], you can "separate the variables" (a term you may want to look up) by dividing both sides by the function of x on the right, and multiplying by dt, so that x appears only on the left and t appears only on the right. Then integrating both sides gives Khan's integral. Do that, and you'll have an equation for t in terms of x (with an arbitrary constant). Solve for that constant, and then you can solve for x as a function of t. These two forms answer parts (b) and (a) respectively.

This is a helpful road map that I will use while I learn each of the steps along the way, thank you for posting it. I can get to [MATH]\frac{dx}{30-10x} = dt[/MATH] through the simplest of algebra, but I don't know if that's actually valid in calculus. If it is, going any futher requires me to Learn To Integrate™, a concept I understand, but I don't know the various processes used to do that. I know that an actual academic course would walk me through all of this.

One question I do have is, given some arbitrary parameter values in the original example (starting velocity, ending velocity, width of window), will the ultimate solution be in a form that continues to give the correct answers when changing those variables? Or will a unique constant result for each combination of inputs that needs to be solved for use in the final formulas?

I suspect the answer to your final two questions is "No."

First, a course in differential equations has calculus as a prerequisite. It is not something that you just pick up on the side. Khan Academy has a nice course in differential equations, and you are immediately knee deep in calculus.

I thought that might be the case, but never hurts to ask, right? If nothing else, it helps to clarify the scope of where I stand in the middle of all of this. Forest-through-the-trees and all that.
 
If you want to learn differential equations, you'll want to take it slow, and first learn/relearn integration (though no individual step in this case is very advanced).

But if all you really need is an answer, you could just do this:


You'll probably need additional help to be sure you are interpreting or applying the results correctly, but that's just another question you could ask. It can also be generalized to use parameters instead of the 2, 30, and 10.
 
I won't turn down a lengthy step-by-step lecture on how this problem is ultimately solved, but that falls in the realm of tutoring and I don't want to force anyone to do that.



This is a helpful road map that I will use while I learn each of the steps along the way, thank you for posting it. [MATH]\frac{dx}{30-10x} = dt[/MATH] through the simplest of algebra, but I don't know if that's actually valid in calculus. If it is, going any futher requires me to Learn To Integrate™, a concept I understand, but I don't know the various processes used to do that.

One question I do have is, given some arbitrary parameter values in the original example (starting velocity, ending velocity, width of window), will the ultimate solution be in a form that continues to give the correct answers when changing those variables? Or will a unique constant result for each combination of inputs that needs to be solved for use in the final formulas

I thought that might be the case, but never hurts to ask, right? If nothing else, it helps to clarify the scope of where I stand in the middle of all of this. Forest-through-the-trees and all that.
First, in standard analysis, [MATH]\dfrac{ds}{dt}[/MATH] is an operator (like a plus sign) rather than a fraction. So, strictly speaking, algebra does not cut it. The reason for the notation, however, is that the early developers of calculus did think of it as a fraction, and in many cases thinking of it that way works just fine despite being formally wrong.

The basic idea about the derivative operation and the integral operation is that they are inverses just like + and -. So you can eliminate the derivative in your equation. Thus we say that given the differential equation

[MATH]\dfrac{ds}{dt} = 30 - 10s \implies 1 * dt = \dfrac{ds}{30 - 10s}.[/MATH]
We have "separated the variables" and can move forward to integration, but notice that the fraction on the right is undefined if s = 3.

[MATH]1 * dt = \dfrac{ds}{30 - 10s} \implies \int \ 1 \ dt = \int \ \dfrac{ds}{30 - 10s}.[/MATH]
Now there is a very simple formula for integrating constants, namely

[MATH]\int \ c \ dt = ct + K_1 \implies \int \ 1 \ dt = t + K_1.[/MATH]
I shall not justify the formula, which gets into calculus.

The other side of the equation is not so simple. For a reason that will soon become clear, we do a substitution of variable letting x = 30 - 10s, which means

[MATH]\dfrac{dx}{ds} = -\ 10 \implies ds = -\ \dfrac{dx}{10} = -\ \dfrac{1}{10} * dx.[/MATH]
Again, why dx and ds have that relation requires going into calculus, which I may do later.

[MATH]\therefore \int \ 1 \ dt = \int \ \dfrac{ds}{30 - 10s} \implies t + K_1 = -\ \dfrac{1}{10} * \int \ \dfrac{dx}{x}.[/MATH]
But there is a simple formula for the integral of dx/x if x > 0. But x will be > 0 if s < 3, a constraint we are fine with.

That formula says [MATH]\int \ \dfrac{dx}{x} = ln(x) + K_2.[/MATH]
We did the change of variable in order to get to the simple formula, which I definitely am not going to justify. (I did that 50 years ago, and it was a pain.)

So now we have

[MATH]t + K_1 = -\ \dfrac{1}{10} * \int \ \dfrac{dx}{x} = -\ \dfrac{1}{10} * (ln(x) + K_2) \implies t = -\ \dfrac{ln(30 - 10s)}{10} + K_3.[/MATH]
Great. By substituting variables back and forth and doing basic differential equations, differential calculus, and integral calculus, we have an expression for t. But what is the constant?

When t is zero, s = 0 so

[MATH]0 = -\ \dfrac{ln(30 - 10 * 0)}{10} + K_3 \implies K_3 = \dfrac{ln(30)}{10} \implies t = \dfrac{1}{10} * ln \left ( \dfrac{30}{30 - 10s} \right ) \text { if } s < 3.[/MATH]
So if you have followed this at all, you can see that it is all algebraic manipulations and formulas. And what drives the math is that velocity is linear with respect to distance so changing the parameters will give you a similar logarithmic function. What must still be a total mystery are the formulas.

OK. I am going to give a very non-rigorous introduction to differential calculus.

Suppose we have a differentiable function f(x), which means that f(x) is continuous and that

[MATH]\dfrac{f(x + h) - f(x)}{(x + h) - x} = g(x) + j(x,\ h) \text { if } h \ne 0 \text { and } h \approx 0 \implies |h| \ge |j(x,\ h)|,[/MATH]
Then we call g(x) the derivative of f(x) and often denote it as f'(x). Notice that the left hand side of the equation looks like a slope formula and is definitely a fraction, the so-called Newton quotient. That is why historically the notation was in fractional form and why logically derivatives often can be treated as though they are fractions. Why do we care about derivatives? First, if a differentiable function's derivative is positive (negative) at some value, the function itself is increasing (decreasing) in an interval around that value. Second, if a function has a local minimum or local maximum, the function's derivative is zero there. So the main practical use of derivatives is to find the minima and maxima of functions.

Now let's go back to the formula I said I would address later.

[MATH]x = 30 - 10s = f(s).[/MATH]
Obviously f(s) is continuous.

[MATH]\dfrac{f(s + h) - f(s)}{(s + h) - s} = \dfrac{\{30 - 10(h + s)\} - \{30 - 10s\}}{h} = \dfrac{30 - 10h - 10s - 30 + 10s}{h} = -\ 10 + 0.[/MATH]
In English, minus ten is the derivative of 30 - 10s and is simply the slope.

When we use the fractional looking notation for the derivative

[MATH]\dfrac{dx}{ds} = -\ 10 \implies ds = -\ \dfrac{1}{10} * dx[/MATH]
seems intuitive and is easy to remember even though the derivative is not a fraction.
 
Last edited:
@Dr.Peterson, I... had no idea Wolfram|Alpha could solve things all willy-nilly like that even at this level of obfuscation. I'm quite intrigued, and very grateful to learn this. If nothing else, I can proceed with my project even before I finish learning all of the ins-and-outs of the underlying solution, so I'm quite excited.

@JeffM, your post will make some good lunchtime reading this week, thanks for the write-up. It's good to know that experienced assistance is within reach!
 
Top