0% found this document useful (0 votes)
7 views15 pages

Chapter2 Sol

The document contains homework problems related to homogeneous linear ordinary differential equations (ODEs) of second order, including verification of basis functions, solving initial value problems, and finding general solutions. It also includes modeling free oscillations of a pendulum and determining maxima and minima of oscillatory functions. Solutions to each problem are provided, demonstrating the application of various methods in solving ODEs.

Uploaded by

chy3148123
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)
7 views15 pages

Chapter2 Sol

The document contains homework problems related to homogeneous linear ordinary differential equations (ODEs) of second order, including verification of basis functions, solving initial value problems, and finding general solutions. It also includes modeling free oscillations of a pendulum and determining maxima and minima of oscillatory functions. Solutions to each problem are provided, demonstrating the application of various methods in solving ODEs.

Uploaded by

chy3148123
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

Homework 1

§2.1 Homogeneous Linear ODEs of Second Order


1. Verify by substitution that the given functions form a basis. Solve the given
initial value problem.
(a) y ′′ + 2y ′ + 2y = 0, e−x cos x, e−x sin x, y(0) = 1, y ′ (0) = −1
(b) y ′′ + 2y ′ + y = 0, e−x , xe−x , y(0) = 2, y ′ (0) = −1
(c) x2 y ′′ − xy ′ + y = 0, x, x ln x, y(1) = 1, y ′ (1) = 2
(d) x2 y ′′ − 7xy ′ + 15y = 0, x3 , x5 , y(1) = 0.4, y ′ (1) = 1

Sol. (a) Set y1 = e−x cos x and y2 = e−x sin x. Substituting y1′ = −e−x (cos x + sin x),
y1′′ = 2e−x sin x and y2′ = e−x (cos x − sin x), y2′′ = −2e−x cos x into the ODE,

y1′′ + 2y1′ + 2y1 = 0, y2′′ + 2y2′ + 2y2 = 0,

thus y1 , y2 are solutions of the ODE.


Since yy21 = tan x is not constant, they form a basis of solutions and the general
solution is
y = c1 e−x cos x + c2 e−x sin x = e−x (c1 cos x + c2 sin x).
From the initial conditions we have y(0) = c1 = 1 and y ′ (0) = −c1 + c2 = −1, and
so c1 = 1, c2 = 0. The solution of the ODE is y = e−x cos x.

(b) Set y1 = e−x and y2 = xe−x . Substituting y1′ = −e−x , y1′′ = e−x and y2′ =
(1 − x)e−x , y2′′ = (−2 + x)e−x into the ODE,

y1′′ + 2y1′ + y1 = 0, y2′′ + 2y2′ + y2 = 0,

thus y1 , y2 are solutions of the ODE.


Since yy12 = x is not constant, they form a basis of solutions and the general solution
is
y = c1 e−x + c2 xe−x = (c1 + c2 x)e−x .
From the initial conditions we have y(0) = c1 = 2 and y ′ (0) = c2 − c1 = −1, and so
c1 = 2, c2 = 1. The solution of the ODE is y = (2 + x)e−x .

(c) Set y1 = x, y2 = x ln x. Substituting y1′ = 1, y1′′ = 0 and y2′ = ln x + 1, y2′′ = 1


x
into the ODE,
x2 y1′′ − xy1′ + y1 = 0, x2 y2′′ − xy2′ + y2 = 0.
Thus y1 , y2 are solutions of the ODE.
Since yy21 = ln x is not constant, they form a basis of solutions and the general solution
is
y = c1 x + c2 x ln x.

Computational Science & Engineering (CSE) T. Jeong


Homework 2

From the initial conditions we have y(1) = c1 = 1 and y ′ (1) = c1 + c2 = 2, and so


c1 = 1, c2 = 1. The solution of the ODE is y = x + x ln x.

