I have forgotten
my Password

Or login with:

  • Facebookhttp://facebook.com/
  • Googlehttps://www.google.com/accounts/o8/id
  • Yahoohttps://me.yahoo.com
MathsCalculus

Differential

Introduction

Differential equations are an powerful mathematical tool that help us understand nature and finance, allowing us to make accurate calculations, including:
  • movement of an object
  • the collision of two cars
  • trajectories of planets

As an example:
Imagine a particle that is projected horizontally (Gravity is neglected):
1/intro_1.gif
+
  • Velocity is given by \frac{dx}{dt}=v
  • Acceleration is \frac{d^2x}{dt^2}=\frac{dv}{dt}=v\,\frac{dv}{dx}
  • It is assumed that the drag is proportional to v^n

Applying Newton's second Law: "Force = Mass x Acceleration"
F =-m\,k\,v^n

Therefore if we are interested in the distance x
v\,\frac{dv}{dx}=-k\,v^n
or
\frac{dv}{dx}=-k\,v^{n-1}

If we are interested in time then:
\frac{dv}{dt}=-k\,v^2

Definitions

Particular solutions

  • When x'=a
x(t)=at and a\in\mathhf{R}

  • When x'=2t
x(t)=t^2+c and c\in\mathhf{R}

Differential Equations which involve only one independent variable are called Ordinary. In these equations x is the independent variable and y is the dependent variable. For example :
\frac{d^2y}{dx^2}= - p^2y

2\frac{d^3y}{dx^3} + 3 \frac{d^2y}{dx^2} + \frac{dy}{dx} - 10y = e^{-3x}\;sin\,5x

Equations which involve two or more independent variables and partial differential coefficients with respect to them are called Partial. For example :
  • When \displaystyle \frac{\partial du}{\partial dx}+\frac{\partial du}{\partial dy}=0
u(x,y)=a(y-x)\;,\;a\in\mathhf{R}
The Laplace equation
\frac{\partial u^2}{\partial x^2}+\frac{\partial u^2}{\partial y^2}=0

Order

Equations that involve a second differential coefficient but none of higher orders is said to be Second Order.

  • When x''=x'
x(t)=ae^t+b and a,b\in\mathhf{R}

  • When x''=x
x(t)=ae^t+be^{-t} and a,b\in\mathhf{R}

  • When x''+2x'+x=0
x(t)=ae^t+bte^{-t}\;,\;a,b\in\mathhf{R}

For example :
First order
\frac{d^2y}{dx^2}= - p^2y
Second order
\left[1 + \left(\frac{dy}{dx} \right)^2 \right]^{\frac{3}{2}} = 3\,\frac{d^2y}{dx^2}
\frac{\partial^2 y}{\partial t^2} = a^2\;\frac{\partial^2 y}{\partial x^2}
Third order
2\frac{d^3y}{dx^3} + 3 \frac{d^2y}{dx^2} + \frac{dy}{dx} - 10y = e^{-3x}\;sin\,5x

Degree

The degree of an equation is the power of the highest differential coefficient once the equation has been made rational and integral as far as the differential coefficients are concerned. For example :

  • When x''+p^2x=0
x(t)=A cos(px)+Bsin(px) and A,B\in\mahhf{R}

  • When x''+x=t
x(t)=asin(t)+bcos(t)+t a,b\in\mathhf{R}

First degree
\frac{d^2y}{dx^2}= - p^2y
2\frac{d^3y}{dx^3} + 3 \frac{d^2y}{dx^2} + \frac{dy}{dx} - 10y = e^{-3x}\;sin\,5x
Second degree
\left\[\frac{dx}{dt}\right\]^2=\frac{dx}{dt}

Note that this definition of degree does not require x or y to occur rationally or integrally.

The Geometrical Meaning Of A Differential Equation

This section presents geometric characteristics of the solution of a differential equation .

Linear Solution

A linear function is a function f:\mathhf{R}\to\mathhf{R} such as f(x)=ax+b where a,b\in\mathhf{R}

If \frac{dy}{dx} = 2 then y = 2x + c
22109/lines_plot.gif
+

Quadric Solution

A quadric function is a function f:\mathbb{R}\to\mathbb{R} such as f(x)=ax^2+bx+c where a,b,c\in\mathbb{R}

