0% found this document useful (0 votes)
253 views

Ordinary Differential Equations Separation Variables

This document provides a tutorial on using the separation of variables technique to solve ordinary differential equations. It contains sections on the theory of separation of variables, examples of exercises solving differential equations using this method, the answers to the exercises, and a list of standard integrals used in the separation of variables technique. The goal is to teach readers how to use separation of variables to find the general and particular solutions to differential equations.

Uploaded by

Jose Villegas
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
253 views

Ordinary Differential Equations Separation Variables

This document provides a tutorial on using the separation of variables technique to solve ordinary differential equations. It contains sections on the theory of separation of variables, examples of exercises solving differential equations using this method, the answers to the exercises, and a list of standard integrals used in the separation of variables technique. The goal is to teach readers how to use separation of variables to find the general and particular solutions to differential equations.

Uploaded by

Jose Villegas
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 37

Differential Equations

SEPARATION OF VARIABLES

Graham S McDonald

A Tutorial Module for learning the technique


of separation of variables

● Table of contents
● Begin Tutorial


c 2004 [email protected]
Table of contents
1. Theory
2. Exercises
3. Answers
4. Standard integrals
5. Tips on using solutions
Full worked solutions
Section 1: Theory 3

1. Theory
If one can re-arrange an ordinary differential equation into the follow-
ing standard form:

dy
= f (x)g(y),
dx

then the solution may be found by the technique of SEPARATION


OF VARIABLES:
Z Z
dy
= f (x) dx .
g(y)

This result is obtained by dividing the standard form by g(y), and


then integrating both sides with respect to x.

Toc JJ II J I Back
Section 2: Exercises 4

2. Exercises
Click on Exercise links for full worked solutions (there are 16 exer-
cises in total)

Exercise 1.
dy
Find the general solution of = 3x2 e−y and the particular solution
dx
that satisfies the condition y(0) = 1

Exercise 2.
dy y
Find the general solution of =
dx x

Exercise 3.
dy y+1
Solve the equation = given the boundary condition: y = 1
dx x−1
at x = 0

● Theory ● Answers ● Integrals ● Tips


Toc JJ II J I Back
Section 2: Exercises 5

Exercise 4.
dy
Solve y 2 = x and find the particular solution when y(0) = 1
dx

Exercise 5.
dy
Find the solution of = e2x+y that has y = 0 when x = 0
dx

Exercise 6.
xy dy
Find the general solution of =
x+1 dx

Exercise 7.
dy
Find the general solution of x sin2 y. = (x + 1)2
dx

● Theory ● Answers ● Integrals ● Tips


Toc JJ II J I Back
Section 2: Exercises 6

Exercise 8.
dy π
Solve = −2x tan y subject to the condition: y = 2 when x = 0
dx

Exercise 9.
dy
Solve (1 + x2 ) + xy = 0
dx
and find the particular solution when y(0) = 2

Exercise 10.
dy
Solve x = y 2 + 1 and find the particular solution when y(1) = 1
dx

Exercise 11.
dy
Find the general solution of x = y2 − 1
dx

● Theory ● Answers ● Integrals ● Tips


Toc JJ II J I Back
Section 2: Exercises 7

Exercise 12.
1 dy x
Find the general solution of = 2
y dx x +1

Exercise 13.
dy y
Solve = and find the particular solution when y(1) = 3
dx x(x + 1)

Exercise 14.
dy
Find the general solution of sec x · = sec2 y
dx

Exercise 15.
dy
Find the general solution of cosec3 x = cos2 y
dx

● Theory ● Answers ● Integrals ● Tips


Toc JJ II J I Back
Section 2: Exercises 8

Exercise 16.
dy
Find the general solution of (1 − x2 ) + x(y − a) = 0 , where a is
dx
a constant

● Theory ● Answers ● Integrals ● Tips


Toc JJ II J I Back
Section 3: Answers 9

3. Answers

1. General solution is y = ln(x3 + A) , and particular solution is


y = ln(x3 + e) ,

2. General solution is y = kx ,

3. General solution is y + 1 = k(x − 1) , and particular solution


is y = −2x + 1 ,
y3 x2
4. General solution is 3 = 2 + C , and particular solution is
2
y 3 = 3x2 + 1 ,

1 2x

5. General solution is y = −  ln − 2 e − C , and particular
2x
solution is y = − ln 3−e
2 ,

6. General solution is ex = ky(x + 1) ,

Toc JJ II J I Back
Section 3: Answers 10
y 2
1 x
7. General solution is 2 − 4 sin 2y = 2 + 2x + ln x + C ,

2
8. General solution is sin y = e−x +A
, and particular solution is
2
sin y = e−x ,
1
9. General solution is y(1 + x2 ) 2 = k , and particular solution is
1
y(1 + x2 ) 2 = 2 ,

