First Order Ordinary Differential Equations

community project
mathcentre community project
encouraging
academics to share maths
support resources
First Order
Ordinary
Equation
All mccp resourcesDifferential
are released under a Creative
Commons licence
mccp-richard-1
Introduction
You will need to know about trigonometry, dierentiation, integration, complex
numbers in order to make the most of this teach-yourself resource.
We are looking at equations involving a function y(x) and its rst derivative:
Prerequisites:
dy
+ P(x)y = Q(x)
dx
(1)
We want to nd y(x), either explicitly if possible, or otherwise implicitly.
Direct Integration
This method is used to solve ODEs in the form:
dy
= f(x)
dx
These ODEs can be solved as follows:
dy = f(x)dx
Z
so: y =
f(x)dx
Example
:
dy
= 3x2 − 6x + 5
dx
y = x3 − 3x2 + 5x + C
with C constant of integration
The constant of integration can be anything, unless you have boundary conditions. In the previous
example, if you have y(0)=0 then:
y(0) = C = 0
www.mathcentre.ac.uk
c Morgiane Richard
University of Aberdeen
Shazia Ahmed
University of Glasgow
Separation of Variables
This method is used to solve ODEs in the form:
dy
= f(x)g(y)
dx
mathcentre community project
These ODEs can be solved as follows:
encouraging academics to share maths support resources
All mccp resources are dy
released under a Creative Commons licence
= f(x)dx
g(y)
Z
Z
dy
=
f(x)dx
g(y)
Example
:
dy
2x
=
dx
y+1
(y + 1)dy = 2xdx
Z
Z
(y + 1)dy =
2xdx
1 2
y + y = x2 + C
2
with C constant of integration
Homogeneous Equations
A rst order homogeneous dierential equation is a dierential equation in the form:
dy
y
= f( )
dx
x
These ODEs can be solved by making the substitution y(x) = v(x) · x where v is a function of x.
Then we have:
Using the product rule:
Inserting in the ODE:
Re-arranging:
www.mathcentre.ac.uk
dv
dy
=
·x+v
dx
dx
dv
· x + v = f(v)
dx
dv
dx
=
f(v) − v
x
Z
Z
dv
dx
=
f(v) − v
x
c Morgiane Richard
University of Aberdeen
Shazia Ahmed
University of Glasgow
Example
dy
x + 3y
=
dx
2x
dy
1 3y
Rearranging, we get:
= +
dx
2 2x
1 3
dv
x +v = + v
dx
2 2
encouraging academics
dv
1 1to share maths support resources
All mccp resources
x
= are+released
v under a Creative Commons licence
dx
2 2
dv
dx
=
1+v
2x
1
ln(1 + v) = ln(x) + C = ln(x1/2 ) + C withC constant of
2
Taking the log on both sides: v = eC x1/2 − 1
mathcentre community project
integration
with y = v · x, y = kx3/2 − x, with k = eC
Integrating Factor
This method is used to solve ODEs in the form:
dy
+ P(x)y = Q(x)
dx
These
ODEs can be solved as follows: multiply both sides of the equation by the integrating factor:
R
P(x)dx
e
. Then:
R
R
R
P(x)dx dy
e
dx
P(x)dx
+ P(x)e
P(x)dx
y = Q(x)e
Now we see that, using the product rule and the chain rule:
e
R
P(x)dx dy
dx
+ P(x)e
R
P(x)dx
d R P(x)dx y=
y
e
dx
Therefore:
R
d R P(x)dx e
y = Q(x)e P(x)dx
dx
Z
y = e−
Example
The integrating factor is
R
P(x)dx
dy
− y = x with P(x) = −1
dx
R
e −dx = e−x and:
R
Q(x)e
P(x)dx
dx
and Q(x) = x
dy
− e−x y = xe−x
dx
d
ye−x = xe−x
dx
part: ye−x = −e−x (1 + x) + C
y = −(1 + x) + Cex
e−x
Using integration by
www.mathcentre.ac.uk
c Morgiane Richard
University of Aberdeen
with C constant of integration
Shazia Ahmed
University of Glasgow
Bernouilli Equations
Bernouilli equations are of the form:
dy
+ P(x)y = Q(x)yn
dx
mathcentre community project
These equations are solved with the following method:
encouraging academics to share maths support resources
a Creative Commons
licence
Multiply both sides All
ofmccp
the resources
equationarebyreleased
y−n , under
the equation
becomes:
y−n
dy
+ P(x)y1−n = Q(x)
dx
Make the change of variable v = y1−n , then:
dv
dy
= (1 − n)y−n
dx
dx
so
1 dv
+ P(x)v = Q(x)
1 − n dx
The latest form of the equation can be solved for v using the method of the integrating factor.
Finally, y can be found from the relationship y = vn−1 .
Example:
dy 1
+ y
dx x
dy 1 −1
y−2
+ y
dx x
=
xy2
=
x
dv
1 dy
=− 2
dx
y dx
v = y−1 ,
dv v
−
dx x
=
−x
The integrating factor is IF = e
1 dv
1
− 2v
x dx x
1
v
x
v
y
www.mathcentre.ac.uk
=
=
=
=
R
− x1 dx
= e− ln x =
1
x
−1
Z
−dx
−x2 + Cx
1
2
−x + Cx
c Morgiane Richard
University of Aberdeen
Shazia Ahmed
University of Glasgow
Exercises
dy
dy
= 5x3 + 4
(d) x − y = x3 + 3x2 − 2x
dx
dx
dy
dy
(b) x(y − 3)
= 4y
(e) (1 + x2 ) + 3xy = 5x with y(1) = 2
dx
dx
dy
dy
(c) (2y − x)
= 2x + y with y(2) = 3 (f) 2 + y = y3 (x − 1)
dx
encouraging academics to sharedx
maths support resources
All mccp resources are released under a Creative Commons licence
(a) x
mathcentre community project
Answers
5
(a) y = x3 + 4 ln x + C
3
1
(d) y = x3 + 3x2 − 2x ln x + Cx
2 √
5
8
(1 + x2 )−3/2
(b) y − 3 ln y = 4 ln x + C (e) y = +
3
3
y
y
(c) ( )2 − − 1 + x−2 = 0 (f) y = (x + Ce−x )−1/2
x
x
www.mathcentre.ac.uk
c Morgiane Richard
University of Aberdeen
Shazia Ahmed
University of Glasgow