Difference between revisions of "Differential Equations"

From Department of Mathematics at UTSA
Jump to navigation Jump to search
Line 1: Line 1:
  
[[File:Elmer-pump-heatequation.png|thumb|350px|Visualization of heat transfer in a pump casing, created by solving the heat equation. Heat is being generated internally in the casing and being cooled at the boundary, providing a steady state temperature distribution.]]
+
'''Ordinary differential equations''' involve equations containing:
 +
* variables
 +
* functions
 +
* their derivatives
 +
and their solutions.
  
In mathematics, a '''differential equation''' is an equation that relates one or more functions and their derivatives. In applications, the functions generally represent physical quantities, the derivatives represent their rates of change, and the differential equation defines a relationship between the two. Such relations are common; therefore, differential equations play a prominent role in many disciplines including engineering, physics, economics, and biology.
+
In studying integration, you ''already'' have considered solutions to very simple differential equations. For example, when you look to solving
 +
: <math>\int f(x) \,dx=g(x)</math>
 +
for g(x), you are really solving the differential equation
 +
: <math> g'(x) = f(x) \,</math>
  
Mainly the study of differential equations consists of the study of their solutions (the set of functions that satisfy each equation), and of the properties of their solutions. Only the simplest differential equations are solvable by explicit formulas; however, many properties of solutions of a given differential equation may be determined without computing them exactly.
+
== Notations and terminology ==
 +
The notations we use for solving differential equations will be crucial in the ease of solubility for these equations.  
  
Often when a closed-form expression for the solutions is not available, solutions may be approximated numerically using computers. The theory of dynamical systems puts emphasis on qualitative analysis of systems described by differential equations, while many numerical methods have been developed to determine solutions with a given degree of accuracy.
+
This document will be using '''three''' notations primarily:
 +
* f' to denote the derivative of f
 +
* D ''f'' to denote the derivative of ''f''
 +
* <math>{df \over dx}</math> to denote the derivative of ''f'' (for separable equations).
  
==History==
+
=== Terminology ===
 +
Consider the differential equation
 +
: <math>3 f^{\prime \prime}(x)+5xf(x)=11</math>
  
Differential equations first came into existence with the invention of calculus by Newton and Leibniz. In Chapter 2 of his 1671 work ''Methodus fluxionum et Serierum Infinitarum'', Isaac Newton listed three kinds of differential equations:
+
Since the equation's highest derivative is 2, we say that the differential equation is of ''order'' 2.
  
:<math>
+
== Some simple differential equations ==
\begin{align}
+
A key idea in solving differential equations will be that of [[Calculus/Definite integral|integration]].
& \frac {dy}{dx} = f(x) \\[5pt]
+
 
& \frac {dy}{dx} = f(x,y) \\[5pt]
+
Let us consider the second order differential equation (remember that a function acts on a value).
& x_1 \frac {\partial y}{\partial x_1} + x_2 \frac {\partial y}{\partial x_2} = y
+
:<math>f''(x)=2 \,</math>
\end{align}
+
 
 +
How would we go about solving this? It tells us that on differentiating twice, we obtain the constant 2 so, if we integrate twice, we should obtain our result.
 +
 
 +
Integrating once first of all:
 +
 
 +
:<math>\int f''(x) \,dx = \int 2 \,dx</math>
 +
:<math>f'(x)=2x+C_1 \,</math>
 +
 
 +
We have transformed the apparently difficult second order differential equation into a rather simpler one, viz.
 +
 
 +
:<math>f'(x)=2x+C_1 \,</math>
 +
 
 +
This equation tells us that if we differentiate a function once, we get <math>2x+C_1</math>. If we integrate once more, we should find the solution.
 +
 
 +
:<math>\int f'(x) \,dx = \int 2x+C_1 \,dx</math>
 +
:<math>f(x)=x^2+C_1x+C_2 \,</math>  
 +
 
 +
This is the ''solution'' to the differential equation. We will get <math>f''=2 \,</math> for ''all'' values of <math>C_1</math> and <math>C_2</math>.
 +
 
 +
The values <math>C_1</math> and <math>C_2</math> are related to quantities known as ''initial conditions''.
 +
 
 +
Why are initial conditions useful? ODEs (ordinary differential equations) are useful in modeling physical conditions. We may wish to model a certain physical system which is initially at rest (so one initial condition may be zero), or wound up to some point (so an initial condition may be nonzero, say 5 for instance) and we may wish to see how the system reacts under such an initial condition.
 +
 
 +
When we solve a system with given initial conditions, we substitute them after our process of integration.
 +
===Example===
 +
When we solved <math>f''(x)=2 \,</math> say we had the initial conditions <math>f'(0)=3 \,</math> and <math>f(0)=2 \,</math>. (Note, initial conditions need not occur at f(0)).
 +
 
 +
After we integrate we make substitutions:
 +
:<math>f'(0)=2(0)+C_1 \,</math>
 +
:<math>3=C_1 \,</math>
 +
:<math>\int f'(x) \,dx = \int 2x+3 \,dx</math>
 +
:<math>f(x)=x^2+3x+C_2 \,</math>
 +
:<math>f(0)=0^2+3(0)+C_2 \,</math>
 +
:<math>2=C_2 \,</math>
 +
:<math>f(x)=x^2+3x+2 \,</math>
 +
 
 +
Without initial conditions, the answer we obtain is known as the ''general solution'' or the solution to the ''family of equations''. With them, our solution is known as a ''specific solution''.
 +
 
 +
== Basic first order DEs ==
 +
In this section we will consider ''four'' main types of differential equations:
 +
* separable
 +
* homogeneous
 +
* linear
 +
* exact
 +
 
 +
There are many other forms of differential equation, however, and these will be dealt with in the next section
 +
 
 +
=== Separable equations ===
 +
A ''separable'' equation is in the form (using dy/dx notation which will serve us greatly here)
 +
:<math>{dy \over dx} = f(x)/g(y)</math>
 +
 
 +
Previously we have only dealt with simple differential equations with g(''y'')=1. How do we solve such a separable equation as above?
 +
 
 +
We group ''x'' and ''dx'' terms together, and ''y'' and ''dy'' terms together as well.
 +
:<math>g(y)\ dy = f(x)\ dx</math>
 +
Integrating both sides with respect to y on the left hand side and x on the right hand side:
 +
:<math>\int g(y)\,dy=\int f(x)\,dx+C</math>
 +
 
 +
we will obtain the solution.
 +
 
 +
==== Worked example ====
 +
Here is a worked example illustrating the process.
 +
 
 +
We are asked to solve
 +
:<math>{dy \over dx} = 3x^2y</math>
 +
 
 +
Separating
 +
:<math>{dy \over y} = (3x^2)\,dx</math>
 +
Integrating
 +
:<math>\int {dy \over y} = \int 3x^2\,dx</math>
 +
:<math>\ln{y}=x^3+C \,\!</math>
 +
:<math>y=e^{x^3+C}</math>
 +
