Equations in the form are called separable and solved by and thus . Prior to dividing by, one needs to check if there are stationary solutions satisfying.
A separable linearordinary differential equation of the first order must be homogeneous and has the general form where is some known function. We may solve this by separation of variables, Since the separation of variables in this case involves dividing by y, we must check if the constant functiony=0 is a solution of the original equation. Trivially, if y=0 then y'=0, so y=0 is actually a solution of the original equation. We note that y=0 is not allowed in the transformed equation. We solve the transformed equation with the variables already separated by Integrating, where C is an arbitrary constant. Then, by exponentiation, we obtain Here,, so. But we have independently checked that y=0 is also a solution of the original equation, thus with an arbitrary constant A, which covers all the cases. It is easy to confirm that this is a solution by plugging it into the original differential equation: Some elaboration is needed because ƒ might not even be integrable. One must also assume something about the domains of the functions involved before the equation is fully defined. The solution above assumes the real case. If is a constant, the solution is particularly simple, and describes, e.g., if, the exponential decay of radioactive material at the macroscopic level. If the value of is not known a priori, it can be determined from two measurements of the solution. For example, gives and.
Non-separable (non-homogeneous) first-order linear ordinary differential equations
First-order linear non-homogeneous ODEs are not separable. They can be solved by the following approach, known as an integrating factor method. Consider first-order linear ODEs of the general form: The method for solving this equation relies on a special integrating factor, μ: We choose this integrating factor because it has the special property that its derivative is itself times the function we are integrating, that is: Multiply both sides of the original differential equation by μ to get: Because of the special μ we picked, we may substitute dμ/dx for μp, simplifying the equation to: Using the product rule in reverse, we get: Integrating both sides: Finally, to solve for y we divide both sides by : Since μ is a function of x, we cannot simplify any further directly.
Second-order linear ordinary differential equations
A simple example
Suppose a mass is attached to a spring which exerts an attractive force on the massproportional to the extension/compression of the spring. For now, we may ignore any other forces. We shall write the extension of the spring at a time t as x. Now, using Newton's second law we can write : where m is the mass and k is the spring constant that represents a measure of spring stiffness. For simplicity's sake, let us take m=k as an example. If we look for solutions that have the form, where C is a constant, we discover the relationship, and thus must be one of the complex numbers or. Thus, using Euler's formula we can say that the solution must be of the form: See a by WolframAlpha. To determine the unknown constants A and B, we need initial conditions, i.e. equalities that specify the state of the system at a given time. For example, if we suppose at t = 0 the extension is a unit distance, and the particle is not moving. We have and so A = 1. and so B = 0. Therefore x = cos t. This is an example of simple harmonic motion. See a by Wolfram Alpha.
A more complicated model
The above model of an oscillating mass on a spring is plausible but not very realistic: in practice, friction will tend to decelerate the mass and have magnitude proportional to its velocity. Our new differential equation, expressing the balancing of the acceleration and the forces, is where is the damping coefficient representing friction. Again looking for solutions of the form, we find that This is a quadratic equation which we can solve. If there are two complex conjugate rootsa ± ib, and the solution will look like this: Let us for simplicity take, then and. The equation can be also solved in MATLAB symbolic toolbox as x = dsolve=1','Dx
although the solution looks rather ugly, x = ^)/^)*^) - ^)/^)*^)
This is a model of a damped oscillator. The plot of displacement against time would look like this: which resembles how one would expect a vibrating spring to behave as friction removes energy from the system.