Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

HW 2

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

MATH-242

(Spring2024)
Homework 1

Due date: 21 February 2024

1 Instructions
1. Use this assignment format to be uploaded on MOODLE.
2. Show all steps of your work clearly.
3. No partial credit for unjustified answers.

4. Extra pages of work can be attached before uploading.


5. After the due date 20% marks will be deducted.
6. If you are going to use MATLAB for the first time, please get acquainted
with basic commands and codes from the tutorial provided at https://www.mathworks.com
or from any other suitable site. For questions email ali.ilter@bilkent.edu.tr

1
Question 1. (25 points)
Use separation of variables to find the general solution of the given di↵eren-
tial equation. Then, obtain the particular solution satisfying the given initial
condition and indicate the interval of validity.
1. y 0 9x2 e y
= 0; y(0) = 0
2. 4y 0 y(y + 4) = 0; y(0) = 5

Question 2. (25 points)


Show that the equations are exact and obtain the general solution. Find the
algebraic equation that particular solution satisfies (i.e., the implicit solution)
using the initial conditions given. Determine y(x) explicitly if you can, indicat-
ing the interval of validity.
1. (2x + y 2 cos y)dx + (2y + 2xy cos y xy 2 sin y)dy = 0; y(0) = 1
2. (x2 + y 3 )dx + (3xy 2 1)dy = 0; y(1) = 0

Question 3. (25 points)


Show that they are not exact and find a suitable integrating factor to solve the
given equations.

1. (x + y)dx + x ln xdy = 0
2. (2 sin(y) + 3 cos x sin x)dx + cos ydy = 0

Question 4. (25 points)


Solve the following initial value problem using MATLAB and plot the solution(s)
in a suitable range inside the interval of validitie(s)
1. 4y 0 y(y + 4) = 0; y(0) = 5
2. (x2 + y 2 )dx + (2xy 1)dy = 0; y(1) = 0

2
Quest!on 1 :

Y
1)
- -
9xe = 0 , y(0) =
0

