0% found this document useful (0 votes)
75 views

Assignment 1

Here are the key steps to solve this problem: 1) The given differential equation is: y''(x) + 9y(x) = 0 2) The boundary conditions are: y(0) = 4 y(2) = 1 3) Use DSolve to solve the DE: sol1 = DSolve[{y''[x] + 9 y[x] == 0, y[0] == 4, y[2] == 1}, y, x] 4) Plot the solution function over the domain [0,10]: Plot[y[x] /. sol1, {x, 0, 10}] 5) Alternatively, use

Uploaded by

Tanjim Riju
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)
75 views

Assignment 1

Here are the key steps to solve this problem: 1) The given differential equation is: y''(x) + 9y(x) = 0 2) The boundary conditions are: y(0) = 4 y(2) = 1 3) Use DSolve to solve the DE: sol1 = DSolve[{y''[x] + 9 y[x] == 0, y[0] == 4, y[2] == 1}, y, x] 4) Plot the solution function over the domain [0,10]: Plot[y[x] /. sol1, {x, 0, 10}] 5) Alternatively, use

Uploaded by

Tanjim Riju
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/ 7

Answer: (1)

R 1 R 1 R y−x
0 x 0
dzdydx
R 1 R 1 R y−x
= 0 x
( 0 1dz)dydx
R1R1
= 0 x
([z]y−x
0 ])dydx
R1R1
= 0 x
(y − x − 0)dydx
R1R1
= 0 x
(y − x)dydx
R1 R1
= 0
( x (y − x)dy)dx
R1 R1 R1
= 0
( x ydy − x xdy)dx
R1 2
= 0
([ y2 ]1x − [xy]1x )dx
R1 2 x2
= 0
([ 12 − 2
] − [x − x2 ])dx
R1 1 x2
= 0 2
− 2
− x + x2 dx
R1 1
R1 x2
R1
= 0 2
dx − 0 2
dx − 0
xdx + x2 dx
R1 R1
= [ 12 x]10 − 12 ( 0 x2 dx) − 0 xdx + x2 dx
3 2 3
= [ 21 x]10 − 12 ([ x3 ]10 ) − [ x2 ]10 + [ x3 ]10

= [ 21 − 0] − 12 [ 13 − 0] − [ 21 − 0] + [ 13 − 0]

1
= 2
− 16 − 12 + 1
3

1
= 6
(Ans)

Answer: (2)

R 3 R √9−x2 R √9−x2
0 0 0
dzdydx
R 3 R √9−x2 √
2
= 0 0
([1.z]0 9−x )dydx
R3 R√ 9−x2 √
= 0 0
( 9 − x2 − 0)dydx
R3 R√ 9−x2 √
= 0 0
( 9 − x2 )dydx
R 3 R √9−x2
= 0
( 0 dy)dx

1
R3 √ √
= ([ 9 − x 2 .y] 9−x2 )dx
0 0

R3 √ √ √
= ([( 9 − x 2 )( 9 − x2 ) − 9 − x2 .0])dx
0
R3
= 0
9 − x2 − 0dx
R3
= 0
9 − x2 dx
R3 R3
= 0
9dx − 0
x2 dx
3
= [9x]30 − [ x3 ]30
3 03
= (9 × 3 − 9 × 0) − ( 33 − 3
)

= 27 − 9

= 18 (Ans)

Answer: (3)

u = x − y , v = 2x + y

∴x=u+y

Finding value of y,

v = 2x + y

⇒ v = 2(u + y) + y

⇒ v = 2u + 2y + y

⇒ v = 2u + 3y

⇒ 3y = v − 2u

v−2u
∴y= 3

Finding value of x,

x=u+y

v−2u
⇒x=u+ 3

3u+v−2u
⇒x= 3

2
u+v
∴x= 3

By using,
∂x ∂x

∂(x,y)

= ∂u ∂v
∂(u,v) ∂y ∂y
∂u ∂v
∂x ∂y ∂y ∂x
= .
∂u ∂v
− .
∂u ∂v
−→ (i)

u+v v−2u
∵x= 3
; y= 3

Now,

∂x ∂( u+v )
∂u
= 3
∂u

1
= 3

∂y ∂( v−2u )
∂u
= ∂u
3