Letting <math>k = e^C</math> where k is a constant we obtain
 +
:<math>y=ke^{x^3}</math>
 +
which is the general solution.
 +
 
 +
==== Verification ====
 +
This step does not need to be part of your work, but if you want to check your solution, you can verify your answer by differentiation.
 +
 
 +
We obtained
 +
:<math>y=ke^{x^3}</math>
 +
as the solution to
 +
:<math>{dy \over dx} = 3x^2y</math>
 +
 
 +
Differentiating our solution with respect to x,
 +
:<math>{dy \over dx} = 3kx^2e^{x^3}</math>
 +
 
 +
And since <math>y=ke^{x^3}</math>, we can write
 +
:<math>{dy \over dx} = 3x^2y</math>
 +
We see that we obtain our original differential equation, thus our work must be correct.
 +
 
 +
=== Homogeneous equations ===
 +
A ''homogeneous'' equation is in the form
 +
:<math>{dy \over dx} = f(y/x)</math>
 +
 
 +
This looks difficult as it stands, however we can utilize the substitution
 +
:<math>v = {y \over x}</math>
 +
so that we are now dealing with F(v) rather than F(y/x).
 +
 
 +
Now we can express y in terms of v, as ''y''=''xv'' and use the product rule.
 +
 
 +
The equation above then becomes, using the product rule
 +
:<math>{dy \over dx} = v+x{dv \over dx}</math>
 +
 
 +
Then
 +
:<math>v+x{dv \over dx} = f(v)</math>
 +
:<math>x{dv \over dx} = f(v)-v</math>
 +
:<math>{dv \over dx} = {f(v)-v \over x}</math>
 +
which is a separable equation and can be solved as above.
 +
 
 +
However let's look at a worked equation to see how homogeneous equations are solved.
 +
 
 +
==== Worked example ====
 +
We have the equation
 +
:<math> {dy \over dx} = {y^2 + x^2 \over yx}</math>
 +
 
 +
This does not appear to be immediately separable, but let us expand to get
 +
:<math> {dy \over dx} = {y^2 \over yx} + {x^2 \over yx}</math>
 +
:<math> {dy \over dx} = {x \over y} + {y \over x}</math>
 +
 
 +
Substituting ''y''=''xv'' which is the same as substituting ''v''=''y''/''x'':
 +
:<math> {dy \over dx} = 1/v + v</math>
 +
 
 +
Now
 +
:<math> v+x{dv \over dx} = 1/v + v</math>
 +
Canceling ''v'' from both sides
 +
:<math> x{dv \over dx} = 1/v</math>
 +
Separating
 +
:<math> v\, dv = dx/x</math>
 +
Integrating both sides
 +
:<math> {1 \over 2}v^2+C= \ln(x) \,</math>
 +
:<math> {1 \over 2}\left({y \over x}\right)^2= \ln(x)-C</math>
 +
:<math> y^2 = 2x^2 \ln(x) - 2Cx^2 \,</math>
 +
:<math> y = x\sqrt{2 \ln(x) - 2C}</math>
 +
 
 +
which is our desired solution.
 +
 
 +
=== Linear equations ===
 +
A linear first order differential equation is a differential equation in the form
 +
:<math> a(x){dy \over dx} + b(x)y=c(x)</math>
 +
 
 +
Multiplying or dividing this equation by any non-zero function of ''x'' makes no difference to its solutions so we could always divide by ''a''(''x'') to make the coefficient of the differential 1, but writing the equation in this more general form may offer insights.
 +
 
 +
At first glance, it is not possible to integrate the left hand side, but there is one special case. If ''b'' happens to be the differential of ''a'' then we can write
 +
 
 +
:<math>a(x){dy \over dx} + b(x)y = a(x){dy \over dx} + y{da \over dx}
 +
= {d \over dx}a(x)y </math>
 +
 
 +
and integration is now straightforward.
 +
 
 +
Since we can freely multiply by any function, lets see if we can use this freedom to write the left hand side in this special form.
 +
 
 +
We multiply the entire equation by an arbitrary, ''I''(''x''), getting
 +
 
 +
:<math> aI{dy \over dx} + bIy=cI</math>
 +
 
 +
then impose the condition
 +
 
 +
:<math> \frac{d}{dx}aI = bI </math>
 +
 
 +
If this is satisfied the new left hand side will have the special form. Note that multiplying ''I'' by any constant will leave this condition still satisfied.
 +
 
 +
Rearranging this condition gives
 +
 
 +
:<math> \frac{1}{I}\frac{dI}{dx} = \frac{b-\frac{da}{dx}}{a} </math>
 +
 
 +
We can integrate this to get
 +
 
 +
:<math> \ln I(x) = \int \frac{b(z)}{a(z)}dz - \ln a(x) + c \quad
 +
I(x)=\frac{k}{a(x)}e^{\int \frac{b(z)}{a(z)}dz}</math>
 +
 
 +
We can set the constant ''k'' to be 1, since this makes no difference.
 +
 
 +
Next we use ''I'' on the original differential equation, getting
 +
 
 +
:<math> e^{\int \frac{b(z)}{a(z)}dz}{dy \over dx} +  
 +
e^{\int \frac{b(z)}{a(z)}dz} \frac{b(x)}{a(x)}y
 +
=e^{\int \frac{b(z)}{a(z)}dz}\frac{c(x)}{a(x)}</math>
 +
 
 +
Because we've chosen ''I'' to put the left hand side in the special form we can
 +
rewrite this as
 +
 
 +
:<math> {d \over dx}(ye^{\int \frac{b(z)}{a(z)}dz}) =  
 +
e^{\int \frac{b(z)}{a(z)}dz}\frac{c(x)}{a(x)}</math>
 +
 
 +
Integrating both sides and dividing by <math>e^I</math> we obtain the final result
 +
 
 +
:<math> y = e^{-\int \frac{b(z)}{a(z)}dz}
 +
\left(\int e^{\int \frac{b(z)}{a(z)}dz}\frac{c(x)}{a(x)}dx + C\right)
 
</math>
 
</math>
In all these cases, {{mvar|y}} is an unknown function of {{mvar|x}} (or of {{math|''x''<sub>1</sub>}} and {{math|''x''<sub>2</sub>}}), and {{mvar|f}} is a given function.
 
  
He solves these examples and others using infinite series and discusses the non-uniqueness of solutions.
+
We call ''I'' an ''integrating factor''. Similar techniques can be used on some other calculus problems.
 +
 
 +
====Example====
 +
 
 +
Consider
  
Jacob Bernoulli proposed the Bernoulli differential equation in 1695. This is an ordinary differential equation of the form
+
:<math>\frac{dy}{dx} + y \tan x = 1 \quad y(0)=0</math>
  
: <math>y'+ P(x)y = Q(x)y^n\,</math>
+
First we calculate the integrating factor.
  
