Você está na página 1de 37

Introduction

Prof. N. Magaji EGR3301 Chapter_1

EGR 3301 Differential Equations

Electrical Engineering Department

Bayero University Kano

CH1_1
Dr. N. Magaji EGR3301 Chapter_1

COURSEOUTLINE

(1) Ordinary Differential Equation


First order equations,
special types of second order equations.
Higher order linear equation with constant coefficients.
Simple solutions, Legendre functions and Harmite functions.
(power series)
(2) Partial differential equation. Poisson’s and Laplace’s
equation.
Application problems in heat transfer (parabolic equations), wave
propagation (hyperbolic equation),
steady – state (elliptic equation).
Problems in different coordinate systems, boundary value
problems. Laplace and Fourier Transforms.
Introduction Differential Equations
Prof. N. Magaji EGR3301 Chapter_1

§1 What is a differential equation?


 A differential equation is an equation involving
derivatives.
,
 Ordinary Differential Equation : (ODE) 4y''  3y'  2y  0
2u 2u
 2  sin x
x y
2

xdy  ydz  zdx  0

Linear vs. Linear differential equations do not contain


non-linear any higher powers non-linear differential
equations do.

CH1_3
Introduction Differential Equations
Prof. N. Magaji EGR3301 Chapter_1

Order Implies the order of the highest derivative appearing in


the equation
First order differential equation with y as the dependent variable and x as the
independent variable would be:
dy
 f  x, y 
dx
Second order differential equation would d2y dy
have the form 2
 f ( x, y, )
dx dx
d2y dy
Example of an Ordinary Differential
Equation
k 2  m  ny  f ( x )
dx dx

CH1_4
Introduction Differential Equations

Solutions

Example : d2y dy d2y 2 dy


3 2  2  2y  0 3( 2 )  2  2y  0
dx dx dx dx
Degree = 1 Degree = 2
Chapter 1 (First order equations)
Contents
Prof. N. Magaji EGR3301 Chapter_1

1.1 Solution By Direct Integration


1.2 Separable Variables
1.3 Linear Equations
1.4 Exact Equations
1.5 Solutions by Substitutions

CH1_6
1.1 Solution By Direct Integration
Prof. N. Magaji EGR3301 Chapter_1

Example 1
Consider dy/dx = f(x, y) = g(x). The DE
dy/dx = g(x) (1)
can be solved by direct integration.
Integrating both sides: 3
3x  5g(x)
y  xy =2
x  c dx +c= G(x) + c.

eg: dy/dx = 1 + e2x, then


y =  (1 + e2x) dx +c= x + ½ e2x + c
(general solution)
Example 2
dy
 Find the function y of dx  3 x 2
 6x  5

 Solution y  x  3x  5x  c
3 2

CH1_7
1.2 Separable Variables
Prof. N. Magaji EGR3301 Chapter_1

DEFINITION 1.1
Separable Equations
A first-order DE of the form dy/dx = f(x,y) is said to
be separable, if dy/dx = g(x)h(y)

Rewrite the above equation as


dy (2)
p ( y )  g ( x)
dx
where p(y) = 1/h(y).
Solution p( y)dy  g ( x)dx  P( y )  G ( x)  c

CH1_8
Example 3
Prof. N. Magaji EGR3301 Chapter_1

dy  x
Solve  , y (4)  3(initial condition IC)
dx y
Solution:
y2 x2
 ydy    xdx and 2   2  c1
We can also rewrite the solution as
x2 + y2 = c2, where c2 = 2c1
Apply the initial condition, 16 + 9 = 25 = c2

See Fig1.1. Thus, y  (25  x2 )1/2 because y(4)=-3.

CH1_9
Prof. N. Magaji EGR3301 Chapter_1
Fig1.1
Example 4
Prof. N. Magaji EGR3301 Chapter_1

 2
 dy
Find the general solution of the equation x  1  xy  0
dx
dy xy dy x
This gives 
2
 
dx x  1
 
 
2
y x 1
dx

Integrating
 
dy x
 dx
2
y x 1
ln y  1 ln x 2  1  A
and simplify, putting ln B  A 2

ln y  ln x 2  1  ln B  ln B x 2  1 
 