If \frac{dy}{dx} = 2x then y = x^2 + c

22109/parab_plot.gif
+
Now consider the equation \frac{d^2y}{dx^2} = 2

Therefore \frac{dy}{dx} = 2x + A
y = x^2 + Ax + B
  • If A = 0 the graph is as above.
  • If A = 1
    y = x^2 + x + B
    = \left(x + \frac{1}{2} \right)^2 + \left(B - \frac{1}{4} \right)
  • If A = -2
    y = x^2 - 2x + B
    = \left(x - 1 \right)^2 + \left(B - 1 \right)

22109/lots_parabolas.gif
+

Exponential Solution

An exponential function is a function f:\mathhf{R}\to\mathhf{R} such as f(x)=e^{ax} where a\in\mathhf{R}
Now consider the following equation:
\frac{dy}{dx} = x\left(y - 1 \right)

This can be rearranged as: \frac{dy}{y + 1} = x\;dx

The variables have now been separated and :
\int \frac{dy}{y + 1} = \int x\,dx
\therefore\;\;\;\;\;\;y + 1 = e^{\left(\frac{1}{2}\,x^2 + c \right)} = e^{\frac{1}{2}x^2}  + e^c

From which the explicit form is given by:
y = A\,e^{\frac{1}{2}x^2}  - 1

22109/exp_plot.gif
+

The Formation Of Differential Equations By Elimination

If from the following equation we eliminate the arbitrary constant we get the following:

y = A + B\,x + C\,x^2\;\;\;\;\;\;\;(Where A;B;&C\;are\;arbitrary)
\frac{dy}{dx} = B + 2C\,x
\frac{d^2y}{dx^2} = 2C
\frac{d^3y}{dx^3} = 0

Extending this concept, if we started with n arbitrary constants, we could eliminate them by n differentiations. The result would be a differential equation of the n^{th} order.

Conversley if we are given a differential equation of the n^{th} order we can, in general, obtain an equivalent relationship containing no derivatives but n arbitrary constants. This relationship is called "The General Solution"

For Example
\frac{d^4y}{dx^4} = w
where w i aconstant

Integrating with respect to x gives
\frac{d^3y}{dx^3} = wx + A

And so on until
y = \frac{wx^4}{24} + \frac{Ax^3}{6} + \frac{Bx^2}{2};+\;Cx + E

Where A, B, C and E are all arbitrary constants

The Complete Primitive; Particular Integral; And Singular Solution

The solution of a differential equation containing the full number of arbitrary constants is called "The Complete Primative". Any solution derived from the complete Primitive by giving particular values to these constants is called a "A Particular Integral"

For example
A Particular solution of
\frac{d^4y}{dx^4} = w
is given by
y = \frac{wx^4}{24}
(Obtained by putting A,B,C,E = 0) or
y = \frac{wx^4}{24} + \frac{15}{2}\,x^2 + 23\,x-10

Example:

Example - The use of Differential Equations to Solve Problems in Dynamics
Problem
A cricket ball is thrown vertically upwards with a velocity of v ft/sec. The retardation is \propto v or =kv . Find the maximum height reached (Y) and the time of flight to the vertex (T).

Prove that the Initial velocity u is given by:
u= - k\,Y + g\,T
Workings
The acceleration = -kv - g

To find the time of Flight T
\frac{dv}{dt}\;= - (kv + g)
\therefore\;\;\;\;\;\;\frac{dv}{kv + g}\;= - dt
thus
\frac{1}{k}Ln(kv + g)\;= - t + c

When t = 0 v = u
\therefore\;\;\;\;\;\;\frac{1}{k}Ln(ku + g) = 0 + c
\therefore\;\;\;\;\;\;\frac{1}{k}Ln(kv + g)\;= - t + \frac{1}{k}Ln\,(ku + g)
Thus
kt = Ln\left(\frac{ku + g}{kv + g} \right)