for which the following year Leibniz obtained solutions by simplifying it.
+
:<math>I=e^{\int \tan x dx} = e^ {\ln \sec x} = \sec x </math>
  
Historically, the problem of a vibrating string such as that of a musical instrument was studied by Jean le Rond d'Alembert, Leonhard Euler, Daniel Bernoulli, and Joseph-Louis Lagrange. In 1746, d’Alembert discovered the one-dimensional wave equation, and within ten years Euler discovered the three-dimensional wave equation.
+
Multiplying the equation by this gives
  
The Euler–Lagrange equation was developed in the 1750s by Euler and Lagrange in connection with their studies of the tautochrone problem. This is the problem of determining a curve on which a weighted particle will fall to a fixed point in a fixed amount of time, independent of the starting point. Lagrange solved this problem in 1755 and sent the solution to Euler. Both further developed Lagrange's method and applied it to mechanics, which led to the formulation of Lagrangian mechanics.
 
  
In 1822, Fourier published his work on heat flow in ''Théorie analytique de la chaleur'' (The Analytic Theory of Heat), in which he based his reasoning on Newton's law of cooling, namely, that the flow of heat between two adjacent molecules is proportional to the extremely small difference of their temperatures. Contained in this book was Fourier's proposal of his heat equation for conductive diffusion of heat. This partial differential equation is now taught to every student of mathematical physics.
+
:<math>\sec x \frac{dy}{dx} + y \sec x \tan x = \sec x </math>
  
==Example==
+
or
In classical mechanics, the motion of a body is described by its position and velocity as the time value varies. Newton's laws allow these variables to be expressed dynamically (given the position, velocity, acceleration and various forces acting on the body) as a differential equation for the unknown position of the body as a function of time.
 
  
In some cases, this differential equation (called an equation of motion) may be solved explicitly.
+
:<math> \frac{d}{dx} y\sec x = \sec x </math>
  
An example of modeling a real-world problem using differential equations is the determination of the velocity of a ball falling through the air, considering only gravity and air resistance. The ball's acceleration towards the ground is the acceleration due to gravity minus the deceleration due to air resistance. Gravity is considered constant, and air resistance may be modeled as proportional to the ball's velocity. This means that the ball's acceleration, which is a derivative of its velocity, depends on the velocity (and the velocity depends on time). Finding the velocity as a function of time involves solving a differential equation and verifying its validity.
+
We can now integrate
  
==Types==
+
:<math> y = \cos x \int_0^x \sec z \, dz = \cos x \ln (\sec x + \tan x) </math>
Differential equations can be divided into several types. Apart from describing the properties of the equation itself, these classes of differential equations can help inform the choice of approach to a solution. Commonly used distinctions include whether the equation is ordinary or partial, linear or non-linear, and homogeneous or heterogeneous. This list is far from exhaustive; there are many other properties and subclasses of differential equations which can be very useful in specific contexts.
 
  
===Ordinary differential equations===
+
=== Exact equations ===
An ordinary differential equation (''ODE'') is an equation containing an unknown function of one real or complex variable {{mvar|x}}, its derivatives, and some given functions of {{mvar|x}}. The unknown function is generally represented by a variable (often denoted {{mvar|y}}), which, therefore, ''depends'' on {{mvar|x}}. Thus {{mvar|x}} is often called the independent variable of the equation. The term "''ordinary''" is used in contrast with the term partial differential equation, which may be with respect to ''more than'' one independent variable.
+
An exact equation is in the form
 +
: f(''x'', ''y'') d''x'' + g(''x'', ''y'') d''y'' = 0
 +
and, has the property that
 +
: D<sub>x</sub> f = D<sub>y</sub> g
 +
(If the differential equation does not have this property then we can't proceed any further).
  
Linear differential equations are the differential equations that are linear in the unknown function and its derivatives. Their theory is well developed, and in many cases one may express their solutions in terms of integrals.
+
As a result of this, if we have an exact equation then there exists a function h(''x'', ''y'') such that
 +
: D<sub>y</sub> h = f and D<sub>x</sub> h = g
  
Most ODEs that are encountered in physics are linear. Therefore, most special functions may be defined as solutions of linear differential equations.
+
So then the solutions are in the form
 +
: h(''x'', ''y'') = c
 +
by using the fact of the total differential.
 +
We can find then h(''x'', ''y'') by integration
  
As, in general, the solutions of a differential equation cannot be expressed by a closed-form expression, numerical methods are commonly used for solving differential equations on a computer.
+
<!-- === Worked example ===
 +
Consider the differential equation  
 +
: (3''x''<sup>2</sup> + 6''y''<sup>2</sup>) d''x'' + ( (3''x''<sup>2</sup> + 6''y''<sup>2</sup>+4''y'') d''y''
  
===Partial differential equations===
+
It is exact since
 +
: D<sub>x</sub> (3''x''<sup>2</sup> + 6''y''<sup>2</sup>) = 6''x''
 +
: D<sub>y</sub> (3''x''<sup>2</sup> + 6''y''<sup>2</sup>+4''y'') = 6''x''
  
A partial differential equation (''PDE'') is a differential equation that contains unknown multivariable functions and their partial derivatives. (This is in contrast to ordinary differential equations, which deal with functions of a single variable and their derivatives.) PDEs are used to formulate problems involving functions of several variables, and are either solved in closed form, or used to create a relevant computer model.
+
Now, there exists a function h such that
 +
: 1) D<sub>x</sub> h = f = (3''x''<sup>2</sup> + 6''y''<sup>2</sup>)
 +
: 2) D<sub>y</sub> h = g = (3''x''<sup>2</sup> + 6''y''<sup>2</sup>+4''y'')  
  
PDEs can be used to describe a wide variety of phenomena in nature such as sound, heat, electrostatics, electrodynamics, fluid flow, elasticity, or quantum mechanics. These seemingly distinct physical phenomena can be formalized similarly in terms of PDEs. Just as ordinary differential equations often model one-dimensional dynamical systems, partial differential equations often model multidimensional systems. Stochastic partial differential equations generalize partial differential equations for modeling randomness.
+
Integrate D<sub>x</sub> h, with treating ''y'' as a constant:
 +
: h(''x'', ''y'') = 2''y''<sup>3</sup>+3''x''<sup>2</sup>''y''+r(''y'')
 +
(We have the function r(''y'') because on differentiating with respect to ''x'' of the above expression, r(''y'') disappears - this is the similar procedure of adding an arbitrary constant)
  
===Non-linear differential equations===
+
So now,
 +
: D<sub>y</sub> h = 3''x''<sup>2</sup>+6''y''<sup>2</sup>+r'(x)
 +
Comparing with (2), we see r'(''y'')=4''y'', so r(''y'')=2''y''<sup>2</sup>+''C''
  
