A linear first order equation is an equation in the form
The simpliest case of which is shown below in Example 1 where and are not functions but simple constants. Linear first order equations are important because they show up frequently in nature and physics, and can be solved by a fairly straight forward method.
We first begin by motivating the method. First recall that the product rule states that . The key observation is that the left hand side of the first order ODE appears to be fairly similar to the product rule. There is one term with a derivative of , and there is one term without a derivative of .
Let's compare the left hand side
to the product rule applied to the product involving . Notice that is equal to the prime operator.
The first fact we notice is that on the left hand side of our first order ODE there is no in front of the term . We can try to correct that by multiplying through by . Then the ODE would become:
But now this would only look like the product rule if and hence , which we do not know by now. But this simple equation can easily be solved, as it is a separable equation. Dividing both sides of it by and integrating we get:
Integrating by substitution the integral on the left hand side is simply . Thus pulling over the natural logarithm to the right, we have:
This is very important and is called the 'integrating factor'. So our original ODE can be rewritten as
But now the whole point of introducing was we were trying to turn the left hand side of this ODE into for easily integrating it, which is exactly what we have done. Thus
So we may integrate both sides and then solve for y to get
Below we provide another derivation of this formula.
Before we begin we notice that for the function y, we are not guaranteed a solution for all x because the coefficient is discontinuous at 0. So either we can find a solution in or for . For the purposes of this solution we shall assume .
There is a strategy for solving inhomogeneous equations called variation of parameters that proceeds as follows. First find the general solution to the homogeneous equations. Guess that the solutions of the inhomogeneous equations can be written in the same way as for the solutions of the homogeneous equations, except where the unknown constants are replaced by unknown functions. Then you plug a solution of this form back in to the equation to see if you can find what the unknown function is.
This method works well in case of first order linear equations and gives us an alternative derivation of our formula for the solution which we present below.
First, set Q(x) equal to 0 so that you end up with a homogeneous linear equation (the usage of this term is to be distinguished from the usage of "homogeneous" in the previous sections).
This equation is separable, so separate it:
Solve the equation to obtain the solution
Now let C be replaced by a variable function of x, and denote it g(x).
Substitute the previous equation into the differential equation to get
Now solve for g(x) to get
Now obtain the general solution by plugging in this expression in g(x):
Making Linear Equations from Non-Linear EquationsEdit
Sometimes a non-linear equation, which is not solvable like this, can be made linear, and more easily solvable, by applying a substitution.