E X F Y: Differential Equation

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 42

Definition

Differential equation
An equation containing the derivative of one or more
dependent variables, with respect to one or more
independent variables is said to be a differential
equation (DE).
Example
y  f ( x)  e 2x

dependent variable: y

independent variable: x
Definition

Differential Equations are classified by

1. Type,
2. Order
3. Linearity.
Definition
Type
There are two main types of differential equation:
“Ordinary” and “Partial”.
1- Ordinary differential equation (ODE)
Differential equations that involve only ONE independent
variable are called ordinary differential equations.
Example
dy d2y dx dy
 5 y  e or
x
dx 2

dy
dx
 6 y  0 or 
dt dt
 2x  y
dx
Definition
2- Partial differential equation (PDE)

Differential equations that involve two or more independent


variables are called partial differential equations.
Example

 2u  2u u
 2 2
x 2
t t
or
u v

y x
Definition
Order
The order of a differential equation is the order of the
highest derivative found in the DE.
3
d y  dy 
2
 5   4 y  e x
dx 2
 dx 
Second order First order
Example
xy  y  e
' 2 x
first order F ( x, y , y ' )  0

y x
'' 3
second order F ( x, y, y ' , y '' )  0
Definition
Linear
The most general n-th order linear differential equation can be written
dny d n 1 y dy
an ( x)  an 1 ( x)  ...  a1 ( x)  a0 ( x) y  g ( x)
dx n
dx n 1 dx
The differential equation is said to be linear if
' ( n 1)
F ( x, y, y ,...... y )  0 linear in the variables y,
' (n) y ,... y
There are no multiplications among dependent variables and their
derivatives. All coefficients are functions of independent
variables.

A nonlinear ODE is one that is not linear, i.e. does not


have the above form.
Definition
Non - linear
Differential equations are said to be non-linear if any products exist
between the dependent variable and its derivatives, or between the
derivatives themselves.

d 3 y dy 2
3
 ( )  4 y  4e x
cos x
dx dx
Product between two derivatives ---- non-linear
dy
 4 y 2  cos x
dx

Product between the dependent variable themselves ---- non-linear


Definition
Linearity – Summary

Linear Non-linear

2y y2 or sin(y )

dy dy
y
dt dt

(2  3 sin t) y (2  3 y 2 ) y
2
dy  dy 
t  
dt  dt 
Definition
Example
dy
4x  ( y  x)  0 linear first-order ordinary differential equation
dx

y ''  2 y '  y  0 linear second-order ordinary differential equation

d3y dy
3
 3x  5y  ex linear third-order ordinary differential equation
dx dx

linear first-order ordinary differential equation

linear second-order ordinary differential


equation
Definition
Example
(1  y) y '  2 y  e x coefficient depends on y nonlinear first-order ODE

d2y
2
 sin( y)  0 nonlinear function of y nonlinear second-order ODE
dx
d4y
4
 y2  0 power not 1 nonlinear fourth-order ODE
dx

because θ occurs nonlinearly in the function sin θ


nonlinear second-order ODE

is a nonlinear second order equation of degree 2 involving a power


and a radical.
Separable Equations

A separable equation is a first-order differential equation in which


the expression for dy/dx can be factored as a function of x times a
function of y.

In other words, it can be written in the form

dy
 g ( x) H ( y )
dx

The name separable comes from the fact that the expression on the
right side can be “separated” into a function of x and a function of
y.
Separable Equations
Equivalently, if H(y) ≠ 0 = 1/ h(y), we could write

dy g ( x)

dx h( y )
To solve this equation,
1- we rewrite it in the differential form
h(y) dy = g(x) dx
2- Integrate both sides

 h( y) dy   g ( x) dx
3- Solve for y to obtain the next form with use the initial condition C

H ( y )  G ( x)  c
Separable Equations

Examples:
dy
1)  y 2 xe3 x  4 y is separable
dx
dy
Indeed,  y 2 xe3 x  4 y
dx

 y 2 xe3 x e 4 y  xe3 x y 2e 4 y
dy
2)  y  sin x is not separable
dx
Indeed, it cannot be put on the product form
Separable Equations
Example (1)
Solve the differential equation
dy y 2 dy  e3 x dx
 y 2e3 x