(d) Set y1 = x3 , y2 = x5 . Substituting y1′ = 3x2 , y1′′ = 6x and y2′ = 5x4 , y2′′ = 20x3
into the ODE,
x2 y1′′ − 7xy1′ + 15y1 = 0, x2 y2′′ − 7xy2′ + 15y2 = 0.
Thus y1 , y2 are solutions of the ODE.
Since yy21 = x2 is not constant, they form a basis of solutions and the general solution
is
y = c1 x 3 + c2 x 5 .
From the initial conditions we have y(1) = c1 + c2 = 0.4 and y ′ (1) = 3c1 + 5c2 = 1,
and so c1 = 0.5, c2 = −0.1. The solution of the ODE is y = 0.5x3 − 0.1x5 .

2. Solve the ODEs.


(a) 2xy ′′ = 3y ′ (Hint: F (x, y ′ , y ′′ ) = 0, set z = y ′ and y ′′ = z ′ .)
(b) x2 y ′′ + y ′ − 4y = 0 (Use a solution y1 = x2 .)
(c) xy ′′ + 2y ′ + xy = 0 (Use a solution y1 = cosx x .)
(d) y ′′ + (1 + 1/y)y ′2 = 0

dy ′
Sol. (a) Set z = y ′ and y ′′ = dx = dz
dx . The ODE reduces to
dz dz 3dx
2x = 3z, =− .
dx z 2x
By integration, ln |z| = 32 ln |x| + c∗1 and z = c∗∗
3
1 x .
2

Since z = y ′ , we have

2c∗∗
y = c∗∗
3 5
1
1 x 2 dx = x 2 + c2
5
5
= c1 x 2 + c2
(b) The ODE is written y ′′ + x1 y ′ − x42 y = 0. Set the second solution y2 = uy1 . Then
∫ ∫
1 − ∫ p(x)dx 1 − ∫ 1 dx
u = e dx = e x dx
y12 x4

1 1
= 5
dx = − 4
x 4x
2
and so y2 = uy1 = − 4x
x
4 = − 4x2 . Since x / −
1 2 1
4x2 = −4x4 is not constant, they form
a basis and the general solution is
c2
y = c1 x 2 + .
x2
Computational Science & Engineering (CSE) T. Jeong
Homework 3

(c) The ODE is written y ′′ + x2 y ′ + y = 0. Set the second solution y2 = uy1 . Then
∫ ∫
1 − ∫ p(x)dx 2 2

− x2 dx
u = e dx = x sec xe dx
y12

= sec2 x dx = tan x

and so y2 = uy1 = tan x cosx x = sinx x . Since sin x cos x


x / x = tan x is not constant, they
form a basis and the general solution is
c1 cos x + c2 sin x
y= .
x
dy ′ dy ′ dy
(d) Set z = y ′ = dy
dx and y ′′ = dx = dy dx = dz
dy z. The ODE reduces to

dz dz
z + (1 + 1/y)z 2 = 0, = −(1 + 1/y)dy.
dy z
By integration,
c1 −y
ln |z| = −y − ln |y| + c∗ , z= e .
y
Since z = y ′ , we have yey dy = c1 dx and so

yey − ey = c1 x + c2 .

3. It can be shown that the curve y(x) of an inextensible flexible homogeneous


√ cable
′′ ′ 2
hanging between two fixed points is obtained by solving y = k 1 + (y ) , where
the constant k depends on the weight. This curve is called a catenary. Find y(x),
assuming k = 1 and those fixed points are (−1, 0) and (1, 0) in a vertical xy-plane.

Sol. Set z = y ′ and y ′′ = dy dz
dx = dx . The ODE reduces to
√ 1
z′ = 1 + z2, √ dz = dx.
1 + z2
By integration, we have sinh−1 z = x + c1 and z = sinh(x + c1 ). Since z = y ′ , we
have y = cosh(x + c1 ) + c2 .
From the conditions

y(−1) = cosh(−1 + c1 ) + c2 = 0, y(1) = cosh(1 + c1 ) + c2 = 0

we have c1 = 0 and c2 = − cosh 1. The solution is

y = cosh x − cosh 1.

Computational Science & Engineering (CSE) T. Jeong


Homework 4

§2.2 Homogeneous Linear ODEs with Constant Coefficients


