An **ordinary differential equation** or **ODE** (as opposed to a partial differential equation) is a type of differential equation that involves a function of only one independent variable. It can simply be defined, for a layman, as any equation that involves any combination of the following:

- An independent variable ()
- Functions of the independent variable (or dependent variables) ()
- A primary dependent variable (the function in question) ()
- And, necessarily, any number of and degrees of derivatives of the primary function ()

An example differential equation is as follows:

## Methods of solving

### First order

First order first degree differential equations in the form

Can be solved with direct integration.

#### Separable equations

Separable equations are the one of the easiest to solve. For any ODE in the form

the solution is

#### General linear equations

For linear equations in the form

- ,

the solution can be found with the formula

#### Bernoulli equations

Bernoulli differential equations are those in the form

- ,

They can be solved by transforming them into linear differential equations by substituting.

#### Exact equations

Exact differential equations are those in the form

and will have the solution

#### Systems of differential equations

A system of ODEs in the form

or, in more compact notation,

the general solution will be

where and represent the eigenvectors and eigenvalues of *A*, respectively.
Higher order differential equations can be converted into such a system by making the substitution

differentiating, and substituting variables from the original equation for derivatives of *y* to yield a system of first order ODEs. For example:

We can make the substition

### Higher order equations

In general, if *f(x)* and *g(x)* are both solutions to a differential equation, *C _{1}f(x) + C_{2}g(x)* is also a solution.

#### Homogenous equations

Differential equations in this form can be solved by first finding the roots of the auxiliary or characteristic equation, which is equal to

The roots may be real or complex. If the roots are then the general solution will be:

If the characteristic equation has only one solution, the general solution of the ODE will be

If the roots are complex and equal to , by Euler's formula the solution simplifies to

The constant of integration is not restricted to real numbers in this case.

#### Method of undetermined coefficients

This method is used to find a particular solution for non-homogeneous equations by using a similar function as a potential particular solution *Y _{P}* and adjusting the coefficients. It is especially useful when the forcing term is a polynomial, trigonometric function, or exponential function, however if there is information known about the particular integral required different guesses can be tried.

For example:

This equality now creates a linear system of equations.

This particular solution, combined with the general solution of the associated homogeneous equation, gives a final general solution of

## Real world examples

### Murder case

Detectives find a murder victim in room with the thermostat set to 20 °C at 4:30 AM. The detectives take a measurement as soon as they arrive and find the body to be 27 °C. An hour later the body is at 25 °C. What time was the victim killed?

This problem can be solved by using Newton's Law of Cooling, which states

is temperature, the dependent variable, is time, the independent variable, is the ambient temperature and is a constant. Since the variables can be separated, we can find the solution using that method.

Firstly, we must find . We can do this with the initial value (human body temperature).

We can now solve for and . We will assume that 4:30 is hours after death.

The murder took place 2.597 hours ago, or at 1:56 AM. We can also find and find our final solution, although this is unnecessary as far as the detectives are concerned since we already know the time of death.

### Radioactive decay

Polunium-208 has a half life of 2.898 years. If the original sample was 10 grams, how much will remain after 1 year?

We can set this up as a differential equation, with as the amount, as time, and as a constant.

This is a separable differential equation, and can be solved to give

Since we have the initial value , we can find C.

can be found since we know that after 2.898 years there will be 5 grams.

We know have a complete formula, which we can use to calculate out answer.

Our amount of Polunium-208 after 1 year is 7.87 grams.

### Simple harmonic motion

A system which obeys Hooke's law, or

can be rewritten as a second-order differential equation.

Using Newton's 2nd Law,

This equation will have the characteristic equation

The solution to the differential equation is

By using Euler's formula this can be written in the form

which, by trigonometric identities, can be written as

where and . Systems which follow this equation are said to exhibit simple harmonic motion.