dx
  dx
2
y dy  e 3x

1 1 3x
  e c
y 3
1
y
1 3x
e c
3
Separable Equations
Example (2)
Solve the differential equation
ln y  ln x  1  c2
(1  x)dy  ydx  0
ln y  ln x  1  ln c1
(1  x)dy  ydx
ln y  lnc1 x  1 
dy dx

y 1 x y  c1 x  1

dy dx y  c1 x  1
 y   1 x y  cx  1
Separable Equations
Example (3)
a. Solve the differential equation dy x 2
 2
dx y
b. Find the solution of this equation that satisfies the initial
condition y(0) = 2.
Solution
1- write the equation in terms of differentials and integrate both sides:

y2 dy = x2 dx ∫ y2 dy = ∫ x2 dx

⅓y3 = ⅓x3 + C
Separable Equations

Solving for y, we get:

y  x  3C
3 3

At K = 3C.

y x K3 3

y(0) = 2. its means y = 2 when x = 0


K=8

y  x 8
3 3
Separable Equations
Example (4)
Solve the differential equation with the initial condition y(0) = 3.
dy 6x - x³
----- = -----------
dx 2y

Solution
2y dy = (6x – x³) dx 2∫y dy = ∫(6x – x³) dx

y² = 3x² – ¼x4 + C

At y(0) = 3

y = 3x² – ¼x4 + 9
Separable Equations
Example (5)
Find a function f whose graph passes through (1, 0) and has slope 1 – x.
Solution
dy
----- = 1 - x dy = (1 – x) dx
dx

∫dy = ∫(1 – x) dx y = x – ½x² + C

At y(1) = 0
0 = 1 – ½(1)² + C  0=½+C

y = x – ½x² - ½
Separable Equations
Example (6)
A formula for acceleration, a, of a point P moving on a line is a= 6t - 6,
where s = 0, v = 2 and t = 0. Find the law of motion.

Solution
a(t) = 6t – 6 dv
----- = a(t ) = 6t – 6
dt
∫dv = ∫(6t – 6) dt

v(t) = 3t² – 6t + v0 At v = 2 and t = 0 v(0) = 3(0)² – 6(0) + v0 = 2


ds
v0 = 2 v(t) = 3t² – 6t + 2 ----- = v(t) = 3t² – 6t + 2
dt

∫ds = ∫(3t² + 6t + 2) dt s(t) = t³ + 3t² + 2t + s0

At s = 0 and t = 0 s(0) = 0³ + 3(0)² + 2(0) + s0 = 0

s0 = 0 s(t) = t³ + 3t² + 2t
Separable Equations
Example (7)

dy x y2  x2  C
 y4  3
dx y
y ( 4)  3 32  4 2  C
ydy   xdx .
C  25
 ydy   xdx
1 2 1 2
y   x c y  x  25
2 2

2 2
y 2   x 2  2c
Separable Equations
Example (8)
dy uy du  dy
y cos x  e y sin 2 x
dx dv  e  y dy v  e  y
y0  0
  dy
y y y
ye dy   ye  e
y sin 2. x
ye dy  dx

y y y
cos x ye dy   ye  e c
sin 2 x
 ye dy   cos x dx
y

 yey
dy   y  1e y
c

 dy   2 sin xdx
y
ye
 2 sin xdx  2 cos x
Separable Equations

2 cos x   y  1e  y  c

y0  0
.

2 cos 0  0  1e 0  c

c 1

2 cos x  1   y  1e  y
Separable Equations

Exercise I:
Solve the following DE by separation of variables:
dy
 sin 5 x dy
dx  e 3 x2 y
dx
  x  1
dy 2
dy  2 y  3 
. 2
dx  
dx  4 x  5 
dx  e dy  0
3x

dx  x dy  0
2 e y

 1 sin xdx  1  cos x dy, y 0  0

dy y 2  1
dx 1  2 y 2
 2 , y 2  2
 dx x  1
dy y sin x
II. Linear equations

Learning Objective

At the end of this section you should be able to identify


and solve a linear DE.
II. Linear Equations

Definition

A first-order DE of the form

a1 x   a0 x  y  g ( x)
dy
dx
is said to be linear equation in the dependent variable y.
II. Linear Equations