1. Find a general solution.
(a) y ′′ + 4y ′ + (π 2 + 4)y = 0 (b) y ′′ − w2 y = 0
(c) y ′′ + 4y ′ + 5y = 0 (d) 4y ′′ − 20y ′ + 25y = 0

Sol. (a) The characteristic equation is λ2 +4λ+π 2 +4 = 0, and its root is λ = −2±πi.
The general solution is

y = e−2x (c1 cos πx + c2 sin πx).

(b) The characteristic equation is λ2 − ω 2 = 0. Its roots are λ = ±ω. In case ω = 0,


the general solution is y = A + Bx. In case ω ̸= 0, the general solution is

y = Aeωx + Be−ωx .

(c) The characteristic equation is λ2 + 4λ + 5 = 0. Its roots are λ = −2 ± i. The


general solution is
y = e−2x (A cos x + B sin x).
(d) The characteristic equation is 4λ2 − 20λ + 25 = 0, and its root is λ = 2.5. The
general solution is
y = e2.5x (A + Bx).

′′ ′
2. Find
√ an ODE √ y + ay + by = 0 for given basis.
(a) e− 2x , xe− √2x . (b) 1, e−3x
Sol. (a)√λ = ± 2 are roots of the characteristic
√ equation λ2 + aλ + b = 0. Hence
a = −2 2, b = 2 and the ODE is y ′′ + 2 2y ′ + 2 = 0.
(b) λ = 0, − 3 are roots of the characteristic equation λ2 + aλ + b = 0. Hence
a = 3, b = 0 and the ODE is y ′′ + 3y ′ = 0.

3. Solve the initial value problem.


(a) y ′′ + 9y = 0, y(0) = 0.2, y ′ (0) = −1.5
(b) y ′′ + 2y ′ + y = 0, y(0) = 4, y ′ (0) = −6
(c) y ′′ − 2y ′ − 24y = 0, y(0) = 0, y ′ (0) = 20
Sol. (a) The characteristic equation is λ2 + 9 = 0. Its root is λ = ±3i. The general
solution is
y = c1 cos 3x + c2 sin 3x.
From the initial conditions y(0) = c1 = 0.2 y ′ (0) = 3c2 = −1.5, c1 = 0.2, c2 = −0.5.
The solution is
y = 0.2 cos 3x − 0.5 sin 3x.

Computational Science & Engineering (CSE) T. Jeong


Homework 5

(b) The characteristic equation is λ2 + 2λ + 1 = 0. Its root is λ = −1. The general


solution is
y = e−x (c1 + c2 x).
From the initial conditions y(0) = c1 = 4, y ′ (0) = −c1 + c2 = −6, c1 = 4, c2 = −2.
The solution is
y = e−2x (4 − 2x).
(c) The characteristic equation is λ2 − 2λ − 24 = 0. Its roots are λ = −4, 6.
The general solution is
y = c1 e−4x + c2 e6x .
From the initial conditions y(0) = c1 + c2 = 0, y ′ (0) = −4c1 + 6c2 = 20, c1 =
−2, c2 = 2. The solution is
y = −2e−4x + 2e6x .

Computational Science & Engineering (CSE) T. Jeong


Homework 1

§2.4 Modeling: Free Oscillations


1. Find the frequency of oscillation of a pendulum of length L, neglecting air resis-
tance and the weight of the rod, and assuming θ to be so small that sin θ practically
equals θ.
Sol. Modeling: mLθ′′ + mg sin θ = 0, θ′′ + Lg sin θ = 0.
Since sin θ ≈ θ for sufficiently small θ, we have the ODE
g
θ′′ + θ = 0.
L
The general solution is
√ √ √
g g g
y = c1 cos t + c2 sin t = C cos( t − δ).
L L L
√g
The frequency of oscillation of a pendulum of length is 2πL .

Pendulum(problem 1)

2. Determine the value of t corresponding to the maxima and minima of the oscil-
lation y(t) = et/2 sin t. ( )
Sol. Note that y ′ = e−t/2 cos t − 12 sin t .
From y ′ = 0, we have tan t = 2, that is, the oscillation has local minima
for t = tan−1 2 + (2n + 1)π, n = 0, 1, 2, · · · and it has local maxima for
t = tan−1 2 + 2nπ, n = 0, 1, 2, · · · .