A '''non-linear differential equation''' is a differential equation that is not a linear equation in the unknown function and its derivatives (the linearity or non-linearity in the arguments of the function are not considered here). There are very few methods of solving nonlinear differential equations exactly; those that are known typically depend on the equation having particular symmetries. Nonlinear differential equations can exhibit very complicated behaviour over extended time intervals, characteristic of chaos. Even the fundamental questions of existence, uniqueness, and extendability of solutions for nonlinear differential equations, and well-posedness of initial and boundary value problems for nonlinear PDEs are hard problems and their resolution in special cases is considered to be a significant advance in the mathematical theory (cf. Navier–Stokes existence and smoothness). However, if the differential equation is a correctly formulated representation of a meaningful physical process, then one expects it to have a solution.
+
So substituting above, we get
 +
: h(''x'', ''y'')2''y''<sup>3</sup>+3''x''<sup>2</sup>''y''+2''y''<sup>2</sup>+''C'' = ''C''<sub>1</sub>
 +
where ''C''<sub>1</sub> is a constant, and our most general solution is then
 +
: 2''y''<sup>3</sup>+3''x''<sup>2</sup>''y''+2''y''<sup>2</sup>=''k''
 +
and we have simply moved the two constants to the one side of the expression and made this one constant
 +
-->
  
Linear differential equations frequently appear as approximations to nonlinear equations. These approximations are only valid under restricted conditions. For example, the harmonic oscillator equation is an approximation to the nonlinear pendulum equation that is valid for small amplitude oscillations.
+
==Basic second and higher order ODE's==
  
=== Equation order===
+
The generic solution of a ''n''<sup>th</sup> order ODE will contain ''n'' constants of integration. To calculate them we need ''n'' more equations.
Differential equations are described by their order, determined by the term with the highest derivatives. An equation containing only first derivatives is a ''first-order differential equation'', an equation containing the second derivative is a ''second-order differential equation'', and so on. Differential equations that describe natural phenomena almost always have only first and second order derivatives in them, but there are some exceptions, such as the thin film equation, which is a fourth order partial differential equation.
+
Most often, we have either
 +
:boundary conditions, the values of ''y'' and its derivatives take for two different values of ''x''  
 +
or
 +
:initial conditions, the values of ''y'' and its first ''n-1'' derivatives take  for one particular value of ''x''.
  
===Examples===
+
===Reducible ODE's===
  
In the first group of examples ''u'' is an unknown function of ''x'', and ''c'' and ''ω'' are constants that are supposed to be known. Two broad classifications of both ordinary and partial differential equations consist of distinguishing between ''linear'' and ''nonlinear'' differential equations, and between ''homogeneous'' differential equations and ''heterogeneous'' ones.
+
1.  If the independent variable, ''x'', does not occur in the differential equation then its order can be lowered by one. This will reduce a second order ODE to first order.
  
* Heterogeneous first-order linear constant coefficient ordinary differential equation:
+
Consider the equation:
 +
:<math>F\left(y,\frac{dy}{dx},\frac{d^2y}{dx^2}\right)=0</math>
 +
Define
 +
:<math>u=\frac{dy}{dx}</math>
 +
Then
 +
:<math>\frac{d^2y}{dx^2}=\frac{du}{dx}=\frac{du}{dy}\cdot\frac{dy}{dx}=\frac{du}{dy}\cdot u</math>
 +
Substitute these two expression into the equation and we get
 +
:<math>F\left(y,u,\frac{du}{dy}\cdot u\right)</math>=0
 +
which is a first order ODE
  
:: <math> \frac{du}{dx} = cu+x^2. </math>
+
====Example====
 +
Solve
 +
:<math>1+2y^2\operatorname{D}^2y=0</math>
 +
if at ''x''=0,&nbsp; ''y''=D''y''=1
  
* Homogeneous second-order linear ordinary differential equation:
+
First, we make the substitution, getting
 +
:<math>1+2y^2 u \frac{du}{dy}=0</math>
 +
This is a first order ODE.
 +
By rearranging terms we can separate the variables
 +
:<math>udu=-\frac{dy}{2y^2}</math>
 +
Integrating this gives
 +
:<math>u^2/2=c+1/2y</math>
 +
We know the values of ''y'' and ''u'' when ''x''=0 so we can find ''c''
 +
:<math>c=u^2/2-1/2y=1^2/2-1/(2\cdot 1)=1/2-1/2=0</math>
 +
Next, we reverse the substitution
 +
:<math>\frac{dy}{dx}^2=u^2=\frac{1}{y}</math>
 +
and take the square root
 +
:<math>\frac{dy}{dx}=\pm \frac{1}{\sqrt{y}}</math>
 +
To find out which sign of the square root to keep, we use the initial condition, D''y''=1 at ''x''=0, again, and rule out the negative square root.
 +
We now have another separable first order ODE,
 +
:<math>\frac{dy}{dx}=\frac{1}{\sqrt{y}}</math>
 +
Its solution is
 +
:<math>\frac{2}{3}y^\frac{3}{2}= x+d</math>
 +
Since ''y''=1 when ''x''=0, ''d''=2/3, and
 +
:<math>y=\left(1 + \frac{3x}{2} \right)^\frac{2}{3}</math>
  
:: <math> \frac{d^2u}{dx^2} - x\frac{du}{dx} + u = 0. </math>
+
2. If the dependent variable, ''y'', does not occur in the differential equation then it may also be reduced to a first order equation.
  
* Homogeneous second-order linear constant coefficient ordinary differential equation describing the harmonic oscillator:
+
Consider the equation:
 +
:<math>F\left(x,\frac{dy}{dx},\frac{d^2y}{dx^2}\right)=0</math>
 +
Define
 +
:<math>u=\frac{dy}{dx}</math>
 +
Then
 +
:<math>\frac{d^2y}{dx^2}=\frac{du}{dx}</math>
 +
Substitute these two expressions into the first equation and we get
 +
:<math>F\left(x,u,\frac{du}{dx}\right)</math>=0
 +
which is a first order ODE
  
:: <math> \frac{d^2u}{dx^2} + \omega^2u = 0. </math>
+
===Linear ODEs===
 +
An ODE of the form
 +
:<math>\frac{d^ny}{dx^n}+a_1(x)\frac{d^{n-1}y}{dx^{n-1}}+ ... +a_n y=F(x)</math>
 +
is called '''linear'''. Such equations are much simpler to solve than typical non-linear ODEs. Though only a few special cases can be solved exactly in terms of elementary functions, there is much that can be said about the solution of a generic linear ODE. A full account would be beyond the scope of this book <!-- This book covers up to 1st year undergraduate, per intro. Save special functions (Bessel, Legendre etc), Sturm-Liouville problem, eigenfunctions, orthonormal bases, etc for a later book -->
  
* Heterogeneous first-order nonlinear ordinary differential equation:
 
  
:: <math> \frac{du}{dx} = u^2 + 4. </math>
+
If ''F(x)=0'' for all ''x'' the ODE is called '''homogeneous'''
  
* Second-order nonlinear (due to sine function) ordinary differential equation describing the motion of a pendulum of length ''L'':
+
Two useful properties of generic linear equations are
 +
