You are on page 1of 6

Math 334

Assignment 1 — Solutions

1. Direction Fields. Sketch the direction field for each of the following ordinary differential equations.

dy dy x2 − y 2 dy x2 dy
(a) = x2 − y 2 , (b) = 2 , (c) = 2, (d) = x − y.
dx dx x + y2 dx y dx
Solution

(a) (b)

(c) (d)

1
Math 334 Assignment 1 — Solutions 2

2. Separable equations. Solve the following initial value problems.


(a) y ′ = x3 (1 − y),y(0) = 3;

(b) dy/dθ = y sin θ, y(0) = 3;
2
(c) dy/dx = ex /y 2 ,y(0) = 1;
√ 2
(d) dy/dx = (1 + y ) 1 + sin x, y(0) = 1.

Solution
dy x4 4
(a) y ′ = x3 (1 − y) =⇒ = x3 dx =⇒ − ln |1 − y| = + C1 =⇒ y = 1 + Ce−x /4 .
1−y 4
4
/4
y(0) = 3 =⇒ C = 2. Therefore the solution is: y(x) = 1 + 2e−x .

dy dy
(b) = y sin θ =⇒ = sin θ dθ =⇒ ln |y| = − cos θ + C1 =⇒ y = Ce− cos θ .
dθ y
√ √ √
y(0) = 3 =⇒ C = 3e. Therefore the solution is: y(θ) = 3e1−cos θ .

2 x
dy ex y3
Z
2 2
(c) = 2 =⇒ y 2 dy = ex dx =⇒ = et dt + C.
dx y 3 0
 Z x 1/3
1 t2
y(0) = 1 =⇒ C = . Therefore the solution is: y(x) = 3 e dt + 1 .
3 0

dy √ dy √ √
(d) = (1 + y 2 ) 1 + sin x =⇒ 2
= 1 + sin x dx =⇒ tan−1 y = −2 1 − sin x + C.
dx 1+y
π π √
y(0) = 1 =⇒ C = + 2. Therefore: y(x) = tan( + 2(1 − 1 − sin x)) .
4 4

3. Interval of definition. By looking at an initial value problem dy/dx = f (x, y) with y(x0 ) = y0 ,
it is not always possible to determine the domain of the solution y(x) or the interval over which the
function y(x) satisfies the differential equation.
(a) Solve the equation dy/dx = xy 3 .
(b) Give explicitly the solutions to the initial value problem with y(0) = 1; y(0) = 1/2; y(0) = 2.
(c) Determine the domains of the solutions in part (b).
(d) As found in part (c), the domains of the solutions depend on the initial conditions. For the initial
value problem dy/dx = xy 3 with y(0) = a, where a > 0, show that as a → 0+ , the domain
approaches the whole real line (−∞, ∞), and as a → +∞, the domain shrinks to a single point.

Solution
dy dy −1 x2 1
(a) = xy 3 =⇒ 3 = x dx =⇒ = + C1 =⇒ y(x) = √ .
dx y 2y 2 2 C − x2
1
(b) i. y(0) = 1 =⇒ C = 1 =⇒ y(x) = √ .
1 − x2
Math 334 Assignment 1 — Solutions 3

1 1
ii. y(0) = =⇒ C = 4 =⇒ y(x) = √ .
2 4 − x2
1 2
iii. y(0) = 2 =⇒ C = =⇒ y(x) = √ .
4 1 − 4x2
1
(c) i. The domain of y(x) = √ is given by 1 − x2 > 0 i.e. |x| < 1.
1 − x2
1
ii. The domain of y(x) = √ is given by 4 − x2 > 0 i.e. |x| < 2.
4 − x2
2 1
iii. The domain of y(x) = √ is given by 1 − 4x2 > 0 i.e. |x| < .
1 − 4x 2 2
1 a
(d) y(0) = a where a > 0 =⇒ C = 2 =⇒ y(x) = √ .
a 1 − a2 x2
1
The domain of this function is given by 1 − a2 x2 > 0, i.e. |x| < .
a
In other words, the domain of the solution is given by: D(y(x)) = (−1/a, 1/a).
Thus, we have

lim D(y(x)) = lim (−1/a, 1/a) = (−∞, ∞); i.e. the entire real line,
a→0+ a→0+

whereas
lim D(y(x)) = lim (−1/a, 1/a) = (−0, 0) = {}; i.e. the empty set.
a→+∞ a→+∞

4. Exact equations. For each of the following equations, find the most general function M (x, y) so that
the equation is exact:

(a) M (x, y)dx + (sec2 y − x/y)dy = 0;


(b) M (x, y)dx + (sin x cos y − xy − e−y )dy = 0.
Solution
∂M ∂N 1
(a) The equation M (x, y)dx + (sec2 y − x/y)dy = 0 is exact if = =− .
∂y ∂x y
dy
Z
This means that M (x, y) = − = − ln |y| + g(x) for an arbitrary function g.
y
(b) The equation M (x, y)dx + (sin x cos y − xy − e−y )dy = 0 is exact if
∂M ∂N
= = cos x cos y − y. This means that
∂y ∂x Z
y2
M (x, y) = (cos x cos y − y) dy = cos x sin y − + g(x) for an arbitrary function g.
2

5. Integrating factors I. Solve the following differential equations:


(a) (3x2 + y)dx + (x2 y − x)dy = 0;
(b) (y 2 + 2xy)dx − x2 dy = 0.

Solution
Math 334 Assignment 1 — Solutions 4

(a) From the equation


(3x2 + y)dx + (x2 y − x)dy = 0
∂M ∂N
we have M (x, y) = 3x2 + y and N (x, y) = x2 y − x, which leads to = 1 and = 2xy − 1.
 ∂y
 ∂x