§2.5 Euler-Cauchy equations


1. Find a real general solution.
(a) x2 y ′′ − 2y = 0 (b) 2x2 y ′′ + 4xy ′ + 5y = 0 (c) x2 y ′′ − 3xy ′ + 4y = 0
Sol. (a) The characteristic equation is m2 − m − 2 = 0 and its roots are m = 2, − 1.
The general solution is
y = c1 x2 + c2 x−1 .
−1±3i
(b) The characteristic equation is 2m2 + 2m + 5 = 0 and its roots are m = 2 .

Computational Science & Engineering (CSE) T. Jeong


Homework 2

The general solution is


1 3 3
y = √ [c1 cos( ln x) + c2 sin( ln x)].
x 2 2
(c) The characteristic equation is m2 − 4m + 4 = 0 and its root is m = 2.
The general solution is
y = x2 (c1 + c2 ln x).

2. Solve the initial value problem.


(a) x2 y ′′ − 4xy + 6y = 0, y(1) = 0.4, y ′ (1) = 0
(b) x2 y ′′ − xy ′ + y = 0, y(1) = 1.5, y ′ (1) = 0.25
(c) x2 y ′′ + xy ′ + y = 0, y(1) = 1, y ′ (1) = 1
Sol.(a) The characteristic equation is m2 − 5m + 6 = 0 and its root is m = 2, 3.
The general solution is
y = c1 x 2 + c2 x 3 .
From the initial conditions, y(1) = c1 + c2 = 0.4, y ′ (1) = 2c1 + 3c2 = 0, c1 =
1.2, c2 = −[Link] solution is
y = 1.2x2 − 0.8x3 .
(b) The characteristic equation is m2 − 2m + 1 = 0 and its root is m = 1.
The general solution is
y = x(c1 + c2 ln x).
From the initial conditions, y(1) = c1 = 1.5, y ′ (1) = −c1 + c2 = 0.25, c2 =
−[Link] solution is
y = 1.5x − 1.25x ln x.
(c) The characteristic equation is m2 + 1 = 0 and its roots are m = ±i.
The general solution is
y = c1 cos(ln x) + c2 sin(ln x).
From the initial conditions, y(1) = c1 = 1, y ′ (1) = c2 = 1. The solution is
y = cos(ln x) + sin(ln x).
3. Transform the Euler-Cauchy equation x2 y ′′ + axy ′ + by = 0 into an ODE with
constant coefficients by setting x = et (x > 0).
Sol. Set x = et . Note that
dy dy dx
y′ = = ( )/( ) = ẏe−t ,
dx dt dt
′ −t
dy d(ẏe ) dx
y ′′ = =( )/( ) = (ÿe−t − ẏe−t )e−t = (ÿ − ẏ)e−2t .
dx dt dt
Computational Science & Engineering (CSE) T. Jeong
Homework 3

Substituting x, y ′ , y ′′ into the ODE, we have

x2 y ′′ + axy ′ + by = e2t (ÿ − ẏ)e−2t + aet ẏe−t + by


= ÿ + (a − 1)ẏ + by = 0.

§2.6 Existence and Uniqueness of Solutions. Wronskian


1. Find an second order homogeneous ODE [y ′′ + p(x)y ′ + q(x)y = 0] for which the
given functions are solutions. Show linear independence by Wronskian. Solve the
initial value problem.
(a) cos 5x, sin 5x, y(0) = 3, y ′ (0) = −5
(b) x−3 , x−3 ln x, y(1) = 4, y ′ (1) = 0
(c) 1, e3x , y(0) = 2, y ′ (0) = −1
(d) e−kx cos πx, e−kx sin πx, y(0) = 1, y ′ (0) = −k − π

Sol. (a) From λ = ±5i, λ2 + 25 = 0, cos 5x, sin 5x are solutions of the ODE
y ′′ + 25y = 0, and the general solution is

y = c1 cos 5x + c2 sin 5x.