hence
y  B x2  1 is the general solution
1.3 Linear Equations
Prof. N. Magaji EGR3301 Chapter_1

Introduction:
Linear DEs are friendly to be solved. We can find
some smooth methods to deal with.

DEFINITION 1.2
Linear Equations

A first-order DE of the form


a1(x)(dy/dx) + a0(x)y = g(x) (1)
is said to be a linear equation in y.

CH1_12
Solving Procedures
Prof. N. Magaji EGR3301 Chapter_1

Standard Form
Standard form of a first-order DE can be written as
dy/dx + P(x)y = f(x) (2)
If (2) is multiplied by e  P ( x ) dx
(3)
then dy
e  P ( x ) dx  e  P ( x ) dx P( x) y  e P ( x ) dx f ( x) (4)
dx
or
d   P ( x ) dx   P ( x ) dx
e y e f ( x) (5)
dx  
Integrating both sides, we get
  (6)

P ( x ) dx P ( x ) dx
e y e f ( x)dx  c

Dividing (6) by e P ( x ) dx gives the solution.


CH1_13
Example 5
Prof. N. Magaji EGR3301 Chapter_1

We call e P ( x ) dx as an integrating factor and we


should only memorize this to solve problems.
Solve dy/dx – 3y = 6. Solution:
Since P(x) = – 3, we have the integrating factor is
e
( 3) dx
 e3 x
then
dy
3 x
e  3e3 x y  6e3 x
dx
is the same as d [e3 x y ]  6e3 x
dx
So e-3xy = -2e-3x + c, a solution is y = -2 + ce3x, - <
x < .
CH1_14
Example 6
Prof. N. Magaji EGR3301 Chapter_1

dy
2 Given 2 cos x  4 y sin x  sin 2 x find y( x ) (ie y as a function of x ), given that
dx
y(0)   (ie y  0 when x   ).
3 3

 Px  y  Qx 
dy
Divide through by 2cos x to write it in the form
dx
dy 2 sin x sin 2 x 2 sin x cos x
 y 
dx cos x 2 cos x 2 cos x
 2 tan x  y  sin x
dy
dx
The equation is linear, integrating factor e 
2 tan x dx

2
 2 tan xdx 2 ln sec x  ln sec x
ln sec 2 x 
hence integrating factor is e  e    sec 2 x
2 tan x dx

CH1_15
Application to Circuits
Prof. N. Magaji EGR3301 Chapter_1

See Fig 1.2 di


L  Ri  E (t ) (7)
dt

Fig 1.2

CH1_16
Example 7
Prof. N. Magaji EGR3301 Chapter_1

Refer to Fig 1.2, where E(t) = 12 Volt, L = ½ Henry


R = 10 Ohms. Determine i(t) where i(0) = 0.
Solution:
1 di
From (7),  10i  12, i(0)  0
2 dt
Then d 20
[e i ]  24e 20t
dt
6
i (t )   ce 20t
5
Using i(0) = 0, c = -6/5, then i(t) = (6/5) – (6/5)e-20t.

CH1_17
Example 7 (cont.)
Prof. N. Magaji EGR3301 Chapter_1

A general solution of (7) is


e ( R / L ) t ( R / L ) t
L 
( R / L ) t
i (t )  e E (t ) dt  ce (11)

When E(t) = E0 is a constant, (11) becomes


Eo
i(t )   ce ( R / L )t (12)
R
where the first term is called a steady-state part, and the
second term is a transient term.

CH1_18
1.4 Exact Equations
Prof. N. Magaji EGR3301 Chapter_1

DEFINITION 1.3

M(x, y) dx + N(x, y) dy is an exact differential


in a region R of the xy-plane, if it corresponds to the
differential of some function f(x, y). A first-order DE
of the form
M(x, y) dx + N(x, y) dy = 0 1
is said to be an exact equation, if the left side is an
exact differential. M  N
y x
2

CH1_19
Exact Equation(cont.)
Prof. N. Magaji EGR3301 Chapter_1

Procedure of Solution for Exact Equation:

Step 1: Check whether differential equation written in the form (1) satisfies (2) or

not.

Step 2: If for given equation (2) is satisfied then there exists a function f for

which
f
 M(x, y) (3)
