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

EXAM2

The document contains solutions to several differential equations, including initial value problems and non-homogeneous equations. It details the steps to find homogeneous and particular solutions, applying methods such as variation of parameters and continuity conditions. The final solutions for different intervals of x are provided, along with the derived general solutions for each case.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views

EXAM2

The document contains solutions to several differential equations, including initial value problems and non-homogeneous equations. It details the steps to find homogeneous and particular solutions, applying methods such as variation of parameters and continuity conditions. The final solutions for different intervals of x are provided, along with the derived general solutions for each case.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

Q1

2
d y
2
− y =0 ,
dx
'
y ( 1 )=e , y ( 1 )=e .

2 rx rx
r e −e =0 .

(since e rx ≠ 0):
2
r −1=0 .

Solve the characteristic equation:


r =±1 .

So, the general solution :


x −x
y ( x )=C1 e +C 2 e .

1. Initial condition 1: y ( 1 )=e .


x=1 and y ( 1 )=e
1 −1 −1
y ( 1 )=C 1 e +C2 e . e=C 1 e+C 2 e .

C2 C2
1=C 1 + 2
. C 1+ 2
=1 . ¿ (1)
e e

1. Initial condition 2: y ' (1 )=e .


Differentiate the general solution:
' x −x
y ( x )=C1 e −C 2 e .

Sub. x=1 and y ' (1 )=e :


' −1 −1
y (1 )=C1 e−C 2 e . e=C 1 e−C 2 e .

C2 C2
1=C 1− 2
. C 1− 2
=1 . ¿ (2)
e e

Solve for C 1 and C 2


Add equ (1) and (2):
( C 1+
C2
e
2 )(
+ C 1−
C2
e
2 )
=1+1 . 2 C1=2. C 1=1 .

Sub C 1=1 in equ (1):


C2 C2
1+ 2
=1 . 2
=0 . C 2=0 .
e e

The solution to the IVP is y ( x )=e x .

Q2
Differential Equation:
2
d y
2
+ y=sec x
dx

Homogeneous Solution
2
d y
Solve 2 + y=0 :
dx
y h=C 1 cos x+ C2 sin x

Particular Solution (Variation of Parameters)


Assume:
y p=u 1 ( x ) cos x+ u2 ( x ) sin x

Equations for u'1 ( x ) and u'2 ( x ):


' ' ' '
u1 ( x ) cos x +u2 ( x ) sin x=0 ,−u1 ( x ) sin x +u2 ( x ) cos x=sec x

Solve:
' '
u1 ( x )=−tan x , u1 ( x )=ln∣ cos x ∣ u2 ( x )=1 ,u 2 ( x )=x y p= ( ln ∣cos x ∣) cos x + x sin x

General Solution
y ( x )=C1 cos x +C 2 sin x + ( ln ∣cos x ∣ ) cos x + x sin x

Q3
Solve for 0 ≤ x<1 (Non-homogeneous Equation)
For 0 ≤ x<1
2
d y
2
− y =1.
dx

The homogeneous equation is:


2
d y
2
− y =0 .
dx

The characteristic equation is:


R^2−1=0 ⟹ r=±1.

Thus, the solution is:


x −x
y h=C 1 e + C2 e .

2. Particular Solution: Assume y p= A . SuB. in the equation:


y p=−1.

3. General Solution for 0 ≤ x<1 :


x −x
y ( x )=C1 e +C 2 e −1.

Conditions
4. Condition 1: y ( 0 )=0
5. y ( 0 )=C 1 e0 +C 2 e0 −1=0 .
Condition 2: y ' ( 0 )=1:
' x −x
y ( x )=C1 e −C 2 e .

At x=0 :
y ( 0 )=C 1 e −C 2 e =1. C 1−C2 =1. ¿ (2)
' 0 0

Solve the equations ( 1 ) and ( 2 ) :


C 1+C 2=1 , C1−C 2=1 .
Thus, for 0 ≤ x<1 :
x
y ( x )=e −1 .