At the vertex t = T and v = 0 so
kT = Ln\left(\frac{ku + g}{0 + g} \right)
i.e.
{T = \frac{1}{k}\;Ln\left(\frac{ku}{g} + 1 \right)

For Height Y
v\;\frac{dv}{dy}= - (kv + g)
v\;\frac{dv}{(kv + g)}= - dy
\int \frac{v}{kv + g}dv = -\int dy
\int \left[\frac{1}{k} - \frac{g/k}{k\,v + g} \right]dv= - y + D
\therefore\;\;\;\;\;\;\frac{1}{k}\;v - \frac{g}{k^2}\;Ln\,(kv + g)= - y + D

But when y = 0, v = u so
\frac{1}{k}\;u - \frac{g}{k^2}\;Ln\,(ku + g) = 0 + D
\therefore\;\;\;\;\;\;\frac{1}{k}\;v - \frac{g}{k^2}\;Ln\,(kv + g)= - y + \frac{1}{k}u - \frac{g}{k^2}\,Ln(ku + g)

At the Vertex v = 0
\therefore\;\;\;\;\;0 - \frac{g}{k^2}\,Ln g= - Y + \frac{1}{k}u - \frac{g}{k^2}\,Ln(ku + g)
y = \frac{1}{k}u - \frac{g}{k^2}\,Ln\,\left(\frac{ku + g}{g} \right)
y = \frac{1}{k}u - \frac{g}{k^2}\,Ln\,\left(\frac{ku}{g} + 1 \right)
= \frac{1}{k}u - \frac{g}{k}\times \frac{1}{k}\,Ln\,\left(\frac{ku}{g} + 1 \right)
Solution
The flight time is:
{T = \frac{1}{k}\;Ln\left(\frac{ku}{g} + 1 \right)

Max Height is:
H= \frac{1}{k}u - \frac{g}{k}\times \frac{1}{k}\,Ln\,\left(\frac{ku}{g} + 1 \right)

Differential Equations Which Include Trigonometrical Functions The Right Hand Side

In the following worked examples \displaystyle A\;cos\,nx + B\;sin\,nx is usually re-written as \displaystyle C\;sin\,(nx + \alpha ). For those unused to this type of trigonometrical manipulation, the following notes should help.
Example:

Example - Basic examples .
Problem
Basic trigonometrical examples
Workings
The reference page on Trigonometrical Formulae includes:-

Considering the first equation , this can be re-written as:-

Now if during the solution of a differential equation we arrive at :-

we can compare the right hand side with the right hand side of (5) and we can see that they are of the same form but Cos\,\alpha has been replaced by "3" and Sin\,\alpha by "4". Clearly this can not be correct as the Sine and Cosine can not have a value above unity but if we draw the following right angled triangle.
22109/dr_triang.jpg
+

Values of Sine and Cosine \alpha can be obtained which can be put into equation (5)

This can be re-arranged to satisfy the requirements of equation (6)

Mixed Examples

The next examples will present some mixed differential equations (containing exponential, polynomials, sine, cosine).
Example:

Example - Using the lambda example
Problem
Solve
\ddot{x} + 4x = 4\,e^2t

Workings
\lambda  = 2\;\;\;;\;\;\;k = 0\;\;\;;\;\;\;n = 2\;\;\;;\;\;\;a = 4

Using the D operator

D^2 + 4 = 0

\therefore\;\;\;\;D = \pm j2
Solution
Therefore the General Solution is given by:-

x = \frac{1}{2}\,e^{\frac{1}{2}t} + A\;cos\,2t + B\;sin\,2t

Section Pages

Taylor

Computes the first and second derivatives of a function using the Taylor formula.
double taylor1 (double (*f)(double), double x, double h, double gamma = 1.0)[inline]
double taylor2 (double (*f)(double), double x, double h, double gamma = 1.0)[inline]

Taylor Table

Computes the first and second derivatives of a function at multiple points.
std::vector<double> taylor1_table (double (*f)(double), std::vector<double> &points, double h, double gamma = 1.0)
std::vector<double> taylor2_table (double (*f)(double), std::vector<double> &points, double h, double gamma = 1.0)

First Order

First Order Differential Equations with worked examples

Linear with Constant Coefficient

A guide to linear equations of second and higher degrees

Separable

This section contains worked examples of the type of differential equation which can be solved by integration

The D operator

Solving Differential Equations using the D operator

Homogeneous

The solution of homogeneous differential equations including the use of the D operator

Linear Simultaneous Equations

Linear simultaneous differential equations

Partial

An Introduction to Partial Differential Equations