# How to solve a kinematics exercise with a differential equation?

Posted 13 days ago
381 Views
|
13 Replies
|
7 Total Likes
|
 I am wondering how to solve a kinematics exercise with a differential equation. I want to respect other author's copyright and the solution to their exercises, so I won't put the word problem here but if its okay I'll come up with a similar problem and ask for help solving that and then I'll be able to solve the problem from my textbook.Otherwise, I think this will be taken down.This is based on Giancoli Physics: Principles with Applications 7th edition, chapter 2 Describing Motion: Kinematics in One Dimension, page 45, problem 53, level III, which means a Challenge problem.Douglas Giancoli states on page 43 (with Grammarly corrections applied to the quote), "The Problems at the end of each Chapter are ranked I, II, or III according to estimated difficulty, with level I Problems being easiest. Level III is meant as challenges for the best students."This is a similar problem that I think could be reframed as a differential equation. A falling stone takes 0.2718 s (I'm choosing a time based on the digits of Euler's number) to travel past a window 2.718 m tall. From what height above the top of the window did the stone fall?I think this could be modeled as an initial value problem for a second-order differential equation. It also might be a differential algebraic equation or a delay-differential equation that could be solved with DSolve. Once I figure out how to abstract the problem, I can make the computer do the calculations, get the result, and interpret the answer in the context of the problem.My question is, what question should I ask in Computer-Based Maths step 1? Computer-Based Maths step 2 is abstract, which I think will be an ODE, and step 3, I think, will be DSolve and step 4 will be writing a conclusion.
13 Replies
Sort By:
Posted 4 days ago

We can consider your problem a "uniform acceleration" problem, and it can be cast as a differential equations problem, as you desire. It's one of the simplest differential equations, one that was solved long before calculus was formally invented. (Applying differential equations to it is a bit like using a sledge hammer on a brad to hang a picture, only you don't really have to worry about hitting this problem too hard.) But in for a penny, in for a pound:

accelerationBVPTemplate = <|
"System" -> {x''[t] == #acceleration},
"BoundaryConditions" -> {x[#t1] == #x1, x[#t2] == #x2} |> &;
solutionEvent = WhenEvent[x'[t] == 0, Return[x[t], NDSolve]];
myProblem = <|
"acceleration" -> -9.8,
"t1" -> 0, "x1" -> 0,
"t2" -> E/10, "x2" -> -E
|>;
fallingPastWindowProblem = {
Values@accelerationBVPTemplate[myProblem],
solutionEvent}

(*
{{{x''[t] == -9.8}, {x == 0, x[E/10] == -E}},
WhenEvent[x'[t] == 0, Return[x[t], NDSolve]]}
*)

NDSolve[fallingPastWindowProblem, {}, {t, -Infinity, 0}]

(*  3.83342  *)


Sometimes NDSolve is pure magic. The object was dropped 3.83 meters above the window.

### Notes

1. The first output shows the actual equations being used by NDSolve.
2. The Return[x[t], NDSolve] causes a return before NDSolve is finished. It returns the value of x[t] rather than the usual value that NDSolve was planning to return. The code asks NDSolve to plan to return nothing, that is, {}, since we won't use the trajectory x. You can use Throw and Catch instead of Return[] if you prefer (Throw inside WhenEvent and Catch outside NDSolve). Return[] looks neater to me.
3. A "boundary condition" is when two quantities happen to be equal at a particular instant. You have two boundary conditions, when the object passes the top of window and when it passes the bottom. If all boundary conditions occur at the same instant, they are often called "initial conditions", and the problem is called an "initial value problem" (IVP). But in the problem at hand, they occur at different instants, and the problem is called a "boundary value problem" (BVP).
4. When there is a relation between quantities at different times that holds for all "future" times (say, after the starting time) and not just at an instant, we have a delay differential equation, such as u'[t] = u[t-2]. That is not the case here.
5. The object was dropped before it passed the window, which started happening at $t=0$. We don't know how long before, so we go ahead and ask NDSolve to integrate back to -Infinity trusting that Return[] will stop it. (You should see what happens if you set gravity to 9.8 instead of -9.8. It's good to know what happens when you mess up.)
6. I assumed the object was dropped with an initial velocity of zero, hence the event at x'[t] == 0 in WhenEvent[]. If it was released with a velocity v0, change the event condition to x'[t] == v0 and fill in the number for v0 before calling NDSolve.
7. The use of named arguments and associations was just me wanting to experiment with them to see if they make the code more readable & reusable. The first output just shows the system that is constructed. One could easily type the code directly, and probably more quickly.
8. WhenEvent is a wonderful numerical solver. It's more finicky in DSolve. To get the solution out of dsol = DSolve[..], one can change the event to WhenEvent[x'[t] == 0, "StopIntegration"] and retrieve the value of x[t] from the result in a number of ways. For instance FunctionRange[x[t] /. dsol, t, x], or to isolate the numerical value, MaxValue[{x, FunctionRange[x[t] /. dsol, t, x]}, x].
Posted 3 days ago
 If for example the stone was thrown down at e meters per second, would this be the solution? accelerationBVPTemplate = <|"System" -> {x''[t] == #acceleration}, "BoundaryConditions" -> {x[#t1] == #x1, x[#t2] == #x2}|> &; solutionEvent = WhenEvent[x'[t] == -E(*new velocity*), Return[x[t], NDSolve]]; myProblem = <|"acceleration" -> -9.8, "t1" -> 0, "x1" -> 0, "t2" -> E/10, "x2" -> -E|>; fallingPastWindowProblem = {Values@accelerationBVPTemplate[myProblem], solutionEvent} NDSolve[fallingPastWindowProblem, {}, {t, -Infinity, 0}] I put a comment to clearly indicate where I changed the code.
Posted 3 days ago
 Yes, that is correct.You might consider why this goes wrong, if you want to think about assumptions in modeling: solutionEvent = WhenEvent[x'[t] == -4 E(*new velocity*), Return[x[t], NDSolve]]; 
Posted 12 days ago
 What you have written is a delay differertial equation (DDE). But it can (and should) be cast as an ODE, noting that speed changes due to constant acceleration as the stone traverses from top to bottom of the window.
Posted 12 days ago
 How can I cast it as a differential equation?
Posted 12 days ago
 You are making this way to hard for a problem on page 45. In fact it does not require a differential equation.Call the time the stone reaches the top of the window t. You are positing that it reaches the bottom at t+E/10. If the gravitational acceleration is a (I'm keeping things symbolic for now) and we call the position function s(t), then the standard physics gives s(t)=a t^2/2+constant (assuming zero initial velocity). The constant part will get removed from subtracting the position at window top from bottom.Step 1: Figure out the time (in seconds) the stone took to reach the window top. In:= timesol = First[Solve[a/2*(t + E/10)^2 - a/2*t^2 == E, t]] (* Out= {t -> (200 - a E)/(20 a)} *) Step 2: Plug that into the distance formula to find out how far it had traveled in that time. Here I plug in a decent approximation to the gravitational constant so we can get a number in meters. In:= a/2*t^2 /. timesol /. a -> 9.8 (* Out= 3.83342 *) Note: No DDE's were harmed in the making of this problem solution.
Posted 6 days ago
 I made a Manipulate Manipulate[ Block[{timeSolution}, timeSolution = First[NSolve[ a/2 (t + timetofallpastwindow)^2 - a/2 t^2 == heightOfWindow, t]]; a/2 t^2 /. timeSolution /. a -> 9.8], {{timetofallpastwindow, 0.2718, "Time to fall past window"}, 0.1, 1}, {{heightOfWindow, E, "Height of Window"}, 1, 5}] 
Posted 6 days ago
 FullSimplify[ Block[{timeSolution}, timeSolution = First[Solve[ a/2 (t + timetofallpastwindow)^2 - a/2 t^2 == heightOfWindow, t]]; a/2 t^2 /. timeSolution]] returns a symbolic answer of (-2 heightOfWindow + a timetofallpastwindow^2)^2/(8 a timetofallpastwindow^2) 
Posted 6 days ago
 I made a new Manipulate. Manipulate[(-2 heightOfWindow + a timetofallpastwindow^2)^2/( 8 a timetofallpastwindow^2), {{timetofallpastwindow, 0.2718, "Time to fall past window"}, 0.1, 1}, {{heightOfWindow, E, "Height of Window"}, 1, 5}, {{a, 9.8, "Acceleration of gravity"}, 9.8, 9.82, 0.0001}] 
Posted 5 days ago
 Could I make it work with a delay-differential equation? I don't understand why DSolve couldn't solve the delay-differential equation.
Posted 5 days ago
 The problem is in no way a DDE. In particular, the delay is not in the derivative, it's in the distance condition. And it is with respect to a specific time, not something that applies to all times t. Try instead (note corrected sign error) rt = DSolveValue[{r''[t] == -9.8, r[t0 - 0.2718] - r[t0] == -2.718, r == 0}, r[t], t] (* Out= -4.9 (-1.76902 t + 1. t^2 - 2. t t0) *) I do not claim this to be a good way to solve the problem, only that this can be used for a more indirect approach. You'd still need the initial velocity condition that was not used in the DE above in order to solve for t0. Solve[(D[rt, t] /. t -> 0) == 0, t0] (* {{t0 -> -0.884508}} *) This can then be used to figure out r[t0].
Posted 5 days ago
 I thought since it is a kinematics equation, the problem could be cast as a differential equation. I thought the case with a difference of 0.2718 s would make it an application of discrete shift or discrete delta.
Posted 12 days ago
 Please make sure you know the rules: https://wolfr.am/READ-1STYour post is too vague. Please describe your subject extensively providing technical details, code, examples, and other relevant ideas, so it is clear what exactly you are looking for.