#Any linear combination of solutions of an homogeneous linear equation is also a solution.
 +
#If we have a solution of a nonhomogeneous linear equation and we add any solution of the corresponding homogenous linear equation we get another solution of the nonhomogeneous linear equation
  
:: <math> L\frac{d^2u}{dx^2} + g\sin u = 0. </math>
+
====Variation of constants====
  
In the next group of examples, the unknown function ''u'' depends on two variables ''x'' and ''t'' or ''x'' and ''y''.
+
Suppose we have a linear ODE,
 +
:<math>\frac{d^ny}{dx^n}+a_1(x)\frac{d^{n-1}y}{dx^{n-1}}+ ... +a_n y=0</math>
 +
and we know one solution, ''y=w(x)''
  
* Homogeneous first-order linear partial differential equation:
+
The other solutions can always be written as ''y=wz''. This substitution in the ODE will give us terms involving every differential of ''z'' upto the ''n''<sup>th</sup>, no higher, so we'll end up with an ''n''<sup>th</sup> order linear ODE for ''z''.
  
:: <math> \frac{\partial u}{\partial t} + t\frac{\partial u}{\partial x} = 0. </math>
+
We know that ''z'' is constant is one solution, so the ODE for ''z'' must not contain a ''z'' term, which means it will effectively be an ''n-1''<sup>th</sup> order linear ODE. We will have reduced the order by one.
  
* Homogeneous second-order linear constant coefficient partial differential equation of elliptic type, the [[Laplace equation]]:
+
Lets see how this works in practice.
  
:: <math> \frac{\partial^2 u}{\partial x^2} + \frac{\partial^2 u}{\partial y^2} = 0. </math>
+
=====Example=====
  
* Homogeneous third-order non-linear partial differential equation :
+
Consider
 +
:<math>\frac{d^2y}{dx^2}+\frac{2}{x}\frac{dy}{dx}-\frac{6}{x^2}y=0</math>
  
:: <math> \frac{\partial u}{\partial t} = 6u\frac{\partial u}{\partial x} - \frac{\partial^3 u}{\partial x^3}. </math>
+
One solution of this is ''y=x<sup>2</sup>'', so substitute ''y=zx<sup>2</sup>'' into this equation.
  
==Existence of solutions==
+
:<math>\left( x^2\frac{d^2z}{dx^2}+4x\frac{dz}{dx}+2z\right)
 +
+\frac{2}{x} \left( x^2\frac{dz}{dx}+2xz \right) -\frac{6}{x^2}x^2 z=0</math>
  
Solving differential equations is not like solving algebraic equations. Not only are their solutions often unclear, but whether solutions are unique or exist at all are also notable subjects of interest.
+
Rearrange and simplify.
 +
:<math>x^2 D^2 z + 6xD z=0</math>
 +
This is first order for D''z''. We can solve it to get
 +
:<math>z=A x^{-5} \quad y=A x^{-3}</math>
  
For first order initial value problems, the Peano existence theorem gives one set of circumstances in which a solution exists. Given any point <math>(a,b)</math> in the xy-plane, define some rectangular region <math>Z</math>, such that <math>Z = [l,m]\times[n,p]</math> and <math>(a,b)</math> is in the interior of <math>Z</math>. If we are given a differential equation <math>\frac{dy}{dx} = g(x,y)</math> and the condition that <math>y=b</math> when <math>x=a</math>, then there is locally a solution to this problem if <math>g(x,y)</math> and <math>\frac{\partial g}{\partial x}</math> are both continuous on <math>Z</math>. This solution exists on some interval with its center at <math>a</math>. The solution may not be unique.
+
Since the equation is linear we can add this to any multiple of the other solution to get the general solution,
  
However, this only helps us with first order initial value problems. Suppose we had a linear initial value problem of the nth order:
+
:<math>y=A x^{-3} + B x^2</math>
  
:<math>
+
====Linear homogeneous ODE's with constant coefficients====
f_{n}(x)\frac{d^n y}{dx^n} + \cdots + f_{1}(x)\frac{d y}{dx} + f_{0}(x)y = g(x)
+
 
</math>
+
Suppose we have a ODE
such that
+
:<math> (D^n+a_1 D^{n-1}+ ... + a_{n-1}D+a_0)y=0</math>
:<math>
+
we can take an inspired guess at a solution (motivate this)
y(x_{0})=y_{0}, y'(x_{0}) = y'_{0}, y''(x_{0}) = y''_{0}, \ldots
+
:<math>y=e^{px}</math>
</math>
+
For this function D<sup>n</sup>''y''=p<sup>n</sup>y so the ODE becomes
 +
:<math> (p^n+a_1 p^{n-1}+ ... + a_{n-1}p+a_0)y=0</math>
 +
 
 +
''y=0'' is a trivial solution of the ODE so we can discard it. We are then left with the equation
 +
:<math> p^n+a_1 p^{n-1}+ ... + a_{n-1}p+a_0)=0</math>
 +
This is called the ''characteristic'' equation of the ODE.
 +
 
 +
It can have up to ''n'' roots, p<sub>1</sub>,  p<sub>2</sub> &hellip;  p<sub>n</sub>, each root giving us a different solution of the ODE.
 +
 
 +
Because the ODE is linear, we can add all those solution together in any linear combination to get a general solution
 +
:<math>y=A_1 e^{p_1 x} +A_2 e^{p_2 x} + ... + A_n e^{p_n x}</math>
 +
 
 +
To see how this works in practice we will look at the second order case. Solving equations like this of higher order uses exactly the same principles; only the algebra is more complex.
 +
 
 +
=====Second order=====
 +
 
 +
If the ODE is second order,
 +
:<math>D^2 y + bDy+cy=0</math>
 +
then the characteristic equation is a quadratic,
 +
:<math>p^2+bp+c=0</math>
 +
with roots
 +
:<math>p_{\pm}=\frac{-b \pm \sqrt{b^2-4c}}{2}</math>
 +
 
 +
What these roots are like depends on the sign of ''b''<sup>2</sup>-4''c'', so we have three cases to consider.
 +
 
 +
''1) b<sup>2</sup> > 4c''
 +
 
 +
In this case we have two different real roots, so we can write down the solution straight away.
 +
:<math> y=A_{+}e^{p_{+}}+A_{-}e^{p_{-}}</math>
 +
 
 +
 
 +
''2) b<sup>2</sup> < 4c''
 +
 
 +
In this case, both roots are imaginary. We could just put them directly in the formula, but if we are interested in real solutions it is more useful to write them another way.
 +
 
 +
Defining k<sup>2</sup>=4c-b<sup>2</sup>, then the solution is
 +
:<math>y=A_{+}e^{ikx-\frac{bx}{2}}+A_{-}e^{-ikx-\frac{bx}{2}}</math>
 +
 
 +
For this to be real, the ''A''<nowiki>'</nowiki>s must be complex conjugates
 +
