# 1. Solving Differential Equations (DEs)

A **differential equation** (or "DE") contains
**derivatives** or **differentials**.

Our task is to **solve** the differential equation. This will involve integration at some point, and we'll (mostly) end up with an expression along the lines of "*y* = ...".

Recall from the Differential section in the Integration chapter, that a differential can be thought of as a **derivative** where `dy/dx` is actually not written in fraction form.

### Examples of Differentials

dx(this means "an infinitely small change inx")`dθ` (this means "an infinitely small change in `θ`")

`dt` (this means "an infinitely small change in

t")

## Examples of Differential Equations

### Example 1

We saw the following example in the Introduction to this chapter. It involves a derivative, `dy/dx`:

`(dy)/(dx)=x^2-3`

As we did before, we will integrate it. This
will be a **general solution** (involving *K*, a
constant of integration).

So we proceed as follows:

`y=int(x^2-3)dx`

and this gives

`y=x^3/3-3x+K`

But where did that *dy* go from the `(dy)/(dx)`? Why did it seem to disappear?

In this example, we appear to be integrating the *x* part only (on the right), but in fact we have integrated with respect to *y* as well (on the left). DEs are like that - you need to integrate with respect to two (sometimes more) different variables, one at a time.

We could have written our question only using **differentials**:

dy= (x^{2}− 3)dx

(All I did was to multiply both sides of the original *dy/dx* in the question by *dx*.)

Now we integrate both sides, the left side with respect to *y* (that's why we use "*dy*") and the right side with respect to *x* (that's why we use "*dx*") :

∫

dy= ∫(x^{2}− 3)dx

Then the answer is the same as before, but this time we have arrived at it considering the *dy* part more carefully:

`y=x^3/3-3x+K`

On the left hand side, we have integrated ∫ *dy* = ∫ 1 *dy* to give us *y.*

**Note about the constant: **We have integrated both sides, but there's a constant of integration on the right side only. What happened to the one on the left? The answer is quite straightforward. We do actually get a constant on both sides, but we can combine them into one constant (*K*) which we write on the right hand side.

### Example 2

This example also involves differentials:

`θ^2 dθ = sin(t + 0.2)\ dt`

We have:

A function of `theta` with `d theta` on the left side, and

A function of

twithdton the right side.

To solve this, we would integrate both sides, one at a time, as follows:

∫ θ

^{2 }dθ = ∫ sin(t+ 0.2)dt`θ^3/3 = −cos(t + 0.2) + K`

We have integrated with respect to θ on the left and with respect to *t* on the right.

## Solving a differential equation

From the above examples, we can see that **solving a DE** means finding
an equation with no derivatives that satisfies the given
DE. Solving a differential equation always involves one or more
**integration** steps.

It is important to be able to identify the **type of
DE** we are dealing with before we attempt to
solve it.

## Definitions

**First order DE:** Contains only first derivatives

**Second order DE:** Contains second derivatives (and
possibly first derivatives also)

**Degree:** The **highest power** of the **highest
derivative** which occurs in the DE.

### Example 3 - Order and Degree

a) `(d^2y)/(dx^2)+((dy)/(dx))^3-3x+2y=8`

This DE has **order 2** (the highest derivative appearing
is the **second** derivative) and **degree 1** (the
**power** of the highest derivative is 1.)

b) `((dy)/(dx))^5-2x=3\ sin(x)-sin(y)`

This DE has **order 1** (the highest derivative appearing
is the **first** derivative) and **degree 5** (the
**power** of the highest derivative is 5.)

c) `(y'')^4+2(y')^7-5y=3`

This DE
has **order 2** (the highest derivative appearing is the
**second** derivative) and **degree 4** (the **power**
of the highest derivative is 4.)

## General and Particular Solutions

When we first performed integrations, we obtained a **general
solution** (involving a constant, *K*).

We obtained a **particular solution** by substituting known
values for *x* and *y*. These known conditions are
called **boundary conditions** (or **initial
conditions**).

It is the same concept when solving differential equations - find general solution first, then substitute given numbers to find particular solutions.

Let's see some examples of first order, first degree DEs.

### Example 4

a. Find the general solution for the differential equation

`dy + 7x\ dx = 0`

b. Find the particular solution given that `y(0)=3`.

### Example 5

Find the particular solution of

`y^' = 5`

given that when `x=0, y=2`.

### Example 6

Find the particular solution of

`y''' = 0`

given that:

`y(0) = 3,` `y'(1) = 4,` `y''(2) = 6`

### Example 7

After solving the differential equation,

`(dy)/(dx)ln\ x-y/x=0`

(we will see how to solve this DE in the next section Separation of Variables), we obtain the result

`y=c ln x`

Did we get the correct general solution?

## Second Order DEs

We include two more examples here to give you an idea of second order DEs. We will see later in this chapter how to solve such Second Order Linear DEs.

### Example 8

The general solution of the second order DE

y'' +a^{2}y= 0

is

`y = A cos ax + B sin ax`

### Example 9

The general solution of the second order DE

y'' − 3y' + 2y= 0

is

y=Ae^{2x}+Be^{x}

If we have the following boundary conditions:

y(0) = 4,y'(0) = 5

then the particular solution is given by:

y=e^{2x}+ 3e^{x}

Now we do some examples using second order DEs where we are given a final answer and we need to check if it is the correct solution.

### Example 10 - Second Order DE

Show that

`y = c_1 sin 2x + 3 cos 2x`

is a general solution for the differential equation

`(d^2y)/(dx^2)+4y=0`

### Example 11 - Second Order DE

Show that `(d^2y)/(dx^2)=2(dy)/(dx)` has a
solution of *y *= *c*_{1} + *c*_{2}*e*^{2x}

Didn't find what you are looking for on this page? Try **search**:

### Online Algebra Solver

This algebra solver can solve a wide range of math problems. (Please be patient while it loads.)

Go to: Online algebra solver

### Ready for a break?

Play a math game.

(Well, not really a math game, but each game was made using math...)

### The IntMath Newsletter

Sign up for the free **IntMath Newsletter**. Get math study tips, information, news and updates each fortnight. Join thousands of satisfied students, teachers and parents!

### Share IntMath!

### Short URL for this Page

Save typing! You can use this URL to reach this page:

intmath.com/solvde

### Calculus Lessons on DVD

Easy to understand calculus lessons on DVD. See samples before you commit.

More info: Calculus videos