(dy fax 194 =

=>
eY
en(eY)
=
3x

=
C

en (3X + C) >
=

y = n(3X+ C) >
-
y = n(3X + 1) val!d!ty of !nterval :

-
1/3
( 3
-
,

y(0) =
0-3x+
C( y
=
1 -c 1 =

2)
4-X Y(Y+ 4) 0jy(0)
-
= = - 5

194 [** = =
41ny
-
en(y + ul) =

* +
2 =
1n(u)
en(!)
= C

+C
- => e = ex

# =T !tu) e e* C
- C = 1
T
-
.
= =

(A + B) Y = 0 Y

HA = > A=
1- 4 ,
B =
-

14 => 4(1 exC" + -


u =
y

-F!n
+
In(tul
= Keny y(0) 4(2 2-
-
=> =
-
5 -> + -
4 = 5
-

>
- C =
-
5

=>
y =

toe !nterval of val!d!ty :

(en (/5) ,
+ 2)
Quest!on 2 :

1) (2x + 4 COSY) dx + (24 + 2xY COSY -


XY >s!ny)dy = 0, y(0) =
1
- -
N
M

My = 24 Cosy -

y s!ny = Nx =
CYCOSY -
4 s!ny > exact !
-

F(X y) ,
= (Max + g(y) =
f(2x + 42 C0sY(ax + g(Y) = x+ 2
xy (0sy + g(4) + C

2F x(2ycosy yus!ny) + g'(y) 2 s!ny g'(y) 2y g(y) y C


=
-
=
2y 2xy(0sy
+
-
X4 = = >
- =

F(X y) , = X2 + xy (0SY +
y2 + c =
0 >
-
y(0) =
1 -> 1+ ( 0 =
-> C -1

F(x
, y) = x
2
+
xy COSY + Y2 -
1= 0 >
-
!nterval of Val!d!ty cannot be determ!ned s!nce y cannot be solved expl!c!tly.

24)dx (3xy2 + -
1)dY =
0 + y(1) = 0
ne
N

My = 3
y = Nx =

342 = exact !

F(x , y)fMax +
gly) f(x) 43)dx + +
g(y)
=

- + y3x +
g(y) + 2

(F 3xy +
g'(y) 3xy2 1 = g'(y) 1 = g(y) y2
= -
= =
=

F(x,
y) - y3x y 2 0 ->
y(1) 0
1 C 0 - C
=
=
= -
+ = + + =
+

from Wolframalpha
* y3x y H
3
:

F(x , y) =
+
- -
=
0

>
- !nterval of val!d!ty
!s (1 . 32534 ,
+
8)

I plotted !n mattab
Quest!on 3 :

1)(x
Y)dx +
+ xfn(X) dy = 0

!N

(My = 1) + (Nx =
n(X) + 1) = not exact !

>
-
Check !f O20(X) ,
N

-Sxdx -enx

1-1n(x) 1 funct!on of O =e C factor


-f Only
=

a !ntegrat!ng
=
x =
-
=
=
Xfn(x)

(1 Y(X)dx
+ +
lnxdy = 0 => My = 1x =
Nx = X

F(x,
y) =
(enxdy +
g(x) =

y(fnx) +
g(x) + C

E 4 x
= + g(x) = 1+
* = g(X) =
1 =
g(x) =

F(x,
y) y(enx) + x+ C
*
0 =
= =
y=

eb!n(y)
3c0s(X) s!n(X)dx + -
+

-
Cosly) dy = 0
M N

(My + (Nx 1
= 2 Cosy) =
0 = not exact !

>
- Check FLOM : N

S2dx
-0 = 2-
>
only a funct!on ofx >
- o = e =
e2x
COSY

12 s!nye + e 3cosx -
es!nx)dx + lecosyldy = 0

My = 2e
*
Cosy = Nx = 222" Cosy

F(x , y) =
)e *

cosydy + g(X) =
*
e s!ny +
g(x) + C

/ /
*
s!nye g'(X) 3e Cosx -e
* *
e 3c0sx -e
F 2 + s!nx 2e2Y
s!ny g'(x) = s!n
= + =
=

=> g(x) =
3) "cosxdx -Ses!nx = e
**
(2106x s!nx) + -

1
22 (2s!nx (0sX) = (7 cosx + s!nx
*
-
X

(Ce-2 -17cosx +
s!nx
** *
s!nx) + ( s!n"
F(X , y) = e
s!ny +
22 (7c0sx + = 0 = y
=

= =
Se Cosxax = fe *
s!nx dx 2 = COSX , du =- s!nx

(
u = COsX, du -s!nxdx =
2 = s!nx du = Cosxdx d!=* dx, v=
*
,
2 = STRX dU = COSX dx
, 2
e dx

d!e , v e *
e dx,
d!
=
=
o
=

edx
24 =

I d!

#
2

!
= =
,
I 2
e x s!nx

-1)e
+

I =

cosxex + es!nx dx
s!nex - cosxe I =

22 s!nx
**
Cosx L
2Xcosx A
=
+

e2x S!ver E
*

I Cosx

-12
= *
+
2Xs!nx
!
-A
Cosx

s!ne
=

!
=

=
51
=

22x (2C0sx + s!
&I
= (2s!nx -
cok e

X X
=> I (2106X + s!n (2 s!nx-Cos
-
=
= =
Quest!on 4 :

1)4X - Y(Y+ 4) = 0 =
y(0) = - 5

194 [** = =
41ny
-
en(y + ul) =

* +
2 =
1n(u)
en(!)
= C

+C
- => e = ex

# +
=

+
1
e e* C
C
T
u(y h)
+

- =
.
= 1 -

(A + B) Y = 0 Y

HA = > A=
1- 4 ,
B =
-

14 => 4(1 exC" + -


u =
y

!f" -!f
+
Keny -
Install =>
y(0) =
-
5 -> 4(2 2- + -
4 = 5
-

=
>
- C =
-
5

toe
=
y = !nterval of val!d!ty :
x
cen!15) ,
+ 0


2) y2dx +
(2xy -

1)dy = 0 , y(1) = 0
-
M N

My 2 y
= = Nx =
2y = exact !

F(x, y) fNdy +
g(x) =
((2xy -1 )dy +
g(x) = x42 -

y + g(x) + C

E =
x+
y2 =
y +
g(X) = g'(x) = X = g(x) =

& C

F(X , y) =
xy2 -

y +
- + C =

0)- + C 0 = -

F(x , y) =
xy2 -

y +
* -
= 0

m
4 -M1 "

=
+
= +1

- y =

2x
=> because of !n!t!al cond!t!on :

y
-
=
-x +1

2x

You might also like