10. General solution is tan−1 y = ln x + C, and particular solution


is tan−1 y = ln x + π4 ,

11. General solution is y − 1 = kx2 (y + 1) ,

12. General solution is y 2 = k(x2 + 1) ,

kx 6x
13. General solution is y = x+1 , and particular solution is y = x+1 ,

Toc JJ II J I Back
Section 3: Answers 11

14. General solution is 2y + sin 2y = 4 sin x + C ,

1
15. General solution is tan y = − cos x + 3 cos3 x + C ,

1
16. General solution is y − a = k(1 − x2 ) 2 .

Toc JJ II J I Back
Section 4: Standard integrals 12

4. Standard integrals
R R
f (x) f (x)dx f (x) f (x)dx
n xn+1 n 0 [g(x)]n+1
x n+1 (n 6= −1) [g (x)] g (x) n+1 (n 6= −1)
1 g 0 (x)
x ln |x| g(x) ln |g (x)|
x ax
e ex a x
ln a (a > 0)
sin x − cos x sinh x cosh x
cos x sin x cosh x sinh x
tan x − ln
|cos x| tanh x ln cosh x
cosec x ln tan x2 cosech x ln tanh x2
sec x ln |sec x + tan x| sech x 2 tan−1 ex
sec2 x tan x sech2 x tanh x
cot x ln |sin x| coth x ln |sinh x|
sin2 x x
2 −
sin 2x
4 sinh2 x sinh 2x
4 − x2
cos2 x x
2 +
sin 2x
4 cosh2 x sinh 2x
4 + x2

Toc JJ II J I Back
Section 4: Standard integrals 13

R R
f (x) f (x) dx f (x) f (x) dx

1 1
tan−1 x 1 1 a+x
a2 +x2 a a a2 −x2 2a ln a−x (0 < |x| < a)

1 1 x−a
(a > 0) x2 −a2 2a ln x+a (|x| > a > 0)


2 2
√ 1 sin−1 x √ 1 ln x+ aa +x (a > 0)

a2 −x2 a a2 +x2

2 2
(−a < x < a) √ 1 ln x+ xa −a (x > a > 0)

x2 −a2

√ a2
√ a2
h √ i
sinh−1 x a2 +x2
 −1 x
 x

a2 − x2 2 sin a a2 +x2 2 a + a2

√ i √ h √ i
a2
a2 −x2
− cosh−1
2 2
+x x
+ x xa2−a

a2 x2 −a2 2 a

Toc JJ II J I Back
Section 5: Tips on using solutions 14

5. Tips on using solutions

● When looking at the THEORY, ANSWERS, INTEGRALS, or


TIPS pages, use the Back button (at the bottom of the page) to
return to the exercises.

● Use the solutions intelligently. For example, they can help you get
started on an exercise, or they can allow you to check whether your
intermediate results are correct.

● Try to make less use of the full solutions as you work your way
through the Tutorial.

Toc JJ II J I Back
Solutions to exercises 15

Full worked solutions


Exercise 1.
dy
This is of the form = f (x)g(y) , where f (x) = 3x2 and
dx
g(y) = e−y , so we can separate the variables and then integrate,
Z Z
i.e. ey dy = 3x2 dx i.e. ey = x3 + A
(where A = arbitrary constant).
i.e. y = ln(x3 + A) : General solution

Particular solution: y(x) = 1 when x = 0 i.e. e1 = 03 + A

i.e. A = e and y = ln(x3 + e) .

Return to Exercise 1

Toc JJ II J I Back
Solutions to exercises 16

Exercise 2.
dy
This is of the form = f (x)g(y) , where f (x) = x1 and
dx
g(y) = y, so we can separate the variables and then integrate,

Z Z
dy dx
=
y x

i.e. ln y
= ln x + C
= ln x + ln k (ln k = C = constant)
i.e. ln y − ln x = ln k
i.e. ln(y/x) = ln k
i.e. y = kx .
Return to Exercise 2

Toc JJ II J I Back
Solutions to exercises 17

Exercise 3.
Find the general solution first. Then apply the boundary condition
to get the particular solution.

dy 1
Equation is of the form: = f (x)g(y), where f (x) = x−1
dx
g(y) = y + 1
so separate variables and integrate.
Z Z
dy dx
i.e. =
y+1 x−1

i.e. ln(y + 1) = ln(x − 1) + C


= ln(x − 1) + ln k (k = arbitrary constant)

i.e. ln(y + 1) − ln(x − 1) = ln k


 
y+1
i.e. ln = ln k
x−1

Toc JJ II J I Back
Solutions to exercises 18

y+1
i.e. =k
x−1

i.e. y + 1 = k(x − 1) (general solution)

Now determine k for particular solution with y(0) = 1.

