1st Order ODE-1
1st Order ODE-1
dy
1. The solution of equation of the form = f ( x) .
dx
dy
A differential equation of the form = f ( x) is solved by direct integration, i.e.
dx
y = ∫ f ( x)dx .
dy
Example 1: Find the general solution of the ODE = 3 x 2 − sin 2 x .
dx
Solution: Integrating both sides of the equation gives y = ∫ ( 3 x 2 − sin 2 x )dx
1
i.e. y = x3 + cos 2 x + c .
2
dy
Example 2: Find the general solution of x = 2 − 4 x3 .
dx
2
Solution: Rearranging and integrating both sides of the equation gives y = ∫ − 4 x 2 dx
x
4 3
i.e. y = 2 ln x − x + c .
3
Example 3: Find the equation of the curve that passes by θ = 2 when t = 1 , with gradient
dθ
given by 2t t − = 5.
dt
5
Solution: Rearranging and integrating both sides of the equation gives θ = ∫ t − dt
2t
2
t 5 3
i.e. θ = − ln t + c . when t = 1 , θ = 2 ⇒ c = .
2 2 2
2
Therefore θ = − ln t + or θ = ( t 2 − 5ln t + 3) .
t 5 3 1
2 2 2 2
Salah Beddiaf 1
Differential Equations
dy
2. The solution of equation of the form = f ( y) .
dx
dy dy
A differential equation of the form = f ( y ) is rearranged to give dx = and then the
dx f ( y)
dy
solution is obtained by direct integration i.e. x = ∫ .
f ( y)
dy
Example 1: Find the general solution of the ODE = 3+ 2y .
dx
dy
Solution: Rearranging and integrating both sides of the equation gives x = ∫
3+ 2y
1
i.e. x = ln(3 + 2 y ) + c .
2
y2 1
i.e. x = − ln y + c , given that y = 1 when x = 2 1 ⇒ c = 2
6 3 6
2
y 1
Therefore x = − ln y + 2 .
6 3
dR
Solution: Rearranging and integrating both sides of the equation gives ∫ dθ = ∫ α R
1 1
i.e. θ = ln R + c , given that R = R0 when θ = 0 c ⇒ c = − ln R0
α α
1 1 1 R R
Therefore θ = ln R − ln R0 = ln , or eαθ = ⇒ R = R0 eαθ .
α α α R0 R0
Salah Beddiaf 2
Differential Equations
dy
3. The solution of equation of the form = f ( x) g ( y ) .
dx
dy
A differential equation of the form = f ( x) g ( y ) , where f ( x) is a function of x only
dx
dy
f ( y ) and is a function of y only, may be rearranged as = f ( x)dx , and then the solution
g ( y)
dy
is obtained by direct integration, i.e. ∫
g ( y) ∫
= f ( x)dx .
When two variables are rearranged into two separable groups as shown above, each
containing only one variable, the variables are said to be separable.
dy dy
The differential equations of the form = f ( x) and = g ( y ) are special cases of
dx dx
‘separating the variables’.
dy 3x 3 − 1
Example 1: Solve = .
dx 3 − 2 y
Solution: Separating and integrating both sides of the equation gives
3x 4
∫ (3 − 2 y )dy = ∫ (3x − 1)dx i.e. 3 y − y = 4 − x + c .
3 2
dy
Example 2: Solve the equation 4 xy = y2 −1 .
dx
4y 1
Solution: Separating and integrating both sides of the equation gives ∫ 2 dy = ∫ dx
y −1 x
i.e. 2 ln( y − 1) = ln x + c or if c = ln A (A constant)
2
1 1 2 1
Gives c = − , Therefore e2θ = e3t − , or 3e 2θ = 4e3t − 1 .
6 2 3 6
Salah Beddiaf 3
Differential Equations
y=
∫ dx
.
e∫
P ( x ) dx
1 dy
Example 1: Solve + 4 y = 2 given the boundary conditions x = 0 when y = 4 .
x dx
Solution:
dy
i) Rearranging the equation gives + 4 xy = 2 x i.e. P( x) = 4 x and Q( x) = 2 x .
dx
∫ P( x)dx = ∫ 4 xdx = 2 x (no constant of integration is required here)
2
ii)
IF = e2 x
2
iii)
dy 2 x2
+ e 4 xy = 2 xe 2 x
2 2
iv) multiply the ODE by the IF gives e2 x
dx
or
d
dx
( 2
)
ye 2 x = 2 xe2 x
2
∫ dx ( ye )dx = ∫ 2 xe
d 2 x2 2 x2
v) integrate both sides gives dx
1 2 7
ye 2 x = e 2 x + c when x = 0 , y = 4 gives c = .
2
2 2
2 1 2 7
2 2
1
Therefore ye 2 x = e2 x + or y = 1 + 7e−2 x .
2
2
( )
dy 1
Example 2: Find the general solution of the equation = y+x.
dx x
Solution:
dy 1 1
i) Rearranging the equation gives − y = x i.e. P( x) = − and Q( x) = x .
dx x x
1
ii) ∫ P( x)dx = ∫ − x dx = − ln x (no constant of integration is required here)
1
iii) IF =
x
1 dy 1 d 1
iv) multiply the ODE by the IF gives − 2 y = 1 or y =1
x dx x dx x
Salah Beddiaf 4
Differential Equations
1 1
v) integrate both sides gives y = ∫ 1dx , y = x + c Therefore y = x 2 + cx .
x x
dy
Example 3: Find the solution of the equation sin x + y cos x = 1 , which satisfies the
dx
π
condition y = π .
2
Solution:
dy
i) Rearranging the equation gives + y cot x = cosec x i.e. P( x) = cot x and
dx
Q( x) = cosec x .
ii) ∫ P( x)dx = ∫ cot xdx = ln ( sin x ) (no constant of integration is required here)
iii) IF = sin x
dy d
iv) multiply the ODE by the IF gives sin x + y cos x = 1 or ( y sin x ) = 1
dx dx
v) integrate both sides gives y sin x = ∫ 1dx
y sin x = x + c or y = ( x + c)cosec x .
π π π
Using the condition y = π then c = , and y = x + cosec x .
2 2 2
ve = ge
m
or
dt
kt kt
v) integrate both sides gives ve m = ∫ ge m dt
kt
mg ktm mg −
kt
ve m = e + c or v = + ce m .
k k
mg mg −
kt
Using the condition v ( 0 ) = 0 then c = − , and v = 1 − e .
m
k k
Salah Beddiaf 5