x

Integrating (3) with respect to x, while holding y constant, we get

f (x, y)   M(x, y)dx  g(y) (4)

where the arbitrary function g(y) is constant of integration

CH1_20
Exact Equation(cont.)
Prof. N. Magaji EGR3301 Chapter_1

f
Step 3: Differentiate (4) with respect to y and assume =N(x,y), we get
y

f 
y y 
 M(x, y)dx  g' (y)  N(x, y)

or

y 
g' (y)  N(x, y)  M(x, y)dx (5)

Step 4: Integrate (5) with respect to y and substitute this value in (4) to obtain

f(x,y)=c, the solution of the given equation.

Step 5 If the equation is not exact, use integrating factor for one variable only

M y Nx N x M y
 dx  dy
 (x)  exp N or  (y)  exp N (6)

Step 6: Multiply the old equation by μ, and, if you can, check that you have a new equation

which is exact. CH1_21


Example 8
Prof. N. Magaji EGR3301 Chapter_1

Solve 2xy dx + (x2 – 1) dy = 0.


Solution:
With M(x, y) = 2xy, N(x, y) = x2 – 1, we have
M/y = 2x = N/x
Thus it is exact.
There exists a function f such that
f/x = 2xy, f/y = x2 – 1
Then
f(x, y) = x2y + g(y)
f/y = x2 + g’(y) = x2 – 1
Hence f(x, y) = x2y – y+c,
g’(y) = -1, g(y) = -y+c

CH1_22
Example 9
Prof. N. Magaji EGR3301 Chapter_1

Example 9
Solve (e2y – y cos xy)dx+(2xe2y – x cos xy + 2y)dy = 0.
Solution:
This DE is exact because
M/y = 2e2y + xy sin xy – cos xy = N/x
Hence a function f exists, and
f/y = 2xe2y – x cos xy + 2y that is,

CH1_23
Example 9(cont.)
Prof. N. Magaji EGR3301 Chapter_1

f ( x, y)  2 x  e2 y dy  x  cos xydy  2 ydy


 xe2 y  sin xy  y 2  h( x)
f 2 y
 e  y cos xy  h '( x)  e2 y  y cos xy
x
Thus h’( x)  0, h( x)  c. The solution is xe2 y – sinxy  y 2  c  0

CH1_24
Example 10
Prof. N. Magaji EGR3301 Chapter_1

dy xy 2  cos x sin x
Solve  , y (0)  2
dx y (1  x )
2
Solution:
Rewrite the DE in the form
(cos x sin x – xy2) dx + y(1 – x2) dy = 0
Since
M/y = – 2xy = N/x (This DE is exact)
Now
f/y = y(1 – x2)
f(x, y) = ½y2(1 – x2) + h(x)
f/x = – xy2 + h’(x) = cos x sin x – xy2

CH2_25
Example 10 (cont.)
Prof. N. Magaji EGR3301 Chapter_1

We have
h(x) = cos x sin x
h(x) = -½ cos2 x+c
Thus ½y2(1 – x2) – ½ cos2 x +c= c1
or
y2(1 – x2) – cos2 x = c’

where c’ = 2(c1 -c). Now y(0) = 2, so c’ = 3.


The solution is
y2(1 – x2) – cos2 x = 3

CH1_26
Example 11
Prof. N. Magaji EGR3301 Chapter_1

The nonlinear DE: xy dx + (2x2 + 3y2 – 20) dy = 0 is not


exact. With M = xy, N = 2x2 + 3y2 – 20, we find
My = x, Nx = 4x. Since
M y  Nx x  4x  3x
 2  2 depends on x only
N 2 x  3 y  20 2 x  3 y  20
2 2

Nx  M y 3
 depends only on y.
M y
The integrating factor is
e  3dy/y = e3lny = y3 = (y)

CH1_27
Example 11 (cont.)
Prof. N. Magaji EGR3301 Chapter_1

Multiplying the original equation with μ(y) then the


resulting equation is exact as:
xy4 dx + (2x2y3 + 3y5 – 20y3) dy = 0

The final answer using the previous method result the


solution as:
½ x2y4 + ½ y6 – 5y4 = c

Solve
x  xy  y '  0

