0% found this document useful (0 votes)
27 views4 pages

Assignment6 With Solutions

Uploaded by

Zerlina Fung
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views4 pages

Assignment6 With Solutions

Uploaded by

Zerlina Fung
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Student Name:

Student ID:

Assignment 6

BMEG2410 Complex Analysis and Differential Equations

Please include all details of your derivation, no score will be given if only a final answer is provided.

Q1. (40 points) Test for exactness. If exact, solve. If not, skip the question. However, if an integrating factor F
is provided, use it to solve the ODE.
2 2 1
(1) 6𝑥𝑥𝑥𝑥𝑒𝑒 𝑥𝑥 𝑑𝑑𝑑𝑑 + �𝑒𝑒 𝑥𝑥 − � 𝑑𝑑𝑑𝑑 = 0
𝑦𝑦

2 2 1
Let M(𝑥𝑥, 𝑦𝑦) = 6xy𝑒𝑒𝑥𝑥 , N(𝑥𝑥, 𝑦𝑦) = 𝑒𝑒𝑥𝑥 −
𝑦𝑦

∂M 2
= 6x𝑒𝑒𝑥𝑥 ,
∂y

∂N 2
= 2x𝑒𝑒𝑥𝑥 ,
∂x

∂M ∂N

∂y ∂x

It is not an exact equation

(2) (3𝑥𝑥 2 𝑦𝑦 − 3𝑥𝑥𝑦𝑦 2 + 𝑦𝑦 2 )𝑑𝑑𝑑𝑑 = −(5𝑥𝑥 4 + 3𝑥𝑥𝑦𝑦 2 − 𝑦𝑦 3 )𝑑𝑑𝑑𝑑.

Let P(𝑥𝑥, 𝑦𝑦) = 5𝑥𝑥4 + 3𝑥𝑥𝑦𝑦2 − 𝑦𝑦3 , Q(𝑥𝑥, 𝑦𝑦) = 3𝑥𝑥2 𝑦𝑦 − 3𝑥𝑥𝑦𝑦2 + 𝑦𝑦2
∂P(𝑥𝑥, 𝑦𝑦)F(𝑥𝑥, 𝑦𝑦) ∂Q(𝑥𝑥, 𝑦𝑦)F(𝑥𝑥, 𝑦𝑦)
= = 6xy − 3𝑦𝑦2
∂y ∂x
∂P(𝑥𝑥,𝑦𝑦)F(𝑥𝑥,𝑦𝑦) ∂Q(𝑥𝑥,𝑦𝑦)F(𝑥𝑥,𝑦𝑦)
Since =
∂y ∂x

Integrate P(𝑥𝑥, 𝑦𝑦) with respect to x and Q(𝑥𝑥, 𝑦𝑦) with respect to y:

� 𝑃𝑃(𝑥𝑥, 𝑦𝑦) = � (5𝑥𝑥4 + 3𝑥𝑥𝑦𝑦2 − 𝑦𝑦3 ) 𝑑𝑑𝑑𝑑

� 𝑄𝑄(𝑥𝑥, 𝑦𝑦) = � (3𝑥𝑥2 𝑦𝑦 − 3𝑥𝑥𝑦𝑦2 + 𝑦𝑦2 ) 𝑑𝑑𝑑𝑑

Then
3
� 𝑃𝑃(𝑥𝑥, 𝑦𝑦) 𝑑𝑑𝑑𝑑 = 𝑥𝑥5 + 𝑥𝑥2 𝑦𝑦2 − 𝑥𝑥𝑦𝑦3
2
3 2 2 1
� 𝑄𝑄(𝑥𝑥, 𝑦𝑦) 𝑑𝑑𝑦𝑦 = 𝑥𝑥 𝑦𝑦 + 𝑦𝑦3 ( − 𝑥𝑥)
2 3
Combine the results and eliminate overlapping terms:
3 1
Φ(𝑥𝑥, 𝑦𝑦) = 𝑥𝑥 5 + 𝑥𝑥 2 𝑦𝑦 2 − 𝑥𝑥𝑦𝑦 3 + 𝑦𝑦 3 � − 𝑥𝑥� = 𝐶𝐶, where C' is the constant of integration.
2 3