x=0
gives 1 + 1 = k(0 − 1)
y=1
i.e. 2 = −k
i.e. k = −2

Particular solution: y + 1 = −2(x − 1) i.e. y = −2x + 1 .

Return to Exercise 3

Toc JJ II J I Back
Solutions to exercises 19

Exercise 4.
Use separation of variables to find the general solution first.
y3 x2
Z Z
y 2 dy = x dx i.e. = +C
3 2
(general solution)

1 1
Particular solution with y = 1, x = 0 : 3 = 0 + C i.e. C = 3

3x2
i.e. y 3 = 2 +1.

Return to Exercise 4

Toc JJ II J I Back
Solutions to exercises 20

Exercise 5.
General solution first then find particular solution.
dy
Write equation as: = e2x ey (≡ f (x)g(y))
dx
Separate variables Z Z
dy
and integrate: = e2x dx
ey

i.e. −e−y = 12 e2x + C

i.e. e−y = − 12 e2x − C

−y = ln − 12 e2x − C

i.e.

y = − ln − 12 e2x − C .

i.e.

Toc JJ II J I Back
Solutions to exercises 21
x=0
0 = − ln − 21 − C

Particular solution: gives
y=0

i.e. − 12 − C = 1

i.e. C = − 32
 
3−e2x
∴ y = − ln 2 .

Return to Exercise 5

Toc JJ II J I Back
Solutions to exercises 22

Exercise 6.
Separate variables and integrate:
Z Z
x dy
dx =
x+1 y
%
Numerator and denominator of same degree in x: reduce degree of
numerator using long division.
x x+1−1 x+1 1 1
i.e. x+1 = x+1 = x+1 − x+1 =1− x+1
R 1
 R dy
i.e. 1− x+1 dx = y

i.e. x − ln(x + 1) = ln y + ln k (ln k = constant of integration)


i.e. x = ln(x + 1) + ln y + ln k
= ln[ky(x + 1)]
i.e. ex = ky(x + 1) . General solution.
Return to Exercise 6
Toc JJ II J I Back
Solutions to exercises 23

Exercise 7.
Separate variables and integrate:

(x + 1)2
Z Z
2
i.e. sin ydy = dx
x
Z Z 2
1 x + 2x + 1
i.e. (1 − cos 2y)dy = dx
2 x
Z Z Z  
1 1 1
i.e. dy − cos 2ydy = x+2+ dx
2 2 x
1 1 1 1 2
i.e. y − · sin 2y = x + 2x + ln x + C .
2 2 2 2
Return to Exercise 7

Toc JJ II J I Back
Solutions to exercises 24

Exercise 8.
General solution first.
dy
Separate variables: i.e. = −2x dx
tan y
Z Z
Integrate: i.e. cot y dy = −2 xdx

x2
i.e. ln(sin y) = −2 · 2 +A

i.e. ln(sin y) = −x2 + A


2
i.e. sin y = e−x +A

 Z Z 0 
cos y f (y)
Note: dy is of form dy = ln[f (y)] + C
sin y f (y)

Toc JJ II J I Back
Solutions to exercises 25
π
Particular solution: y= 2 when x = 0

gives sin π2 = eA

i.e. 1 = eA

i.e. A=0
2
∴ Required solution is sin y = e−x .

Return to Exercise 8

Toc JJ II J I Back
Solutions to exercises 26

Exercise 9.
Separate variables and integrate:
dy
(1 + x2 ) = −xy
Z dx Z
dy x
i.e. = − dx
y 1 + x2
Z Z
dy 1 2x
i.e. = − dx
y 2 1 + x2
R 0 (x)
[compare with ff (x) dx]
i.e. ln y = − 12 ln(1 + x2 ) + ln k (ln k = constant)
1
i.e. ln y + ln(1 + x2 ) 2 = ln k
h 1
i
i.e. ln y(1 + x2 ) 2 = ln k

1
i.e. y(1 + x2 ) 2 = k, (general solution).

Toc JJ II J I Back
Solutions to exercises 27

Particular solution

y(0) = 2, i.e. y(x) = 2 when x = 0


1
i.e. 2(1 + 0) 2 = k
i.e. k=2
1
i.e. y(1 + x2 ) 2 = 2 .
Return to Exercise 9

Toc JJ II J I Back
Solutions to exercises 28

Exercise 10.
Z Z
dy dx
2
=
y +1 x
 Z 
dy
Standard integral: = tan−1 y + C
1 + y2
i.e. tan−1 y = ln x + C. General solution.

Particular solution with y = 1 when x = 1:


tan π4 = 1 ∴ tan−1 (1) = π
4 , while ln 1 = 0 (i.e. 1 = e0 )
π π
∴ 4 =0+C i.e. C = 4