From Wronskian
cos 5x sin 5x
W (cos 5x, sin 5x) = = 5 ̸= 0,
−5 sin 5x 5 cos 5x
they are linearly independent on any interval.
From the initial condition, y(0) = c1 = 3 and y ′ (0) = 5c2 = −5, c2 = −1. The
particular solution is
y = 3 cos 3x − sin 3x.
(b) From (m + 3)2 = m2 + (7 − 1)m + 6 = 0, x−3 , x−3 ln x are solutions of the ODE
x2 y ′′ + 7xy ′ + 6y = 0, and the general solution is

y = c1 x−3 + c2 x−3 ln x.

From Wronskian

−3 −3 x−3 x−3 ln x −7
W (x , x ln x) = −4 −4 −4 = x ̸= 0,
−3x −3x ln x + x
they are linearly independent on x > 0.
From the initial condition, y(0) = c1 = 4 and y ′ (0) = −3c1 + 4c2 = 0, c2 = 3. The
particular solution is
y = 3 cos 3x − sin 3x.

Computational Science & Engineering (CSE) T. Jeong


Homework 4

(c) From λ = 0, 3, λ2 − 3λ = 0, 1, e3x are solutions of the ODE y ′′ − 3y ′ = 0, and


the general solution is
y = c1 + c2 e3x .
From Wronskian
1 e3x
W (1, e3x ) = = 3e3x ̸= 0,
0 3e3x

they are linearly independent on any interval.


From the initial condition, y(0) = c1 + c2 = 3 and y ′ (0) = 3c2 = −1, c1 = 73 , c2 =
− 13 . The particular solution is
7 1
y = − e3x .
3 3
(d) From λ = −k ± πi, λ + 2kλ + (k 2 + π 2 )λ = 0, e−kx cos πx, e−kx sin πx are
2

solutions of the ODE y ′′ + 2ky ′ + (k 2 + π 2 )y = 0, and the general solution is

y = c1 e−kx cos πx + c2 e−kx sin πx.

From Wronskian

W (e−kx cos πx, e−kx sin πx)


e−kx cos πx e−kx sin πx
=
e−kx (−k cos πx − π sin πx) e−kx (−k sin πx + π cos πx)
= πe−2kx ̸= 0,

they are linearly independent on any interval.


From the initial condition, y(0) = c1 = 1 and y ′ (0) = −kc1 +πc2 = −k−π, c2 = −1.
The particular solution is

y = e−kx cos πx − e−kx sin πx.

§2.7 Nonhomogeneous ODEs


1. Find a (real) general solution.
(a) y ′′ + 5y ′ + 6y = 2e−x (b) y ′′ + 3y ′ + 2y = 12x2
(c) y ′′ + 10y ′ + 25y = 100 sinh 5x (d) y ′′ + 9y = cos x + 13 cos 3x
(e) y ′′ + 4y ′ + 4y = e−2x sin 2x (f) y ′′ + 6y ′ + 73y = 80ex cos 4x

Sol. (a) y ′′ + 5y ′ + 6y = 0, λ2 + 5λ + 6 = 0, λ = −2, − 3


The homogeneous solution yh = c1 e−2x + c2 e−3x .
Set a particular solution yp = Ae−x .
yp′′ + 5yp′ + 6yp = (A − 5A + 6A)e−x = 2e−x

Computational Science & Engineering (CSE) T. Jeong


Homework 5

=⇒ A = 1, ∴ yp = e−x .
Hence we have the general solution
y = yh + yp = c1 e−2x + c2 e−3x + e−x .

(b) y ′′ + 3y ′ + 2y = 0, λ2 + 3λ + 2 = 0, λ = −1, − 2
The homogeneous solution yh = c1 e−x + c2 e−5x .
Set a particular solution yp = Ax2 + Bx + C.
yp′′ + 3yp′ + 2yp = 2A + 3(2Ax + B) + 2(Ax2 + Bx + C) = 12x2
=⇒ A = 6, B = −18, C = 21 ∴ yp = 6x2 − 18x + 21.
Hence we have the general solution
y = yh + yp = c1 e−x + c2 e−5x + 6x2 − 18x + 21.

