2.3: Ordinary Differential Equations
A differential equation is an equation that involves derivatives of a function. For example, here is a differential equation involving \(f\) and its first derivative: \[\frac{df}{dx} = f(x)\] This is called an ordinary differential equation because it involves a derivative with respect to a single variable \(x\) , rather than multiple variables.
Finding a solution for the differential equation means finding a function that satisfies the equation. There is no single method for solving differential equations. In some cases, we can guess the solution; for example, by trying different elementary functions, we can discover that the above differential equation can be solved by \[f(x) = A \exp(x).\] Certain classes of differential equation can be solved using techniques like Fourier transforms, Green’s functions, etc., some of which will be taught in this course. On the other hand, many differential equations simply have no known exact analytic solution.
Example \(\PageIndex{1}\)
The following differential equation describes a damped harmonic oscillator: \[\frac{d^2 x}{dt^2} + 2\gamma\frac{dx}{dt} + \omega_0^2 x(t) = 0.\] In this case, note that \(x(t)\) is the function, and \(t\) is the input variable. This is unlike our previous notation where \(x\) was the input variable, so don’t get confused! This equation is obtained by applying Newton’s second law to an object moving in one dimension subject to both a damping force and a restoring force, with \(x(t)\) representing the position as a function of time.
Specific solutions and general solutions
When confronted with an ordinary differential equation, the first thing you should check for is the highest derivative appearing in the equation. This is called the order of the differential equation. If the equation has order \(N\) , then its general solution contains \(N\) free parameters that can be assigned any value (this is similar to the concept of integration constants, which we’ll discuss in the next chapter). Therefore, if you happen to guess a solution, but that solution does not contain \(N\) free parameters, then you know the solution isn’t the most general one.
For example, the ordinary differential equation \[\frac{df}{dx} = f(x)\] has order one. We have previously guessed the solution \(f(x) = A \exp(x)\) , which has one free parameter, \(A\) . So we know our work is done: there is no solution more general than the one we found.
A specific solution to a differential equation is a solution containing no free parameters. One way to get a specific solution is to start from a general solution, and assign actual values to each of the free parameters. In physics problems, the assigned values are commonly determined by boundary conditions . For example, you may be asked to solve a second-order differential equation given the boundary conditions \(f(0) = a\) and \(f(1) = b\) ; alternatively, you might be given the boundary conditions \(f(0) = c\) and \(f'(0) = d\) , or any other combination of two conditions. For an ordinary differential equation of order \(N\) , we need \(N\) conditions to define a specific solution.