The general solution of the equation is


3 1
𝑥𝑥 5 + 𝑥𝑥 2 𝑦𝑦 2 − 2𝑥𝑥𝑦𝑦 3 + 𝑦𝑦 3 = 𝐶𝐶
2 3

(3) (𝑥𝑥𝑦𝑦 2 + 4𝑥𝑥 2 𝑦𝑦)𝑑𝑑𝑑𝑑 + (3𝑥𝑥 2 𝑦𝑦 + 4𝑥𝑥 3 )𝑑𝑑𝑑𝑑 = 0, 𝐹𝐹(𝑥𝑥) = 𝑦𝑦/𝑥𝑥 is the integrating factor.

Let P(𝑥𝑥, 𝑦𝑦) = x𝑦𝑦2 + 4𝑥𝑥2 y, Q(𝑥𝑥, 𝑦𝑦) = 3𝑥𝑥2 y + 4𝑥𝑥3


P(𝑥𝑥, 𝑦𝑦)F(𝑥𝑥, 𝑦𝑦) = 𝑦𝑦3 + 4x𝑦𝑦2 , Q(𝑥𝑥, 𝑦𝑦)F(𝑥𝑥, 𝑦𝑦) = 3x𝑦𝑦2 + 4𝑥𝑥2 y
∂P(𝑥𝑥,𝑦𝑦)F(𝑥𝑥,𝑦𝑦) ∂Q(𝑥𝑥,𝑦𝑦)F(𝑥𝑥,𝑦𝑦)
= 3𝑦𝑦2 + 8xy =
∂y ∂x

It is an exact equation, the solution to the ODE is given by


𝑥𝑥 𝑦𝑦
∫0 𝑃𝑃(𝑢𝑢, 𝑦𝑦)𝐹𝐹(𝑢𝑢, 𝑦𝑦)𝑑𝑑𝑑𝑑 + ∫0 𝑄𝑄(0, 𝑣𝑣)𝐹𝐹(0, 𝑣𝑣)𝑑𝑑𝑑𝑑 = C

𝑥𝑥 𝑦𝑦
∫0 �𝑦𝑦3 + 4𝑢𝑢𝑦𝑦2 �𝑑𝑑𝑑𝑑 + ∫0 0 𝑑𝑑𝑑𝑑 = C

2𝑥𝑥 2 𝑦𝑦 2 + x𝑦𝑦 3 = C

(4) (𝑒𝑒 𝑥𝑥+𝑦𝑦 − 𝑒𝑒 𝑥𝑥 )𝑑𝑑𝑑𝑑 + (𝑒𝑒 𝑥𝑥+𝑦𝑦 + 𝑒𝑒 𝑦𝑦 )𝑑𝑑𝑑𝑑 = 0

𝑒𝑒 𝑦𝑦 𝑑𝑑𝑑𝑑 𝑒𝑒 𝑥𝑥 𝑑𝑑𝑑𝑑
Separating the y and x parts: 𝑒𝑒 𝑥𝑥 (1 − 𝑒𝑒 𝑦𝑦 )𝑑𝑑𝑑𝑑 = 𝑒𝑒 𝑦𝑦 (𝑒𝑒 𝑥𝑥 + 1)𝑑𝑑𝑑𝑑  = ,
1−𝑒𝑒 𝑦𝑦 1+𝑒𝑒 𝑥𝑥

𝑒𝑒 𝑦𝑦 𝑑𝑑𝑑𝑑 𝑒𝑒 𝑥𝑥 𝑑𝑑𝑑𝑑
Integrating both sides: ∫ =∫  − 𝑙𝑙𝑙𝑙|𝑒𝑒 𝑦𝑦 − 1| = 𝑙𝑙𝑙𝑙|𝑒𝑒 𝑥𝑥 + 1| − 𝑙𝑙𝑙𝑙𝐶𝐶1,
1−𝑒𝑒 𝑦𝑦 1+𝑒𝑒 𝑥𝑥