(c) y ′′ + 10y ′ + 25y = 0, λ2 + 10λ + 25 = 0, λ = −5


The homogeneous solution yh = e−5x (c1 + c2 x).
Note that 100 sinh 5x = 50(e5x − e−5x ).
Set a particular solution yp = Ae5x + 12 Bx2 e−5x .
yp′′ + 10yp′ + 25yp = 100Ae5x + Be−5x = 50(e5x − e−5x )
=⇒ A = 12 , B = −50 ∴ yp = 12 e5x − 25x2 e−5x
Hence we have the general solution
1
y = yh + yp = e−5x (c1 + c2 x) + e5x − 25x2 e−5x .
2
(d) y ′′ + 9y = 0, λ2 + 9 = 0, λ = ±3i
The homogeneous solution yh = c1 cos 3x + c2 sin 3x.
Set a particular solution yp = A cos x + B sin x + Cx cos 3x + Dx sin 3x.
yp′′ + 9yp = 8A cos x + 8B sin x − 6C sin 3x + 6D cos 3x = cos x + 31 cos 3x
=⇒ A = 81 , B = 0, C = 0, D = 18 1
, ∴ yp = 18 cos x + 18
1
x sin 3x.
Hence we have the general solution
1 1
y = yh + yp = c1 cos 3x + c2 sin 3x + cos x + x sin 3x.
8 18
(e) y ′′ + 4y ′ + 4y = 0, λ2 + 4λ + 4 = 0, λ = −2
The homogeneous solution yh = (c1 + cx )e−2x .
Set a particular solution yp = e−2x (A cos 2x + B sin 2x).
yp′′ + 4yp′ + 4yp = e−2x (−4A cos 2x + 4B sin 2x) = e−2x sin 2x.
=⇒ A = 0, B = 1/4, ∴ yp = 41 e−2x sin 2x.
Hence we have the general solution
1
y = yh + yp = (c1 + cx )e−2x + e−2x sin 2x.
4
Computational Science & Engineering (CSE) T. Jeong
Homework 6

(f) y ′′ + 6y ′ + 73y = 0, λ2 + 6λ + 73 = 0, λ = −3 ± 8i
The homogeneous solution yh = e−3x (c1 cos 8x + c2 sin 8x).
Set a particular solution yp = ex (A cos 4x + B sin 4x).
yp′′ + 6yp′ + 73yp = ex [(64A + 32B) cos 4x + (64B − 32A) sin 4x] = 80ex cos 4x
=⇒ A = 1, B = 12 ∴ yp = ex (cos 4x + 12 B sin 4x).
Hence we have the general solution
1
y = yh + yp = e−3x (c1 cos 8x + c2 sin 8x) + ex (cos 4x + B sin 4x).
2
2. Solve the initial value problems.
(a) y ′′ − 2y ′ = 12e2x − 8e−2x , y(0) = −2, y ′ (0) = 12.
(b) y ′′ + 4y = 16 cos 2x, y(0) = 0, y ′ (0) = 0.
Sol. (a) y ′′ − 2y ′ = 0, λ2 − 2λ = 0, λ = 0, 2
The homogeneous solution yh = c1 + c2 e2x .
Set a particular solution yp = Axe2x + Be−2x .

yp′′ − 2yp′ = (4A + 4Ax)e2x + 4Be−2x − 2(A + 2Ax)e2x + 4Be−2x


= 2Ae2x + 8e−2x = 12e2x − 8Be−2x ,
=⇒ A = 6, B = −1 ∴ yp = 6xe2x − e−2x
Hence we have the general solution
y = yh + yp = c1 + c2 e2x + 6xe2x − e−2x .
From the initial condition,
y(0) = c1 + c2 − 1 = −2, y ′ (0) = 2c2 + 6 + 2 = 12, c2 = 2, c1 = −3.
The solution is
y = −3 + 2e2x + 6xe2x − e−2x .