:<math>A_{\pm}=A e^{\pm ia}</math>
 +
 
 +
Make this substitution and we can write,
 +
:<math>y=A e^{-bx/2}\cos (kx+a)</math>
 +
 
 +
If ''b'' is positive, this is a damped oscillation.
 +
 
 +
 
 +
''3) b<sup>2</sup> = 4c''
 +
 
 +
In this case the characteristic equation only gives us one root, ''p=-b/2''. We must use another method to find the other solution.
 +
 
 +
We'll use the method of variation of constants. The ODE we need to solve is,
 +
:<math>D^2 y -2pDy+p^2y=0</math>
 +
rewriting ''b'' and ''c'' in terms of the root. From the characteristic equation we know one solution is <math>y=e^{px}</math> so we make the substitution <math>y=ze^{px}</math>, giving
 +
:<math> (e^{px}D^2z+2pe^{px}Dz+p^2e^{px}z)-2p(e^{px}Dz+pe^{px}z)+p^2e^{px}z=0 </math>
 +
This simplifies to D<sup>2</sup>''z''=0, which is easily solved. We get
 +
:<math>z=Ax+B \quad y=(Ax+B)e^{px}</math>
 +
so the second solution is the first multiplied by ''x''.
 +
 
 +
Higher order linear constant coefficient ODE's behave similarly: an exponential for every real root of the characteristic and a exponent multiplied by a trig factor for every complex conjugate pair, both being multiplied by a polynomial if the root is repeated.
 +
 
 +
E.g., if the characteristic equation factors to
 +
:<math>(p-1)^4(p-3)(p^2+1)^2=0</math>
 +
the general solution of the ODE will be
 +
:<math>y=(A+Bx+Cx^2+Dx^3)e^x + Ee^{3x}+ F \cos (x+a) +Gx \cos(x+b)</math>
 +
 
 +
The most difficult part is finding the roots of the characteristic equation.
 +
 
 +
====Linear nonhomogeneous ODEs with constant coefficients====
 +
 
 +
First, let's consider the ODE
 +
:<math>Dy-y=x</math>
 +
a nonhomogeneous first order ODE which we know how to solve.
 +
 
 +
Using the integrating factor ''e<sup>-x</sup>'' we find
 +
:<math>y=c e^{-x} +1 -x</math>
  
For any nonzero <math>f_{n}(x)</math>, if <math>\{f_{0},f_{1},\ldots\}</math> and <math>g</math> are continuous on some interval containing <math>x_{0}</math>, <math>y</math> is unique and exists.
+
This is the sum of a solution of the corresponding homogeneous equation, and a polynomial.
  
==Connection to difference equations==
+
Nonhomogeneous ODE's of higher order behave similarly.
  
The theory of differential equations is closely related to the theory of difference equations, in which the coordinates assume only discrete values, and the relationship involves values of the unknown function or functions and values at nearby coordinates. Many methods to compute numerical solutions of differential equations or study the properties of differential equations involve the approximation of the solution of a differential equation by the solution of a corresponding difference equation.
+
If we have a single solution, ''y<sub>p</sub>'' of the nonhomogeneous ODE, called a ''particular'' solution,
 +
:<math> (D^n+a_1 D^{n-1} + \cdots + a_n)y=F(x)</math>
 +
then the general solution is ''y=y<sub>p</sub>+y<sub>h</sub>'', where ''y<sub>h</sub>'' is the general solution of the homogeneous ODE.  
  
==Applications==
+
Find ''y<sub>p</sub>'' for an arbitrary ''F(x)'' requires methods beyond the scope of this chapter, but there are some special cases where finding ''y<sub>p</sub>'' is straightforward.
  
The study of differential equations is a wide field in pure and applied mathematics, physics, and engineering. All of these disciplines are concerned with the properties of differential equations of various types. Pure mathematics focuses on the existence and uniqueness of solutions, while applied mathematics emphasizes the rigorous justification of the methods for approximating solutions. Differential equations play an important role in modeling virtually every physical, technical, or biological process, from celestial motion, to bridge design, to interactions between neurons. Differential equations such as those used to solve real-life problems may not necessarily be directly solvable, i.e. do not have closed form solutions. Instead, solutions can be approximated using numerical methods.
+
Remember that in the first order problem ''y<sub>p</sub>'' for a polynomial ''F(x)'' was itself a polynomial of the same order. We can extend this to higher orders.
  
Many fundamental laws of physics and chemistry can be formulated as differential equations. In biology and economics, differential equations are used to model the behavior of complex systems. The mathematical theory of differential equations first developed together with the sciences where the equations had originated and where the results found application. However, diverse problems, sometimes originating in quite distinct scientific fields, may give rise to identical differential equations. Whenever this happens, mathematical theory behind the equations can be viewed as a unifying principle behind diverse phenomena. As an example, consider the propagation of light and sound in the atmosphere, and of waves on the surface of a pond. All of them may be described by the same second-order partial differential equation, the wave equation, which allows us to think of light and sound as forms of waves, much like familiar waves in the water. Conduction of heat, the theory of which was developed by Joseph Fourier, is governed by another second-order partial differential equation, the heat equation. It turns out that many diffusion processes, while seemingly different, are described by the same equation; the Black–Scholes equation in finance is, for instance, related to the heat equation.
+
''Example:''
 +
:<math>D^2y+y=x^3-x+1</math>
 +
Consider a particular solution
 +
:<math>y_p=b_0+b_1 x+b_2 x^2 + x^3</math>
 +
Substitute for ''y'' and collect coefficients
 +
:<math>x^3 + b_2 x^2 +(6+b_1)x +(2b_2+b_0)=x^3-x+1</math>
 +
So ''b<sub>2</sub>=0'', ''b<sub>1</sub>=-7'', ''b<sub>0</sub>=1'', and the general solution is
 +
:<math>y=a \sin x + b \cos x + 1 -7x + x^3</math>
  
The number of differential equations that have received a name, in various scientific areas is a witness of the importance of the topic.  
+
This works because all the derivatives of a polynomial are themselves polynomials.
  
