Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

MAT2384 Assignment #1

Due Tuesday September 25 at the beginning of class.


Late assignments will not be accepted, nor will unstapled assignments.
Student Name

Student Number

By signing below, you declare that this work was your own and that you have not copied from any other
individual or other source.
Signature

1. For each of the following ODEs, find the general solution. If an initial condition is given, find the corresponding particular solution.
(a) (x2 + 9)y 0 = 4 + 4y 2 , y(0) = 1
Separating the equations and integrating, we have
dy
dx
dy = 2
4 + 4y 2
x +9
Z
Z
1
1
1
1
dy =
dx

x 2
4 1 + y2
9
+1
3

1
x
1
tan1 y = tan1
4
9
3

 

+C

Using the initial condition, we have


1
=0+C
4 4
 
4

1
1 x
tan y = tan
+
9
3
4
 



4
1 x
tan
+
y = tan
9
3
4
(b) (3x + y)dx xdy = 0, y(1) = 1
Dividing by the x terms, we have

[1]
dy
y
=
x
dx
dy
y
=3
dx x
3+

This is linear in y, so we use an integrating factor of the form


e

1
dx
x

= e ln x = eln x =

1
x

Thus
d
dx

y
x

 

3
x

y
3
=
dx + C
x
x
= 3 ln x + C
Z

1 = 3 ln(1) + C C = 1
y = 3x ln x + x

(c) (cos y + y 2 cos x + 1)dx + (2y sin x x sin y)dy = 0


If M = cos y + y 2 cos x + 1 and N = 2y sin x x sin y, then
N
= 2y cos x sin y
x

M
= sin y + 2y cos x
y
Hence the equation is exact. Let
Z

F (x, y) =

M (x, y)dx + g(y)


Z

(cos y + y 2 cos x + 1)dx + g(y)

= x cos y + y 2 sin x + x + g(y)


F
= x sin y + 2y sin x + 1 + g 0 (y) = N = 2y sin x x sin y
y
g 0 (y) = 1
g(y) = y
F (x, y) = x cos y + y 2 sin x + x y = C is the solution, in implicit form
(d) (cos y + y cos x)dx + (sin x x sin y)dy = 0, y(/2) = /2
If M = cos y + y cos x and N = sin x x sin y, then
N
= cos x sin y
x

M
= sin y + cos x
y
Hence the equation is exact. Let
Z

F (x, y) =

M (x, y)dx + g(y)


Z

(cos y + y cos x)dx + g(y)

= x cos y + y sin x + g(y)


F
= x sin y + sin x + g 0 (y) = N = sin x x sin y
y
g 0 (y) = 0
g(y) = k
F (x, y) = x cos y + y sin x = C (where the constant k has been absorbed)
Applying the initial condition, we have

cos + sin = C
2
2
2
2

C=
2

x cos y + y sin x =
2
(e) [y cos(x + y)]dx + [sin(x + y) + y cos(x + y)]dy = 0, y(0) = /2
If M = y cos(x + y) and N = sin(x + y) + y cos(x + y), then
M
= cos(x + y) y sin(x + y)
y

N
= cos(x + y) y sin(x + y)
x

Hence the equation is exact. Let


Z

F (x, y) =

M (x, y)dx + g(y)


Z

(y cos(x + y))dx + g(y)

= y sin(x + y) + g(y)
F
= sin(x + y) + y cos(x + y) + g 0 (y) = N = sin(x + y) + y cos(x + y)
y
g 0 (y) = 0
g(y) = k
F (x, y) = sin(x + y) + y cos(x + y) = C (where the constant k has been absorbed)
Applying the initial condition, we have
sin

+ cos = C
2
2
2
C=1

sin(x + y) + y cos(x + y) = 1
(f)

1
x

ey dx + (sin y xey )dy = 0, y(1) = 0

If M =

1
x

ey and N = sin y xey , then

[2]

M
= ey
y

N
= ey
x

Hence the equation is exact. Let


Z

F (x, y) =

M (x, y)dx + g(y)

1
ey )dx + g(y)
x
= ln x xey + g(y)
Z

