Differential Equations of Motion

Definition of a Differential Equation

I know you most likely have not yet had much exposure to differential equations in math class.  Perhaps you have had none and wouldn't know how to define a differential equation.  So let's start there.  A differential equation is an equation that contains a function as well as derivatives of that function.  While that's the usual textbook definition, in reality it needn't have the function itself in the equation, but it'd be trivially simple to solve if it didn't.  For us, that seems like a good place to start so that you can tie this new concept together with old ones you know well.

The Simplest Example

When we wrote out Newton's second law for an object subjected to only the force of gravity, we wrote   You already know that the acceleration is the second derivative of the position with respect to time.  If we substitute that into Newton's second law we get this:

This is a differential equation.  There are methods that you will eventually be taught to solve such equations, but mostly with you guys I will use the method in which we look at it and guess a form of equation that might work.  If this method has a formal name, I've long forgotten it. I do recall that such guessed functions are called trial functions.  What we are assured of is this: So long as our equations are well-behaved in the range of parameters that we are dealing with, if we guess a solution that works, it is the one and only unique solution to the equation.  They call this fact existence and uniqueness of a solution.  It just means that if a solution exists and you found it, then it's unique.

The Art and Skill of Guessing

Finding a trial solution that ends up being successful is a bit of an art. I can tell you that after looking all over nature at lots of equations that first of all there are many repeated themes. You will find, for instance, that due to the symmetry of natural laws and the fact that waves are all over the place, that solutions that for instance tell you how beach balls oscillate, will look very similar to electron densities around atomic nuclei, since electrons are also subject to wave equations. Besides looking for and often expecting to find repeated themes in nature, if you have a good command of the basic forms of the existing analytic functions and their derivatives, you will be good at guessing trial functions. That being true, my point is not to spend excessive time with you solving differential equations by hand anyway, but rather to massage them into a form that can be inputted into GeoGebra to get numerical solutions. Why? Because as stated earlier, many of the most interesting and even common equations can't be solved by hand in terms of analytic functions.
[url=https://pixabay.com/en/sketch-cartoon-space-set-3045125/]"Space Cartoon"[/url] by pencilparker is in the [url=http://creativecommons.org/publicdomain/zero/1.0/]Public Domain, CC0[/url]
We will see in later chapters that free fall is equivalent to weightlessness as seen here.
"Space Cartoon" by pencilparker is in the Public Domain, CC0 We will see in later chapters that free fall is equivalent to weightlessness as seen here.

A Worked Example - Free Fall

I want to take the equation above for an object subjected to only the gravitational force and do two things with you: Take you through the solution by hand via a trial function, and then solve it numerically using GeoGebra. The nice thing about this equation is that we have used it so many times both in lecture and in lab that you won't have any problem guessing the solution. Have a look at the 1D version of the equation after the mass is cancelled, and assuming downward is the positive direction:

Obviously the term on the right side is a constant equal roughly to 10m/s2. The idea of guessing a solution in this case is to think of a function that has a second derivative equal to a constant. Obviously, since we already have done this in lab you know to expect an equation of the form because as you think through all the analytic functions you know of, the second order polynomial is the only one with a constant second derivative. Do not discard the zeroth and first order terms here, since they allow us to define initial conditions of our system, as you'll see below. To find out if our solution works, take the second derivative of the trial function and plug it into the differential equation. In this case the second derivative is just 2C. Plugged in we find 2C=g, or C=g/2. So now we know our equation can be more uniquely written as As mentioned, if we look at the value of our function evaluated at t=0, it corresponds to our initial position, so , and if we take one derivative of our solution we find , which means that B represents initial velocity since Thus after doing all that we can write which we've seen before from doing the math relating to constant acceleration kinematics. NOTE: Please recall the order of operations and note that the last term has the squared time in the numerator! I say this both because it's true and because we'll be writing equations and feeding them into a computer for solutions soon, and we need to do it correctly without over-use of parentheses. Using too many sets of parentheses doesn't make the answer wrong, but it makes the inputs look very messy.

The Numerical Solution of Free Fall

The differential equation above, which obviously has it's roots in Newton's second law, is called a second order, non-homogenous, linear differential equation. The second order refers to the second derivative (rather than a first derivative), the non-homogenous part refers to the fact that the constant isn't zero, and the linear part refers to the fact that the derivative itself is not squared or inside functions. The only part of that discussion that really matters to us right now is the second order part. Second order equations almost always need to be rewritten in terms of two, coupled first order equations in order for computer programs to solve them numerically. We will need to do this. The idea is to write expressions containing only first derivatives that tells the computer how the terms are related, since it doesn't know kinematics like you do. In GeoGebra, this is how this problem will need to be written out:

Think of the first line as one which tells the program what velocity is, and the second line as telling it that the derivative of velocity (which is the second derivative of position) is equal to g, which was our original second order equation. Note that the functional dependencies need to be explicitly declared. The first entry will be the one related to the derivative. Realize that functions can be differentiated with respect to any variable, so when a prime notation is used, it is ambiguous. The ambiguity is resolved by knowing that whatever parameter is the first in the list of dependencies is the one with which the function is being differentiated. Entering these equations into GeoGebra means using underscores for subscripts, etc.  So the actual inputs will be r_x'(t,r_x,v_x)=v_x, etc. Once these two equations are written, you must tell GeoGebra to solve the N=2 coupled differential equations with the command: NSolveODE[{r_x',v_x'},0,{0,0},10] In this function you list the two equations in order, the starting value of the first parameter (t=0), the initial values of the position and velocity {0,0} where I chose to set both to zero, and the final value of the first parameter (t=10s). Once you press enter, you will be asked if you should create 'g' as a slider. Click yes. Then you will see the solutions which should look familiar if you set g=10. You will see a parabolically growing position plot and a linearly increasing velocity graph. The plots will end at t=10s, since that was the value chosen in the function command.  If you hadn't done so before, you have now solved your first set of numerical differential equations... and this is just the beginning of exciting things to come.  Please take the time to plug this into GeoGebra and see it first hand.  It will sink in much better that way!