Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 8

Question 1 12M

dy
a) Find general solution for =xy + y
dx

dy
=xy + y 2M
dx

dy
= y ( x+ 1) 2M
dx
1 dy
=( x +1) 2M
y dx
1 dy
∫ y dx dx =∫ (x +1)dx 2M

1 1
∫ y dy = 2 x2 + x +c 2M

1
ln y= x 2 + x+ c or
2
1 2
x +x+ c
y=e 2 2M

13M
b) Solve the following first-order differential equations:

dy
y =−3 x , given that when y=0, x=±3
dx

ydy=−3 xdx 2M

∫ ydy =−3∫ xdx 2M

1 2 3 2
y =− x +c 2M
2 2

When y=0, x=±3. So

1 2
( 0) =−3/2 ( ± 3 )2 +c 2M
2

c=27/2 2M

Thus

1 2 −3 2 27
y= x +
2 2 2
2 2
y =−3 x +27
3M
Question 2 4M

a) Find the general solution following second-order differential equations:


2
d y
i) 2
−1 y=0
dx

The auxiliary equation is λ 2−1=( λ+1) (λ-1) =0 1M


λ=± 1 1M
So, the general solution is
y ( x ) =c 1 e− x + c 2 e x 2M

2 4M
d y dy
ii) 9 2
+12 + 4 y =0
dx dx

The auxiliary equation is 9 λ 2+12 λ+ 4=( 3λ+2) (3λ+2)=0 1M


−2
λ= 1M
3
So, the general solution is
−2 −2
x x
y ( x ) =c 1 e 3
+c 2 X e 3 2M

d y
2
dy 5M
iii) −4 +5 y=0
dx 2
dx
Hint: Use Quadratic formula

The auxiliary equation is λ 2−4 λ+5=0 1M


−(−4 ) ± √ (−4 ) −4 (1 )( 5 )
2
By using the quadratic formula, the roots are r =
2 (1)
4 ± √−1. √ 4
¿
2
¿ 2 ±i 2M
The roots are complex numbers, so the general solution is
y=e2 x ¿ 2M

b) Solve the following second-order differential equations: 6M

d2 y dy dy
i) +10 +21 y=0 , y ( 0 )=2 , ( 0 ) =2
dx 2
dx dx

The auxiliary equation is λ 2+10 λ +21=( λ+7) (λ+3) = 0


λ=−7 ,−3 1M
So, the general solution is
−3 x −7 x
y ( x ) =c 1 e + c2 e 1M
' −3 x −7 x
y ( x )=−3 c1 e −7 c2 e 1M

y ( 0 )=2 ​​​​​​→ c 1+ c 2=2 ….. (1)


'
y ( 0 )=2 ​​​→ ​​​​− 3 c1 −7 c 2=2 ….. (2)
c 1=​​4 ​​​​​​​, c 2=−2 1M

−3 x −7 x
y ( x ) =4 e −2 e 2M

2 6M
d y dy dy
ii) 2 − −3=0 , y ( 0 )=1, ( 0 ) =0
d x dx
2
dx

The auxiliary equation is 2 λ2− λ−3=( λ+1) ( 2 λ- 3) = 0

λ=1.5 ,−1 1M

So, the general solution is


1.5 x −x
y ( x ) =c 1 e + c2 e 1M
y ' ( x )=1.5 c 1 e1.5 x −c 2 e−x 1M

y ( 0 )=1 → c1 + c2=1 ….. (1)


'
y ( 0 )=0 ​→ ​​​​1.5 c1 −c 2=0 ….. (2)

c 1=0. ​​4 ​​​​​​​, c 2=0.6 1M

1.5 x −x
y ( x ) =0.4 e +0.6 e 2M
Question 3 25M

a) Use Euler’s Method with a step size of 0.2 to make a table of approximate
values of the solution of initial-value problem. Give answer up to 4 decimal
point.

dy
=3 x+2 y , y ( 0 )=2
dx

Until n =10

( dydx )
y 1= y 0 + h
( x0 , y0 )
Δx=2+0.2[3 ( 0 ) +2(2)]=2.8000 2.5M