Definition

Singular points
a1 x   a0 x  y  g ( x)
dy
dx

Values of x that will make a1 x   0 , are called singular


points of the equation.
Example (10) x  1  3 y  ln x
dy
dx

x 1 is a singular point.
II. Linear Equations
Example (11)
What are the singular points of this differential equation?

Solution

1- First, put the equation into the following form:

Doing so gives you


II. Linear Equations

2- Therefore

3- Looks like p(x) and q(x) both become unbounded when 4 −


x2 = 0, so the singular points are

x1 = 2 and x2 = −2
II. Linear Equations

Definition
Integrating factor.

 Px  y  f ( x)
dy
dx
 P  x dx
The function   x   e is defined as the integrating
factor.

Remark:
 P  x dx
 ' x    Px dx e'
 P( x)  ( x)
II. Linear Equations
Example (12)

Find the integrating factor for :


dy
 3y  0
dx
Solution

P( x)  3, f(x)  0

 P  x dx   3dx
 x   e e  e 3 x
II. Linear Equations
Example (13)

Find the integrating factor and Singular point for :


dy
x  4 y  x 6e x
dx
Solution
dy 4 4
 y  x 5e x P( x)   , f(x)  x 5e x
dx x x
4
P  x dx  1
 x   e 
 4 ln x ln x 4
e e
dx
e x  4
x
Singular point : 0
II. Linear Equations
Rules for solving linear first order equations
Step (1)
If the equation is not in standard form and is written

Divide by a ( x ) to bring it to the standard form

with P ( x ) = b( x )/a ( x ) and Q( x ) = c ( x )/a ( x )


II. Linear Equations
Rule for solving linear first order equations
Step (2)
Find the integrating factor

Step (3)
Rewrite the original differential equation in the form
II. Linear Equations
Rules for solving linear first order equations
Step (4)
Integrate the equation in Step 3 to obtain

Step (5)
Divide the result of Step 4 by μ( x ) to obtain the required
general solution of the linear first order differential equation in
Step 1.
II. Linear Equations
Rules for solving linear first order equations
Step (6)
If an initial condition y( x0) = y0 is given, the required solution
of the initial value problem (i.v.p.) is obtained by choosing the
arbitrary constant C in the general solution found in Step 5 so
that y = y0 when x = x0
II. Linear Equations
Example (14)
Solve the following linear DE :
dy
x  4 y  x 6e x
dx
Solution
Step (1)
Divide by ( x ) to bring it to the standard form

dy 4
 y  x 5e x
dx x
4
P( x)  
x Q(x)  x 5e x
II. Linear Equations
Step (2)
Find the integrating factor
4
P( x)  
x

(x)  e  4 / x
 x   4
1
x
Step (3)
Rewrite the original differential equation in the form

d
(  ( x) y ( x))   ( x)Q ( x)
dx
II. Linear Equations
Step (4)
Integrate the equation in Step 3 to obtain
d
 dx
(  ( x) y ( x))    ( x)Q( x)dx

(  ( x) y( x))   x 4 x 5e x dx   xex dx  ( x  1)e x  c


Step (5)
( x 4 y ( x))  ( x  1)e x  c
The general solution of the DF is
y ( x)  x 4 ( x  1)e x  cx 4
II. Linear Equations
Example (15)
Solve the following linear DE :

x  9 dx  xy  0
2 dy

Solution
x
y ' 2 y0
x 9
x
P( x)  2
x 9 Q(x)  0
1 2x

x
 x 2 9
1
P  x dx
 x   e 
dx dx ln x 2  9
e e 2 x 2 9
e 2

1
ln x  9
2 2

e  x2  9
II. Linear Equations

1 1 c
y
μ(x)  μ(x)Q( x)dx 
μ(x)  0 dx 
μ(x)

c

x2  9
II. Linear Equations
Exercise-II:
Solve the following linear DE :

dy
 3x  1 y  e 3 x
1) x  y  x 2 sin x dy
dx 4) x
dx

dy
2) x  4 y  x 3  x 5) xy  y  e x , y1  2
dx

6)  x  1  y  ln x, y 1  10
dy
3) cos x  sin x  y  1
dy
dx dx

You might also like