(b) y ′′ + 4y = 0, λ2 + 4 = 0, λ = ±2i
The homogeneous solution yh = c1 cos 2x + c2 sin 2x.
Set a particular solution yp = Ax cos 2x + Bx sin 2x.
yp′′ + 4yp = (4B) cos 2x + (−4A) sin 2x = 16 cos 2x, A = 0, B = 4.
Hence we have the general solution
y = yh + yp = c1 cos 2x + c2 sin 2x + 4x sin 2x.
From the initial condition,
y(0) = c1 = 0, y ′ (0) = 2c2 = 0, c2 = 0, c1 = 0,
The solution is
y = 4x sin 2x.

Computational Science & Engineering (CSE) T. Jeong


Homework 1

§2.8 Modeling: Forced Oscillations. Resonance


1. Find the stead-state motion of the mass-spring system modeled by the ODE

y ′′ + 4y ′ + 5y = cos t − sin t.

Sol. y ′′ + 4y ′ + 5y = 0, λ2 + 4λ + 5 = 0, λ = −2 ± i.
The homogeneous solution yh = e−2t (c1 cos t + c2 sin t).
Set the particular solution yp = A cos t + B sin t.
yp′′ + 4yp′ + 5yp = (4A + 4B) cos t + (4B − 4A) sin t = cos t − sin t.
=⇒ B = 0, A = 14 ∴ yp = 41 cos t
The stead-state motion(particular solution) is
1
yp = cos t.
4

2. Find the transient motion of the mass-spring system modeled by the ODE

y ′′ + 2y ′ + 5y = 4 cos t + 8 sin t.

Sol. y ′′ + 2y ′ + 5y = 0, λ2 + 2λ + 5 = 0, λ = −1 ± 2i
The homogeneous solution yh = e−t (c1 cos 2t + c2 sin 2t).
Set the particular solution yp = A cos t + B sin t.
yp′′ + 2yp′ + 5yp = (4A − 2B) cos t + (4B − 2A) sin t = 4 cos t + 8 sin t
=⇒ A = 0, B = 2, ∴ yp = 2 sin t.
The transient motion(general solution) is

y = yh + yp = e−t (c1 cos 2t + c2 sin 2t) + 2 sin t.

Computational Science & Engineering (CSE) T. Jeong


Homework 2

§2.9 Modeling: Electric Circuits


1. (a) Find the general solution for RC-circuit with constant R and C, E = E0 sin ωt.
(b) Find the general solution for RL-circuit with L = 0.5H, R = 20Ω and E = 110V .

Sol. (a) The ODE of the RC-circuit is given by



1 1
RI + Idt = E0 sin ωt, RI ′ + I = ωE0 cos ωt.
C C
The general solution is
[∫ ]
t ωE0
I(t) = e− RC
t
e RC cos ωtdt + c
R
ωE0 C
= ce− RC +
t
(cos ωt + ωRC sin ωt)
1 + (ωRC)2
ωE0 C
= ce− RC + √
t
sin(ωt − δ)
1 + (ωRC)2
where δ = tan−1 ωRC
1
.

(b) The ODE of the RL-circuit is given by


LI ′ + RI = E, 0.5I ′ + 20I = 110, I ′ + 40I = 220.
The general solution is
[∫ ]
− Rt E Rt
I(t) = e L e L dt + c
L
= 5.5 + ce−40t .

2. Find the steady-state current in RLC-circuit with R = 0.2Ω, L = 0.1H, C =


2F, E = 754 sin 0.5t V .

Computational Science & Engineering (CSE) T. Jeong


Homework 3

Sol. 0.1I ′′ + 0.2I ′ + 0.5I = 377 cos 0.5t, I ′′ + 2I ′ + 5I = 3770 cos 0.5t.
I ′′ + 2I ′ + 5I = 0, λ2 + 2λ + 5 = 0, λ = −1 ± 2i, Ih = e−t (c1 cos 2t + c2 sin 2t).
Set Ip = A cos 0.5t + B sin 0.5t.
Ip′′ + 2Ip′ + 5Ip = ( 19A
4 + B) cos 0.5t + ( 4 − A) sin 0.5t = 3770 cos 0.5t,
19B