Particular solution is: tan−1 y = ln x + π


4 .
Return to Exercise 10

Toc JJ II J I Back
Solutions to exercises 29

Exercise 11.

Z Z
dy dx
=
y2 − 1 x
1 A B A(y + 1) + B(y − 1)
Partial fractions : 2 = + =
y −1 y−1 y+1 (y − 1)(y + 1)
(A + B)y + (A − B)
=
y2 − 1

Compare numerators: 1 = (A + B)y + (A − B) [true for all y]


A+B =0
A−B =1
2A = 1

∴ A = 12 , B = − 12 .

Toc JJ II J I Back
Solutions to exercises 30
A B dx
R R
i.e. y−1 + y+1 dy = x

1 1 1 dx
R R
i.e. 2 y−1 − y+1 dy = x

1
i.e. 2 [ln(y − 1) − ln(y + 1)] = ln x + ln k

i.e. ln(y − 1) − ln(y + 1) − 2 ln x = 2 ln k


h i
y−1
i.e. ln (y+1)x2 = 2 ln k

i.e. y − 1 = k 0 x2 (y + 1), (k 0 = k 2 = constant) .

Return to Exercise 11

Toc JJ II J I Back
Solutions to exercises 31

Exercise 12.
Z Z Z
dy x 1 2x
= 2
dx = 2
dx
y x +1 2 x +1
 Z 0 
f (x)
Note : dx = ln[f (x)] + A
f (x)
1
ln x2 + 1 + C

i.e. ln y =
2
1 1
ln y 2 = ln x2 + 1 + C {get same coefficients to

i.e.
2 2
allow log manipulations}
2
 
1 y
i.e. ln 2 = C
2 x +1
y2
i.e. = e2C
x2 + 1
i.e. y 2 = k x2 + 1 , (where k = e2C = constant) .


Return to Exercise 12
Toc JJ II J I Back
Solutions to exercises 32

Exercise 13. Z Z
dy dx
=
y x(x + 1)
Use partial fractions:
1 A B A(x + 1) + Bx
= + =
x(x + 1) x x+1 x(x + 1)
(A + B)x + A
=
x(x + 1)

Compare numerators: 1 = (A + B)x + A (true for all x)


i.e. A + B = 0 and A = 1, ∴ B = −1
Z Z  
dy 1 1
i.e. = − dx
y x x+1

i.e. ln y = ln x − ln (x + 1) + C

Toc JJ II J I Back
Solutions to exercises 33

i.e. ln y − ln x + ln (x + 1) = ln k (ln k = C = constant)


 
y(x + 1)
i.e. ln = ln k
x

y(x + 1)
i.e. =k
x
kx
i.e. y = . General solution.
x+1

Particular solution with y(1) = 3:


k
x = 1, y = 3 gives 3= 1+1

i.e. k = 6
6x
i.e. y = x+1 .
Return to Exercise 13

Toc JJ II J I Back
Solutions to exercises 34

Exercise 14.
Z Z
dy dx
=
sec2 y sec x

Z Z
2
i.e. cos y dy = cos x dx
Z Z
1 + cos 2y
i.e. dy = cos x dx
2
y 1 1
i.e. + · sin 2y = sin x + C
2 2 2
i.e. 2y + sin 2y = 4 sin x + C 0

(where C 0 = 4C = constant) .

Return to Exercise 14

Toc JJ II J I Back
Solutions to exercises 35

Exercise 15.
Z Z
dy dx
i.e. =
cos2 y cosec3 x
Z
= sin3 x dx
Z
= sin2 x · sin x dx
Z
= (1 − cos2 x) · sin x dx
Z Z
= sin x dx − cos2 x · sin x dx
| {z }
du
set u = cos x , so = − sin x
dx
and cos2 x · sin x dx = −u2 du

Toc JJ II J I Back
Solutions to exercises 36

LHS is standard integral

sec2 y dy = tan y + A .
R

 3

This gives, tan y = − cos x − − cos3 x + C

cos3 x
i.e. tan y = − cos x + 3 +C .

Return to Exercise 15

Toc JJ II J I Back
Solutions to exercises 37

Exercise 16.
dy
i.e. (1 − x2 ) dx = −x(y − a)
R dy R x
i.e. y−a = − 1−x2 dx

dy −2x f 0 (x)
= + 12
R R R
i.e. y−a 1−x2 dx [compare RHS integral with f (x) dx]
1
i.e. ln(y − a) = 2 ln(1 − x2 ) + ln k
1
i.e. ln(y − a) − ln(1 − x2 ) 2 = ln k
 
y−a
i.e. ln 2
1 = ln k
(1−x ) 2

1
∴ y − a = k(1 − x2 ) 2 .
Return to Exercise 16

Toc JJ II J I Back

You might also like