∂M ∂N 1 ∂M ∂N 2
Since 6= the equation is not exact. However, − = − which implies that
∂y ∂x N ∂y ∂x x
1 dµ 2
there exists an integrating factor, depending only on x, which satisfies = − . An integrating
µ dx x
1
factor is therefore given by µ(x) = 2 . Multiplying through by µ leads to the equation
x
y 1
(3 + )dx + (y − )dy = 0,
x2 x
which is exact. There exists a function F which satisfies
∂F y ∂F 1
= 3 + 2, =y− . (1)
∂x x ∂y x
y
The first of these implies F (x, y) = 3x − + g(y). Differentiating with respect to y and comparing
x
y2
the result with the second equation in (1) leads to g′ (y) = y or g(y) = .
2
The solution to the original equation is

y y2
3x − + =C .
x 2

(b) From the equation


(y 2 + 2xy)dx − x2 dy = 0
∂M ∂N
we have M (x, y) = y 2 + 2xy and N (x, y) = −x2 , which leads to = 2x + 2y and = −2x.
 ∂y  ∂x
∂M ∂N 1 ∂N ∂M 2
Since 6= the equation is not exact. However, − = − which implies that
∂y ∂x M ∂x ∂y y
1 dµ 2
there exists an integrating factor, depending only on y, which satisfies = − . An integrating
µ dy y
1
factor is therefore given by µ(y) = 2 . Multiplying through by µ leads to the equation
y

2x x2
(1 + 2
)dx − 2 dy = 0,
y y
which is exact. There exists a function F which satisfies
∂F 2x ∂F x2
=1+ , = − 2. (2)
∂x y ∂y y
x2
The first of these implies F (x, y) = x + + g(y). Differentiating with respect to y and comparing
y
the result with the second equation in (2) leads to g′ (y) = 0 or g(y) = constant.
The solution to the original equation is

x2 x2
x+ =C or y(x) = .
y C −x
Math 334 Assignment 1 — Solutions 5

6. Integrating factors II. Find integrating factors of the form xn y m to solve the following equations:
(a) (2y 2 − 6xy)dx + (3xy − 4x2 )dy = 0;
(b) (12 + 5xy)dx + (6xy −1 + 3x2 )dy = 0.
Solution

(a) Multiply the equation by µ(x, y) to get

(2xny m+2 − 6xn+1 y m+1 ) dx + (3xn+1 y m+1 − 4xn+2 y m ) dy = 0.

∂ ∂
For this equation to be exact requires (2xny m+2 − 6xn+1 y m+1 ) = (3xn+1 y m+1 − 4xn+2 y m ),
∂y ∂x
which implies that

2(m + 2)xny m+1 − 6(m + 1)xn+1 y m = 3(n + 1)xny m+1 − 4(n + 2)xn+1 y m . (3)

Upon rearrangement we get [(2m − 3n + 1)y − 2(3m − 2n − 1)x]xny m = 0. This is true if


2m − 3n + 1 = 0 and 3m − 2n − 1 = 0, which yields m = n = 1. Therefore, an integrating factor
which renders the equation exact is µ(x, y) = xy and equation (3) becomes

(2xy 3 − 6x2 y 2 ) dx + (3x2y 2 − 4x3 y) dy = 0,

which is easily solved to give


x2 y 3 − 2x3 y 2 = C .

(b) Multiply the equation by µ(x, y) to get

(12xny m + 5xn+1 y m+1 ) dx + (6xn+1 y m−1 + 3xn+2 y m ) dy = 0.

∂ ∂
For this equation to be exact requires (12xny m + 5xn+1 y m+1 ) = (6xn+1 y m−1 + 3xn+2 y m ),
∂y ∂x
which implies that

12mxny m−1 + 5(m + 1)xn+1 y m = 6(n + 1)xny m−1 + 3(n + 2)xn+1 y m . (4)

Upon rearrangement we get [6(2m − n − 1)y −1 + (5m − 3n − 1)x]xny m = 0. This is true if


2m − n − 1 = 0 and 5m − 3n − 1 = 0, which yields m = 2, n = 3. Therefore, an integrating factor
which renders the equation exact is µ(x, y) = x3 y 2 and equation (4) becomes

(12x3y 2 + 5x4 y 3 ) dx + (6x4 y + 3x5 y 2 ) dy = 0,

which is easily solved to give


3x4 y 2 + x5 y 3 = C .

7. Integrating factors III. Show that if (∂N/∂x − ∂M/∂y)/(xM − yN ) depends only on the product
xy, that is
∂N/∂x − ∂M/∂y
= H(xy),
xM − yN
then the equation M (x, y)dx + N (x, y)dy = 0 has an integrating factor of the form µ = µ(xy). Give
the general formula for µ(xy).
Math 334 Assignment 1 — Solutions 6

Solution
We look for an integrating factor of the form µ = µ(xy). Multplying through by µ gives

µ(xy)M (x, y) dx + µ(xy)N (x, y) dy = 0,

∂ ∂
which is exact if (µ(xy)M (x, y)) = (µ(xy)N (x, y)). Expanding yields
∂y ∂x

∂M ∂N
µ(xy) + xµ′ (xy)M = µ(xy) + yµ′ (xy)N,
∂y ∂x
which upon rearrangement results in

µ′ (xy) ∂N/∂x − ∂M/∂y


= . (5)
µ(xy) xM − yN

Thus, we see that an integrating factor of the form µ = µ(xy) exists provided that the R.H.S. of (5)
satisfies
∂N/∂x − ∂M/∂y
= H(xy)
xM − yN
for some function H. The formula for the integrating factor is then given by
R
H(t) dt
µ(t) = e .

You might also like