y = y +h ( )
dy
2 1 Δx=4.04002.5M
dx ( x1 , y 1)

y 3= y 2 +h ( dydx )
( x 2, y 2)
Δx=5.8960 2.5M

y 4 = y 3 +h ( dydx )
( x 3 , y3 )
Δx=8.5304 2.5M

y 5= y 4 +h ( dydx )
( x 4 , y 4)
Δx =12.4226 2.5M

y 6 = y 5+ h ( dydx )
( x5 , y5 )
Δx=17.9916 2.5M

y 7 = y 6+ h ( dydx ) ( x6 , y6 )
Δx=25.9082 2.5M

y 8 = y 7+ h ( dydx ) ( x6 , y6 )
Δx=37.1115 2.5M

y 9= y 8+ h ( dydx ) ( x7 , y7 )
Δx=52.9161 2.5M

y 10= y 9 +h ( dydx ) ( x8 , y 8)
Δx =75.1625 2.5M
Question 4 25M

a) Use Runge Kutta Method with a step size of 0.1 to make a table of
approximate values of the solution of initial-value problem. Give answer up to
4 decimal point.

dy
=2+ x+ y , y ( 0 )=2
dx

over the interval 0 ≤ x ≤ 0.2.

h=0.1; x 0=0 , x 1=0.1 , x2=0.2

Let n=0,
k 1=f ( x 0 , y 0 )=f ( 0,2 )=2+0+2=4.0000

( h h
) (
k 2=f x 0+ , y 0+ k 1 =f 0+
2 2
0.1
2
, 2+
2 )
0.1 ( 4 )

¿ f ( 0.05,2 .2000 )=4.2500

( h h
) (
k 3=f x 0+ , y 0+ k 2 =f 0+
2 2
0.1
2
, 2+
2 )
0.1 ( 4.25 )
=¿

¿ f ( 0.05,2 .2125 )=4.2625


k 4=f ( x 0+ h , y 0+ h k 3 )=f ( 0+0.1 , 2+0.1 ( 4.2625 ) )
¿ f ( 0.1 , 2.4263 )=4.5263 8M
0.1
When n=0, y 1=2+ ( 4.0000+2 ( 4.2500 ) +2 ( 4.2625 ) + 4.5263 )
6
¿ 2.4259 1M

Let n=1,
k 1=f ( x 1 , y 1 ) =f ( 0.1 , 2.4259 )=4.5259

(
k 2=f 0.1+
0.1
2
, 2.4259+
0.1
2 )
( 4.5259 ) =f ( 0.15,2 .6522 )
¿ 4.8022

(
k 3=f 0.1+
0.1
2
, 2.4259+
0.1
2 )
( 4.8022 ) =f ( 0.15 , 2.6660 )
¿ 4.8160
k 4=f ( 0.1+0.1,2.4259+ 0.1 ( 4.8160 ) )=f ( 0.2 ,2.9075 )
¿ 5.1075 7M
0.1
When n=1, y 2=2.4259+ ( 4.5259+2 ( 4.8022 ) +2 ( 4.8160 ) +5.1075 )
6
¿ 2.9071 1M

Let n=2,
k 1=f ( x 2 , y 2 ) =f ( 0.2,2 .9071 )=5.1071

(
k 2=f 0.2+
0.1
2
, 2.9071+
0.1
2 )
( 5.1071 ) =f ( 0.25 ,3.1625 )
¿ 5.4125
(
k 3=f 0.2+
0.1
2
, 2.9071+
0.1
2 )
(5.4125 ) =f ( 0.25,3 .1777 )
¿ 5.4277
k 4=f ( 0.2+0.1 ,2.9071+ 0.1 ( 5.4277 ) ) =f ( 0.3,3 .4400 )
¿ 5.7499 7M
When n=2,
0.1
y 3=2.9071+ ( 5.1071+2 ( 5.4125 ) +2 ( 5.4277 )+ 5.7499 )
6
¿ 5.4494 1M

You might also like