F
= xey + g 0 (y) = N = sin y xey
y
g 0 (y) = sin y
g(y) = cos x
F (x, y) = ln x xey cos x = C
Applying the initial condition, we have
ln 1 e0 cos 0 = C
C = 2
y

ln x xe cos x = 2
(g) (cos x 2x sin x 2y sin x)dx + cos xdy = 0
N
Note that M
y 6= x , so this equation is not exact.
Rewrite the equation as
dy
cos x + 2x sin x + 2y sin x
=
dx
cos x
= 1 + 2x tan x + 2y tan x

This is linear in y so we look for an integrating factor.


Z

exp(2

sin x
tan xdx) = exp 2
dx
cos x


Z
sin x du
= exp 2
x sin x
 Z

1
= exp 2
du
u
= exp(2 ln u)


u = cos x
du
= sin x
dx
du
=
sin x

= exp(2 ln(cos x))


= exp ln(cos2 x)
= cos2 x
We thus have
d
(y cos2 x) = cos2 x + 2x sin x cos x
dx
Z
Z
y cos2 x =

cos2 xdx +

2x sin x cos xdx + C

Using double angle formulas, we have


cos 2x = cos2 x sin2 x
= 2 cos2 x 1
1
1
cos2 x = cos 2x +
2
2
Z
1
x
2
cos xdx = sin 2x +
4
2
sin 2x = 2 sin x cos x
Z

2x sin x cos xdx =

x sin 2xdx
v 0 = sin 2x
cos 2x
v=
2

u=x
u0 = 1
y cos2 x =

cos2 xdx +

2x sin x cos xdx + C

1
x x
1
= sin 2x cos 2x +
cos 2xdx + C
4
2
2
2
1
x x
1
= sin 2x cos 2x + sin 2x + C
4
2
2
4
sin 2x
x
x cos 2x
sin 2x
C
y=

+
+
2
2
2
2
4 cos x 2 cos x
2 cos x
4 cos x cos2 x
Z

(h) (3xy + y 2 )dx + (x2 + xy)dy = 0. (Hint: Use the substitution v = xy .)


N
Note that M
y 6= x , so this equation is not exact.
Rewrite the equation as
dy
y(3x + y)
=
dx
x(x + y)
y(3 + xy )
=
x(1 + xy )

[3]

If we let v = xy , then
dy
dx
dv
v+x
dx
dv
x
dx
dv
x
dx
Z
1+v
dv
2v(2 + v)

dv
 dx 
3+v
= v
1+v


3+v
v
= v
1+v
4v 2v 2
=
1+v
Z
1
=
dx
x
=x+x

We can use partial fractions to deal with the left-hand side.


1+v
A
B
=
+
2v(2 + v)
2v 2 + v
1 + v = A(2 + v) + b(2v)
v=0
v = 2

1
2
1
B=
4
A=

2A = 1
4B = 1

We thus have
1
1
+
dv = ln x + C
4v 4(2 + v)
1
1
ln v + ln(2 + v) = ln x + C
4
4

2
1
ln
+ 1 = ln x + C
4
v
2
= ke4 ln x 1
v
2
v=
kx4 1
2x
y=
kx4 1

Z 

2. (a) Use the fixed point iteration method to find the root of x4 + 5x 2 in the interval [0, 1] to 5 decimal
places. Start with x0 = 0.4.
We can rewrite x4 + 5x 2 = 0 as x 15 (2 x4 ). Thus the discrete time dynamial system is
1
xn+1 = (2 x4n )
5
x0 = 0.4
x1 = 0.9872
x2 = 0.210045064
x3 = 0.399610704
x4 = 0.39489902
x5 = 0.395136173
x6 = 0.395124522
x7 = 0.395125097
x8 = 0.395125069
Thus x 0.39513.


(b) Use Newtons method to find 3 5 to 6 decimal places. Start with x0 = 1.8.
We let f (x) = x3 5. Then f 0 (x) = 3x2 . By Newtons method, we have
f (xn )
f 0 (xn
x3 5
= xn n 2
3xn
3
2x 5
= n3
3xn
x0 = 1.8

xn+1 = xn

x1 = 1.714403292
x2 = 1.70998737
x3 = 1.709975947
x4 = 1.709975947
Thus x 1.709976.

[2]

You might also like