𝑙𝑙𝑙𝑙|𝑒𝑒 𝑦𝑦 − 1| + 𝑙𝑙𝑙𝑙|𝑒𝑒 𝑥𝑥 + 1| = 𝑙𝑙𝑙𝑙𝐶𝐶1|(𝑒𝑒 𝑦𝑦 − 1) ⋅ (𝑒𝑒 𝑥𝑥 + 1)| = 𝐶𝐶1,


The general solution of the ODE is: (𝑒𝑒 𝑦𝑦 − 1)(𝑒𝑒 𝑥𝑥 + 1) = 𝐶𝐶.

Q2. (40 points) Solve given ODEs and the initial value problems (IVP).

(1) 𝑦𝑦 ′ + y tanx = cosx.


It is a linear ODE and a(𝑥𝑥) = −tan x , b(𝑥𝑥) = cos x
The integrating factor F(𝑥𝑥) = 𝑒𝑒 − ∫ −𝑡𝑡𝑡𝑡𝑡𝑡 𝑥𝑥 𝑑𝑑𝑑𝑑 = sec x

(2) 𝑦𝑦 ′ + y tanx = cosx, 𝑦𝑦|𝑥𝑥=0 = 1

It is a linear ODE and a(𝑥𝑥) = −tan x , b(𝑥𝑥) = cos x


The integrating factor F(𝑥𝑥) = 𝑒𝑒 − ∫ −𝑡𝑡𝑡𝑡𝑡𝑡 𝑥𝑥 𝑑𝑑𝑑𝑑 = sec x
While 𝑦𝑦|𝑥𝑥=0 = 1
∫ 𝑏𝑏(𝑥𝑥)𝐹𝐹(𝑥𝑥)dx = ∫ 1 𝑑𝑑𝑑𝑑 = 𝑥𝑥
∫ 𝑏𝑏(𝑥𝑥)𝐹𝐹(𝑥𝑥)𝑑𝑑𝑑𝑑+𝐶𝐶 𝑥𝑥 + 𝐶𝐶
The general solution is y = 𝐹𝐹(𝑥𝑥)
= = (x + C) cos x
𝑠𝑠𝑠𝑠𝑠𝑠 𝑥𝑥

(3) 𝑥𝑥𝑥𝑥 ′ + 𝑦𝑦 ′ + 𝑥𝑥𝑦𝑦 2 = 0. 𝑦𝑦|𝑥𝑥=0 = 1


Separate x and y:
𝑦𝑦 ′ 𝑥𝑥
− 𝑦𝑦 2 =
𝑥𝑥+1

Integrate both sides:


1 𝑥𝑥
∫ − 𝑦𝑦 2 𝑑𝑑𝑑𝑑 = ∫ 𝑥𝑥+1 𝑑𝑑𝑑𝑑

1 1
= ∫1 − 𝑑𝑑𝑑𝑑 = 𝑥𝑥 − ln|𝑥𝑥 + 1| +C
𝑦𝑦 𝑥𝑥+1

1
𝑦𝑦 =
𝑥𝑥−ln|𝑥𝑥+1| +C

Substitute initial value:


1
𝑦𝑦|𝑥𝑥=0 = = 1𝐶𝐶 = 1
𝐶𝐶

The final solution of the ODE is


1
𝑦𝑦 =
𝑥𝑥−ln|𝑥𝑥+1| +1

(4) 𝑦𝑦′ cos x + (y − 1) sec x = 0 , 𝑦𝑦|𝑥𝑥=0 = 2.


1 1
It is a linear ODE and a(𝑥𝑥) = − , b(𝑥𝑥) =
𝑐𝑐𝑐𝑐𝑠𝑠2 𝑥𝑥 𝑐𝑐𝑐𝑐𝑠𝑠2 𝑥𝑥

−1
−∫ 𝑑𝑑𝑑𝑑
The integrating factor F(𝑥𝑥) = 𝑒𝑒 𝑐𝑐𝑐𝑐𝑠𝑠2 𝑥𝑥 = 𝑒𝑒 𝑡𝑡𝑡𝑡𝑡𝑡 𝑥𝑥

𝑒𝑒 𝑡𝑡𝑡𝑡𝑡𝑡 𝑥𝑥
And ∫ 𝑏𝑏(𝑥𝑥)𝐹𝐹(𝑥𝑥)dx = ∫ 2 𝑑𝑑𝑑𝑑 = 𝑒𝑒 𝑡𝑡𝑡𝑡𝑡𝑡 𝑥𝑥
𝑐𝑐𝑐𝑐𝑠𝑠 𝑥𝑥