Solve for x ≥ 1 (Homogeneous Equation)


For x ≥ 1
2
d y
2
− y =0 .
dx
x −x
y ( x )=D1 e + D 2 e .

Continuity at x=1
At x=1, both y ( x ) and y ' ( x ) must be continuous.
1. Continuity of y ( x ): From 0 ≤ x<1 :
y ( 1 )=e 1−1 .

From x ≥ 1:
1 −1
y ( 1 )=D1 e + D2 e .

Equate the two:


−1
e−1=D1 e + D2 e . ¿ (3)

2. Continuity of y ' ( x ) : Differentiate y ( x ) in both regions:


o For 0 ≤ x<1 : y ' ( x )=e x . At x=1: y ' (1 )=e .
o For x ≥ 1: y ' ( x )= D1 e x −D 2 e− x . At x=1: y ' (1 )=D1 e−D 2 e−1 .
Equate the two:
−1
e=D1 e−D2 e . ¿ (4)

Solve for D1 and D2

−1
e−1=D1 e + D2 e .

Divide through by e :
1 D2
1− =D1 + 2 . ¿ (5)
e e

From ( 4 ):
−1
e=D1 e−D2 e .

Divide through by e :
D2
1=D1 − 2
. ¿ (6)
e

Add ( 5 ) and ( 6 ):

(1− 1e )+1=( D + De )+( D − De ).


1 2
2
1 2
2

Simplify:
1 1
2− =2 D1 . D1=1− .
e 2e
1
Substitute D1=1− 2 e into ( 6 ):

( )
1 D2
1= 1− − 2.
2e e

Simplify:
D2 1 e
= . D 2= .
e
2
2e 2

Final Solution:
 For 0 ≤ x<1 : y ( x )=e x −1 .

( )
1 x e −x
 For x ≥ 1: y ( x )= 1− 2 e e + 2 e .

Q4

x
y ( x )=e +∫ sin ( z−x ) y ( z ) dz .
−x

0
Differentiate both sides w.r.t x :
x

'
y ( x )=−e +
−x
∫ sin ( z −x ) y ( z ) dz .
∂x 0

Using Leibniz's rule:


x x
∂ ∂ sin ( z −x )

∂x 0
sin ( z −x ) y ( z ) dz =sin ( 0 ) y ( x ) +∫
∂x
y ( z ) dz .
0


Substitute sin ( 0 )=0 and ∂ x sin ( z −x )=−cos ( z−x ) :
x
y ( x )=−e −∫ cos ( z−x ) y ( z ) dz .
' −x

Differentiate w.r.t x again:


x

''
y ( x )=e −
−x
∫ cos ( z−x ) y ( z ) dz .
∂x 0

Using Leibniz's rule again:


x x

∫ cos ( z−x ) y ( z ) dz=cos ( 0 ) y ( x ) +∫ ∂∂x [−sin ( z−x ) ] y ( z ) dz .
∂x 0 0


Substitute cos ( 0 )=1 and ∂ x [−sin ( z−x ) ]=−cos ( z−x ) :
x
y ( x )=e − y ( x ) −∫ cos ( z−x ) y ( z ) dz .
'' −x

Substitute y ' ( x ) into this equation:


'' −x
y ( x )− y ( x )=e .

The differential equation is:


'' −x
y ( x )− y ( x )=e .

The solution of the homogeneous equation y h ( x ) is:


x −x
y h ( x )=C1 e +C 2 e .

Find a particular solution y p ( x ): Assume y p ( x )= Ax e−x .


''
( Ax e− x ) − Ax e− x =e−x .
' ''
( Ax e− x ) =A ( e−x −x e−x ) , ( Ax e− x ) = A (−2 e− x + x e−x ) .
Substitute:
−1
A (−2 e− x + x e−x )− Ax e−x =e− x .−2 A e− x =e−x . A= .
2
−1 − x
y p ( x )= xe .
2

The general solution is:


x −x 1 −x
y ( x )=C1 e +C 2 e − x e .
2

You might also like