= − 32

∂x ∂( u+v )
∂v
= 3
∂v

1
= 3

∂y ∂( v−2u )
∂v
= ∂v
3

1
= 3

Putting the values in (i),

1
= 3
× 13 − (− 32 ) × 1
3

= 0.33 (Ans)

Answer: (4)

R 1 R 3−3x R 3−3x−y
0 0 0
dzdydx
R 1 R 3−3x
= 0 0
([1.z]3−3x−y
0 )dydx
R 1 R 3−3x
= 0 0
([z]3−3x−y
0 )dydx
R 1 R 3−3x
= 0 0
(3 − 3x − y − 0)dydx

3
R 1 R 3−3x
= 0 0
(3 − 3x − y)dydx
R 1 R 3−3x
= 0
( 0 3 − 3x − y dy)dx
R 1 R 3−3x R 3−3x R 3−3x
= 0
( 0 3 dy − 0 3x dy − 0 y dy)dx
R1 2
= 0
([3y]03−3x − [3xy]3−3x
0 − [ y2 ]3−3x
0 )dx
R1 2
02
= 0
([(3 × 3 − 3x) − 3 × 0] − [3x(3 − 3x) − 3x × 0] − [ (3−3x)
2
− 2
])dx
R1 2
= 0
([3(3 − 3x)] − [3x(3 − 3x)] − [ (3−3x)
2
])dx
R1 (3−3x)2
= 0
9x2 − 18x − 2
+ 9 dx
R1 R1 R1 (3−3x)2 R1
= 0
9x2 dx − 0
18x dx − 0 2
dx + 0
9 dx
R1 R1 1
R1 R1
=9 0
x2 dx − 18 0
x dx − 2 0
(3 − 3x)2 dx + 0
9 dx
3 2 R1
= 9[ x3 ]10 − 18[ x2 ]10 − 1
2 0
(3 − 3x)2 dx − [9x]10
R1
= 9[ 13 − 03 ] − 18[ 12 − 20 ] − 1
2 0
(3 − 3x)2 dx − [9 − 0]

1
R1
=3−9− 2 0
(3 − 3x)2 dx − 9

1
R1
Applying u-substitution to 2 0
(3 − 3x)2 dx,

u = 3 − 3x

⇒ du = −3x.dx

⇒ dx = − 13 du

Adjusting limits,

x=0; u=3

x=1; u=0

Putting the values,

1
R0 2
= 2 3
− u3 du

1 1
R3
= 2
× 3 0
u2 du
3
= 61 [ u3 ]30
3 03
= 16 [ 33 − 3
]

3
= 2

4
Putting all the values together,

= 3 − 9 − 32 + 9

3
= 2
(Ans)

5
5 (a)
In[ ]:= eqn = y '[x] ⩵ Sin[5 x];

In[ ]:= DSolve[eqn, y, x]


1
Out[]= y → Function{x}, 1 - Cos[5 x]
5

5 (b)

1
In[ ]:= y[x] = c1 - Cos[5 x];
5
In[ ]:= Plot[Evaluate[Table[y[x], {c1 , - 2, 2}]], {x, - 5, 5}]

Out[]=
-4 -2 2 4

-1

-2

In[ ]:= ClearAll["Global`*"]

5 (c)
In[ ]:= sol1 = DSolve[{y ''[x] + 9 y[x] ⩵ 0, y[0] ⩵ 4, y[2] == 1}, y, x]
Out[]= {{y → Function[{x}, 4 Cos[3 x] - 4 Cot[6] Sin[3 x] + Csc[6] Sin[3 x]]}}
2 assigmment_5_set_1.nb

In[ ]:= Plot[y[x] /. sol1, {x, 0, 10}]

10

Out[]=
2 4 6 8 10

-5

-10

In[ ]:= sol2 = NDSolve[{y ''[x] + 9 y[x] ⩵ 0, y[0] ⩵ 4, y[2] == 1}, y, {x, 0, 10}]

Domain: {{0., 10.}}


Out[]= y → InterpolatingFunction Output: scalar


In[ ]:= Plot[y[x] /. sol2, {x, 0, 10}]

10

Out[]=
2 4 6 8 10

-5

-10

You might also like