∫ 𝑏𝑏(𝑥𝑥)𝐹𝐹(𝑥𝑥)𝑑𝑑𝑑𝑑+𝐶𝐶 𝑒𝑒 𝑡𝑡𝑡𝑡𝑡𝑡 𝑥𝑥 +𝐶𝐶


The general solution is y = = = 1 + C 𝑒𝑒 − 𝑡𝑡𝑡𝑡𝑡𝑡 𝑥𝑥
𝐹𝐹(𝑥𝑥) 𝑒𝑒 𝑡𝑡𝑡𝑡𝑡𝑡 𝑥𝑥

𝑦𝑦(0) = 2 𝐶𝐶 = 1
The final solution of the ODE is
y = 1 + 𝑒𝑒 − 𝑡𝑡𝑡𝑡𝑡𝑡 𝑥𝑥

𝑑𝑑2 𝑥𝑥
Q3. (20 points) Verification: x = 𝐶𝐶1 cos 𝑘𝑘𝑘𝑘 + 𝐶𝐶2 sin 𝑘𝑘𝑘𝑘 is the general solution of ODE + 𝑘𝑘 2 x = 0. Please also
𝑑𝑑𝑡𝑡 2

find the specific solution with the initial condition: 𝑥𝑥|𝑡𝑡=0 = A, 𝑥𝑥′|𝑡𝑡=0 = 0.
Note: C 1 , C 2 and k are arbitrary constants.
If 𝑘𝑘 ≠ 0
𝑥𝑥 = 𝐶𝐶1 cos 𝑘𝑘𝑡𝑡 + 𝐶𝐶2 sin 𝑘𝑘𝑘𝑘
𝑥𝑥′ = −𝑘𝑘𝐶𝐶1 𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠 + 𝑘𝑘𝐶𝐶2 cos 𝑘𝑘𝑘𝑘
x ′′ = −𝑘𝑘 2 𝐶𝐶1coskt − 𝑘𝑘 2 𝐶𝐶2 sin 𝑘𝑘𝑘𝑘
Substitute x and x′′ to equation 𝑥𝑥′′ + 𝑘𝑘 2 x = 0, we have:
−𝑘𝑘 2 (𝐶𝐶1 𝑐𝑐𝑐𝑐𝑐𝑐 𝑘𝑘𝑘𝑘 + 𝐶𝐶2 𝑠𝑠𝑠𝑠𝑠𝑠 𝑘𝑘𝑘𝑘) + 𝑘𝑘 2 (𝐶𝐶1 𝑐𝑐𝑐𝑐𝑐𝑐 𝑘𝑘𝑘𝑘 + 𝐶𝐶2 𝑠𝑠𝑠𝑠𝑠𝑠 𝑘𝑘𝑘𝑘) ≡ 0
If 𝑘𝑘 = 0
𝑦𝑦 = 𝐶𝐶1 cos 0 + 𝐶𝐶2 sin 0 = 𝐶𝐶1
𝑥𝑥 ′ = 𝑥𝑥 ′′ = 0
Which will also satisfy the equation 𝑥𝑥′′ + 𝑘𝑘 2x = 0,
Therefore,x = 𝐶𝐶1 cos 𝑘𝑘𝑘𝑘 + 𝐶𝐶2 sin 𝑘𝑘𝑘𝑘 is the general solution of ODE 𝑥𝑥′′ + 𝑘𝑘 2 x = 0.

Let 𝑥𝑥|𝑡𝑡=0 = A, x′|𝑡𝑡=0 = 0


𝐶𝐶1 = 𝐴𝐴, 𝑘𝑘𝑘𝑘2 = 0
If 𝑘𝑘 ≠ 0
𝐶𝐶1 = 𝐴𝐴, 𝐶𝐶2 = 0
The specific solution of the ODE is: 𝑥𝑥 = 𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴.
If 𝑘𝑘 = 0, 𝐶𝐶2 is arbitrary, no specific solution with such initial condition.

You might also like