==Resources==
+
Two other special cases are
* [https://mathresearch.utsa.edu/wikiFiles/MAT1193/Differential%20Equations/Presentation18_SlopeFields.pptx Slope Fields]. PowerPoint file created by Professor Cynthia Roberts, UTSA.
+
:<math>F(x)=P_n e^{kx} \quad y_p(x)=Q_n e^{kx}</math>
* [https://mathresearch.utsa.edu/wikiFiles/MAT1193/Differential%20Equations/Presentation19_Separation%20of%20Variables.pptx Separation of variables]. PowerPoint file created by Professor Cynthia Roberts, UTSA.
+
:<math>F(x)=A_n \sin kx +B_n \cos kx \quad
* [https://mathresearch.utsa.edu/wikiFiles/MAT1193/Differential%20Equations/Presentation20_DiffEq_Solutions.pptx Differential Equations Solutions]. PowerPoint file created by Professor Cynthia Roberts, UTSA.
+
y_p(x)=P_n \sin kx +Q_n \cos kx</math>
 +
where ''P<sub>n</sub>'',''Q<sub>n</sub>'',''A<sub>n</sub>'', and ''B<sub>n</sub>'' are all polynomials of degree ''n''.
  
==References==
+
Making these substitutions will give a set of simultaneous linear equations for the coefficients of the polynomials.
# Dennis G. Zill (15 March 2012). A First Course in Differential Equations with Modeling Applications. Cengage Learning. ISBN 978-1-285-40110-2.
 
# Newton, Isaac. (c.1671). Methodus Fluxionum et Serierum Infinitarum (The Method of Fluxions and Infinite Series), published in 1736 [Opuscula, 1744, Vol. I. p. 66].
 
# Bernoulli, Jacob (1695), "Explicationes, Annotationes & Additiones ad ea, quae in Actis sup. de Curva Elastica, Isochrona Paracentrica, & Velaria, hinc inde memorata, & paratim controversa legundur; ubi de Linea mediarum directionum, alliisque novis", Acta Eruditorum
 
# Hairer, Ernst; Nørsett, Syvert Paul; Wanner, Gerhard (1993), Solving ordinary differential equations I: Nonstiff problems, Berlin, New York: Springer-Verlag, ISBN 978-3-540-56670-0
 
# Frasier, Craig (July 1983). "Review of The evolution of dynamics, vibration theory from 1687 to 1742, by John T. Cannon and Sigalia Dostrovsky" (PDF). Bulletin of the American Mathematical Society. New Series. 9 (1).
 
# Wheeler, Gerard F.; Crummett, William P. (1987). "The Vibrating String Controversy". Am. J. Phys. 55 (1): 33–37. Bibcode:1987AmJPh..55...33W. doi:10.1119/1.15311.
 
# For a special collection of the 9 groundbreaking papers by the three authors, see First Appearance of the wave equation: D'Alembert, Leonhard Euler, Daniel Bernoulli. - the controversy about vibrating strings (retrieved 13 Nov 2012). Herman HJ Lynge and Son.
 
# For de Lagrange's contributions to the acoustic wave equation, can consult Acoustics: An Introduction to Its Physical Principles and Applications Allan D. Pierce, Acoustical Soc of America, 1989; page 18.(retrieved 9 Dec 2012)
 
# Speiser, David. Discovering the Principles of Mechanics 1600-1800, p. 191 (Basel: Birkhäuser, 2008).
 
# Fourier, Joseph (1822). Théorie analytique de la chaleur (in French). Paris: Firmin Didot Père et Fils. OCLC 2688081.
 
# Boyce, William E.; DiPrima, Richard C. (1967). Elementary Differential Equations and Boundary Value Problems (4th ed.). John Wiley & Sons. p. 3.
 
# Weisstein, Eric W. "Ordinary Differential Equation Order." From MathWorld--A Wolfram Web Resource. http://mathworld.wolfram.com/OrdinaryDifferentialEquationOrder.html
 
# Order and degree of a differential equation Archived 2016-04-01 at the Wayback Machine, accessed Dec 2015.
 
# Zill, Dennis G. (2001). A First Course in Differential Equations (5th ed.). Brooks/Cole. ISBN 0-534-37388-7.
 
# "dsolve - Maple Programming Help". www.maplesoft.com. Retrieved 2020-05-09.
 
# "DSolve - Wolfram Language Documentation". www.wolfram.com. Retrieved 2020-06-28.
 
# "Basic Algebra and Calculus — Sage Tutorial v9.0". doc.sagemath.org. Retrieved 2020-05-09.
 
# "Symbolic algebra and Mathematics with Xcas" (PDF).
 

Revision as of 13:36, 15 October 2021

Ordinary differential equations involve equations containing:

  • variables
  • functions
  • their derivatives

and their solutions.

In studying integration, you already have considered solutions to very simple differential equations. For example, when you look to solving

for g(x), you are really solving the differential equation

Notations and terminology

The notations we use for solving differential equations will be crucial in the ease of solubility for these equations.

This document will be using three notations primarily:

  • f' to denote the derivative of f
  • D f to denote the derivative of f
  • to denote the derivative of f (for separable equations).

Terminology

Consider the differential equation

Since the equation's highest derivative is 2, we say that the differential equation is of order 2.

Some simple differential equations

A key idea in solving differential equations will be that of integration.

Let us consider the second order differential equation (remember that a function acts on a value).

How would we go about solving this? It tells us that on differentiating twice, we obtain the constant 2 so, if we integrate twice, we should obtain our result.

Integrating once first of all:

We have transformed the apparently difficult second order differential equation into a rather simpler one, viz.

This equation tells us that if we differentiate a function once, we get . If we integrate once more, we should find the solution.

This is the solution to the differential equation. We will get for all values of and .

The values and are related to quantities known as initial conditions.

Why are initial conditions useful? ODEs (ordinary differential equations) are useful in modeling physical conditions. We may wish to model a certain physical system which is initially at rest (so one initial condition may be zero), or wound up to some point (so an initial condition may be nonzero, say 5 for instance) and we may wish to see how the system reacts under such an initial condition.

When we solve a system with given initial conditions, we substitute them after our process of integration.

Example

When we solved say we had the initial conditions and . (Note, initial conditions need not occur at f(0)).

After we integrate we make substitutions:

Without initial conditions, the answer we obtain is known as the general solution or the solution to the family of equations. With them, our solution is known as a specific solution.

Basic first order DEs

In this section we will consider four main types of differential equations:

  • separable
  • homogeneous
  • linear
  • exact

There are many other forms of differential equation, however, and these will be dealt with in the next section

Separable equations

A separable equation is in the form (using dy/dx notation which will serve us greatly here)

Previously we have only dealt with simple differential equations with g(y)=1. How do we solve such a separable equation as above?

We group x and dx terms together, and y and dy terms together as well.

Integrating both sides with respect to y on the left hand side and x on the right hand side:

we will obtain the solution.

Worked example

Here is a worked example illustrating the process.

We are asked to solve

Separating

Integrating

Letting where k is a constant we obtain

which is the general solution.

Verification

This step does not need to be part of your work, but if you want to check your solution, you can verify your answer by differentiation.

We obtained

as the solution to

Differentiating our solution with respect to x,

And since , we can write

We see that we obtain our original differential equation, thus our work must be correct.

Homogeneous equations

A homogeneous equation is in the form

This looks difficult as it stands, however we can utilize the substitution

so that we are now dealing with F(v) rather than F(y/x).

Now we can express y in terms of v, as y=xv and use the product rule.

The equation above then becomes, using the product rule

Then

which is a separable equation and can be solved as above.

However let's look at a worked equation to see how homogeneous equations are solved.

Worked example

We have the equation

This does not appear to be immediately separable, but let us expand to get

Substituting y=xv which is the same as substituting v=y/x:

Now

Canceling v from both sides

Separating

Integrating both sides

which is our desired solution.

Linear equations

A linear first order differential equation is a differential equation in the form

Multiplying or dividing this equation by any non-zero function of x makes no difference to its solutions so we could always divide by a(x) to make the coefficient of the differential 1, but writing the equation in this more general form may offer insights.

At first glance, it is not possible to integrate the left hand side, but there is one special case. If b happens to be the differential of a then we can write

and integration is now straightforward.

Since we can freely multiply by any function, lets see if we can use this freedom to write the left hand side in this special form.

We multiply the entire equation by an arbitrary, I(x), getting

then impose the condition

If this is satisfied the new left hand side will have the special form. Note that multiplying I by any constant will leave this condition still satisfied.

Rearranging this condition gives

We can integrate this to get

We can set the constant k to be 1, since this makes no difference.

Next we use I on the original differential equation, getting

Because we've chosen I to put the left hand side in the special form we can rewrite this as

Integrating both sides and dividing by we obtain the final result

We call I an integrating factor. Similar techniques can be used on some other calculus problems.

Example

Consider

First we calculate the integrating factor.

Multiplying the equation by this gives


or

We can now integrate

Exact equations

An exact equation is in the form

f(x, y) dx + g(x, y) dy = 0

and, has the property that

Dx f = Dy g

(If the differential equation does not have this property then we can't proceed any further).

As a result of this, if we have an exact equation then there exists a function h(x, y) such that

Dy h = f and Dx h = g

So then the solutions are in the form

h(x, y) = c

by using the fact of the total differential. We can find then h(x, y) by integration


Basic second and higher order ODE's

The generic solution of a nth order ODE will contain n constants of integration. To calculate them we need n more equations. Most often, we have either

boundary conditions, the values of y and its derivatives take for two different values of x

or

initial conditions, the values of y and its first n-1 derivatives take for one particular value of x.

Reducible ODE's

1. If the independent variable, x, does not occur in the differential equation then its order can be lowered by one. This will reduce a second order ODE to first order.

Consider the equation:

Define

Then

Substitute these two expression into the equation and we get

=0

which is a first order ODE

Example

Solve

if at x=0,  y=Dy=1

First, we make the substitution, getting

This is a first order ODE. By rearranging terms we can separate the variables

Integrating this gives

We know the values of y and u when x=0 so we can find c

Next, we reverse the substitution

and take the square root

To find out which sign of the square root to keep, we use the initial condition, Dy=1 at x=0, again, and rule out the negative square root. We now have another separable first order ODE,

Its solution is

Since y=1 when x=0, d=2/3, and

2. If the dependent variable, y, does not occur in the differential equation then it may also be reduced to a first order equation.

Consider the equation:

Define

Then

Substitute these two expressions into the first equation and we get

=0

which is a first order ODE

Linear ODEs

An ODE of the form

is called linear. Such equations are much simpler to solve than typical non-linear ODEs. Though only a few special cases can be solved exactly in terms of elementary functions, there is much that can be said about the solution of a generic linear ODE. A full account would be beyond the scope of this book


If F(x)=0 for all x the ODE is called homogeneous

Two useful properties of generic linear equations are

  1. Any linear combination of solutions of an homogeneous linear equation is also a solution.
  2. If we have a solution of a nonhomogeneous linear equation and we add any solution of the corresponding homogenous linear equation we get another solution of the nonhomogeneous linear equation

Variation of constants

Suppose we have a linear ODE,

and we know one solution, y=w(x)

The other solutions can always be written as y=wz. This substitution in the ODE will give us terms involving every differential of z upto the nth, no higher, so we'll end up with an nth order linear ODE for z.

We know that z is constant is one solution, so the ODE for z must not contain a z term, which means it will effectively be an n-1th order linear ODE. We will have reduced the order by one.

Lets see how this works in practice.

Example

Consider

One solution of this is y=x2, so substitute y=zx2 into this equation.

Rearrange and simplify.

This is first order for Dz. We can solve it to get

Since the equation is linear we can add this to any multiple of the other solution to get the general solution,

Linear homogeneous ODE's with constant coefficients

Suppose we have a ODE

we can take an inspired guess at a solution (motivate this)

For this function Dny=pny so the ODE becomes

y=0 is a trivial solution of the ODE so we can discard it. We are then left with the equation

This is called the characteristic equation of the ODE.

It can have up to n roots, p1, p2 … pn, each root giving us a different solution of the ODE.

Because the ODE is linear, we can add all those solution together in any linear combination to get a general solution

To see how this works in practice we will look at the second order case. Solving equations like this of higher order uses exactly the same principles; only the algebra is more complex.

Second order

If the ODE is second order,

then the characteristic equation is a quadratic,

with roots

What these roots are like depends on the sign of b2-4c, so we have three cases to consider.

1) b2 > 4c

In this case we have two different real roots, so we can write down the solution straight away.


2) b2 < 4c

In this case, both roots are imaginary. We could just put them directly in the formula, but if we are interested in real solutions it is more useful to write them another way.

Defining k2=4c-b2, then the solution is

For this to be real, the A's must be complex conjugates

Make this substitution and we can write,

If b is positive, this is a damped oscillation.


3) b2 = 4c

In this case the characteristic equation only gives us one root, p=-b/2. We must use another method to find the other solution.

We'll use the method of variation of constants. The ODE we need to solve is,

rewriting b and c in terms of the root. From the characteristic equation we know one solution is so we make the substitution , giving

This simplifies to D2z=0, which is easily solved. We get

so the second solution is the first multiplied by x.

Higher order linear constant coefficient ODE's behave similarly: an exponential for every real root of the characteristic and a exponent multiplied by a trig factor for every complex conjugate pair, both being multiplied by a polynomial if the root is repeated.

E.g., if the characteristic equation factors to

the general solution of the ODE will be

The most difficult part is finding the roots of the characteristic equation.

Linear nonhomogeneous ODEs with constant coefficients

First, let's consider the ODE

a nonhomogeneous first order ODE which we know how to solve.

Using the integrating factor e-x we find

This is the sum of a solution of the corresponding homogeneous equation, and a polynomial.

Nonhomogeneous ODE's of higher order behave similarly.

If we have a single solution, yp of the nonhomogeneous ODE, called a particular solution,

then the general solution is y=yp+yh, where yh is the general solution of the homogeneous ODE.

Find yp for an arbitrary F(x) requires methods beyond the scope of this chapter, but there are some special cases where finding yp is straightforward.

Remember that in the first order problem yp for a polynomial F(x) was itself a polynomial of the same order. We can extend this to higher orders.

Example:

Consider a particular solution

Substitute for y and collect coefficients

So b2=0, b1=-7, b0=1, and the general solution is

This works because all the derivatives of a polynomial are themselves polynomials.

Two other special cases are

where Pn,Qn,An, and Bn are all polynomials of degree n.

Making these substitutions will give a set of simultaneous linear equations for the coefficients of the polynomials.