CH1_28
1.5 Solutions by Substitutions
Prof. N. Magaji EGR3301 Chapter_1

Introduction
If we want to transform the first-order DE:
dx/dy = f(x, y)
by the substitution y = g(x, u), where u is a function
of x, then
dy du
 g x ( x, u )  g u ( x, u )
dx dx
Since dy/dx = f(x, y), y = g(x, u),
du
f ( x, g ( x, u ))  g x ( x, u )  gu ( x, u )
dx
Solving for du/dx, we have the form du/dx = F(x, u).
If we can get u = (x), a solution is y = g(x, (x)).
CH1_29
Prof. N. Magaji EGR3301 Chapter_1 Solutions by Substitutions

A first-order equation can be changed into a separable


differential equation or into a linear differential equation of
standard form by appropriate substitution.
Two classes of which include: homogeneous and Bernoulli’s
equation.
Homogenous Equations
A function f(.,.) of two variables is called homogeneous
function of degree  if
f(tx, ty)  t  f(x, y) for some real number .
A first order differential equation, M(x,y)dx + N(x,y)dy = 0
is called homogenous if both coefficients M(x,y) and N(x,y) are
homogenous functions of the same degree.
Method of Solution for Homogenous Equations: A
homogeneous differential equation can be solved by either
substituting y=ux or x=vy, where u and v are new dependent
variables.. CH11_30
homogeneous
Prof. N. Magaji EGR3301 Chapter_1
Example 12
Solve the following homogenous equations:
a) (x-y)dx + xdy = 0
b) (y2+yx)dx + x2dy = 0
Solution: (a) Let y=ux, then the given equation takes
the form
 (x-ux)dx + x(udx + xdu) = 0
 or dx + xdu = 0
 or dx/x + du = 0
 or lnx+u = c
 or xlnx+y=cx
CH1_31
Example 11(cont)
Prof. N. Magaji EGR3301 Chapter_1

(b) Let y=ux, then the given equation takes the form

(u2x2 + ux2)dx + x2 (udx + xdu) = 0

or (u2 + 2u)dx + xdu = 0

dx du
or  0
x u(u  2)

Solving this separable differential equation, we get


1 1
ln | x |  lnu lnu  2 c
2 2

x 2u
or  c 1 where c1=2c
u2
y y 
or x2  c 1  2 
x x 

or x 2 y  c1(y  2x)

CH1_32
Bernoulli’s Equation
Prof. N. Magaji EGR3301 Chapter_1

The DE: dy/dx + P(x)y = f(x)yn (4)


where n is any real number, is called Bernoulli’s
Equation.

Note for n = 0 and n = 1, (4) is linear, otherwise, let


u = y1-n
to transform (4) into a linear equation.

CH1_33
Example 13
Prof. N. Magaji EGR3301 Chapter_1

Solve x dy/dx + y = x2y2.


Solution:
Rewrite the DE as a Bernoulli’s equation with n=2:
dy/dx + (1/x)y = xy2
For n = 2, then y = u-1, and
dy/dx = -u-2(du/dx)
From the substitution and simplification,
du/dx – (1/x)u = -x
The integrating factor on (0, ) is
  dx / x ln x ln x 1
e e e  x 1

CH1_34
Example 12 (cont.)
Prof. N. Magaji EGR3301 Chapter_1

du
1 1 1
Integrating x x u   x 1 x
dx x

gives x-1u = -x + c, or u = -x2 + cx.

Since u = y-1, we have y = 1/u and the general


solution of the DE is y = 1/(−x2 + cx).

CH1_35
yy(xu
g
M
FPdx y, )yp)du
)dy
p (x x)

(dx )Ny( fx
yFQdy x)
,g(y(x)rdy xy0
()dx
dx )a0

Recap of the topic


Prof. N. Magaji EGR3301 Chapter_1

1 Separable g ( y ) dy  f ( x ) dx

2 linear y  p( x) y  r( x)

3 Exact M ( x , y ) dx  N ( x , y ) dy  0

4 Integrating Factor FPdx  FQdy  0


g ( u ) du  f ( x ) dx
5 Substitution

y  p( x) y  g ( x) y a
6 Bernoulli
Dr. N. Magaji EGR3301 Chapter_1