A = 760, B = 160, Ip = 760 cos 0.5t + 160 sin 0.5t. The steady-state current
Ip = 760 cos 0.5t + 160 sin 0.5t.

§2.10 Solution by Variation of Parameters


1. Solve the given nonhomogeneous ODE by variation of parameters or undeter-
mined coefficients.
(a) x2 y ′′ − xy ′ − 3y = x2 (b) y ′′ − 2y ′ + y = ex sin x
(c) y ′′ + y = cos x + sec x (d) y ′′ − 4y ′ + 4y = 12e2x /x4

Sol. (a) x2 y ′′ − xy ′ − 3y = 0, m2 − 2m − 3 = 0, m = −1, 3, yh = c1 x−1 + c2 x3 .


−1 3 x−1 x3
Since W (x , x ) = = 4x,
−x−2 3x2
∫ 3 ∫ −1
−1 x x 1
yp = −x dx + x 3
dx = − x2 .
4x 4x 3
Thus the general solution is
1
y = yh + yp = c1 x−1 + c2 x3 − x2 .
3

(b) y ′′ − 2y ′ + y = 0, yh = ex (c1 + c2 x).


Set yp = ex (A cos x + B sin x).
yp′′ − 2yp′ + yp = ex (−A cos x − B sin x) = ex sin x, A = 0, B = −1, yp = −ex sin x.

∴ y = yh + yp = ex (c1 + c2 x) − ex sin x.

(c) y ′′ + y = 0, yh = c1 cos x + c2 sin x.


For the ODE of y ′′ + y = cos x, set yp,1 = Ax cos x + Bx sin x.
′′
yp,1 + yp,1 = −2A sin x + 2B cos x = cos x, A = 0, B = 21 , yp,1 = 12 x sin x.
For the ODE of y ′′ + y = sec x, set yp,2 = u cos x + v sin x.
cos x sin x
W (cos x, sin x) = = 1.
∫ ∫ − sin x cos x ∫ ∫
u = − yW2 r dx = − sin x sec xdx = ln | cos x|, v = yW1 r dx = dx = x.
yp,2 = ln | cos x| cos x + x sin x.
∴ y = yh + yp,1 + yp,2 = c1 cos x + c2 sin x + 21 x sin x + ln | cos x| cos x + x sin x.

Computational Science & Engineering (CSE) T. Jeong


Homework 4

(d) y ′′ − 4y ′ + 4y = 0, yh = (c1 + c2 x)e2x .


e2x xe2x
Set yp = ue2x + vxe2x . W (x, x2 ) = 2x 2x
4x
2x = e .
∫ ∫ 2e
∫ e +
∫ 2xe
u = − yW2 r dx = − x123 dx = x62 , v = yW1 r dx = x124 dx = − x43 .
yp = x · x62 − x2 · x43 = x2 .
∴ y = yh + yp = (c1 + c2 x)e2x + x2

2. Solve y ′′ − 2y ′ + y = 6x2 e−x by both methods (undetermined coefficients and


variation of parameters).
Sol. y ′′ − 2y ′ + y = 0, λ2 − 2λ + 1 = 0, λ = 1, yh = ex (c1 + c2 x).
(Methods of undetermined coefficients)
Set yp = (Ax2 + Bx + C)e−x .
yp′′ − 2yp′ + yp = [4Ax2 + (−8A + 4B)x + (2A − 4B + 4C)]e−x = 6x2 e−x
A = 23 , B = 3, C = 49 , yp = ( 32 x2 + 3x + 49 )e−x
3 9
∴ y = yh + yp = ex (c1 + c2 x) + ( x2 + 3x + )e−x .
2 4
(Methods of variation of parameters)
x x ex xex
Since W (e , xe ) = x = e2x .
e (1 + x)ex
∫ ∫
xex · 6x2 e−x xex · 6x2 e−x
yp = −e x
2x
dx + xex dx
e e2x
3 9
= ( x2 + 3x + )e−x
2 4
Thus the general solution is
3 9
y = yh + yp = ex (c1 + c2 x) + ( x2 + 3x + )e−x .
2 4

Computational Science & Engineering (CSE) T. Jeong

You might also like