SEPARATION OF VARIABLES

advertisement
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 g.s.mcdonald@salford.ac.uk
Table of contents
1.
2.
3.
4.
5.
Theory
Exercises
Answers
Standard integrals
Tips on using solutions
Full worked solutions
Section 1: Theory
3
1. Theory
If one can re-arrange an ordinary differential equation into the following 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 exercises 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.
Find the general solution of
xy
dy
=
x+1
dx
Exercise 7.
Find the general solution of x sin2 y.
dy
= (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 =
dx
π
2
when x = 0
Exercise 9.
dy
+ xy = 0
dx
and find the particular solution when y(0) = 2
Solve (1 + x2 )
Exercise 10.
dy
Solve x
= y 2 + 1 and find the particular solution when y(1) = 1
dx
Exercise 11.
Find the general solution of x
dy
= y2 − 1
dx
● Theory ● Answers ● Integrals ● Tips
Toc
JJ
II
J
I
Back
Section 2: Exercises
7
Exercise 12.
Find the general solution of
1 dy
x
= 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.
Find the general solution of sec x ·
dy
= sec2 y
dx
Exercise 15.
Find the general solution of cosec3 x
dy
= 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 ,
4. General solution is
2
y 3 = 3x2 + 1 ,
y3
3
=
x2
2
+ C , and particular solution is
1 2x
5. General solution is y = −
ln − 2 e − C
2x
solution is y = − ln 3−e
,
2
, and particular
6. General solution is ex = ky(x + 1) ,
Toc
JJ
II
J
I
Back
Section 3: Answers
10
7. General solution is
y
2
−
1
4
sin 2y =
2
8. General solution is sin y = e−x
2
sin y = e−x ,
2
x
2
+A
+ 2x + ln x + C ,
, and particular solution is
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) ,
13. General solution is y =
Toc
JJ
kx
x+1 ,
II
and particular solution is y =
J
I
Back
6x
x+1
,
Section 3: Answers
11
14. General solution is 2y + sin 2y = 4 sin x + C ,
15. General solution is tan y = − cos x +
1
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
f (x)
n
x
1
x
x
e
sin x
cos x
tan x
cosec x
sec x
sec2 x
cot x
sin2 x
cos2 x
R
f (x)dx
xn+1
n+1
(n 6= −1)
ln |x|
ex
− cos x
sin x
− ln
|cos x|
ln tan x2 ln |sec x + tan x|
tan x
ln |sin x|
x
sin 2x
2 −
4
x
sin 2x
2 +
4
Toc
JJ
R
f (x)
n
0
[g (x)] g (x)
g 0 (x)
g(x)
x
a
sinh x
cosh x
tanh x
cosech x
sech x
sech2 x
coth x
sinh2 x
cosh2 x
II
J
f (x)dx
[g(x)]n+1
n+1
(n 6= −1)
ln |g (x)|
ax
(a > 0)
ln a
cosh x
sinh x
ln cosh x ln tanh x2 2 tan−1 ex
tanh x
ln |sinh x|
sinh 2x
− x2
4
sinh 2x
+ x2
4
I
Back
Section 4: Standard integrals
f (x)
1
a2 +x2
√ 1
a2 −x2
√
a2 − x2
13
R
f (x) dx
f (x)
1
a
tan−1
1
a2 −x2
R
(a > 0)
1
x2 −a2
f (x) dx
a+x 1
2a ln a−x (0 < |x| < a)
x−a 1
ln
2a
x+a (|x| > a > 0)
sin−1
x
a
√ 1
a2 +x2
√
2
2
ln x+ aa +x (a > 0)
(−a < x < a)
√ 1
x2 −a2
√
2
2
ln x+ xa −a (x > a > 0)
a2
2
−1
sin
√
+x
Toc
x
a
x
a
a2 −x2
a2
JJ
√
i √
a2 +x2
a2
2
x2 −a2
II
a2
2
J
h
h
sinh−1
− cosh−1
I
x
a
i
√
x a2 +x2
2
a
i
√
2
2
+ x xa2−a
+
x
a
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
= 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
This is of the form
(where A = arbitrary constant).
i.e.
y = ln(x3 + A) : General solution
Particular solution: y(x) = 1 when x = 0
i.e. A = e
and
i.e. e1 = 03 + A
y = ln(x3 + e) .
Return to Exercise 1
Toc
JJ
II
J
I
Back
Solutions to exercises
16
Exercise 2.
dy
= f (x)g(y) , where f (x) = x1 and
dx
g(y) = y, so we can separate the variables and then integrate,
This is of the form
Z
i.e.
ln y
=
=
i.e. ln y − ln x =
i.e. ln(y/x) =
i.e.
y =
dy
=
y
Z
dx
x
ln x + C
ln x + ln k
ln k
ln k
kx .
(ln k = C = constant)
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
= 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
Equation is of the form:
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
i.e. ln
y+1
x−1
Toc
= ln k
JJ
II
J
I
Back
Solutions to exercises
i.e.
18
y+1
=k
x−1
i.e. y + 1 = k(x − 1)
(general solution)
Now determine k for particular solution with y(0) = 1.
x=0
y=1
gives
1 + 1 = k(0 − 1)
i.e.
i.e.
2 = −k
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.
Z
Z
x2
y3
=
+C
y 2 dy = x dx i.e.
3
2
(general solution)
Particular solution with y = 1, x = 0 :
1
3
= 0 + C i.e. C =
i.e. y 3 =
1
3
3x2
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
= e2x ey (≡ f (x)g(y))
dx
Write equation as:
Separate variables
Z
and integrate:
Toc
dy
=
ey
Z
e2x dx
i.e.
−e−y = 12 e2x + C
i.e.
e−y = − 12 e2x − C
i.e.
−y = ln − 12 e2x − C
i.e.
y = − ln − 12 e2x − C .
JJ
II
J
I
Back
Solutions to exercises
21
Particular solution:
x=0
y=0
gives
0 = − ln − 21 − C
i.e.
− 12 − C = 1
i.e.
C = − 32
∴
y = − ln
3−e2x
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.
i.e.
x
x+1
=
x+1−1
x+1
x+1
x+1
−
R
dy
y
1
x+1
i.e.
R
i.e.
x − ln(x + 1) = ln y + ln k
i.e.
x = ln(x + 1) + ln y + ln k
1−
1
x+1
=
dx =
=1−
1
x+1
(ln k = constant of integration)
= 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:
Z
i.e.
Z
2
sin ydy
1
(1 − cos 2y)dy
2
Z
Z
1
1
dy −
cos 2ydy
2
2
1 1
1
y − · sin 2y
i.e.
2
2 2
i.e.
i.e.
Toc
JJ
II
(x + 1)2
dx
x
Z 2
x + 2x + 1
=
dx
x
Z 1
=
x+2+
dx
x
1 2
=
x + 2x + ln x + C .
2
Return to Exercise 7
Z
=
J
I
Back
Solutions to exercises
24
Exercise 8.
General solution first.
Separate variables:
i.e.
dy
= −2x dx
tan y
Z
Integrate:
i.e.
Z
cot y dy = −2
xdx
x2
2
i.e.
ln(sin y) = −2 ·
i.e.
ln(sin y) = −x2 + A
i.e.
sin y = e−x
2
+A
+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
gives
when x = 0
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 )
dx
Z
dy
i.e.
y
Z
dy
i.e.
y
= −xy
Z
x
= −
dx
1 + x2
Z
1
2x
= −
dx
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
i
1
i.e. ln y(1 + x2 ) 2 = ln k
1
i.e. y(1 + x2 ) 2 = k,
Toc
(general solution).
JJ
II
J
I
Back
Solutions to exercises
27
Particular solution
y(0) = 2,
i.e.
i.e.
i.e.
i.e.
y(x) = 2 when x = 0
1
2(1 + 0) 2 = k
k=2
1
y(1 + x2 ) 2 = 2 .
Return to Exercise 9
Toc
JJ
II
J
I
Back
Solutions to exercises
28
Exercise 10.
Z
Z
Standard integral:
dy
=
2
y +1
Z
dx
x
dy
= 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
=0+C
i.e. C =
π
4
π
4
, while ln 1 = 0 (i.e. 1 = e0 )
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
dy
y2 − 1
1
A
B
Partial fractions : 2
=
+
y −1
y−1 y+1
Z
=
=
=
dx
x
A(y + 1) + B(y − 1)
(y − 1)(y + 1)
(A + B)y + (A − B)
y2 − 1
1 = (A + B)y + (A − B)
Compare numerators:
[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
B
y+1
30
i.e.
R
A
y−1
i.e.
1
2
R
i.e.
1
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
i.e.
ln
i.e.
y − 1 = k 0 x2 (y + 1),
h
+
1
y−1
−
y−1
(y+1)x2
dy =
1
y+1
i
R
dy =
dx
x
R
dx
x
= 2 ln k
(k 0 = k 2 = constant) .
Return to Exercise 11
Toc
JJ
II
J
I
Back
Solutions to exercises
31
Exercise 12.
Z
Z
x
1
2x
dx
=
dx
2
2
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
i.e.
ln y 2 =
ln x2 + 1 + C {get same coefficients to
2
2
allow log manipulations}
2
y
1
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) .
Toc
dy
=
y
JJ
Z
II
J
Return to Exercise 12
I
Back
Solutions to exercises
32
Exercise 13.
Z
dy
=
y
Z
dx
x(x + 1)
Use partial fractions:
1
A
B
= +
x(x + 1)
x
x+1
=
=
Compare numerators: 1 = (A + B)x + A
i.e. A + B = 0 and A = 1,
Z
i.e.
dy
=
y
Z 1
1
−
x x+1
A(x + 1) + Bx
x(x + 1)
(A + B)x + A
x(x + 1)
(true for all x)
∴ B = −1
dx
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
i.e. ln
i.e.
(ln k = C = constant)
y(x + 1)
= ln k
x
y(x + 1)
=k
x
i.e. y =
kx
.
x+1
General solution.
Particular solution with y(1) = 3:
x = 1, y = 3
gives
3=
k
1+1
i.e. k = 6
i.e. y =
6x
x+1
.
Return to Exercise 13
Toc
JJ
II
J
I
Back
Solutions to exercises
34
Exercise 14.
Z
Z
i.e.
dy
=
sec2 y
2
cos y dy
Z
Z
=
Z
i.e.
i.e.
i.e.
1 + cos 2y
dy
2
y 1 1
+ · sin 2y
2 2 2
2y + sin 2y
(where C 0
dx
sec x
cos x dx
Z
=
cos x dx
=
sin x + C
=
4 sin x + C 0
=
4C = constant) .
Return to Exercise 14
Toc
JJ
II
J
I
Back
Solutions to exercises
35
Exercise 15.
Z
i.e.
dy
cos2 y
Z
dx
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 .
3
tan y = − cos x − − cos3 x + C
R
This gives,
i.e.
tan y = − cos x +
cos3 x
3
+C .
Return to Exercise 15
Toc
JJ
II
J
I
Back
Solutions to exercises
37
Exercise 16.
i.e.
i.e.
dy
(1 − x2 ) dx
= −x(y − a)
R dy
R x
y−a = −
1−x2 dx
dy
y−a
= + 12
R
−2x
1−x2 dx
i.e.
R
i.e.
ln(y − a) =
i.e.
i.e.
ln(y − a) − ln(1 − x2 ) 2 = ln k
y−a
ln
= ln k
1
2
∴
y − a = k(1 − x2 ) 2 .
1
2
[compare RHS integral with
R
f 0 (x)
f (x)
dx]
ln(1 − x2 ) + ln k
1
(1−x ) 2
1
Return to Exercise 16
Toc
JJ
II
J
I
Back
Download