Solution
Solution
Section 1.1
Section 1.2
6. Because the differential equation can be rewritten dy/y 1/3 = x1/3 dx,
3/2
integration immediately gives 32 y 2/3 = 34 x4/3 + 23 C, or y(x) = 21 x4/3 + C .
1
2 Advanced Engineering Mathematics with MATLAB
10. Because the differential equation can be written du/u = dx/x2 , integra-
tion immediately gives u = Ce−1/x or y(x) = x + Ce−1/x .
11. From the hydrostatic equation and ideal gas law, dp/p = −g dz/(RT ).
Substituting for T (z),
dp g
=− dz.
p R(T0 − Γz)
Integrating from 0 to z,
g/(RΓ)
p(z) g T0 − Γz p(z) T0 − Γz
ln = ln , or = .
p0 RΓ T0 p0 T0
12. For 0 < z < H, we simply use the previous problem. At z = H, the
pressure is
g/(RΓ)
T0 − ΓH
p(H) = p0 .
T0
Then we follow the example in the text for an isothermal atmosphere for
z ≥ H.
dV dV R dV dt
2
= − =− .
V + RV /S V S(1 + RV /S) RC
Integration yields
V t
ln =− + ln(C).
1 + RV /S RC
V0 RV0 /S
V (t) = e−t/(RC) + e−t/(RC) V (t).
1 + RV0 /S 1 + RV0 /S
Worked Solutions 3
SV0 e−t/(RC)
V (t) = .
S + RV0 1 − e−t/(RC)
A dT
+ T 4 = γ4,
B dt
or
B dT 1 dT dT
dt = − 4 = −
A T − γ4 2γ 2 T 2 + γ 2 T 2 − γ2
1 2γ dT dT dT
= 3 − + .
4γ T 2 + γ 2 T −γ T +γ
The final answer follows from direction integration.
dN d[ln(K/N )]
= b dt, or = −b dt.
N ln(K/N ) ln(K/N )
Integration leads to
or
ln {ln(K/N )/ ln[K/N (0)]} = −bt
or
ln(K/N ) = ln[K/N (0)]e−bt
or
ln[N/N (0)] = ln[K/N (0)] 1 − e−bt
or
N (t) = N (0) exp ln[K/N (0)] 1 − e−bt .
dI β dI
− = −α dz.
I α 1 + βI/α
Integration leads to
I(z) 1 + βI(0)/α
ln = −αz,
1 + βI(z)/α I(0)
4 Advanced Engineering Mathematics with MATLAB
or
I(z) I(0) αI(0)e−αz
= e−αz , or I(z) = .
1 + βI(z)/α 1 + βI(0)/α α + βI(0) [1 − e−αz ]
d[X]
= k dt
([A]0 − [X]) ([B]0 − [X]) ([C]0 − [X])
d[X]
([A]0 − [B]0 ) ([A]0 − [C]0 ) ([A]0 − [X])
d[X]
+
([B]0 − [A]0 ) ([B]0 − [C]0 ) ([B]0 − [X])
d[X]
+ = k dt
([C]0 − [A]0 ) ([C]0 − [B]0 ) ([C]0 − [X])
Integration yields
1 [A]0
ln
([A]0 − [B]0 ) ([A]0 − [C]0 ) [A] − [X]
0
1 [B]0
+ ln
([B]0 − [A]0 ) ([B]0 − [C]0 ) [B] − [X]
0
1 [C]0
+ ln = kt.
([C]0 − [A]0 ) ([C]0 − [B]0 ) [C]0 − [X]
d[X]
= (k1 + k2 ) dt.
α − [X]
Because [X]0 = 0,
h i
α − [X] = αe−(k1 +k2 )t , or [X] = α 1 − e−(k1 +k2 )t .
Section 1.3
dx u+1
(u2 + 2u − 1) dx = −(u + 1)x du, or − = 2 du.
x u + 2u − 1
Integrating this last equation,
2 2 y2 y
− ln |x| = 1
2 ln |u +2u−1|+C, or x + 2 − 1 = y 2 +2xy −x2 = C.
x2 x
or
dx 2u
2xu du + (1 + 3u2 ) dx = 0, or =− du.
x 1 + 3u2
Integrating this last equation,
or
dx u+1
2u2 dx + (u + 1)x du = 0, or 2 = − 2 du.
x u
Integrating this last equation,
1 x x
ln |x|2 = − ln |u| + + C, or ln |ux2 | = C − , or ln |xy| = C − .
u2 y y
√
5. Because M (x, y) = y + 2 xy and N (x, y) = −x, we have that M (tx, ty) =
p √
ty + 2 t2 xy = ty + 2t xy = tM (x, y), and N (tx, ty) = −tx = tN (x, y).
Therefore, the differential equation is homogeneous.
Let y = ux. Substituting into the differential equation,
√ du dx
x(u dx + x du) = (xu + 2x u ) dx, or √ = .
2 u x
or p dx du
x 1 + u2 dx + x2 du = 0, or = −√ .
x 1 + u2
Integrating this last equation,
p
− ln(x) = − ln u + 1 + u2 − ln(C).
dx
u dx + x du = [sec(u) + u] dx, or cos(u) du = .
x
Integrating and substituting for u, the final answer is
sin(y/x) − ln |x| = C.
8. Because M (x, y) = ey/x + y/x and N (x, y) = −1, we have that M (tx, ty) =
e(ty)/(tx) + (ty)/(tx) = ey/x + y/x = M (x, y), and N (tx, ty) = −1 = N (x, y).
Therefore, the differential equation is homogeneous.
Let y = ux. Substituting into the differential equation,
dx
u dx + x du = (eu + u) dx, or e−u du = .
x
Integrating and substituting for u, the final answer is
y(x) = −x ln (C − ln |x|) .
Section 1.4
∂M ∂N
= 2y = .
∂y ∂x
∂u
= 2xy + f ′ (y) = 2xy.
∂y
∂M ∂N
=1= .
∂y ∂x
8 Advanced Engineering Mathematics with MATLAB
∂u
= x + f ′ (y) = x + y.
∂y
∂u
= x cos(y) − x2 + f ′ (y) = x cos(y) − x2 .
∂y
∂u 1 1 1
= + f ′ (y) = + .
∂y x x y
∂M ∂N
= −6x = .
∂y ∂x
The exactness criteria is satisfied.
Now, since
∂u
= 3x2 − 6xy,
∂x
then u(x, y) = x3 − 3x2 y + f (y). To find f (y), we use
∂u
= −3x2 + f ′ (y) = −3x2 − 2y.
∂y
∂M ∂N
= sin(xy) + xy cos(xy) = .
∂y ∂x
The exactness criteria is satisfied.
Now, since
∂u
= y sin(xy),
∂x
then u(x, y) = − cos(xy) + f (y). To find f (y), we use
∂u
= x sin(xy) + f ′ (y) = x sin(xy).
∂y
∂M ∂N
= 4xy = .
∂y ∂x
10 Advanced Engineering Mathematics with MATLAB
∂u
= 2x2 y + f ′ (y) = 2x2 y.
∂y
∂M ∂N
= 6xy 2 + 5x4 = .
∂y ∂x
∂u
= 3x2 y 2 + x5 + f ′ (y) = 3x2 y 2 + x5 + 1.
∂y
∂M 1 ∂N
= = .
∂y x ∂x
∂u
= ln(x) + f ′ (y) = y 2 + ln(x).
∂y
∂M ∂N
= 1 + ln(y) = .
∂y ∂x
∂u
= x[ln(y) + 1] + f ′ (y) = x + e−y + x ln(y).
∂y
∂M ∂N
= −8y sin(4y 2 ) = .
∂y ∂x
∂u
= −8xy sin(4y 2 ) + f ′ (y) = −8xy sin(4y 2 ).
∂y
∂M ∂N
= 2 sin(x + y) cos(x + y) = .
∂y ∂x
∂u
= sin2 (x + y) = 1
2 [1 − cos(2x + 2y)] ,
∂x
then u(x, y) = x/2 − sin(2x + 2y)/4 + f (y). To find f (y), we use
∂u
= − 21 cos(2x + 2y) + f ′ (y) = − cos2 (x + y) = − 12 [1 + cos(2x + 2y)] .
∂y
12 Advanced Engineering Mathematics with MATLAB
y a+1 ya
M (x, y) = α , and N (x, y) = (x − y) .
(1 − y)a+1 (1 − y)a+2
∂M ya ∂N
= = .
∂y (1 − y)a+2 ∂x
∂u ya ya
=x a+2
+ f ′ (y) = (x − y) .
∂y (1 − y) (1 − y)a+2
Therefore,
y a+1
f ′ (y) = − .
(1 − y)a+2
Integrating, we find that
Z y
ξ a+1
f (y) = − dξ.
0 (1 − ξ)a+2
Section 1.5
2 2 2
or ex y = 12 ex + C, or y = 1
2 + Ce−x . This general solution applies to any
x on the interval (−∞, ∞).
5. Directly from the differential equation, we have that P (x) = −3/x, and
µ(x) = x−3 . Multiplying the differential equation
by the integrating factor,
we have that x−3 y ′ − 3x−4 y = 2x−1 , d y/x3 = 2/x, or y/x3 = 2 ln(x) + C,
or y = 2x3 ln(x) + Cx3 . This general solution applies to any x on the interval
(−∞, ∞).
dy 2 sin(x) tan(x)
+ y= ,
dx 1 − cos(x) 1 − cos(x)
This general solution applies to any x on the interval nπ+ϕ < x < (n+1)π+ϕ,
where ϕ is any real and n is any integer.
[sec(x) + tan(x)]b
µ(x) = .
cosa (x)
Therefore,
Z x
1
µ(x) = exp 1+ dξ = exp[x + ln(x)] = xex .
ξ
dy
xex + (x + 1)ex y = ex
dx
d
[xex y] = ex
dx
xex y = ex + C
1
y = + Ce−x .
x
15. Since the differential equation is already in canonical form, P (x) = 2a,
and µ(x) = e2ax . Multiplying by the integrating factor, we have that
16. Since the differential equation is already in canonical form, P (x) = 2k/x3 ,
and µ(x) = exp(−k/x2 ). Multiplying by the integrating factor, we have that
d h −k/x2 i x + 1 −k/x2
e y(x) = ln e .
dx x
16 Advanced Engineering Mathematics with MATLAB
Because y(1) = 0,
Z x
k ξ+1 k
y(x) = exp 2 ln exp − 2 dξ.
x 1 ξ ξ
dp 2 2
− p=− , p(1) = 0.
dx kx k
dp 2 2
x−2/k − x−2/k−1 p = − x−2/k
dx k k
d h −2/k i 2
x p = − x−2/k .
dx k
If k 6= 2, an integration yields
2/k 2
x−2/k p(x) = − x1−2/k + C, or y 2 (x) = − x + Cx2/k .
1 − 2/k k−2
2
y 2 (x) = x − x2/k ,
2−k
p(x)
= − ln(x) + C.
x
y 2 (x) = x ln(1/x).
dx
− (1 − N )rx = S, x(0) = 1.
dt
Worked Solutions 17
d h −(1−N )rt i
e x(t) = Se−(1−N )rt .
dt
Integrating both sides of this equation from 0 to t, we obtain
S h i
e−(1−N )rt x(t) − 1 = 1 − e−(1−N )rt .
(1 − N )r
S h i
x(t) = e(1−N )rt + e(1−N )rt − 1 .
(1 − N )r
d[A]
= −k1 dt.
[A]
Integration yields
[A] = [A]0 e−k1 t .
Substituting [A] into the equation for [B],
d[B]
+ k2 [B] = k1 [A]0 e−k1 t .
dt
Multiplying by the integrating factor, we have that
d k2 t
e [B] = k1 [A]0 e(k2 −k1 )t .
dt
Integrating this equation, we find that
k1 [A]0 −k1 t
[B] = e − e−k2 t .
k2 − k1
k2 [A]0 k1 [A]0
[C] − [C]0 = 1 − e−k1 t − 1 − e−k2 t
k2 − k1 k2 − k1
or
k1 e−k2 t − k2 e−k1 t
[C] = [A]0 1 + .
k2 − k1
since [C]0 = 0.
dI
L + RI = E0 cos2 (ωt), I(0) = 0.
dt
d h Rt/L i E
0 Rt/L
e I(t) = e cos2 (ωt).
dt L
1
Using the fact that I(0) = 0 and replacing cos2 (ωt) with 2 [1 + cos(2ωt)], we
have that
Z th i
Rt/L E0
e I(t) = eRτ /L + eRτ /L cos(2ωτ ) dτ,
2L 0
or
Rt/L E0 eRτ /L − 1 E0 eRτ /L [R cos(2ωτ ) + 2ωL sin(2ωτ )] − R
e I(t) = + .
2R 2R2 + 8ω 2 L2
dz z 1 dz z d z 1
− = 1, or − 2 = = .
dx x x dx x dx x x
Worked Solutions 19
z(x) = Cx + x ln(x).
1
y(x) = .
Cx + x ln(x)
dz z 1 dz d 1
+ = − 2, or x +z = (xz) = − .
dx x x dx dx x
Integrating this equation yields
z(x) = [C − ln(x)]/x.
dz 2z x 1 dz 2z d z 1
− = , or − = = .
dx x 2 x2 dx x3 dx x2 2x
Integrating this equation yields
dz z 1 dz z d z
− = x, or − 2 = = 1.
dx x x dx x dx x
Integrating this equation yields
z(x) = Cx + x2 .
20 Advanced Engineering Mathematics with MATLAB
1
y(x) = .
Cx + x2
dz z 1 dz z d z 1
− = −1, or − 2 = =− .
dx x x dx x dx x x
Integrating this equation yields
z(x) = Cx − x ln(x).
dz 2z
− = −1
dx x
or
1 dz 2z d z 1
2
− 3 = = − 2.
x dx x dx x2 x
Integrating this equation yields
z(x) = Cx2 + x.
Section 1.6
6. The equilibrium points are x = ±1, and x = ±2. For x < −2, −1 < x < 1,
and x > 2, x′ > 0. For −2 < x < −1 and 1 < x < 2, x′ < 0. Therefore, the
equilibrium points at x = −2 and x = 1 are stable while x = −1 and x = 2
are unstable.
Worked Solutions 21
7. There is only one equilibrium point, x = 0. For x < 0, x′ > 0 while for
x > 0, x′ < 0. Therefore, this equilibrium point is stable.
8. The equilibrium points are x = ±2, and x = 0. For x < −2 and 0 < x < 2,
x′ > 0. For −2 < x < 0 and x > 2, x′ < 0. Therefore, the equilibrium point
x = 0 is unstable while the points x = ±2 are stable.
Section 1.7
d −t
e x = −te−t .
dt
3. Because the differential equation can be written dx/x2 = dt/(t + 1), in-
tegration yields 1/x = C − ln(t + 1). Applying the initial condition, C = 1.
Therefore, the final answer is x(t) = [1 − ln(t + 1)]−1 .
d −t
e x = e−2t .
dt
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% MATLAB Code for Differential-Integral Equation
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% initialize parameters
clear; beta = 0.4; deltat = 0.01; K = 1000;
% vary value of b
for n = 1:4
b = 0.2 * (n-1);
22 Advanced Engineering Mathematics with MATLAB
for k = 2:K
t(k) = t(k-1) + deltat;
x(k) = x(k-1) + deltat ...
- b * deltat * sign(x(k-1)) * abs(x(k-1))^beta ...
- deltat * deltat * sum;
sum = sum + x(k);
end
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Section 2.0
1. Since the second solution is y2 (x) = u(x), y2′ (x) = u′ (x) and y2′′ (x) = u′′ (x).
Consequently, substituting these values of y2 (x), y2′ (x), and y2′′ (x) into the
differential equation, we find that xu′′ + 2u′ = 0. Therefore,
u′′ (x) 2
′
=− , u′ (x) = Cx−2 .
u (x) x
y2′ (x) = u′ (x)ex + u(x)ex , and y2′′ (x) = u′′ (x)ex + 2u′ (x)ex + u(x)ex .
Consequently, substituting these values of y2 (x), y2′ (x), and y2′′ (x) into the
differential equation, we find that u′′ + 3u′ = 0. Therefore,
u′′ (x)
= −3, u′ (x) = Ce−3x .
u′ (x)
Worked Solutions 23
y2′ (x) = xu′ (x) + u(x), and y2′′ (x) = xu′′ (x) + 2u′ (x).
Consequently, substituting these values of y2 (x), y2′ (x), and y2′′ (x) into the
differential equation, we find that xu′′ + 6u′ = 0. Therefore,
u′′ (x) 6
=− , u′ (x) = Cx−6 .
u′ (x) x
y2′ (x) = ex u(x) + ex u′ (x), and y2′′ (x) = ex u(x) + 2ex u′ (x) + ex u′′ (x).
Consequently, substituting these values of y2 (x), y2′ (x), and y2′′ (x) into the
differential equation, we find that xu′′ + (x − 1)u′ = 0. Therefore,
u′′ (x) 1
′
= − 1, u′ (x) = −Axe−x .
u (x) x
Thus, u(x) = A(x + 1)e−x , and the second solution is y2 (x) = A(x + 1).
y2′ (x) = (x − 1)u′ (x) + u(x), and y2′′ (x) = (x − 1)u′′ (x) + 2u′ (x).
Consequently, substituting these values of y2 (x), y2′ (x), and y2′′ (x) into the
differential equation, we find that x(2 − x)(x − 1)u′′ + 2u′ = 0. Therefore,
u′′ (x) 2 1 1 2
= = + − ,
u′ (x) x(x − 2)(x − 1) x x−2 x−1
and
x(x − 2) 1
u′ (x) = A = A 1 − .
(x − 1)2 (x − 1)2
Thus, u(x) = Ax+A/(x−1), and the second solution is y2 (x) = A(x2 −x+1).
and
y2′′ (x) = 6 sin(x) cos2 (x)u(x) − 3 sin3 (x)u(x)
+ 6 sin2 (x) cos(x)u′ (x) + sin3 (x)u′′ (x).
Consequently, substituting these values of y2 (x), y2′ (x), and y2′′ (x) into the
differential equation, we find that
Therefore,
Thus, u(x) = A/ sin5 (x), and the second solution is y2 (x) = A/ sin2 (x).
√
7. Since the second solution is y2 (x) = u(x) cos(x)/ x,
and
cos(x) 3 cos(x) sin(x)
y2′′ (x) = − √ u(x) + √ u(x) + √ u(x)
x 4x2 x x x
cos(x) 2 sin(x) ′ cos(x)
− √ u′ (x) − √ u (x) + √ u′′ (x).
x x x x
Consequently, substituting these values of y2 (x), y2′ (x), and y2′′ (x) into the
differential equation, we find that cos(x)u′′ − 2 sin(x)u′ = 0. Therefore,
2 2
y2′ (x) = −bxe−bx /2
u(x) + e−bx /2 ′
u (x),
and
2 2 2
y2′′ (x) = (b2 x2 − b)e−bx /2
u(x) − 2bxe−bx /2 ′
u (x) + u′′ (x)e−bx /2
.
Consequently, substituting these values of y2 (x), y2′ (x), and y2′′ (x) into the
differential equation, we find that u′′ + (a − 2bx)u′ = 0. Therefore,
u′′ (x)
= 2bx − a.
u′ (x)
Worked Solutions 25
Rx 2
Thus, u(x) = ebξ −aξ
dξ, and the second solution is
Z x
2 2
y2 (x) = e−bx /2 ebξ −aξ dξ.
Substituting y(x), y ′ (x), and y ′′ (x) into the original ordinary differential equa-
tion yields the final answer.
Section 2.1
Section 2.2
2. The solution in this case is x(t) = A cos(3t/2+ϕ), and x′ (t) = −3A sin(3t/2
+ϕ)/2. Using the initial conditions,√x(0) = A cos(ϕ) = 2π, and x′ (0) =
−3A sin(ϕ)/2 = 3π. Therefore, A = 2 2 π, and ϕ = −π/4.
3. The solution in this case is x(t) = A cos(πt + ϕ), and x′ (t) = −Aπ sin(πt +
′
ϕ). Using
√ the initial conditions, x(0) = A cos(ϕ) = 1, and x (0) = −πA sin(ϕ)
/2 = 3π. Therefore, A = 2, and ϕ = −π/3.
28 Advanced Engineering Mathematics with MATLAB
4. The differential equation for this problem is 4x′′ + 100x = 0, where x(t)
is the displacement (given in m) and t is time (measured in seconds). The
auxiliary equation is then m2 + 25 = 0 or m = ±5i. Therefore, the general
solution is x(t) = A cos(5t) + B sin(5t). Since x(0) = 0, A = 0. Next,
x′ (t) = 5B cos(5t). Because x′ (0) = 5B = 5, B = 1. The final solution is
x(t) = 5 cos(5t).
Section 2.3
2. The differential equation is x′′ + 10x′ + 125x = 0, which has the char-
acteristic polynomial m2 + 10m + 125 = (m + 5)2 + 100 = 0. The gen-
eral solution is x(t) = e−5t [A cos(10t) + B sin(10t)]. Because x(0) = A =
3 and x′ (0) = −5A + 10B = 25 or B = 4, the final answer is x(t) =
e−5t [3 cos(10t) + 4 sin(10t)].
3. The differential equation is 4x′′ + 20x′ + 169x = 0, which has the character-
2
istic polynomial 4m2 + 20m + 169 = m + 21 + 36 = 0. The general solution
Worked Solutions 29
Section 2.4
′′ ′
1. To find the homogeneous solution, we solve yH + 4yH + 3yH = 0. Its
−3x −x
solution is yH (x) = Ae + Be . For the particular solution, we guess
yp (x) = Cx + D, so that yp (x) = C, and yp′′ (x) = 0. Substitution into the
differential equation yields 4C + 3Cx + 3D = x + 1, and C = 31 and D = − 91 .
The general solution is therefore y(x) = Ae−3x + Be−x + 31 x − 91 .
′′
2. To find the homogeneous solution, we solve yH − yH = 0. Its solution is
yH (x) = Ae + Be . For the particular solution, we guess yp (x) = Cxex +
x −x
De−2x , yielding yp′ (x) = Cex + Cxex − 2De−2x , and yp′′ (x) = 2Cex + Cxex +
4De−2x . Substitution into the differential equation gives 2Cex + 3De−2x =
ex − 2e−2x , or C = 21 and D = − 32 . The general solution is therefore y(x) =
Aex + Be−x + 12 xex − 32 e−2x .
′′ ′
3. To find the homogeneous solution, we solve yH + 2yH + 2yH = 0. Its
−x
solution is yH (x) = e [A cos(x) + B sin(x)]. For the particular solution, we
guess yp (x) = Cx2 + Dx + E, yielding yp′ (x) = 2Cx + D, and yp′′ (x) = 2C.
Substitution into the differential equation gives 2C + 4Cx + 2D + 2Cx2 +
2Dx + 2E = 2x2 + 2x + 4, or C = 1, D = −1 and E = 2. The general solution
is therefore y(x) = e−x [A cos(x) + B sin(x)] + x2 − x + 2.
′′ ′
4. To find the homogeneous solution, we solve yH + yH = 0. Its solution is
yH (x) = A+Be . For the particular solution, we guess yp (x) = Cx3 +Dx2 +
−x
30 Advanced Engineering Mathematics with MATLAB
Ex, yielding yp′ (x) = 3Cx2 +2Dx+E and yp′′ (x) = 6Cx+2D. Substitution into
the differential equation gives 6Cx+2D+3Cx2 +2Dx+E = x2 +2x, or C = 31
and D = E = 0. The general solution is therefore y(x) = Ax + Be−x + 31 x3 .
′′ ′
5. To find the homogeneous solution, we solve yH + 2yH = 0. Its solution
−2x
is yH (x) = A + Be . For the particular solution, we guess yp (x) = Cx2 +
Dx + Exe−2x , yielding yp′ (x) = 2Cx + D + Ee−2x − 2Exe−2x , and yp′′ (x) =
2C + 4Exe−2x − 4Ee−2x . Substitution into the differential equation gives
4Cx + 2C + 2D + 2Ee−2x = 2x + 5 − e−2x , or C = 12 , D = 2, and E = 21 . The
general solution is therefore y(x) = A + Be−2x + 21 x2 + 2x + 12 e−2x .
′′ ′
6. To find the homogeneous solution, we solve yH −4yH +4yH = 0. Its solution
2x 2x
is yH (x) = Ae + Bxe . For the particular solution, we guess yp (x) =
Cx3 e2x + Dx2 e2x , yielding yp′ (x) = 3Cx2 e2x + 2Cx3 e2x + 2Dxe2x + 2Dx2 e2x ,
and yp′′ (x) = 6Cxe2x + 12Cx2 e2x + 4Cx3 e2x + 2De2x + 8Dxe2x + 4Dx2 e2x .
Substitution into the differential equation gives 6Cxe2x + 2De2x = xe2x + e2x ,
or C = 16 and D = 21 . The general solution is therefore y(x) = Ae2x +Bxe2x +
1 2 1 3 2x
2x + 6x e .
′′ ′
7. To find the homogeneous solution, we solve yH + 4yH + 4yH = 0. Its
−2x
solution is yH (x) = (A + Bx)e . For the particular solution, we guess
yp (x) = Cex + Dxex , yielding yp′ (x) = Cex + Dex + Dxex , and yp′′ (x) =
Cex + 2Dex + Dxex . Substitution into the differential equation gives (9C +
2
6D)ex + 9Dxex = xex , or C = − 27 and D = 19 . The general solution is
−2x 1 2
therefore y(x) = (A + Bx)e + 9 x − 27 ex .
′′
8. To find the homogeneous solution, we solve yH − 4yH = 0. Its solu-
tion is yH (x) = A cosh(2x) + B sinh(2x). For the particular solution, we
guess yp (x) = Cx cosh(2x) + Dx sinh(2x), yielding yp′ (x) = C cosh(2x) +
D sinh(2x) + 2Cx sinh(2x) + 2Dx cosh(2x), and yp′′ (x) = 4C sinh(2x) + 4D
cosh(2x) + 4Cx cosh(2x) + 4Dx sinh(2x). Substitution into the differential
equation gives yp′′ − 4yp = 4C sinh(2x) + 4D cosh(2x) = 4 sinh(2x), or D = 0
and C = 1. The general solution is therefore y(x) = A cosh(2x)+B sinh(2x)+
x cosh(2x).
′′
9. To find the homogeneous solution, we solve yH + 9yH = 0. Its solution is
yH (x) = A cos(3x) + B sin(3x). For the particular solution, we guess yp (x) =
Cx2 cos(3x) + Dx2 sin(3x) + Ex cos(3x) + F x sin(3x), yielding yp′ (x) = (2Cx +
3Dx2 + E + 3F x) cos(3x) + (2Dx − 3Cx2 + F − 3Ex) sin(3x), and yp′′ (x) =
(2C − 9Cx2 − 9Ex + 12Dx + 6F ) cos(3x) + (2D − 9Dx2 − 12Cx − 6E −
9F x) sin(3x). Substitution into the differential equation gives yp′′ +9yp = (2C+
12Dx + 6F ) cos(3x) + (2D − 12Cx − 6E) sin(3x) = x cos(3x), or 2C + 6F = 0,
2D − 6E = 0, −12C = 0, and 12D = 1. The general solution is therefore
1 2 1
y(x) = A cos(3x) + B sin(3x) + 12 x sin(3x) + 36 x cos(3x).
Worked Solutions 31
′′
10. To find the homogeneous solution, we solve yH + yH = 0. Its solution is
yH (x) = A cos(x) + B sin(x). For the particular solution, we guess yp (x) =
Cx2 cos(x)+Dx2 sin(x)+Ex cos(x)+F x sin(x), yielding yp′ (x) = (2Cx+Dx2 +
E + F x) cos(x) + (2Dx − Cx2 + F − Ex) sin(x), and yp′′ (x) = (2C − Cx2 −
Ex + 4Dx + 2F ) cos(x) + (2D − Dx2 − 4Cx − 2E − F x) sin(x). Substitution
into the differential equation gives yp′′ + 9yp = (2C + 4Dx + 2F ) cos(x) + (2D −
4Cx − 2E) sin(x) = sin(x) + x cos(x), or 2C + 2F = 0, 2D − 2E = 1, −4C = 0,
and
24D = 1. The general solution is therefore y(x) = A cos(x) + B sin(x) +
1
4 x sin(x) − x cos(x) .
1 a 1
C= , aE = −ωD, D=− and E= .
4a 8ω(ω 2 + a2 ) 8(ω 2 + a2 )
x ω cos(2ωx) − a sin(2ωx)
y(x) = A + Be−2ax + + .
4a 8ω(a2 + ω 2 )
1 1 a
y(0) = A + B + = 0, and y ′ (0) = −2aB + − = 0.
8(a2 + ω 2 ) 4a 4(a2 + ω 2 )
or
x sin(2ax)
y ′ (x) − y ′ (0) + 2a[y(x) − y(0)] = − .
2 4a
32 Advanced Engineering Mathematics with MATLAB
x sin(2ax)
y ′ + 2ay = − .
2 4a
Since this differential equation is already in canonical form, P (x) = 2a, and
µ(x) = e2ax . Multiplying by the integrating factor, we have that
or
x x
e2aξ e2aξ
e2ax y(x) = (2aξ − 1) − [a sin(2ωξ) − ω cos(2ωξ)] .
8a2 0 8ω(a2 + ω 2 ) 0
Section 2.5
d2 x X
m = forces = mg − kx,
dt2
or
d2 x
m + kx = mg.
dt2
Because the system is initially at rest and the coordinate system is chosen so
that x(0) = 0, x(0) = x′ (0) = 0.
The general solution to this differential equation is x(t) = A cos(ωt) +
B sin(ωt) + mg/k, where ω 2 = k/m. Since x′ (0) = 0, B = 0. Because
x(0) = 0, A = −mg/k. Therfore, x(t) = mg[1 − cos(ωt)]/k.
d2 I I
L 2
+ = ωE0 sin(ωt).
dt C
The general solution is
ωE0 sin(ωt)
I(t) = A sin(ω1 t + θ) − ,
Lω 2 − 1/C
√
where ω1 = 1/ LC. The initial condition I(0) = 0 yields θ = 0. On the
other hand, the initial condition I ′ (0) = 0 gives A = ω1 ω 2 E0 /(Lω 2 − 1/C).
Therefore, the final solution is
ω 1 ω 2 E0 ωE0 sin(ωt)
I(t) = sin(ω1 t) − .
Lω 2 − 1/C Lω 2 − 1/C
F0 sin(ωt − ϕ)
x(t) = e−ct/(2m) [A cos(ω0 t) + B sin(ω0 t)] + p .
c2 ω 2 + (k − mω 2 )2
2 2
6.
The characteristic polynomial 2is m + Rm/L + 1/(LC) = [m + R/(2L)] +
1/(LC) − R /(4L ) = 0. If ω = 1/(LC) − R2 /(4L2 ) > 0, then Q(t) =
2 2
Section 2.6
′′
1. First we find the homogeneous solution to the differential equation yH −
′ x 3x
4yH + 3yH = 0. Its solution is yH (x) = Ae + Be . According to variation of
parameters, the particular solution is of the form yp (x) = u1 (x)ex + u2 (x)e3x .
Substitution into the differential equation yields the following system of equa-
tions ex u′1 (x) + e3x u′2 (x) = 0 and ex u′1 (x) + 3e3x u′2 (x) = e−x . Solving for
u′1 (x) and u′2 (x), u′1 (x) = − 12 e−2x or u1 (x) = 14 e−2x , and u′2 (x) = 21 e−4x or
u2 (x) = − 81 e−4x . The general solution is y(x) = Aex + Be3x + u1 (x)ex +
u2 (x)e3x = Aex + Be3x + 18 e−x .
′′
2. First we find the homogeneous solution to the differential equation yH −
′ 2x −x
yH − 2yH = 0. Its solution is yH (x) = Ae + Be . According to variation of
parameters, the particular solution is of the form yp (x) = u1 (x)e2x +u2 (x)e−x .
Substitution into the differential equation yields the following system of equa-
tions e2x u′1 (x) + e−x u′2 (x) = 0 and 2e2x u′1 (x) − e−x u′2 (x) = x. Solving
for u′1 (x) and u′2 (x), u′1 (x) = 13 xe−2x or u1 (x) = − 121
(2x + 1)e−2x , and
′ 1 x 1 x
u2 (x) = − 3 xe or u2 (x) = − 3 (x − 1)e . The general solution is y(x) =
Ae2x + Be−x + u1 (x)e2x + u2 (x)e−x = Aex + Be3x − 21 x + 14 .
′′
3. First we find the homogeneous solution to the differential equation yH −
2x −2x
4yH = 0. Its solution is yH (x) = Ae + Be . According to variation of pa-
rameters, the particular solution is of the form yp (x) = u1 (x)e2x + u2 (x)e−2x .
Substitution into the differential equation yields the following system of equa-
tions e2x u′1 (x) + e−2x u′2 (x) = 0 and 2e2x u′1 (x) − 2e−2x u′2 (x) = xex . Solv-
ing for u′1 (x) and u′2 (x), u′1 (x) = 14 xe−x or u1 (x) = − 41 (x + 1)e−x , and
u′2 (x) = − 14 xe3x or u2 (x) = − 36
1
(3x − 1)e3x . The general solution is y(x) =
2x −2x
Ae + Be + u1 (x)e + u2 (x)e−2x = Ae2x + Be−2x − (3x + 2)ex /9.
2x
′′
4. First we find the homogeneous solution to the differential equation yH +
′
9yH = 0. Its solution is yH (x) = A cos(3x)+B sin(3x). According to variation
Worked Solutions 35
′′
7. First we find the homogeneous solution to the differential equation yH −
′ 2x 2x
4yH + 4yH = 0. Its solution is yH (x) = Ae + Bxe . According to varia-
tion of parameters, the particular solution is of the form yp (x) = u1 (x)e2x +
u2 (x)xe2x . Substitution into the differential equation yields the following sys-
tem of equations e2x u′1 (x)+xe2x u′2 (x) = 0, and 2e2x u′1 (x)+(2x+1)e2x u′2 (x) =
36 Advanced Engineering Mathematics with MATLAB
(x + 1)e2x . Solving for u′1 (x) and u′2 (x), u′1 (x) = −x − x2 or u1 (x) =
− 21 x2 − 13 x3 , and u′2 (x) = 1 + x or u2 (x) = x + 21 x2 . The general solution
is
y(x) = Ae2x +Bxe2x +u1 (x)e2x +u2 (x)xe2x = Ae2x +Bxe2x + 21 x2 + 16 x3 e2x .
′′
8. First we find the homogeneous solution to the differential equation yH −
x −x
4yH = 0. Its solution is yH (x) = Ae + Be . According to variation
of parameters, the particular solution is of the form yp (x) = u1 (x)ex +
u2 (x)e−x . Substitution into the differential equation yields the following
system of equations ex u′1 (x) + e−x u′2 (x) = 0, and ex u′1 (x) − e−x u′2 (x) =
sin2 (x). Solving for u′1 (x) and u′2 (x), u′1 (x) = 12 e−x sin2 (x), or u1 (x) =
− 10 e [2 + sin(x) + 2 cos(x)], and u′2 (x) = − 21 ex sin2 (x), or u2 (x) = − 10
1 −x 1 x
e
x −x x
[2 + sin(x) − 2 cos(x)]. The general
solution
is y(x) = Ae +Be +u 1 (x)e +
u2 (x)e−x = Aex + Be−x − 51 2 + sin2 (x) .
′′
9. First we find the homogeneous solution to the differential equation yH −
′
2yH + yH = 0. Its solution is yH (x) = Aex + Cxex . According to variation of
parameters, the particular solution is of the form yp (x) = u1 (x)ex + u2 (x)xex .
Substitution into the differential equation yields the following system of equa-
tions ex u′1 (x) + xex u′2 (x) = 0 and ex u′1 (x) + (ex + xex )u′2 (x) = ex /x. Solving
for u′1 (x) and u′2 (x), u′1 (x) = −1, or u1 (x) = −x, and u′2 (x) = 1/x, or u2 (x) =
ln(x). The general solution is y(x) = Aex + Cxex + u1 (x)ex + u2 (x)xex =
Aex + Bxex + x ln(x)ex .
′′
10. First we find the homogeneous solution to the differential equation yH +
yH = 0. Its solution is yH (x) = A cos(x) + B sin(x). According to variation of
parameters, the particular solution is of the form yp (x) = u1 (x) cos(x) +
u2 (x) sin(x). Substitution into the differential equation yields the follow-
ing system of equations cos(x)u′1 (x) + sin(x)u′2 (x) = 0, and − sin(x)u′1 (x) +
cos(x)u′2 (x) = tan(x). Solving for u′1 (x) and u′2 (x), u′1 (x) = − sin2 (x)/ cos(x),
or u1 (x) = − ln|sec(x) + tan(x)| + sin(x), and u′2 (x) = sin(x), or u2 (x) =
− cos(x). The general solution is
Section 2.7
Section 2.8
the equilibra. Any displacement from this equilibrium moves off to infinity.
Therefore, the equilibrium is unstable.
5. The curves on the phase diagram are given by v 2 − x = C if |x| > 2 and
v = C if |x| < 2. The equilibrium points are v = 0 and |x| < 2. Therefore,
there are infinite number of equilibrium points, all located along the x-axis
for |x| < 2. Any displacement from these equilbria moves off to infinity and
all of the equilibria are unstable.
Section 2.9
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% MATLAB Code for Pendulum Problem
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% initialize parameters
for i = 1:length(t)-1
theta g = theta(i) + delta t*thetap(i);
thetap g = thetap(i) - b*delta t*thetap(i) ...
- omega 0 sq*delta t*theta(i);
avg 1 = (theta(i) + theta g) / 2;
avg 2 = (thetap(i) + thetap g) / 2;
theta(i+1) = theta(i) + delta t*avg 2;
thetap(i+1) = thetap(i) - b*delta t*avg 2 ...
- omega 0 sq*delta t*avg 1;
if ((abs(theta(i)) < delta t/2) & (thetap(i) > 0))
thetap(i+1) = thetap(i+1) + k; end % impulse forcing
end
Worked Solutions 39
plot(theta,thetap,’k’); xlabel(’\theta’,’FontSize’,25);
ylabel(’\theta^\prime’,’FontSize’,25)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Section 3.1
1.
4 5
A+B = =B+A
3 4
2.
3 4 1 1 2 3
A−B = − =
1 2 2 2 −1 0
1 1 3 4 −2 −3
B−A= − =
2 2 1 2 1 0
3.
9 12 2 2 7 10
3A − 2B = − =
3 6 4 4 −1 2
6 8 1 1 5 7 15 21
3(2A − B) = 3 − =3 =
2 4 2 2 0 2 0 6
4.
3 1 1 2 1 1
AT = , BT = , (B T )T =
4 2 1 2 2 2
5. T
4 5T 4 3
(A + B) = =
3 4 5 4
3 1 1 2 4 3
AT + B T = + =
4 2 1 2 5 4
6.
1 1 1 2 2 3
B + BT = + =
2 1 2 2 3 4
1 1 1 2 0 −1
B − BT = − =
2 2 1 2 1 0
40 Advanced Engineering Mathematics with MATLAB
7.
3 4 1 1 11 11
AB = =
1 2 2 2 5 5
3 1 1 1 5 5
AT B = =
4 2 2 2 8 8
1 1 3 4 4 6
BA = =
2 2 1 2 8 12
1 2 3 4 5 8
BT A = =
1 2 1 2 5 8
8.
2 3 4 3 4 13 20
A = =
1 2 1 2 5 8
1 1 1 1 3 3
B2 = =
2 2 2 2 6 6
9.
T 1 1 1 2 2 4
BB = =
2 2 1 2 4 8
T 1 2 1 1 5 5
B B= =
1 2 2 2 5 5
10.
2 13 20 9 12 1 0 5 8
A − 3A + I = − + =
5 8 3 6 0 1 2 3
11.
3 59 92 6 8 65 100
A + 2A = + =
23 36 2 4 25 40
12.
4 2 269 420 52 80 2 0 219 340
A − 4A + 2I = − + =
105 164 20 32 0 2 85 134
11 8
27 11 8
13. yes 14. no 15. yes 4
2 5
5 3
Worked Solutions 41
10 24 54
16. yes 17. no
3 7 16
18.
4 4 3 3 7 7 1 1
4A + 3A = 4 8 + 3 6 = 7 14 = 7 1 2 = 7A.
12 4 9 3 21 7 3 1
19.
2 2 10 10 1 1
5(2A) = 5 2 4 = 10 20 = 10 1 2 = 10A.
6 2 30 10 3 1
20.
T 1 1
1 1 3
(AT )T = = 1 2 = A
1 2 1
3 1
21.
3 −1 1 1 4 0
(A + B) + C = + =
7 1 1 1 8 2
2 1 2 −1 4 0
A + (B + C) = + =
3 1 5 1 8 2
22.
6 −4 1 1 2 2
(AB)C = =
7 −6 1 1 1 1
2 1 −1 −1 2 2
A(BC) = =
3 1 4 4 1 1
23.
2
2 −1 1 9 −1
A(B + C) = =
3
5 1 1 11 −2
6 −4 3 3 9 −1
AB + AC = + =
7 −6 4 4 11 −2
24.
3 −1 1 1 2 2
(A + B)C = =
7 1 1 1 8 8
3 3 −1 −1 2 2
AC + BC = + =
4 4 4 4 8 8
42 Advanced Engineering Mathematics with MATLAB
25.
3 −1 2 1 1 0
=
−5 2 5 3 0 1
26.
0 1 0 0 1 0 1 0 0
1 0 01 0 0 = 0 1 0
0 0 1 0 0 1 0 0 1
27.
1 −2 x1 5
=
3 1 x2 1
28.
2 1 4 x1 2
4 2 5 x2 = 6
6 −3 5 x3 2
29.
0 1 2 3 x1 2
3 0 −4 −4 x2 5
=
1 1 1 1 x3 −3
2 −3 1 −3 x4 7
Section 3.2
1.
3 5
= −3 + 10 = 7
−2 −1
2.
5 −1
= 20 − 8 = 12
−8 4
3.
3 1 2 0 −11 −13
−11 −13
2 4 5 = 0 −4 −5 = = 55 − 54 = 1
−4 −5
1 4 5 1 4 5
4.
4 3 0 4 3 0
4 3
3 2 2 = 3 2 2 = −2 = 50
11 2
5 −2 −4 11 2 0
Worked Solutions 43
5.
1 3 2 −5 0 −7
−5 −7
4 1 1 = 2 0 −2 = − = −24
2 −2
2 1 3 2 1 3
6.
2 −1 2 2 −1 2
7 9 7 9
1 3 3 = 7 0 9 = = = −7
7 8 0 −1
5 1 6 7 0 8
7.
2 0 0 1 2 0 0 1
0 1 0
0 1 0 0 0 1 0 0
= =− 1 6 1
1 6 1 0 1 6 1 0
−5 1 −2
1 1 −2 3 −5 1 −2 0
1 1
= =3
−5 −2
8.
2 1 2 1 2 1 2 1
−1 −2 −2
3 0 2 2 −1 −2 −2 0
= = − −3 1 −3
−1 2 −1 1 −3 1 −3 0
−5 1 1
−3 2 3 1 −5 1 1 0
−1 0 0
7 3
= − −3 7 3 = = 44
11 11
−5 11 11
9.
1 1 1 1 1 1 1 1
a b c d 0 b−a c−a d−a
=
a2 b2 c2 d2 0 b(b − a) c(c − a) d(d − a)
a3 b3 c3 d 3
0 b2 (b − a) c2 (c − a) d2 (d − a)
1 1 1
= (b − a)(c − a)(d − a) b c d
b2 c 2 d 2
1 1 1
= (b − a)(c − a)(d − a) 0 c−b d−b
0 c(c − b) d(d − b)
1 1
= (b − a)(c − a)(d − a)(c − b)(d − b)
c d
= (b − a)(c − a)(d − a)(c − b)(d − b)(d − c)
44 Advanced Engineering Mathematics with MATLAB
10.
a b+c 1 a b+c 1
b−a a−b
b a+c 1 = b−a a−b 0 =
c−a a−c
c a+b 1 c−a a−c 0
b−a b−a
=− =0
c−a c−a
11. Expand the determinant using the cofactor expansion along the row or
column that contains the zeros. Regardless of the value of the minors, the
sum will equal zero.
Section 3.3
1.
1 2 x1 3 1 2 3 2 1 3
= , = −5, = −9, = −3
3 1 x2 6 3 1 6 1 3 6
Therefore, x1 = 95 , x2 = 35 .
2.
2 1 x1 −3 2 1 −3 1 2 −3
= , = −3, = 2, =5
1 −1 x2 1 1 −1 1 −1 1 1
Therefore,
x1 = − 23 , x2 = − 53 .
3.
1 2 −2 x1 4 1 2 −2
2 1 1 x2 = −2 , 2 1 1 = −6
−1 1 −1 x3 2 −1 1 −1
4 2 −2 1 4 −2 1 2 4
−2 1 1 = 0, 2 −2 1 = 0, 2 1 −2 = 12
2 1 −1 −1 2 −1 −1 1 2
Therefore, x1 = 0, x2 = 0, x3 = −2.
4.
2 3 −1 x1 −1 2 3 −1
−1 −2 1 x2 = 5 , −1 −2 1 =4
3 −1 0 x3 −2 3 −1 0
Worked Solutions 45
−1 3 −1 2 −1 −1 2 3 −1
5 −2 1 = 2, −1 5 1 = 14, −1 −2 5 = 50
−2 −1 0 3 −2 0 3 −1 −2
Therefore,
x1 = 21 , x2 = 72 , x3 = 25
2 .
Section 3.4
1.
2 1 x1 4 2 1 4 2 1 4
= ⇒ B= =
5 −2 x2 1 5 −2 1 0 1 2
Therefore, x2 = 2, x1 = 1.
2.
1 1 x1 0 1 1 0 1 1 0
= ⇒ B= =
3 −4 x2 1 3 −4 1 0 −7 1
Therefore,
x2 = − 17 , x1 = 71 .
3.
−1 1 2 x1 0
3 4 1 x2 = 0
−1 1 2 x3 0
−1 1 2 0 −1 1 2 0
B= 3 4 1 0 = 0 1 1 0
−1 1 2 0 0 0 0 0
Therefore, x3 = α, x2 = −α, x1 = α.
4.
6 14 x1 2
1 −4 x2 = 3
2
−2 5 3 x3 8
4 6 1 2 4 6 1 2 4 6 1 2
B=2 1 −4 3 = 0 4 9 −4 = 0 4 9 −4
3 −2 5 8 0 −7 22 7 0 0 1 0
Therefore,
x3 = 0, x2 = −1, x1 = 2.
46 Advanced Engineering Mathematics with MATLAB
5.
31 −2 x1 −3
1
−1 2 x2 = −1
−43 −6 x3 4
1 −1 2 −1 1 −1 2 −1
B= 3 1 −2 −3 = 0 1 −2 0
−4 3 −6 4 0 1 −2 0
1 −1 2 −1 1 0 0 −1
= 0 1 −2 0 = 0 1 −2 0
0 0 0 0 0 0 0 0
Therefore, x3 = α, x2 = 2α, x1 = −1.
6.
1
−3 7 x1 2
2
4 −3 x2 = −1
−3
7 2 x3 3
1 −3 7 2 1 −3 7 2
B= 2 4 −3 −1 = 0 10 −17 −5
−3 7 2 3 0 −2 23 9
1 −3 7 2
= 0 2 −23 −9
0 0 49 20
Therefore,
x3 = 0.408163, x2 = 0.193875, x1 = −0.275516.
7.
1 −1 3 x1 5
2 −4 7 x2 = 7
4 −9 2 x3 −15
1 −1 3 5 1 −1 3 5
B=2 −4 7 7 = 0 1 2 7
4 −9 2 −15 0 −2 1 −3
1 −1 3 5 1 0 0 1
=0 1 2 7 =0 1 2 7
0 0 5 11 0 0 5 11
Therefore, x3 = 2.2, x2 = 2.6, x1 = 1.
8.
1 1 1 1 x1 −1
2 −1 3 0 x2 1
=
0 2 0 3 x3 15
−1 2 0 1 x4 −2
Worked Solutions 47
1 1 1 1 −1 1 1 1 1 −1
2 −1 3 0 1 0 −3 1 −2 3
B= =
0 2 0 3 15 0 2 0 3 15
−1 2 0 1 −2 0 3 1 2 −3
1 1 1 1 −1 1 1 1 1 −1
0 −1 1 1 18 0 −1 1 1 18
= =
0 0 −2 5 51 0 0 2 0 0
0 0 2 0 0 0 0 0 5 51
Therefore,
x4 = 10.2, x3 = 0, x2 = −7.8, x1 = −3.4
9.
−3 5 1 0 −1 6 1 1 −1 6 1 1
= =
2 1 0 1 2 1 0 1 0 13 2 3
−13 0 1 −5 1 0 −1/13 5/13
= =
0 13 2 3 0 1 2/13 3/13
Therefore,
−1/13 5/13
A−1 = .
2/13 3/13
10.
3 −1 1 0 3 −1 1 0 1 0 2 1
= =
−5 2 0 1 −2 1 1 1 −2 1 1 1
1 0 2 1
=
0 1 5 3
Therefore,
2 1
A−1 = .
5 3
11.
19 2 −9 1 0 0 −1 −3 1 1 5 0
−4 −1 2 0 1 0 = 0 −1 0 0 1 −2
−2 0 1 0 0 1 −2 0 1 0 0 1
−1 −3 1 1 5 0
= 0 −1 0 0 1 −2
0 6 −1 −2 −10 1
−1 0 1 1 2 6
= 0 −1 0 0 1 −2
0 0 −1 −2 −4 −11
1 0 0 1 2 5
=0 1 0 0 −1 2
0 0 1 2 4 11
48 Advanced Engineering Mathematics with MATLAB
Therefore,
1 2 5
A−1 = 0 −1 2 .
2 4 11
12.
1 2 5 1 0 0 1 2 5 1 0 0
0 −1 2 0 1 0 = 0 −1 2 0 1 0
2 4 11 0 0 1 0 0 1 −2 0 1
1 0 9 1 2 0
=0 −1 2 0 1 0
0 0 1 −2 0 1
1 0 0 19 2 −9
=0 1 0 −4 −1 2
0 0 1 −2 0 1
Therefore,
19 2 −9
A−1 = −4 −1 2 .
−2 0 1
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% MATLAB Code for Finite Fourier Series
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
AA(m,n+N+1) = sin(n*t(m));
end
end
for n = 1:N
a exact = ((-1)∧n-1) / (pi*n*n);
[n a exact x(n+1)] % print out An
end
for n = 1:N
b exact = -(-1)∧n / n;
[n b exact x(n+N+1)]
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% MATLAB Code for Fredholm Integral Project
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
clear; a = 0; b = 1; n = 20; h = (b-a)/n;
D = zeros(n+1); K = zeros(n+1); I = eye(n+1);
for i = 1:n-1
if (mod(i,2) == 0)
D(i+1,i+1) = 2*h/3;
else
D(i+1,i+1) = 4*h/3;
end; end
for i = 0:n
xx = i*h; x(i+1) = xx;
50 Advanced Engineering Mathematics with MATLAB
if (iselect == 1)
exact(i+1) = xx*xx; f(i+1) = 0.9*xx*xx; end
if (iselect == 2)
exact(i+1) = exp(xx); f(i+1) = xx+(1-xx)*exp(xx); end
if (iselect == 3)
exact(i+1) = exp(xx); f(i+1) = 2*exp(xx)/3; end
if (iselect == 4)
exact(i+1) = exp(2*xx); f(i+1) = exp(2*xx+1/3); end
if (iselect == 5)
exact(i+1) = 1; f(i+1) = exp(xx)-xx; end
if (iselect == 6)
exact(i+1) = xx; f(i+1) = 5*xx/6; end
end
for i = 1:n+1
xx = x(i);
for j = 1:n+1
tt = x(j);
if (iselect == 1) K(i,j) = 0.5*xx*xx*tt*tt; end
if (iselect == 2) K(i,j) = xx*xx*exp(tt*(xx-1)); end
if (iselect == 3) K(i,j) = exp(xx-tt)/3; end
if (iselect == 4) K(i,j) = -exp(2*xx-5*tt/3)/3; end
if (iselect == 5) K(i,j) = -xx*(exp(xx*tt)-1); end
if (iselect == 6) K(i,j) = 0.5*xx*tt; end
end; end
B = I - K*D;
u = mldivide(B,f’);
if (iselect == 5)
diff5(i-1) = abs((u(i) - exact(i))/exact(i)); end
if (iselect == 6)
diff6(i-1) = abs((u(i) - exact(i))/exact(i)); end
end
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% MATLAB Code for LU Decompostion
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% for a 3 × 3 matrix, read the matrix A and right side b
clear; n = 3;
A = [3 -1 2; 1 2 3; 2 -2 -1]; b = transpose([12 11 2]);
b prime(1) = b(1)/L(1,1);
for i = 2:n
total = b(i);
for k = 1:i-1
total = total - L(i,k)*b prime(k);
end
b prime(i) = total / L(i,i);
end
for j = n-1:-1:1
52 Advanced Engineering Mathematics with MATLAB
total = b prime(j);
for k = j+1:n
total = total - U(j,k)*y(k);
end
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% MATLAB Code for QR Decompostion
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% for a 3 × 3 matrix, read the matrix A and right side b
clear; n = 3;
A = [3 -1 2; 1 2 3; 2 -2 -1]; b = transpose([12 11 2]);
[Q,R] = qr(A);
x = inv(A)*b
y = Q’*b;
x(n) = y(n)/R(n,n);
for j = n-1:-1:1
total = y(j);
for k = j+1:n
total = total - R(j,k)*x(k);
end
x(j) = total / R(j,j);
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Section 3.5
1.
3−λ 2
|A − λI| = = (3 − λ)(−2 − λ) − 6 = (λ − 4)(λ + 3) = 0.
3 −2 − λ
For λ = 4,
(3 − λ)x1 + 2x2 = −x1 + 2x2 = 0
and
3x1 − (2 + λ)x2 = 3x1 − 6x2 = 0.
Therefore,
2
x1 = 2x2 and x0 = α .
1
For λ = −3,
(3 − λ)x1 + 2x2 = 6x1 + 2x2 = 0
and
3x1 − (2 + λ)x2 = 3x1 + x2 = 0.
Therefore,
1
3x1 = −x2 and x0 = β .
−3
2.
3−λ −1
|A − λI| = = (3 − λ)(1 − λ) + 1 = (λ − 2)2 = 0.
1 1−λ
For λ = 2,
(3 − λ)x1 − x2 = x1 − x2 = 0
and
x1 + (1 − λ)x2 = x1 − x2 = 0.
Therefore,
1
x1 = x2 and x0 = α .
1
54 Advanced Engineering Mathematics with MATLAB
3.
2−λ −3 1 2 − λ −3 1
|A − λI| = 1 −2 − λ 1 = (λ − 1) 0 −1 1
1 −3 2−λ 1 −3 2−λ
2−λ −2 1 −2
= −(λ − 1) = (λ − 1)λ
1 −1 − λ 1 −1 − λ
= −(λ − 1)2 λ = 0.
For λ = 1,
(2 − λ)x1 − 3x2 + x3 = x1 − 3x2 + x3 = 0,
x1 − (2 + λ)x2 + x3 = x1 − 3x2 + x3 = 0
and
x1 − 3x2 + (2 − λ)x3 = x1 − 3x2 + x3 = 0.
Therefore,
−1 3
x1 − 3x2 + x3 = 0 and x0 = α 0 + β 1 .
1 0
For λ = 0,
(2 − λ)x1 − 3x2 + x3 = 2x1 − 3x2 + x3 = 0,
x1 − (2 + λ)x2 + x3 = x1 − 2x2 + x3 = 0
and
x1 − 3x2 + (2 − λ)x3 = x1 − 3x2 + 2x3 = 0.
Therefore,
1
x1 = x2 = x3 and x0 = γ 1 .
1
4.
−λ 1 0
|A − λI| = 0 −λ 1 = −λ3 = 0.
0 0 −λ
For λ = 0,
Therefore,
1
x2 = x3 = 0 and x0 = α 0 .
0
Worked Solutions 55
5.
1−λ 1 1
|A − λI| = 0 2−λ 1 = (1 − λ)2 (2 − λ) = 0.
0 0 1−λ
For λ = 1,
(1 − λ)x1 + x2 + x3 = x2 + x3 = 0,
(2 − λ)x2 + x3 = x2 + x3 = 0
and
(1 − λ)x3 = 0 · x3 = 0.
Therefore,
1 0
x2 = −x3 and x0 = α 0 + β 1 .
0 −1
For λ = 2,
(1 − λ)x1 + x2 + x3 = −x1 + x2 + x3 = 0,
(2 − λ)x2 + x3 = x3 = 0
and
(1 − λ)x3 = −x3 = 0.
Therefore,
1
x1 = x2 and x0 = γ 1 .
0
6.
1−λ 2 1
3−λ 1
|A − λI| = 0 3−λ 1 = (1 − λ)
5 −1 − λ
0 5 −1 − λ
= (1 − λ)(λ − 4)(λ + 2) = 0.
For λ = 1,
(1 − λ)x1 + 2x2 + x3 = 2x2 + x3 = 0,
(3 − λ)x2 + x3 = 2x2 + x3 = 0
and
5x2 − (1 + λ)x3 = 5x2 − 2x3 = 0.
Therefore,
1
x2 = x3 = 0 and x0 = α 0 .
0
56 Advanced Engineering Mathematics with MATLAB
For λ = 4,
(1 − λ)x1 + 2x2 + x3 = −3x1 + 2x2 + x3 = 0,
(3 − λ)x2 + x3 = −x2 + x3 = 0
and
5x2 − (1 + λ)x3 = 5x2 − 5x3 = 0.
Therefore,
1
x1 = x2 = x3 and x0 = β 1 .
1
For λ = −2,
(1 − λ)x1 + 2x2 + x3 = 3x1 + 2x2 + x3 = 0,
(3 − λ)x2 + x3 = 5x2 + x3 = 0
and
5x2 − (1 + λ)x3 = 5x2 + x3 = 0.
Therefore,
1
5x1 = 5x2 = −x3 and x0 = γ 1 .
−5
7.
4 − λ −5 1 4 − λ −5 5−λ
|A − λI| = 1 −λ −1 = 1 −λ 0
0 1 −1 − λ 0 1 −1 − λ
4 − λ −6 6 4−λ 0 6
= 1 −λ 0 = 1 −λ 0
0 1 −1 − λ 0 −λ −1 − λ
4−λ 0 6 4−λ 0 6
= −λ 1 1 0 = −λ 1 1 0
0 1 −1 − λ −1 0 −1 − λ
4−λ 6
= −λ = −λ(λ − 2)(λ − 1)
−1 −1 − λ
For λ = 0,
(4 − λ)x1 − 5x2 + x3 = 4x1 − 5x2 + x3 = 0,
x1 − λx2 − x3 = x1 − x3 = 0
and
x2 − (λ + 1)x3 = x2 − x3 = 0.
Worked Solutions 57
Therefore,
1
x1 = x2 = x3 and x0 = α 1 .
1
For λ = 1,
(4 − λ)x1 − 5x2 + x3 = 3x1 − 5x2 + x3 = 0,
x1 − λx2 − x3 = x1 − x2 − x3 = 0
and
x2 − (λ + 1)x3 = x2 − 2x3 = 0.
Therefore,
3
x1 = 3x3 , x2 = 2x3 and x0 = β 2 .
1
For λ = 2,
(4 − λ)x1 − 5x2 + x3 = 2x1 − 5x2 + x3 = 0,
x1 − λx2 − x3 = x1 − 2x2 − x3 = 0
and
x2 − (λ + 1)x3 = x2 − 3x3 = 0.
Therefore,
7
x1 = 7x3 , x2 = 3x3 and x0 = γ 3 .
1
8.
−2 − λ 0 1 −2 − λ 0 1
|A − λI| = 3 −λ −1 = 1 − λ −λ 0
0 1 1−λ 0 1 1−λ
−2 − λ 0 1 −2 − λ 0 1
= 1−λ 1−λ 1 − λ = (1 − λ) 1 1 1
0 1 1−λ 0 1 1−λ
−2 − λ 0 1
−2 − λ 1
= (1 − λ) 0 1 0 = (1 − λ)
−1 −λ
−1 1 −λ
= (λ + 1)2 (1 − λ)
For λ = 1,
(−2 − λ)x1 + x3 = −3x1 + x3 = 0,
3x1 − λx2 − x3 = 3x1 − x2 − x3 = 0
58 Advanced Engineering Mathematics with MATLAB
and
x2 + (1 − λ)x3 = x2 = 0.
Therefore,
1
3x1 = x3 , x2 = 0 and x0 = α 0 .
3
For λ = −1,
(−2 − λ)x1 + x3 = −x1 + x3 = 0,
3x1 − λx2 − x3 = 3x1 + x2 − x3 = 0
and
x2 + (1 − λ)x3 = x2 + 2x3 = 0.
Therefore,
1
x1 = x3 , x2 = −2x3 and x0 = β −2 .
1
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% MATLAB Code for Sturm-Liouville Project
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
clear
N = 5; deltax = pi / (N+1); h = 1 / deltax;
x = [0 deltax:deltax:pi-deltax pi];
A = zeros(N,N);
for i = 1:N
A(i,i) = 2 * h * h;
end
for i = 1:N-1
A(i,i+1) = - h * h;
Worked Solutions 59
end
for i = 2:N
A(i,i-1) = - h* h;
end
[eigenvector,eigenvalue] = eig(A);
for n = 1:N
u = eigenvector(1:N,n);
eigenfunction = [0 u’ 0];
eigenexact = sqrt(2/pi) * sin(n*x);
diff1 = 0; diff2 = 0; total = 0;
for i = 1:N
total = total + eigenfunction(i)*eigenfunction(i);
diff1 = diff1 + (eigenfunction(i)-eigenexact(i))^2;
diff2 = diff2 + (eigenfunction(i)+eigenexact(i))^2;
end
eigenfunction = eigenfunction/sqrt(total*deltax);
if (diff1 > diff2) eigenfunction = - eigenfunction; end
subplot(N/2,2,n), plot(x,eigenfunction,x,eigenexact)
axis([0 pi -1 1])
xlabel(’x’,’Fontsize’,20)
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% MATLAB Code for Singular Decomposition Project
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
clear
format long
intercept = -10; slope = 3; npts = 50; noise = 80;
xs = 10 + rand(npts, 1) * 90;
60 Advanced Engineering Mathematics with MATLAB
A = [xs, ones(npts,1)];
M = transpose(A)*A;
x = inv(M)*transpose(A)*ys;
% Get the coefficients a, b, c in ax + by + c = 0
m = x(1); c = x(2);
% Compute slope m and intercept i for y = mx + i
slope est = m; intercept est = c;
% Plot fitted line on top of old data
ys est = slope est * xs + intercept est;
plot(xs,ys,’b.’,xs,ys est,’k-’,’LineWidth’,2,’MarkerSize’,20);
xlabel(’x’,’FontSize’,20); ylabel(’y’,’FontSize’,20);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Section 3.6
1. In matrix notation,
′ 1 2 x1
x = x, where x= .
2 1 x2
Assuming x = x0 eλt ,
1 2 1 0
−λ x0 = 0.
2 1 0 1
1−λ 2
|A − λI| = = (1 − λ)2 − 4 = 0.
2 1−λ
and
2x1 + (1 − λ)x2 = 2x1 + 2x2 = 0.
Worked Solutions 61
1
Thus, the eigenvector is . For λ2 = 3,
−1
and
2x1 + (1 − λ)x2 = 2x1 − 2x2 = 0.
1
Thus, the eigenvector is . Therefore, the general solution is
1
1 −t 1
x = c1 e + c2 e3t .
−1 1
2. In matrix notation,
′ 1 −4 x1
x = x, where x= .
3 −6 x2
Assuming x = x0 eλt ,
1 −4 1 0
−λ x0 = 0.
3 −6 0 1
1−λ −4
|A − λI| = = (λ + 3)(λ + 2) = 0.
3 −6 − λ
and
3x1 − (6 + λ)x2 = 3x1 − 3x2 = 0.
1
Thus, the eigenvector is . For λ2 = −2,
1
and
3x1 − (6 + λ)x2 = 3x1 − 4x2 = 0.
4
Thus, the eigenvector is . Therefore, the general solution is
3
1 4
x = c1 e−3t + c2 e−2t .
1 3
62 Advanced Engineering Mathematics with MATLAB
3. In matrix notation,
′ 1 1 x1
x = x, where x= .
4 1 x2
Assuming x = x0 eλt ,
1 1 1 0
−λ x0 = 0.
4 1 0 1
1−λ 1
|A − λI| = = (λ − 3)(λ + 1) = 0.
4 1−λ
(1 − λ)x1 + x2 = 2x1 + x2 = 0
and
4x1 + (1 − λ)x2 = 4x1 + 2x2 = 0.
1
Thus, the eigenvector is . For λ2 = 3,
−2
(1 − λ)x1 + x2 = −2x1 + x2 = 0
and
4x1 + (1 − λ)x2 = 4x1 − 2x2 = 0.
1
Thus, the eigenvector is . Therefore, the general solution is
2
1 1
x = c1 e3t + c2 e−t .
2 −2
4. In matrix notation,
′ 1 5 x1
x = x, where x= .
−2 −6 x2
Assuming x = x0 eλt ,
1 5 1 0
−λ x0 = 0.
−2 −6 0 1
Worked Solutions 63
1−λ 5
|A − λI| = = (λ + 4)(λ + 1) = 0.
−2 −6 − λ
and
−2x1 − (6 + λ)x2 = −2x1 − 2x2 = 0.
1
Thus, the eigenvector is . For λ2 = −1,
−1
and
−2x1 − (6 + λ)x2 = −2x1 − 5x2 = 0.
5
Thus, the eigenvector is . Therefore, the general solution is
−2
1 −4t 5
x = c1 e + c2 e−t .
−1 −2
5. In matrix notation,
′ −3/2 −2 x1
x = x, where x= .
2 5/2 x2
Assuming x = x0 eλt ,
−3/2 −2 1 0
−λ x0 = 0.
2 5/2 0 1
−3/2 − λ −2
|A − λI| = = (λ − 1/2)2 = 0.
2 5/2 − λ
and
2x1 + (5/2 − λ)x2 = 2x1 + 2x2 = 0.
64 Advanced Engineering Mathematics with MATLAB
1
Thus, the only eigenvector is . Because of the repeated eigenvalue and
−1
the fact that we have only one eigenvector, we guess for the second solution:
a + bt a/2 + bt/2 + b
x= et/2 and x′ = et/2 .
c + dt c/2 + dt/2 + d
6. In matrix notation,
′ −3 −2 x1
x = x, where x= .
2 1 x2
Assuming x = x0 eλt ,
−3 −2 1 0
−λ x0 = 0.
2 1 0 1
−3 − λ −2
|A − λI| = = (λ + 1)2 = 0.
2 1−λ
and
2x1 + (1 − λ)x2 = 2x1 + 2x2 = 0.
1
Thus, the only eigenvector is . Because of the repeated eigenvalue and
−1
the fact that we have only one eigenvector, we guess for the second solution
a + bt −t ′ −a − bt + b
x= e and x = e−t .
c + dt −c − dt + d
Worked Solutions 65
−c + d = 2a + c, and − d = 2b + d;
or 2a + 2c = −b and b = −d. If we choose d = 2 and c = 0, the general
solution is
1 −t 1 − 2t
x = c1 e + c2 e−t .
−1 2t
7. In matrix notation,
′ 1 −1 x1
x = x, where x= .
1 3 x2
Assuming x = x0 eλt ,
1 −1 1 0
−λ x0 = 0.
1 3 0 1
1−λ −1
|A − λI| = = (λ − 2)2 = 0.
1 3−λ
(1 − λ)x1 − x2 = −x1 − x2 = 0
and
x1 + (3 − λ)x2 = x1 + x2 = 0.
1
Thus, the only eigenvector is . Because of the repeated eigenvalue and
−1
the fact that we have only one eigenvector, we guess for the second solution:
a + bt 2t ′ 2a + 2bt + b
x= e and x = e2t .
c + dt 2c + 2dt + d
b + 2a = a − c, 2b = b − d,
d + 2c = a + 3c and 2d = b + 3d;
66 Advanced Engineering Mathematics with MATLAB
8. In matrix notation,
3 2 x1
x′ = x, where x= .
−2 −1 x2
Assuming x = x0 eλt ,
3 2 1 0
−λ x0 = 0.
−2 −1 0 1
3−λ 2
|A − λI| = = (λ − 1)2 = 0.
−2 −1 − λ
and
−2x1 − (1 + λ)x2 = −2x1 − 2x2 = 0.
1
Thus, the only eigenvector is . Because of the repeated eigenvalue and
−1
the fact that we have only one eigenvector, we guess for the second solution:
a + ct t ′ a + ct + c
x= e and x = et .
b + dt b + dt + d
a + c = 3a + 2b, c = 3c + 2d,
9. In matrix notation,
′ −2 −13 x1
x = x, where x= .
1 4 x2
Worked Solutions 67
Assuming x = x0 eλt ,
−2 −13 1 0
−λ x0 = 0.
1 4 0 1
−2 − λ −13
|A − λI| = = (λ − 1)2 + 4 = 0.
1 4−λ
and
x1 + (4 − λ)x2 = x1 + (3 − 2i)x2 = 0.
3 − 2i
Thus, the eigenvector is . For λ2 = 1 − 2i,
−1
and
x1 + (4 − λ)x2 = x1 + (3 + 2i)x2 = 0.
3 + 2i
Thus, the eigenvector is . The general solution is
−1
3 − 2i t+2it 3 + 2i
x = c1 e + c2 et−2it
−1 −1
3 cos(2t) + 2 sin(2t) t 2 cos(2t) − 3 sin(2t)
= c3 e + c4 et ,
− cos(2t) sin(2t)
Assuming x = x0 eλt ,
3 −2 1 0
−λ x0 = 0.
5 −3 0 1
3−λ −2
|A − λI| = = λ2 + 1 = 0.
5 −3 − λ
68 Advanced Engineering Mathematics with MATLAB
and
5x1 − (3 + λ)x2 = 5x1 − (3 + i)x2 = 0.
3+i
Thus, the eigenvector is . For λ2 = −i,
5
and
5x1 − (3 + λ)x2 = 5x1 − (3 − i)x2 = 0.
3−i
Thus, the eigenvector is . The general solution is
5
3+i 3−i
x = c1 eit + c2 e−it
5 5
3 cos(t) − sin(t) cos(t) + 3 sin(t)
= c3 + c4 ,
5 cos(t) 5 sin(t)
Assuming x = x0 eλt ,
4 −2 1 0
−λ x0 = 0.
25 −10 0 1
4−λ −2
|A − λI| = = (λ + 3)2 + 1 = 0.
25 −10 − λ
and
25x1 − (10 + λ)x2 = 25x1 − (7 + i)x2 = 0.
Worked Solutions 69
2
Thus, the eigenvector is . For λ2 = −3 − i,
7−i
and
25x1 − (10 + λ)x2 = 25x1 − (7 − i)x2 = 0.
2
Thus, the eigenvector is . The general solution is
7+i
2 2
x = c1 e−3t+it + c2 e−3t−it
7−i 7+i
2 cos(t) 2 sin(t)
= c3 e−3t + c4 e−3t ,
7 cos(t) + sin(t) 7 sin(t) − cos(t)
Assuming x = x0 eλt ,
−3 −4 1 0
−λ x0 = 0.
2 1 0 1
−3 − λ −4
|A − λI| = = (λ + 1)2 + 4 = 0.
2 1−λ
and
2x1 + (1 − λ)x2 = 2x1 + (2 − 2i)x2 = 0.
−1 + i
Thus, the eigenvector is . For λ2 = −1 − 2i,
1
and
2x1 + (1 − λ)x2 = 2x1 + (2 + 2i)x2 = 0.
70 Advanced Engineering Mathematics with MATLAB
−1 − i
Thus, the eigenvector is . The general solution is
1
−1 + i −1 − i
x = c1 e−t+2it + c2 e−t−2it
1 1
− cos(2t) − sin(2t) cos(2t) − sin(2t)
= c3 e−t + c4 e−t ,
cos(2t) sin(2t)
Assuming x = x0 eλt ,
3 4 1 0
−λ x0 = 0.
−2 −1 0 1
3−λ 4
|A − λI| = = (λ − 1)2 + 4 = 0.
−2 −1 − λ
and
−2x1 − (1 + λ)x2 = −2x1 − 2(1 + i)x2 = 0.
−1 − i
Thus, the eigenvector is . For λ2 = 1 − 2i,
1
and
−2x1 − (1 + λ)x2 = −2x1 − 2(1 − i)x2 = 0.
−1 + i
Thus, the eigenvector is . The general solution is
1
−1 − i −1 + i
t+2it
x = c1 e + c2 et−2it
1 1
− cos(2t) + sin(2t) t − cos(2t) − sin(2t)
= c3 e + c4 et ,
cos(2t) sin(2t)
Worked Solutions 71
Assuming x = x0 eλt ,
5 3 1 1
+λ x0 = 0.
1 1 2 1
5+λ 3+λ
= (2 + λ)(1 − λ) = 0.
1 + 2λ 1+λ
and
(1 + 2λ)x1 + (1 + λ)x2 = −3x1 − x2 = 0.
1
Thus, the eigenvector is . For λ2 = 1,
−3
and
(1 + 2λ)x1 + (1 + λ)x2 = 3x1 + 2x2 = 0.
2
Thus, the eigenvector is . The general solution is
−3
1 2
x = c1 e−2t + c2 et .
−3 −3
Assuming x = x0 eλt ,
−1 −2 1 1
+λ x0 = 0.
−5 −7 1 2
72 Advanced Engineering Mathematics with MATLAB
−1 + λ −2 + λ
= (λ − 3)(λ + 1) = 0.
−5 + λ −7 + 2λ
and
(−5 + λ)x1 + (−7 + 2λ)x2 = −6x1 − 9x2 = 0.
−3
Thus, the eigenvector is . For λ2 = 3,
2
and
(−5 + λ)x1 + (−7 + 2λ)x2 = −2x1 − x2 = 0.
−1
Thus, the eigenvector is . The general solution is
2
−1 3t −3
x = c1 e + c2 e−t .
2 2
Assuming x = x0 eλt ,
1 −2 0 1 0 0
0 0 0 − λ0 1 0 x0 = 0.
−5 0 7 0 0 1
1−λ −2 0
1−λ 0
|A − λI| = 0 −λ 0 = −λ
−5 7−λ
−5 0 7−λ
= −λ(1 − λ)(7 − λ) = 0.
Worked Solutions 73
−λx2 = 0 · x2 = 0
and
−5x1 + (7 − λ)x3 = −5x1 + 7x3 = 0.
14
Thus, the eigenvector is 7 . For λ2 = 1,
10
−λx2 = −x2 = 0
and
−5x1 + (7 − λ)x3 = −5x1 + 6x3 = 0.
6
Thus, the eigenvector is 0 . For λ3 = 7,
5
−λx2 = −7x2 = 0
and
−5x1 + (7 − λ)x3 = −5x1 = 0.
0
Thus, the eigenvector is 0 . The general solution is
1
14 6 0
x = c1 7 + c2 0 et + c3 0 e7t .
10 5 1
Assuming x = x0 eλt ,
2 0 0 1 0 0
1 0 2 − λ 0 1 0 x0 = 0.
0 0 1 0 0 1
74 Advanced Engineering Mathematics with MATLAB
2−λ 0 0
−λ 2
|A − λI| = 1 −λ 2 = (2 − λ)
0 1−λ
0 0 1−λ
= (2 − λ)(−λ)(1 − λ) = 0.
Assuming x = x0 eλt ,
3 0 −2 1 0 0
−1 2 1 − λ 0 1 0 x0 = 0.
4 0 −3 0 0 1
3−λ 0 −2
3−λ −2
|A − λI| = −1 2−λ 1 = (2 − λ)
4 −3 − λ
4 0 −3 − λ
= (2 − λ)(λ − 1)(λ + 1) = 0.
Assuming x = x0 eλt ,
3 0 −1 1 0 0
−2 2 1 − λ 0 1 0 x0 = 0.
8 0 −3 0 0 1
76 Advanced Engineering Mathematics with MATLAB
3−λ 0 −1
3−λ −1
|A − λI| = −2 2−λ 1 = (2 − λ)
8 −3 − λ
8 0 −3 − λ
= (2 − λ)(λ − 1)(λ + 1) = 0.
(3 − λ)x1 − x3 = 4x1 − x3 = 0,
(3 − λ)x1 − x3 = 2x1 − x3 = 0,
(3 − λ)x1 − x3 = x1 − x3 = 0,
Section 3.7
The inverse B0−1 can be found using either Gaussian elimination or MATLAB.
To find x1 (t) and x2 (t), we have from Equation 3.7.5 that
x1 (t) 1 −3 e3t e3t − 3te3t
= = ,
x2 (t) 0 1 te3t te3t
or
x1 (t) = e3t − 3te3t and x2 (t) = te3t .
Note that x1 (0) = 1 while x2 (0) = 0.
Finally, we have that
At 1 0 3 5
e = x1 (t) + x2 (t) .
0 1 0 3
S = {et , tet , t2 et }.
Therefore,
et et et
Bt = tet e + tet
t
2et + tet ,
t 2 et 2tet + t2 et t t
2e + 4te + t e2 t
and
1 2 1 1 1 1 1 −1 0.5
A2 = 0 1 2 , B0 = 0 1 2 , B0−1 = 0 1 −1 .
0 0 1 0 0 2 0 0 0.5
The inverse B0−1 can be found using either Gaussian elimination or MATLAB.
To find x1 (t), x2 (t) and x3 (t), we have from Equation 3.7.5 that
t t
x1 (t) 1 −1 0.5 e e − tet + 12 t2 et
x2 (t) = 0 1 −1 tet = tet − t2 et ,
2 t 1 2 t
x3 (t) 0 0 0.5 t e 2 t e
Worked Solutions 79
or
x1 (t) = et − tet + 21 t2 et , x2 (t) = tet − t2 et , x3 (t) = 21 t2 et .
Note that x1 (0) = 1 while x2 (0) = x3 (0) = 0.
Finally, we have that
1 0 0 1 1 0 1 2 1
eAt = x1 (t) 0 1 0 + x2 (t) 0 1 1 + x3 (t) 0 1 2.
0 0 1 0 0 1 0 0 1
Substituting for x1 (t), x2 (t) and x3 (t) and simplifying, we finally obtain
t 1 2 t
e tet 2t e
At
e = 0 et tet .
0 0 et
Therefore,
e2t 2e2t 4e2t
Bt = te2t e + 2te2t
2t
4e2t + 4te2t ,
t2 e2t 2te2t + 2t2 e2t 2e + 8te2t + 4t2 e2t
2t
and
4 12 25 1 2 4 1 −2 2
A2 = 0 4 12 , B0 = 0 1 4 , B0−1 = 0 1 −2 .
0 0 4 0 0 2 0 0 0.5
The inverse B0−1 can be found using either Gaussian elimination or MATLAB.
To find x1 (t), x2 (t) and x3 (t), we have from Equation 3.7.5 that
2t 2t
x1 (t) 1 −2 2 e e − 2te2t + 2t2 e2t
x2 (t) = 0 1 −2 te2t = te2t − 2t2 e2t ,
2 2t 1 2 2t
x3 (t) 0 0 0.5 t e 2t e
or
x1 (t) = e2t − 2te2t + 2t2 e2t , x2 (t) = te2t − 2t2 e2t , x3 (t) = 12 t2 e2t .
80 Advanced Engineering Mathematics with MATLAB
Substituting for x1 (t), x2 (t) and x3 (t) and simplifying, we finally obtain
e2t 3te2t 4te2t + 29 t2 e2t
eAt = 0 e2t 3te2t .
2t
0 0 e
S = {et , tet , t2 et }.
Therefore,
et et et
Bt = tet e + tet
t
2et + tet ,
t 2 et 2tet + t2 et t t
2e + 4te + t e2 t
and
1 4 4 1 1 1 1 −1 0.5
A2 = 0 1 4 , B0 = 0 1 2 , B0−1 = 0 1 −1 .
0 0 1 0 0 2 0 0 0.5
The inverse B0−1 can be found using either Gaussian elimination or MATLAB.
To find x1 (t), x2 (t) and x3 (t), we have from Equation 3.7.5 that
t t
x1 (t) 1 −1 0.5 e e − tet + 21 t2 et
x2 (t) = 0 1 −1 tet = tet − t2 et ,
2 t 1 2 t
x3 (t) 0 0 0.5 t e 2t e
or
x1 (t) = et − tet + 21 t2 et , x2 (t) = tet − t2 et , x3 (t) = 21 t2 et .
Note that x1 (0) = 1 while x2 (0) = x3 (0) = 0.
Worked Solutions 81
Substituting for x1 (t), x2 (t) and x3 (t) and simplifying, we finally obtain
t
e 2tet 2t2 et
eAt = 0 et 2tet .
0 0 et
3−λ −2
|λI − A| = = (3 − λ)(−1 − λ) + 8 = 0.
4 −1 − λ
and
1 1 1 − 21
B0 = , B0−1 = 1 .
0 2 0 2
The inverse B0−1 can be found using either Gaussian elimination or MATLAB.
To find x1 (t) and x2 (t), we have from Equation 3.7.5 that
t t
x1 (t) 1 − 12 e cos(2t) e cos(2t) − 12 et sin(2t)
= 1 = 1 t ,
x2 (t) 0 2 et sin(2t) 2 e sin(2t)
or
x1 (t) = et cos(2t) − 12 et sin(2t) and x2 (t) = 21 et sin(2t).
Note that x1 (0) = 1 while x2 (0) = 0.
Finally, we have that
1 0 3 −2
eAt = x1 (t) + x2 (t) .
0 1 4 −1
and
x2H (t) = 2et sin(2t)x1 (0) + et cos(2t) − et sin(2t) x2 (0).
The particular solution is given by
Z t
xp (t) = eAs b(t − s) ds
0
Z t s t−s
e cos(2s) + es sin(2s) −es sin(2s) e
= s s s ds
0 2e sin(2s) e cos(2s) − e sin(2s) et−s
Z t
t cos(2s)
=e ds
0 sin(2s) + cos(2s)
et 0 et − sin(2t)
= − .
2 1 2 cos(2t) − sin(2t)
et et
x1p (t) = sin(2t) and x2p (t) = [1 + sin(2t) − cos(2t)] .
2 2
and
x2H (t) = 1
2 3et − 3e−t x1 (0) + 1
2 3e−t − et x2 (0).
The particular solution is given by
Z t
xp (t) = eAs b(t − s) ds
0
Z t−s
1 t 3es − e−s e−s − es e
= s −s −s s ds
2 0 3e − 3e 3e − e t −s
Z t t
e 3 − e−2s + (t − s) (e−s − es )
= ds
0 et 3 − 3e−2s + (t − s) (3e−s − es )
3tet − 3 sinh(t) + 2t
= .
3tet + 2e−t − 5 sinh(t) + 4t − 2
x1p (t) = 3tet − 3 sinh(t) + 2t and x2p (t) = 3tet + 2e−t − 5 sinh(t) + 4t − 2.
and
1 2 1 −1
B0 = , B0−1 = .
0 2 0 21
84 Advanced Engineering Mathematics with MATLAB
The inverse B0−1 can be found using either Gaussian elimination or MATLAB.
To find x1 (t) and x2 (t), we have from Equation 3.7.5 that
2t 2t
x1 (t) 1 −1 e cos(2t) e cos(2t) − e2t sin(2t)
= = ,
x2 (t) 0 12 e2t sin(2t) 1 2t
2 e sin(2t)
or
x1 (t) = e2t cos(2t) − e2t sin(2t) and x2 (t) = 12 e2t sin(2t).
Note that x1 (0) = 1 while x2 (0) = 0.
Finally, we have that
At 1 0 2 1
e = x1 (t) + x2 (t) .
0 1 −4 2
and
x2H (t) = −2e2t sin(2t)x1 (0) + e2t cos(2t)x2 (0).
The particular solution is given by
Z t
xp (t) = eAs b(t − s) ds
0
Z t 2s 1 2s
e cos(2s) 2 e sin(2s) (t − s)e2t−2s
= ds
0 −2e2s sin(2s) e2s cos(2s) −e2t−2s
Z t
(t − s) cos(2s) − 12 sin(2s)
= e2t ds
−2(t − s) sin(2s) − cos(2s)
0
0
= .
−te2t
2−λ −5
|λI − A| = = (2 − λ)(−2 − λ) + 5 = 0.
1 −2 − λ
Worked Solutions 85
The inverse B0−1 can be found using either Gaussian elimination or MATLAB.
To find x1 (t) and x2 (t), we have from Equation 3.7.5 that
x1 (t) 1 0 cos(t) cos(t)
= = ,
x2 (t) 0 1 sin(t) sin(t)
or
x1 (t) = cos(t) and x2 (t) = sin(t).
Note that x1 (0) = 1 while x2 (0) = 0.
Finally, we have that
1 0 2 −5
eAt = x1 (t) + x2 (t) .
0 1 1 −2
and
x2H (t) = sin(t)x1 (0) + [cos(t) − 2 sin(t)]x2 (0).
The particular solution is given by
Z t
xp (t) = eAs b(t − s) ds
0
Z t
cos(s) + 2 sin(s) −5 sin(s) − cos(t − s)
= ds
0 sin(s) cos(s) − 2 sin(s) sin(t − s)
Z t
− cos(s) cos(t − s) − 2 sin(s) cos(t − s) − 5 sin(s) sin(t − s)
= ds
0 − sin(s) cos(t − s) + cos(s) sin(t − s) − 2 sin(s) sin(t − s)
2t cos(t) − t sin(t) − 3 sin(t)
= .
t cos(t) − sin(t)
86 Advanced Engineering Mathematics with MATLAB
x1p (t) = 2t cos(t) − t sin(t) − 3 sin(t) and x2p (t) = t cos(t) − sin(t).
10. Our first task is to compute the characteristic polynomial p(λ) = 0. This
is simply
2−λ −1
|λI − A| = = λ2 + 1 = 0.
5 −2 − λ
The inverse B0−1 can be found using either Gaussian elimination or MATLAB.
To find x1 (t) and x2 (t), we have from Equation 3.7.5 that
x1 (t) 1 0 cos(t) cos(t)
= = ,
x2 (t) 0 1 sin(t) sin(t)
or
x1 (t) = cos(t) and x2 (t) = sin(t).
and
x2H (t) = 5 sin(t)x1 (0) + [cos(t) − 2 sin(t)]x2 (0).
Worked Solutions 87
x1p (t) = t cos(t) + t sin(t) and x2p (t) = t cos(t) + 3t sin(t) − sin(t).
11. Our first task is to compute the characteristic polynomial p(λ) = 0. This
is simply
2−λ 1 1
|λI − A| = 1 2−λ 1 = (4 − λ)(λ − 1)2 = 0.
1 1 2−λ
and
1 1 1 8/9 −12/9 −1/9
B0 = 0 1 2 , B0−1 = 2/9 15/9 −2/9 .
0 4 16 −1/9 −3/9 1/9
The inverse B0−1 can be found using either Gaussian elimination or MATLAB.
To find x1 (t), x2 (t) and x3 (t), we have from Equation 3.7.5 that
t
x1 (t) 8/9 −12/9 −1/9 e
x2 (t) = 2/9 15/9 −2/9 tet ,
x3 (t) −1/9 −3/9 1/9 e4t
or
x1 (t) = 98 et − 12 t
9 te + 91 e4t ,
x2 (t) = 92 et + 15 t
9 te − 92 e4t ,
88 Advanced Engineering Mathematics with MATLAB
and
x3 (t) = − 19 et − 93 tet + 19 e4t .
Note that x1 (0) = 1 while x2 (0) = x3 (0) = 0.
Finally, we have that
1 0 0 2 1 1 6 5 5
eAt = x1 (t) 0 1 0 + x2 (t) 1 2 1 + x3 (t) 5 6 5.
0 0 1 1 1 2 5 5 6
Substituting for x1 (t), x2 (t), and x3 (t) and simplifying, we finally obtain
4t
e + 2et e4t − et e4t − et
1
eAt = e4t − et e4t + 2et e4t − et .
3
e4t − et e4t − et e4t + 2et
t2 t 4t t 4 4
x1p (t) = − e − e + e4t − et ,
6 9 27 27
t2 t 4t t 4 4
x2p (t) = e − e + e4t − et ,
3 9 27 27
Worked Solutions 89
and
t2 t 5t t 4 4
x3p (t) = − e + e + e4t − et .
6 6 27 27
12. Our first task is to compute the characteristic polynomial p(λ) = 0. This
is simply
1−λ 1 1
|λI − A| = 0 2−λ 1 = (1 − λ)(2 − λ)(3 − λ) = 0.
0 0 3−λ
and
1 1 1 3 −3 1
B0 = 1 2 4, B0−1 = −5/2 4 −3/2 .
1 3 9 1/2 −1 1/2
The inverse B0−1 can be found using either Gaussian elimination or MATLAB.
To find x1 (t), x2 (t) and x3 (t), we have from Equation 3.7.5 that
t
x1 (t) 3 −3 1 e
x2 (t) = −5/2 4 −3/2 e2t ,
x3 (t) 1/2 −1 1/2 e3t
or
x1 (t) = 3et − 3e2t + e3t ,
x2 (t) = − 52 et + 4e2t − 23 e3t ,
and
x3 (t) = 21 et − e2t + 21 e3t .
Note that x1 (0) = 1 while x2 (0) = x3 (0) = 0.
Finally, we have that
1 0 0 1 1 1 1 3 5
eAt = x1 (t) 0 1 0 + x2 (t) 0 2 1 + x3 (t) 0 4 5.
0 0 1 0 0 3 0 0 9
Substituting for x1 (t), x2 (t), and x3 (t) and simplifying, we finally obtain
t
e e2t − et e3t − e2t
eAt = 0 e2t e3t − e2t .
0 0 e3t
90 Advanced Engineering Mathematics with MATLAB
13. Our first task is to compute the characteristic polynomial p(λ) = 0. This
is simply
1−λ 0 1
1−λ 1
|λI − A| = 0 −2 − λ 0 = (−2 − λ)
4 1−λ
4 0 1−λ
= (−2 − λ)(λ2 − 2λ − 3) = (−2 − λ)(λ − 3)(λ + 1) = 0.
and
1 3 9 1/10 3/2 −3/5
B0 = 1 −1 1, B0−1 = 3/20 1/4 −2/5 .
1 −2 4 1/20 −1/4 1/5
The inverse B0−1 can be found using either Gaussian elimination or MATLAB.
To find x1 (t), x2 (t) and x3 (t), we have from Equation 3.7.5 that
3t
x1 (t) 1/10 3/2 −3/5 e
x2 (t) = 3/20 1/4 −2/5 e−t ,
x3 (t) 1/20 −1/4 1/5 e−2t
or
1 3t
x1 (t) = 10 e + 23 e−t − 53 e−2t ,
3 3t
x2 (t) = 20 e + 41 e−t − 52 e−2t ,
and
1 3t
x3 (t) = 20 e − 41 e−t + 51 e−2t .
Note that x1 (0) = 1 while x2 (0) = x3 (0) = 0.
Finally, we have that
1 0 0 1 0 1 5 0 2
eAt = x1 (t) 0 1 0 + x2 (t) 0 −2 0 + x3 (t) 0 4 0.
0 0 1 4 0 1 0 0 5
Substituting for x1 (t), x2 (t), and x3 (t) and simplifying, we finally obtain
1 3t 1 −t 1 3t 1 −t
2e + 2e 0 4e − 4e
eAt = 0 e−2t 0 .
3t −t 1 3t 1 −t
e −e 0 2e + 2e
The homogeneous solution is therefore
x1H (t) = 12 e3t + 12 e−t x1 (0) + 1 3t
4e − 41 e−t x3 (0),
x2H (t) = e−2t x2 (0),
and
x3H (t) = e3t − e−t x1 (0) + 1 3t
2e + 12 e−t x3 (0).
The particular solution is given by
Z t
xp (t) = eAs b(t − s) ds
0
Z t 1 e3s + 1 e−s 0 1 3s 1 −s
−3et−s
2 2 4e − 4e
= 0 e−2s 0 6et−s ds
3s −s 1 3s 1 −s
0 e −e 0 e + 2e −4et−s
5 2s 1 −2s 2
Z t − e − e
2 2
= et 6e−3s ds
0 2s −2s
−5e + e
5 t 3t
1 −t
4 e −e + 4 (e − et )
= 2 et − e−2t .
5 t 3t 1 t −t
2 e −e + 2 (e − e )
92 Advanced Engineering Mathematics with MATLAB
14. Our first task is to compute the characteristic polynomial p(λ) = 0. This
is simply
1−λ 0 2
1−λ 2
|λI − A| = 0 1 − λ 0 = (1 − λ)
1 −λ
1 0 −λ
= (1 − λ)(λ2 − λ − 2) = (1 − λ)(λ − 2)(λ + 1) = 0.
and
1 −1 1 1/3 1 −1/3
B0 = 1 1 1, B0−1 = −1/2 1/2 0 .
1 2 4 1/6 −1/2 1/3
The inverse B0−1 can be found using either Gaussian elimination or MATLAB.
To find x1 (t), x2 (t) and x3 (t), we have from Equation 3.7.5 that
−t
x1 (t) 1/3 1 −1/3 e
x2 (t) = −1/2 1/2 0 et ,
x3 (t) 1/6 −1/2 1/3 e2t
or
x1 (t) = 31 e−t + et − 31 e2t ,
x2 (t) = − 12 e−t + 12 et ,
and
x3 (t) = 61 e−t − 12 et + 31 e2t .
Note that x1 (0) = 1 while x2 (0) = x3 (0) = 0.
Worked Solutions 93
Substituting for x1 (t), x2 (t), and x3 (t) and simplifying, we finally obtain
2
3e + 13 e−t
2t
0 2 2t
3e − 23 e−t
eAt = 0 et 0 .
1 2t 1 −t 1 2t 2 −t
3 e − 3e 0 3e + 3e
2 2t
x1H (t) = 3e + 13 e−t x1 (0) + 2 2t
3e − 32 e−t x3 (0),
and
1 2t
x3H (t) = 3e − 13 e−t x1 (0) + 1 2t
3e + 32 e−t x3 (0).
and
x3p (t) = 23 e2t − 16 e−t − 21 et .
94 Advanced Engineering Mathematics with MATLAB
15. Our first task is to compute the characteristic polynomial p(λ) = 0. This
is simply
1−λ 1 2
1−λ 1
|λI − A| = −1 3−λ 4 = (2 − λ)
−1 3−λ
0 0 2−λ
= (2 − λ)(λ2 − 4λ + 4) = (2 − λ)(λ − 2)2 = 0.
and
1 2 4 1 −2 2
B0 = 0 1 4, B0−1 = 0 1 −2 .
0 0 2 0 0 1/2
The inverse B0−1 can be found using either Gaussian elimination or MATLAB.
To find x1 (t), x2 (t) and x3 (t), we have from Equation 3.7.5 that
2t
x1 (t) 1 −2 2 e
x2 (t) = 0 1 −2 te2t ,
x3 (t) 0 0 1/2 t2 e2t
or
x1 (t) = e2t − 2te2t + 2t2 e2t ,
x2 (t) = te2t − 2t2 e2t ,
and
x3 (t) = 21 t2 e2t .
Note that x1 (0) = 1 while x2 (0) = x3 (0) = 0.
Finally, we have that
1 0 0 1 1 2 0 4 10
eAt = x1 (t) 0 1 0 + x2 (t) −1 3 4 + x3 (t) −4 8 18 .
0 0 1 0 0 2 0 0 4
Substituting for x1 (t), x2 (t), and x3 (t) and simplifying, we finally obtain
1−t t 2t + t2
eAt = e2t −t 1+t 4t + t2 .
0 0 1
Worked Solutions 95
Section 4.1
1.
i j k
a × b = 4 −2 5 = −3i + 19j + 10k
3 1 −1
a · (a × b) = −12 − 38 + 50 = 0, b · (a × b) = −9 + 19 − 10 = 0
2.
i j k
a × b = 1 −3 1 = −12i − 2j + 6k
2 0 4
96 Advanced Engineering Mathematics with MATLAB
a · (a × b) = −12 + 6 + 6 = 0
b · (a × b) = −24 + 0 + 24 = 0
3.
i j k
a×b= 1 1 1 = i − 8j + 7k
−5 2 3
a · (a × b) = 1 − 8 + 7 = 0, b · (a × b) = −5 − 16 + 21 = 0
4.
i j k
a×b= 8 1 −6 = −2i − 86j − 17k
1 −2 10
a · (a × b) = −16 − 86 + 102 = 0
b · (a × b) = −2 + 172 − 170 = 0
5.
i j k
a×b= 2 7 −4 = −3i − 2j − 5k
1 1 −1
a · (a × b) = −6 − 14 + 20 = 0, b · (a × b) = −3 − 2 + 5 = 0
6.
i j k
b × c = b1 b2 b3 = (b2 c3 − c2 b3 )i − (b1 c3 − c1 b3 )j + (b1 c2 − c1 b2 )k
c1 c2 c3
i j k
a × (b × c) = a1 a2 a3
b2 c 3 − c 2 b3 c 1 b3 − b 1 c 3 b1 c 2 − c 1 b2
= [a2 (b1 c2 − c1 b2 ) − a3 (c1 b3 − b1 c3 )]i
− [a1 (b1 c2 − c1 b2 ) − a3 (b2 c3 − c2 b3 )]j
+ [a1 (c1 b3 − b1 c3 ) − a2 (b2 c3 − c2 b3 )]k
(a · c)b − (a · b)c = (a1 c1 + a2 c2 + a3 c3 )b1 i + (a1 c1 + a2 c2 + a3 c3 )b2 j
+ (a1 c1 + a2 c2 + a3 c3 )b3 k − (a1 b1 + a2 b2 + a3 b3 )c1 i
− (a1 b1 + a2 b2 + a3 b3 )c2 j − (a1 b1 + a2 b2 + a3 b3 )c3 k
= [a2 (b1 c2 − c1 b2 ) − a3 (c1 b3 − b1 c3 )]i
− [a1 (b1 c2 − c1 b2 ) − a3 (b2 c3 − c2 b3 )]j
+ [a1 (c1 b3 − b1 c3 ) − a2 (b2 c3 − c2 b3 )]k
= a × (b × c)
Worked Solutions 97
7.
a × (b × c) = (a · c)b − (a · b)c
b × (c × a) = (b · a)c − (b · c)a
c × (a × b) = (c · b)a − (c · a)b
8.
∂ xy 2 ∂ xy 2 ∂ xy 2 y2 2xy 3xy 2
∇f = i+ j+ k= i+ 3 j− 4 k
∂x z3 ∂y z3 ∂z z3 z 3 z z
9.
∂ ∂ ∂
∇f = xy cos(yz) i + xy cos(yz) j + xy cos(yz) k
∂x ∂y ∂z
= y cos(yz)i + [x cos(yz) − xyz sin(yz)]j − xy 2 sin(yz)k
10.
∂ ∂
∇f = ln(x2 + y 2 + z 2 ) i + ln(x2 + y 2 + z 2 ) j
∂x ∂y
∂
+ ln(x2 + y 2 + z 2 ) k
∂z
2x 2y 2z
= 2 2 2
i+ 2 2 2
j+ 2 k
x +y +z x +y +z x + y2 + z2
11.
∂ ∂
∇f = x2 y 2 (2z + 1)2 i + x2 y 2 (2z + 1)2 j
∂x ∂y
∂
+ x2 y 2 (2z + 1)2 k
∂z
= 2xy 2 (2z + 1)2 i + 2x2 y(2z + 1)2 j + 4x2 y 2 (2z + 1)k
12.
∂ ∂
∇f = 2x − y 2 + z 2 i + 2x − y 2 + z 2 j
∂x ∂y
∂
+ 2x − y 2 + z 2 k = 2i − 2yj + 2zk
∂z
98 Advanced Engineering Mathematics with MATLAB
p p
16. pCone. Let f (x, y, z) = x2 + y 2 − z = 0. Then N = xi/ x2 + y 2 +
yj/ x2 + y 2 − k, and
x y k
n= p i+ p j− √ .
2(x2 + y 2 ) 2(x2 + y 2 ) 2
√ √
17. A plane. Let f (x, y, z) = y−z = 0. Then N = j−k, and n = j/ 2−k/ 2.
1 1 1
n = √ i + √ j + √ k.
3 3 3
2
19. A parabola of infinite extent along
√ the y-axis. Let
√ f (x, y, z) = z − x = 0.
2
Then N = −2xi + k, and n = −2xi/ 1 + 4x + k/ 1 + 4x . 2
20.
dx dy dz
= = ⇒ x = y + c1 , and y = z + c2 .
1 1 1
Upon substituting for the point, x = y − 1 and y = z.
21.
dx dy dz x 1 1
=− 2 = ⇒ = + c1 , and − = ln(z) + c2 .
2 y z 2 y y
Upon substituting for the point, y = 2/(x + 1), and z = exp [(y − 1)/y] .
Worked Solutions 99
22.
dx dy dz 1 1 1 1
=− 2 = 2 ⇒− = + c1 , and = − + c2 .
3x2 y z 3x y y z
Upon substituting for the point, x = 2y/(7y − 6), and z = 3y/(4y − 3).
23.
dx dy dz 1 1 1 1
= 2 = − 3 ⇒ = + c1 , and − = 2 + c2 .
x2 y z x y y 2z
Upon substituting for the point, y = x, and z 2 = y/(3y − 2).
24.
25. Let z = x + iy. Then Equation 4.1.13 to Equation 4.1.14 can be written
d2 z dz g
− 2Ωi sin(λ) + z = 0
dt2 dt L
by multiplying Equation 4.1.14 by i and adding the two equations together.
This equation has the characteristic equation:
q
r = Ω sin(λ)i ± i g/L + Ω2 sin2 (λ).
Taking the real and imaginary part of z(t) give x(t) and y(t) in Equation
4.1.15 to Equation 4.1.16.
26. A fluid cannot flow through a solid surface. The normal to the surface
is ∇f . Therefore, the direction derivative in the direction of the flow must
equal zero ∇f · v = 0 at the surface.
27. If we jump on an inertial frame moving with the sphere the fluid appears
to have the velocity v − u. The position of the surface of the sphere is r − ut.
Because the fluid cannot flow through the surface, (v − u) · (r − ut) = 0.
Section 4.2
1.
∂ ∂ ∂
∇·F= x2 z + yz 2 + xy 2 = 2xz + z 2
∂x ∂y ∂z
100 Advanced Engineering Mathematics with MATLAB
i j k
∂ ∂ ∂
∇×F= ∂x ∂y ∂z = (2xy − 2yz)i + (x2 − y 2 )j
2 2 2
x z yz xy
∂ ∂ ∂
∇·∇×F= 2xy − 2yz + x2 − y 2 + 0 =0
∂x ∂y ∂z
∂ 2 ∂ 2 ∂ 2
∇(∇ · F) = 2xz + z i + 2xz + z j + 2xz + z k
∂x ∂y ∂z
= 2zi + (2x + 2z)k
2.
∂ ∂ ∂
∇·F= 4x2 y 2 + 2x + 2yz + 3z + y 2 = 8xy 2 + 2z + 3
∂x ∂y ∂z
i j k
∂ ∂ ∂
∇×F= ∂x ∂y ∂z = (2 − 8x2 y)k
2 2 2
4x y
2x + 2yz 3z + y
∂ ∂ ∂
∇·∇×F= 0 + 0 + 2 − 8x2 y = 0
∂x ∂y ∂z
∂ 2 ∂ 2
∇(∇ · F) = = 8xy + 2z + 3 i + 8xy + 2z + 3 j
∂x ∂y
∂
+ 8xy 2 + 2z + 3 k = 8y 2 i + 16xyj + 2k
∂z
3.
∂ ∂ ∂
∇·F = (x − y)2 + e−xy + xze2y = 2(x − y) − xe−xy + xe2y
∂x ∂y ∂z
i j k
∂ ∂ ∂
∇×F= ∂x ∂y ∂z = 2xze2y i − ze2y j + 2(x − y) − ye−xy k
(x − y)2 exze−xy 2y
∂ ∂ ∂
∇·∇×F= 2xze2y + −ze2y + 2(x − y) − ye−xy = 0
∂x ∂y ∂z
∂ −xy 2y
∇(∇ · F) = = 2(x − y) − xe + xe i
∂x
∂ −xy 2y
+ 2(x − y) − xe + xe j
∂y
∂ −xy 2y
+ 2(x − y) − xe + xe k
∂z
= 2 − e−xy + xye−xy + e2y i + x2 e−xy + 2xe2y − 2 j
Worked Solutions 101
4.
∂ ∂ 2 ∂
∇·F= 3xy + 2xz + y 3 = 3y
∂x ∂y ∂z
i j k
∂ ∂ ∂
∇×F= ∂x ∂y ∂z = (3y 2 − 4xz)i + (2z 2 − 3x)k
2 3
3xy
2xz y
∂ 2 ∂ 2
∇·∇×F= 3y − 4xz + 2z − 3x = 0
∂x ∂z
∂ ∂ ∂
∇(∇ · F) = 3y i + 3y j + 3y k = 3j
∂x ∂y ∂z
5.
∂ ∂ 2 ∂ 3
∇·F= 5yz + x z + 3x = 0
∂x ∂y ∂z
i j k
∂ ∂ ∂
∇×F= ∂x ∂y ∂z = −x2 i + (5y − 9x2 )j + (2xz − 5z)k
2 3
5yz
x z 3x
∂ 2 ∂ 2 ∂
∇·∇×F= −x + 5y − 9x + 2xz − 5z = 0
∂x ∂y ∂z
∂ ∂ ∂
∇(∇ · F) = 0 i+ 0 j+ 0 k=0
∂x ∂y ∂z
6.
∂ ∂ ∂
∇·F= y3 + x3 y 2 − xy + xz − x3 yz = x3 y
∂x ∂y ∂z
i j k
∂ ∂ ∂
∇×F= ∂x ∂y ∂z
3 3 2
y x y − xy xz − x3 yz
= −x3 zi + (3x2 yz − z)j + (3x2 y 2 − y − 3y 2 )k
∂ 3 ∂ 2 ∂ 2 2 2
∇·∇×F= −x z + 3x yz − z + 3x y − y − 3y = 0
∂x ∂y ∂z
∂ 3 ∂ 3 ∂
∇(∇ · F) = x y i+ x y j+ x y k = 3x2 yi + x3 j
3
∂x ∂y ∂z
7.
∂ ∂ ∂
∇·F= xe−y + yz 2 + 3e−z = e−y + z 2 − 3e−z
∂x ∂y ∂z
102 Advanced Engineering Mathematics with MATLAB
i j k
∂ ∂ ∂
∇×F= ∂x ∂y ∂z = −2yzi + xe−y k
−y 2 −z
xeyz 3e
∂ ∂
∇·∇×F= −2yz + xe−y = 0
∂x ∂z
∂ −y 2 −z ∂ −y 2 −z
∇(∇ · F) = e + z − 3e i+ e + z − 3e j
∂x ∂y
∂
+ e−y + z 2 − 3e−z k = −e−y j + (2z + 3e−z )k
∂z
8.
∂ ∂ ∂ 3
∇·F= y ln(x) + 2 − 3yz + xyz = y/x − 3z + 3xyz 2
∂x ∂y ∂z
i j k
∂ ∂ ∂
∇×F= ∂x ∂y ∂z = (xz 3 + 3y)i + (−yz 3 )j − ln(x)k
3
y ln(x) 2 − 3yz xyz
∂ ∂ ∂
∇·∇×F= xz 3 + 3y + −yz 3 + − ln(x) = 0
∂x ∂y ∂z
∂ ∂
∇(∇ · F) = y/x − 3z + 3xyz 2 i + y/x − 3z + 3xyz 2 j
∂x ∂y
∂
+ y/x − 3z + 3xyz 2 k
∂z
= −y/x2 + 3yz 2 i + 1/x + 3xz 2 j + −3 + 6xyz k
9.
∂ ∂ ∂
∇·F= xyz + x3 yzez + xyez = yz + x3 zez + xyez
∂x ∂y ∂z
i j k
∂ ∂ ∂
∇×F= ∂x ∂y ∂z
xyz x3 yzez xyez
= (xe − x ye − x3 yzez )i + (xy − yez )j + (3x2 yzez − xz)k
z 3 z
∂ z 3 z 3 z ∂ z
∇·∇×F= xe − x ye − x yze + xy − ye
∂x ∂y
∂
+ 3x2 yzez − xz = 0
∂z
Worked Solutions 103
∂ 3 z z ∂ 3 z z
∇(∇ · F) = yz + x ze + xye i + yz + x ze + xye j
∂x ∂y
∂
+ yz + x3 zez + xyez k
∂z
= 3x2 zez + yez i + z + xez j + y + x3 ez + x3 zez + xyez k
10.
∂ ∂ ∂
∇·F = xy 3 − z 4 + 4x4 y 2 z + −y 4 z 5 = y 3 + 8x4 yz − 5y 4 z 4
∂x ∂y ∂z
i j k
∂ ∂ ∂
∇×F= ∂x ∂y ∂z
3 4 4 2 4 5
xy − z 4x y z −y z
= (−4y z − 4x y )i − 4z 3 j + (16x3 y 2 z − 3xy 2 )k
3 5 4 2
∂ ∂
∇·∇×F= −4y 3 z 5 − 4x4 y 2 + −4z 3
∂x ∂y
∂
+ 16x3 y 2 z − 3xy 2 = 0
∂z
∂ 3 4 4 4 ∂ 3 4 4 4
∇(∇ · F) = y + 8x yz − 5y z i + y + 8x yz − 5y z j
∂x ∂y
∂
+ y 3 + 8x4 yz − 5y 4 z 4 k
∂z
= 32x3 yzi + 3y 2 + 8x4 z − 20y 3 z 4 j + 8x4 y − 20y 4 z 3 k
11.
∂ 2 ∂ 2 ∂
∇·F= xy + xyz + xy cos(z) = y 2 + xz 2 − xy sin(z)
∂x ∂y ∂z
i j k
∂ ∂ ∂
∇×F= ∂x ∂y ∂z
2
xy xyz 2 xy cos(z)
= [x cos(z) − 2xyz]i − y cos(z)j + (yz 2 − 2xy)k
∂ ∂ ∂ 2
∇·∇×F= x cos(z) − 2xyz + −y cos(z) + yz − 2xy = 0
∂x ∂y ∂z
∂ ∂ 2
∇(∇ · F) = y 2 + xz 2 − xy sin(z) i + y + xz 2 − xy sin(z) j
∂x ∂y
∂ 2
+ y + xz 2 − xy sin(z) k
∂z
= [z 2 − y sin(z)]i + 2y − x sin(z) j + 2xz − xy cos(z) k
104 Advanced Engineering Mathematics with MATLAB
12.
∂ 2 ∂ 2 ∂
∇·F= xy + xyz + xy sin(z) = y 2 + xz 2 + xy cos(z)
∂x ∂y ∂z
i j k
∂ ∂ ∂
∇×F= ∂x ∂y ∂z
2
xy xyz 2 xy sin(z)
= [x sin(z) − 2xyz]i − y sin(z)j + (yz 2 − 2xy)k
∂ ∂ ∂ 2
∇·∇×F= x sin(z) − 2xyz + −y sin(z) + yz − 2xy = 0
∂x ∂y ∂z
∂ 2 2 ∂ 2 2
∇(∇ · F) = y + xz + xy cos(z) i + y + xz + xy cos(z) j
∂x ∂y
∂ 2
+ y + xz 2 + xy cos(z) k
∂z
= [z 2 + y cos(z)]i + 2y + x cos(z) j + 2xz − xy sin(z) k
13.
∂ 2 ∂ ∂
∇·F= xy + xyz + xy cos(z) = y 2 + xz − xy sin(z)
∂x ∂y ∂z
i j k
∂ ∂ ∂
∇×F= ∂x ∂y ∂z
2
xy xyz xy cos(z)
= [x cos(z) − xy]i − y cos(z)j + (yz − 2xy)k
∂ ∂ ∂
∇·∇×F= x cos(z) − xy + −y cos(z) + yz − 2xy = 0
∂x ∂y ∂z
∂ 2 ∂ 2
∇(∇ · F) = y + xz − xy sin(z) i + y + xz − xy sin(z) j
∂x ∂y
∂ 2
+ y + xz − xy sin(z) k
∂z
= [z − y sin(z)]i + 2y − x sin(z) j + x − xy cos(z) k
i j k
∂ ∂ ∂
∇×F= ∂x ∂y ∂z
P (x, y, z) Q(x, y, z) R(x, y, z)
= [Ry − Qz ]i + [Pz − Rx ]j + [Qx − Py ]k
Worked Solutions 105
i j k
∂ ∂ ∂
∇×∇×F= ∂x ∂y ∂z
R y − Qz Pz − R x Q x − Py
= [Pxx + Qxy + Rxz − Pxx − Pyy − Pzz ]i
+ [Pxy + Qyy + Ryz − Qxx − Qyy − Qzz ]j
+ [Pxz + Qyz + Rzz − Rxx − Ryy − Rzz ]k
= ∇ (∇ · F) − ∇2 F
(b)
i j k
∂ ∂ ∂
∇×F= ∂x ∂y ∂z = −4yi − 2zj − 3xk
3xy 4yz 2xz
i j k
∂ ∂ ∂
∇×∇×F= ∂x ∂y ∂z = 2i + 3j + 4k
−4y −2z −3x
∇ (∇ · F) = ∇(3y + 4z + 2x) = 2i + 3j + 4k, ∇2 F = 0
∇ × ∇ × F = ∇ (∇ · F) − ∇2 F = 2i + 3j + 4k
15.
1 ∂ 1 ∂2E 1 ∂2E
∇×∇×E = − (∇ × B) , ∇ (∇ · E)−∇2 E = − , ∇2 E =
c ∂t c2 ∂t2 c2 ∂t2
1 ∂ 1 ∂2B 1 ∂2B
∇×∇×B = (∇ × E) , ∇ (∇ · B)−∇2 B = − , ∇2 B =
c ∂t c2 ∂t2 c2 ∂t2
Section 4.3
1. Z Z
F · dr = y sin(πz) dx + x2 ey dy + 3xz dz
C C
Z 1
2
= t2 sin(πt3 ) dt + t2 et (2t dt) + 9t6 dt
0
1 1
1 2 1 9 7 16 2
=− cos(πt3 ) + et t2 − 1 + t = +
3π 0 0 7 0 7 3π
106 Advanced Engineering Mathematics with MATLAB
2. Z Z Z Z
F · dr = y dx + z dy + x dz = F · dr + F · dr
C C C1 C2
3.
Z Z Z 2
3 6
F · dr = ex dx + xexy dy + xyexyz dz = et dt + 2t2 et dt + 3t5 et dt
C C 0
2 2 2
2 3 1 6
= et + et + et = e2 + 23 e8 + 21 e64 − 13
6
0 3 0 2 0
4.
Z Z Z 2
F · dr = yz dx + xz dy + xy dz = t2 · t · 3t2 dt + t3 · t · 2t dt + t5 dt
C C 1
Z 2
2
= 6t5 dt = t6 1
= 63
1
5. Z Z Z Z
F · dr = y dx − x dy + 3xy dz = F · dr + F · dr
C C C1 C2
6.
Z Z Z Z Z
F · dr = (x + 2y) dx + (6y − 2x) dy = F · dr + F · dr + F · dr
C C C1 C2 C3
Z
7 7
F · dr = 2 +0− 2 =0
C
8. Z Z
F · dr = 2x dx + y dy + z dz
C C
Z 2π
= 2t dt + sin(t) cos(t) dt
0
+ [cos(t) + sin(t)][− sin(t) dt + cos(t) dt]
2π 2π 2π
= t2 + 1
2 sin2 (t) + 12 [cos(t) + sin(t)]2 = 4π 2
0 0 0
9.
Z Z
F · dr = (2y 2 + z) dx + 4xy dy + x dz
C C
Z 2π
= [2 sin2 (t) + t][− sin(t) dt] + 4 cos(t) sin(t)[cos(t) dt] + cos(t) dt
0
Z 2π
= [−2 sin(t) + 6 cos2 (t) sin(t) − t sin(t) + cos(t)] dt
0
2π
= [2 cos(t) − 2 cos3 (t) + t cos(t)] = 2π
0
10. Z Z
F · dr = x2 dx + y 2 dy + (z 2 + 2xy) dz
C C
Z
= x2 dx + y 2 dy + (z 2 + 2xy) dz
C1
Z
+ x2 dx + y 2 dy + (z 2 + 2xy) dz
C2
Z
+ x2 dx + y 2 dy + (z 2 + 2xy) dz
C3
Z Z 1
x2 dx + y 2 dy + (z 2 + 2xy) dz = x2 dx + x2 dx + (02 + 2x2 ) · 0 = 2
3
C1 0
Z Z 0
2 2 2
x dx + y dy + (z + 2xy) dz = x2 dx + 12 · 0 + (02 + 2x · 1) · 0 = − 13
C2 1
Z Z 0
x2 dx + y 2 dy + (z 2 + 2xy) dz = 02 · 0 + y 2 dy + (02 + 2y · 0) · 0 = − 13
C3 1
Z
x2 dx + y 2 dy + (z 2 + 2xy) dz = 0
C
Worked Solutions 109
Section 4.4
f (y, z) = y 3 +h(z) and ϕ(x, y, z) = xe2z +y 3 +h(z). Then ϕz = 2xe2z +h′ (z) =
2xe2z and h(z) = constant. The final answer is ϕ(x, y, z) = xe2z + y 3 +
constant.
Section 4.5
1.
ZZ Z 1 Z 1 Z 1 Z 1
1
F · n dσ = (xi − j + yk) · k dx dy = y dx dy =
S 0 0 0 0 2
2.
ZZ ZZ
F · n dσ = (xi + yj + xzk) · k dσ
S S
Z 3 Z 2π 3 2π
r3
= [r cos(θ)] · 1 · r dθ dr = sin(θ) =0
0 0 3 0 0
3. First, we write the surface integral as a sum of the top and bottom lids:
ZZ ZZ ZZ
F · n dσ = F · n dσ + F · n dσ.
S S1 S2
Therefore, ZZ
F · n dσ = 0.
S
∇f 2xi + 2yj x y
n= =p = i + j.
|∇f | 2
4x + 4y 2 2 2
∇f 2yj + 2zk y z
n= =p = j + k.
|∇f | 2
4y + 4z 2 3 3
∇f 2yj + 2zk y z
n= =p = j + k.
|∇f | 2
4y + 4z 2 2 2
∇f 2xi + 2yj x y
n= =p = i + j.
|∇f | 2
4x + 4y 2 2 2
ZZ ZZ x y
F · n dσ = (zi + xj + yk) · i + j dσ
S S 2 2
Z 2 Z π/2
= [zi + 2 cos(θ)j + 2 sin(θ)k] · [cos(θ)i + sin(θ)j] 2 dθ dz
1 0
ZZ Z 2 Z π/2
F · n dσ = [z cos(θ) + 2 cos(θ) sin(θ)] 2 dθ dz
S 1 0
Z 2 π/2 π/2
2
=2 z sin(θ) + sin (θ) dz
1 0 0
Z 2 2
=2 (z + 1) dz = z 2 + 2z 1
=5
1
Then,
ZZ Z 1 Z 1
F · n dσ = [y 2 i + x2 j + 5(y + 1)k] · (−j + k) dx dy
S −1 −1
Z 1Z 1 Z 1
2
1
= (−x + 5y + 5) dx dy = − 31 x3 + 5x(y + 1) −1
dy
−1 −1 −1
Z 1 1
28
28
86
= 3 + 10y dy = 3 y + 5y 2 = 3 .
−1 −1
i j k
rr × rθ = cos(θ) sin(θ) 2r = −2r2 cos(θ)i − 2r2 sin(θ)j + rk.
−r sin(θ) r cos(θ) 0
i j k
rr × rθ = cos(θ) sin(θ) −2r = 2r2 cos(θ)i + 2r2 sin(θ)j + rk.
−r sin(θ) r cos(θ) 0
Then,
ZZ Z √ Z
2 2π
F · n dσ = [−r sin(θ)i + r cos(θ)j + 6(4 − r2 )2 k]
S 0 0
· [2r2 cos(θ)i + 2r2 sin(θ)j + rk] dθ dr
Z √ Z √2
2 Z 2π
2 2 2π
= 6(4 − r ) r dθ dr = 6(4 − r2 )2 r θ 0
dr
0 0 0
√
2
= −2π(4 − r2 )3 0
= 112π.
116 Advanced Engineering Mathematics with MATLAB
Section 4.6
1. I Z
2
(x + 4y) dx + (y − x) dy = (x2 + 4y) dx + (y − x) dy
C C1
Z
+ (x2 + 4y) dx + (y − x) dy
C2
Z
+ (x2 + 4y) dx + (y − x) dy
C3
Z
+ (x2 + 4y) dx + (y − x) dy
C4
Along C1 , x = dx = 0 and
Z Z 0 Z 0
(x2 + 4y) dx + (y − x) dy = (02 + 4y) · 0 + (y − 0) dy = y dy = − 12 .
C1 1 1
Along C2 , y = dy = 0 and
Z Z 1
(x2 + 4y) dx + (y − x) dy = (x2 + 0) dx + (0 − x) · 0 = 13 .
C2 0
Thus, I
(x2 + 4y) dx + (y − x) dy = −5.
C
By Green’s lemma,
I ZZ
2 ∂ ∂ 2
(x + 4y) dx + (y − x) dy = (y − x) − (x + 4y) dx dy
C R ∂x ∂y
Z 1Z 1
= (−1 − 4) dx dy = −5.
0 0
2.
I Z Z
(x − y) dx + xy dy = (x − y) dx + xy dy + (x − y) dx + xy dy
C C1 C2
Z Z
+ (x − y) dx + xy dy + (x − y) dx + xy dy
C3 C4
Along C1 , y = dy = 0 and
Z Z 1 Z 1
(x − y) dx + xy dy = (x − 0) dx + x · 0 · 0 = x dx = 12 .
C1 0 0
Along C2 , x = 1, dx = 0 and
Z Z 1
(x − y) dx + xy dy = (1 − y) · 0 + 1 · y dy = 12 .
C2 0
Along C3 , y = 1, dy = 0 and
Z Z 0 0
1 2
(x − y) dx + xy dy = (x − 1) dx + x · 1 · 0 = 2x −x = 21 .
C3 1 1
Along C4 , x = dx = 0 and
Z Z 0
(x − y) dx + xy dy = (0 − y) · 0 + 0 · y dy = 0.
C4 1
118 Advanced Engineering Mathematics with MATLAB
Thus, I
(x − y) dx + xy dy = 32 .
C
By Green’s lemma,
I ZZ
∂ ∂
(x − y) dx + xy dy = (xy) − (x − y) dx dy
C R ∂x ∂y
Z 1Z 1
= (y + 1) dx dy = 23 .
0 0
3. I Z Z
−y 2 dx + x2 dy = −y 2 dx + x2 dy + −y 2 dx + x2 dy
C
Z C1 C2
2 2
+ −y dx + x dy
C3
Along C1 , y = dy = 0 and
Z Z 1
−y 2 dx + x2 dy = −02 dx + x2 · 0 = 0.
C1 0
Thus, I
−y 2 dx + x2 dy = 1.
C
By Green’s lemma,
I ZZ
∂ 2 ∂
−y 2 dx + x2 dy = (x ) − (−y 2 ) dx dy
C R ∂x ∂y
Z 1Z x Z 1
x
= (2x + 2y) dy dx = (2xy + y 2 ) 0
dx
0 0 0
Z 1 1
= 3x2 dx = x3 = 1.
0 0
Worked Solutions 119
4. I Z
(xy − x2 ) dx + x2 y dy = (xy − x2 ) dx + x2 y dy
C
Z C1
+ (xy − x2 ) dx + x2 y dy
Z C2
+ (xy − x2 ) dx + x2 y dy
C3
Along C1 , y = dy = 0 and
Z Z 1 1
(xy − x2 ) dx + x2 y dy = (x · 0 − x2 ) dx + x2 0 · 0 = − 13 x3 = − 13 .
C1 0 0
Thus, I
(xy − x2 ) dx + x2 y dy = − 12
1
.
C
By Green’s lemma,
I ZZ
2 2∂ 2 ∂ 2
(xy − x ) dx + x y dy = (x y) − (xy − x ) dx dy
C R ∂x ∂y
Z 1Z x Z 1
x
= (2xy − x) dy dx = (xy 2 − xy) 0
dx
0 0 0
Z 1 1
= (x3 − x2 ) dx = 14 x4 − 31 x3 1
= − 12 .
0 0
5. I Z
sin(y) dx + x cos(y) dy = sin(y) dx + x cos(y) dy
C C1
Z
+ sin(y) dx + x cos(y) dy
C2
Z
+ sin(y) dx + x cos(y) dy
C3
120 Advanced Engineering Mathematics with MATLAB
Along C1 , y = dy = 0 and
Z Z 1
sin(y) dx + x cos(y) dy = 0 dx + x · 1 · 0 = 0.
C1 −1
Thus, I
sin(y) dx + x cos(y) dy = 0.
C
By Green’s lemma,
I ZZ
∂ ∂
sin(y) dx + x cos(y) dy = [x cos(y)] − [sin(y)] dx dy = 0.
C R ∂x ∂y
6. I Z Z
y 2 dx + x2 dy = y 2 dx + x2 dy + y 2 dx + x2 dy
C C1 C2
Z
+ y 2 dx + x2 dy
C3
Along C1 , y = dy = 0 and
Z Z 1
y 2 dx + x2 dy = 0 dx + x2 · 0 = 0.
C1 0
7.
I Z 2π
−y 2 dx + x2 dy = [−4 sin2 (θ)][−2 sin(θ) dθ]
C 0
+ [4 cos2 (θ)][2 cos(θ) dθ]
Z 2π
=8 [cos3 (θ) + sin3 (θ)] dθ
0
Z 2π
=8 {cos(θ)[1 − sin2 (θ)] + sin(θ)[1 − cos2 (θ)]}dθ
0
2π
= 8 sin(θ) − 1
3 sin3 (θ) − cos(θ) + 1
3 cos3 (θ) =0
0
By Green’s lemma,
I ZZ
∂ 2 ∂
−y 2 dx + x2 dy = (x ) − (−y 2 ) dx dy
C R ∂x ∂y
Z 2 Z 2π
= [2r cos(θ) + 2r sin(θ)] r dθ dr
0 0
2 2π
2r3
= [sin(θ) − cos(θ)] = 0.
3 0 0
8.
I Z 2π
2 2
−x dx + xy dy = [−a2 cos2 (θ)][−a sin(θ) dθ]
C 0
+ [a3 cos(θ) sin2 (θ)][a cos(θ) dθ]
2π 2π
a3 a4 a4 π
=− cos3 (θ) + θ− 1
4 sin(4θ) = .
3 0 8 0 4
122 Advanced Engineering Mathematics with MATLAB
By Green’s lemma,
I ZZ
2 2 ∂ 2 ∂ 2
−x dx + xy dy = (xy ) − (−x ) dx dy
C R ∂x ∂y
Z a Z 2π
= [r2 sin2 (θ)] r dθ dr
0 0
4 a 2π
r 1 1
a4 π
= θ − sin(2θ) = .
4 02 2
0 4
By Green’s lemma,
I ZZ
∂ ∂
(6y + x) dx + (y + 2x) dy = (y + 2x) − (6y + x) dx dy
C R ∂x ∂y
Z 2 Z 2π
= −4 r dθ dr = (−4)(2π)(2) = −16π.
0 0
10. I Z
(x + y) dx + (2x2 − y 2 ) dy = (x + y) dx + (2x2 − y 2 ) dy
C C1
Z
+ (x + y) dx + (2x2 − y 2 ) dy
C2
For C1 , y = x2 and
Z Z 2
(x + y) dx + (2x2 − y 2 ) dy = (x + x2 ) dx + (2x2 − x4 )(2x dx)
C1 −2
2
x2 x3 x6
= + + x4 − = 16
3 .
2 3 3 −2
Worked Solutions 123
For C2 , y = 4 and
Z Z −2
(x + y) dx + (2x2 − y 2 ) dy = (x + 4) dx + (2x2 − 16) · 0
C2 2
−2
x2
= + 4x = −16.
2 2
Therefore, I
32
(x + y) dx + (2x2 − y 2 ) dy = − .
C 3
By Green’s lemma,
I ZZ
∂ ∂
(x + y) dx + (2x2 − y 2 ) dy = (2x2 − y 2 ) − (x + y) dx dy
C R ∂x ∂y
Z 2Z 4
= (2x − 1) dy dx
−2 x2
Z 2
= (−4 + 8x + x2 − 2x3 ) dx
−2
2
= −4x + 4x2 + 31 x3 − 12 x4 = − 32
3 .
−2
11. I Z Z
3y dx + 2x dy = 3y dx + 2x dy + 3y dx + 2x dy
C C1 C2
For C1 , y = 0 and
Z Z π
3y dx + 2x dy = 3 · 0 · dx + 2x · 0 = 0.
C1 0
12. I Z
−16y dx + (4ey + 3x2 ) dy = −16y dx + (4ey + 3x2 ) dy
C C1
Z
+ −16y dx + (4ey + 3x2 ) dy
C2
Z
+ −16y dx + (4ey + 3x2 ) dy
C3
For C1 , y = x and
Z Z √
2
y 2
−16y dx + (4e + 3x ) dy = −16x dx + (4ex + 3x2 ) dx
C1 0
√
2 √
2 x 3
√
2
= −8x + 4e + x = 4e + 2 2 − 20.
0
For C3 , y = −x and
Z Z 0
−16y dx + (4ey + 3x2 ) dy = √ 16xdx + (4e−x + 3x2 ) (−dx)
C3 − 2
0
= 8x2 + 4e−x − x3 √
− 2
√ √
= −4e 2 − 2 2 − 12.
Therefore, I
−16y dx + (4ey + 3x2 ) dy = 16π.
C
By Green’s lemma,
I ZZ
y 2 ∂ y 2 ∂
−16y dx + (4e + 3x ) dy = (4e + 3x ) − (−16y) dx dy
C R ∂x ∂y
Worked Solutions 125
I Z 3π/4 Z 2
−16y dx + (4ey + 3x2 ) dy = [6r cos(θ) + 16] r dr dθ
C π/4 0
Z 2 3π/4
= [6r sin(θ) + 16θ] r dr
0 π/4
Z 2 2
= 8πr dr = 4πr2 = 16π.
0 0
Section 4.7
1.
I Z Z
F · dr = 5y dx − 5x dy + 3z dz + 5y dx − 5x dy + 3z dz
C C1 C2
Z Z
+ 5y dx − 5x dy + 3z dz + 5y dx − 5x dy + 3z dz
C3 C4
Along C1 , y = 0, z = 1, dy = dz = 0, and
Z Z 1
5y dx − 5x dy + 3z dz = 0 dx − 5x · 0 + 3 · 0 = 0.
C1 0
Along C2 , x = z = 1, dx = dz = 0, and
Z Z 1
5y dx − 5x dy + 3z dz = 5y · 0 − 5 dy + 3 · 0 = −5.
C2 0
Along C3 , y = z = 1, dy = dz = 0, and
Z Z 0
5y dx − 5x dy + 3z dz = 5 dx − 5x · 0 + 3 · 0 = −5.
C3 1
Along C4 , x = 0, z = 1, dx = dz = 0, and
Z Z 0
5y dx − 5x dy + 3z dz = 5y · 0 − 0 dy + 3 · 0 = 0.
C4 1
Thus, I
F · dr = −10.
C
Now,
i j k
∂ ∂ ∂
∇×F= ∂x ∂y ∂z = −10k
5y −5x 5z
126 Advanced Engineering Mathematics with MATLAB
ZZ Z 1 Z 1
∇ × F · n dσ = −10k · k dx dy = −10.
S 0 0
2.
I Z Z
F · dr = x2 dx + y 2 dy + z 2 dz + x2 dx + y 2 dy + z 2 dz
C C1 C2
Z Z
+ x2 dx + y 2 dy + z 2 dz + x2 dx + y 2 dy + z 2 dz
C3 C4
Along C1 , y = 0, z = 2, dy = dz = 0, and
Z Z 2
x2 dx + y 2 dy + z 2 dz = x2 dx = 83 .
C1 0
Along C2 , x = z = 2, dx = dz = 0, and
Z Z 1
x2 dx + y 2 dy + z 2 dz = y 2 dy = 13 .
C2 0
Along C3 , y = 1, z = 2, dy = dz = 0, and
Z Z 0
x2 dx + y 2 dy + z 2 dz = x2 dx = − 83 .
C3 2
Along C4 , x = 0, z = 2, dx = dz = 0, and
Z Z 0
2 2 2
x dx + y dy + z dz = y 2 dy = − 31 .
C4 1
Thus, I
F · dr = 0.
C
Now,
i j k
∂ ∂ ∂
∇×F= ∂x ∂y ∂z = 0.
2 2 2
x y z
ZZ Z 2 Z 1
∇ × F · n dσ = 0 · k dy dx = 0.
S 0 0
3. I Z Z
F · dr = z dx + x dy + y dz + z dx + x dy + y dz
C
Z C1 C2
+ z dx + x dy + y dz
C3
Worked Solutions 127
Thus, I
F · dr = 2.
C
Now,
i j k
∂ ∂ ∂
∇×F= = i + j + k. ∂x ∂y ∂z
z x y
ZZ Z 2 Z 2−x
∇ × F · n dσ = [i + j + k] · k dy dx
S 0 0
Z 2 2
= (2 − x) dx = 2x − 12 x2 = 2.
0 0
Now,
i j k
∂ ∂ ∂
∇×F= ∂x ∂y ∂z = 4i + 2j − 3k.
2z −3x 4y
ZZ Z 2π Z 2 2 2π
r2
∇ × F · n dσ = [4i + 2j − 3k] · k r dr dθ = −3 θ = −12π.
S 0 0 2 0 0
128 Advanced Engineering Mathematics with MATLAB
5. I Z Z
F · dr = z dx + x dy + y dz + z dx + x dy + y dz
C C1 C2
Z
+ z dx + x dy + y dz
C3
Along C1 , y = 0 and z = 3, so that
Z Z 2
z dx + x dy + y dz = 3 dx = 6.
C1 0
Thus, I
F · dr = π.
C
Now,
i j k
∂ ∂ ∂
∇×F= ∂x ∂y ∂z = i + j + k.
z x y
ZZ Z π/2 Z 2 2 π/2
r2
∇ × F · n dσ = [i + j + k] · k r dr dθ = θ = π.
S 0 0 2 0 0
6. I Z
F · dr = (2z + x) dx + (y − z) dy + (x + y) dz
C C1
Z
+ (2z + x) dx + (y − z) dy + (x + y) dz
C2
Z
+ (2z + x) dx + (y − z) dy + (x + y) dz
C3
Along C1 , z = 0 and x + y = 1, so that
Z Z 0
(2z + x) dx + (y − z) dy + (x + y) dz = x dx + (1 − x) (−dx) + 0
C1 1
0
= [x2 − x] 1
= 0.
Worked Solutions 129
Thus, I
F · dr = 23 .
C
Now,
i j k
∂ ∂ ∂
∇×F= ∂x ∂y ∂z = 2i + j.
2z + x y−z x+y
Because r = xi + yj + (1 − x − y)k, rx = i − k and ry = j − k,
rx × ry = i + j + k.
ZZ Z 1 Z 1−x
∇ × F · n dσ = [(2i + j) · (i + j + k)] dy dx
S 0 0
Z 1 1
=3 (1 − x) dx = 3 x − 12 x2 = 23 .
0 0
7. I Z Z
F · dr = z dx + x dy + y dz + z dx + x dy + y dz
C C1 C2
Z
+ z dx + x dy + y dz
C3
Thus, I
45
F · dr = 2 .
C
Now,
i j k
∂ ∂ ∂
∇×F= ∂x ∂y ∂z = i + j + k.
z x y
i j k
rx × ry = 1 0 −1 = i + 21 j + k.
0 1 − 21
ZZ Z 3 Z 6−2x
∇ × F · n dσ = [(i + j + k) · (i + 12 j + k)] dy dx
S 0 0
Z 3
5 45
= 2 (6 − 2x) dx = 2 .
0
Now,
i j k
∂ ∂ ∂
∇×F= ∂x ∂y ∂z = (1 − x)i + zk.
x zx y
Section 4.8
1. ZZ ZZ ZZ ZZ
⊂⊃ F · n dσ = F · n dσ + F · n dσ + F · n dσ
S S1 S2 S3
ZZ ZZ ZZ
+ F · n dσ + F · n dσ + F · n dσ
S4 S5 S6
Thus, ZZ
⊂⊃ F · n dσ = 3.
S
Because
∇ · F = 2x + 2y + 2z,
ZZZ Z 1Z 1Z 1
∇ · F dV = (2x + 2y + 2z) dx dy dz
V 0 0 0
Z 1 Z 1 Z 1 Z 1 Z 1 Z 1
= 2x dx dy dz + 2y dx dy dz
0 0 0 0 0 0
Z 1 Z 1 Z 1
+ 2z dx dy dz = 3
0 0 0
2. ZZ ZZ ZZ ZZ
⊂⊃ F · n dσ = F · n dσ + F · n dσ + F · n dσ
S S1 S2 S3
ZZ ZZ ZZ
+ F · n dσ + F · n dσ + F · n dσ
S4 S5 S6
Thus, ZZ
⊂⊃ F · n dσ = 32 .
S
Because
∇ · F = x + y + z,
ZZZ Z 1 Z 1Z 1
∇ · F dV = (x + y + z) dx dy dz
V 0 0 0
Z 1 Z 1 Z 1 Z 1 Z 1 Z 1
= x dx dy dz + y dx dy dz
0 0 0 0 0 0
Z 1 Z 1 Z 1
+ z dx dy dz = 32 .
0 0 0
3. ZZ ZZ ZZ ZZ
⊂⊃ F · n dσ = F · n dσ + F · n dσ + F · n dσ
S
ZZ S1 ZZ S2 ZZ S3
+ F · n dσ + F · n dσ + F · n dσ
S4 S5 S6
Along the surface S1 , z = 1 and n = k,
ZZ Z 1Z 1
F · n dσ = [(y − x)i + (1 − y)j + (y − x)k] · k dx dy
S1 −1 −1
Z 1 Z 1 Z 1 1
1 2
= (y − x) dx dy = 2y − yx dx
−1 −1 −1 −1
Z 1
= −2 x dx = 0.
−1
Thus, ZZ
⊂⊃ F · n dσ = −16.
S
Because
ZZZ Z 1 Z 1 Z 1
∇ · F = −2 ∇ · F dV = −2 dx dy dz = −16.
V −1 −1 −1
Worked Solutions 135
4. ZZ ZZ ZZ ZZ
⊂⊃ F · n dσ = F · n dσ + F · n dσ + F · n dσ
S S1 S2 S3
Thus, ZZ
⊂⊃ F · n dσ = 2π.
S
Because
∇ · F = 2x + 2,
ZZZ Z 1 Z 1 Z 2π
∇ · F dV = 2 [r cos(θ) + 1] dθ r dr dz
V 0 0 0
Z 1 Z 1 Z 1 1
2π r2
=2 r sin(θ) + θ 0
r dr dz = 4π dz = 2π.
0 0 0 2 0
5. ZZ ZZ ZZ ZZ
⊂⊃ F · n dσ = F · n dσ + F · n dσ + F · n dσ
S S1 S2 S3
Thus, ZZ
⊂⊃ F · n dσ = 4π.
S
Because
∇ · F = 2x + 2y + 2z,
ZZZ 1 Z 2 Z 2π
Z
∇ · F dV = 2 [r cos(θ) + r sin(θ) + z] dθ r dr dz
V 0 0 0
Z 1 Z 1 2π
=2 r sin(θ) − r cos(θ) + zθ 0
r dr dz
0 0
Z 1 2
r2 1
= 4π z dz = 4π z 2 0
= 4π.
0 2 0
6. ZZ ZZ ZZ ZZ
⊂⊃ F · n dσ = F · n dσ + F · n dσ + F · n dσ
S S1 S2 S3
Along the surface S1 , z = 5 and n = k,
ZZ Z 2π Z 2
F · n dσ = [r2 sin2 (θ)i + 125r cos(θ)j + 16k] · k r dr dθ = 64π.
S1 0 0
Thus, ZZ
⊂⊃ F · n dσ = 64π.
S
Because
∇ · F = 2(z − 1),
ZZZ Z 5 Z 2 Z 2π 2 2π 5
r2
∇ · F dV = 2 (z − 1) dθ r dr dz = θ (z − 1)2 = 64π.
V 1 0 0 2 0 0 1
7.
ZZ ZZ ZZ ZZ ZZ
⊂⊃ F · n dσ = F · n dσ + F · n dσ + F · n dσ + F · n dσ
S S1 S2 S3 S4
Thus, ZZ
5
⊂⊃ F · n dσ = 12 .
S
Because
∇ · F = 6y + 4z,
ZZZ Z 1Z 1−x Z 1−x−y
∇ · F dV = (6y + 4z) dz dy dx
V 0 0 0
Z 1 Z 1−x
1−x−y
= (6yz + 2z 2 ) 0
dy dx
0 0
Z 1Z 1−x
= [2(1 − x)2 + 2(1 − x)y − 4y 2 ] dy dx
0 0
Z 1
1−x
= [2(1 − x)2 y + (1 − x)y 2 − 34 y 3 ] 0
dx
0
Z 1
1
= 5
3 (1 − x)3 dx = − 12
5
(1 − x)4 0
= 5
12 .
0
8. ZZ ZZ ZZ
⊂⊃ F · n dσ = F · n dσ + F · n dσ
S S1 S2
Thus, ZZ
π
⊂⊃ F · n dσ = − .
S 2
Worked Solutions 139
Because
∇ · F = x − 1,
ZZZ Z 1Z 1Z 2π
∇ · F dV = [r cos(θ) − 1] dθ dz r dr
V 0 r2 0
Z 1Z 1 Z 1
2π
= [r sin(θ) − θ] 0
dz r dr = −2π (1 − r2 ) r dr
0 r2 0
1
r2 r4 π
= −2π − =−
2 4 0 2
Section 5.1
1. Z Z
0 π 0
1 1 t
a0 = 1 dt + 0 dt = =1
π −π π 0 π −π
Z 0 Z π 0
1 1 sin(nt)
an = 1 cos(nt) dt + 0 cos(nt) dt = =0
π −π π 0 nπ −π
Z 0 Z π 0
1 1 cos(nt) (−1)n − 1
bn = 1 sin(nt) dt + 0 sin(nt) dt = − =
π −π π 0 nπ −π nπ
∞
X
1 2 sin[(2m − 1)t]
f (t) = −
2 π m=1
2m − 1
2.
Z 0 Z π 0
1 1 t2 π
a0 = t dt + 0 dt = =−
π −π π 0 2π −π 2
Z 0 Z π
1 1
an = t cos(nt) dt + 0 cos(nt) dt
π −π π 0
0
1 cos(nt) t 1 − (−1)n
= + sin(nt) =
π n2 n −π n2 π
Z 0 Z π
1 1
bn = t sin(nt) dt + 0 sin(nt) dt
π −π π 0
0
1 sin(nt) t (−1)n
= − cos(nt) =−
π n2 n −π n
∞ ∞
π 2 X cos[(2m − 1)t] X (−1)n
f (t) = − + − sin(nt)
4 π m=1 (2m − 1)2 n=1
n
140 Advanced Engineering Mathematics with MATLAB
3.
Z 0 Z π
1 1 0 1 2 π π
a0 = −π dt + t dt = −t −π
+ t 0
=−
π −π π 0 2π 2
Z 0 Z π
1 1
an = −π cos(nt) dt + t cos(nt) dt
π −π π 0
0 π
sin(nt) 1 cos(nt) t (−1)n − 1
=− + + sin(nt) =
n −π π n2 n 0 n2 π
Z 0 Z
1 1 π
bn = −π sin(nt) dt + t sin(nt) dt
π −π π 0
0 π
cos(nt) 1 sin(nt) t 1 − 2(−1)n
= + 2
− cos(nt) =
n −π π n n 0 n
∞
π X (−1)n − 1 1 − 2(−1)n
f (t) = − + cos(nt) + sin(nt)
4 n=1 n2 π n
Z 0 Z
1 1 1 1 1
an = + t cos(nπt) dt + − t cos(nπt) dt
1 −1 2 1 0 2
Z 1
1
=2 − t cos(nπt) dt
0 2
1 1
sin(nπt) cos(nπt) t sin(nπt) 2[1 − (−1)n ]
= −2 2 2
+ =
nπ 0 n π nπ 0 n2 π 2
∞ ∞
2 X [1 − (−1)n ] 4 X cos[(2m − 1)πt]
f (t) = cos(nπt) =
π 2 n=1 n2 π 2 m=1 (2m − 1)2
5.
Z π/2 Z π π/2 π π
1 1 t2 t2 π
a0 = t dt + (π − t) dt = +t − =
π 0 π π/2 2π 0 π/2 2π π/2 4
Worked Solutions 141
Z π/2 Z π
1 1
an = t cos(nt) dt + (π − t) cos(nt) dt
π 0 π π/2
π/2 π
1 cos(nt) t sin(nt)
= + sin(nt) +
π n2 n 0 n π/2
π
1 cos(nt) t 4 cos(nπ/2) sin2 (nπ/4)
− + sin(nt) = ,
π n2 n π/2 n2 π
where we have used the identities 1+cos(nπ) = 2 cos2 (nπ/2) and 1−cos(nπ/2)
= 2 sin2 (nπ/4).
Z π/2 Z π
1 1
bn = t sin(nt) dt + (π − t) sin(nt) dt
π 0 π π/2
π/2 π
1
sin(nt) t cos(nt)
= − cos(nt) −
πn2 n 0 n π/2
π
1 sin(nt) t 2 sin(nπ/2)
− − cos(nt) =
π n2 n π/2 πn2
∞
π 2 X 2 cos(nπ/2) sin2 (nπ/4) sin(nπ/2)
f (t) = + cos(nt) + sin(nt)
8 π n=1 n2 n2
Z π/2 Z π/2
2 2 1
b2 = sin (2t) dt = [1 − cos(4t)] dt
π 0 π 0
π/2 π/2
1 1 1
= t − sin(4t) =
π 0 4π 0 2
∞
X
1 4 (−1)m
f (t) = sin(2t) + sin[(2m − 1)t]
2 π m=1
[(2m − 1)2 − 4]
7. Z L L
1 1 at 2
a0 = eat dt = e = sinh(aL)
L −L aL −L aL
142 Advanced Engineering Mathematics with MATLAB
Z L
1 at nπt
an = e cos dt
L −L L
L
1 eat nπt nπ nπt
= a cos + sin
L a2 + n2 π 2 /L2 L L L −L
2aL(−1)n
= 2 2 sinh(aL)
a L + n2 π 2
Z
1 L at nπt
bn = e sin dt
L −L L
L
1 eat nπt nπ nπt
= a sin − cos
L a2 + n2 π 2 /L2 L L L −L
2nπ(−1)n
=− 2 2 sinh(aL)
a L + n2 π 2
X∞
sinh(aL) (−1)n nπt
f (t) = + 2aL sinh(aL) cos
aL n=1
a2 L2 + n2 π 2 L
∞
X n(−1)n
nπt
− 2π sinh(aL) sin
n=1
a2 L2 + n2 π 2 L
8. Z Z
L L L
1 2 2t3 2L2
a0 = (t + t2 ) dt = t2 dt ==
L −L 0L 3L 0 3
Z L Z L
1 nπt 2 nπt
an = (t + t2 ) cos dt = t2 cos dt
L −L L L 0 L
L
2 2t cos(nπt/L) n2 π 2 t2 /L2 − 2 4L2 (−1)n
= − sin(nπt/L) =
L n2 π 2 /L2 n3 π 3 /L3 0 n2 π 2
Z L Z L
1 nπt 2 nπt
bn = (t + t2 ) sin dt = t sin dt
L −L L L 0 L
2 L
2 L nπt Lt nπt 2L
= sin − cos = − (−1)n
L n2 π 2 L nπ L 0 nπ
2 X∞ ∞
L 2
4L (−1) n
nπt 2L X (−1)n nπt
f (t) = + 2 cos − sin
3 π n=1 n2 L π n=1 n L
9. Z
1 π 1 π 2
a0 = sin(t) dt = − cos(t) 0 =
π 0 π π
Z
1 π 1 π
a1 = sin(t) cos(t) dt = sin2 (t) 0 = 0
π 0 2π
Worked Solutions 143
Z π Z π
1 2 1 1 1 π 1
b1 = sin (t) dt = [1 − cos(2t)] dt = [t − 2 sin(2t)] 0
= 2
π 0 2π 0 2π
For n > 1,
Z π π
1 1 cos[(n − 1)t] cos[(n + 1)t]
an = sin(t) cos(nt) dt = −
π 0 π 2(n − 1) 2(n + 1) 0
1 + (−1)n
=−
π(n2 − 1)
Z π π
1 1 sin[(n − 1)t] sin[(n + 1)t]
bn = sin(t) sin(nt) dt = − =0
π 0 π 2(n − 1) 2(n + 1) 0
∞
1 1 2 X cos(2mt)
f (t) = + sin(t) −
π 2 π m=1 4m2 − 1
10.
Z 1/2 Z 3/2 1/2 3/2 3/2
1 1 t2 t2
a0 = t dt + (1 − t) dt = +t − =0
1 −1/2 1 1/2 2 −1/2 1/2 2 1/2
Z Z
1 1/2 1 3/2
an = t cos(nπt) dt + (1 − t) cos(nπt) dt
1 −1/2 1 1/2
1/2 3/2
1 t sin(nπt)
= cos(nπt) + sin(nπt) +
n2 π 2 nπ −1/2 nπ 1/2
3/2
1 t
− 2 2
cos(nπt) + sin(nπt) =0
n π nπ 1/2
Z 1/2 Z 3/2
1 1
bn = t sin(nπt) dt + (1 − t) sin(nπt) dt
1 −1/2 1 1/2
1/2 3/2
1 t cos(nπt)
= sin(nπt) − cos(nπt) −
n2 π 2 nπ −1/2 nπ 1/2
3/2 3
1 t 4 sin (nπ/2)
− sin(nπt) − cos(nπt) =
n2 π 2 nπ 1/2 n2 π 2
∞
4 X (−1)m
f (t) = − sin[(2m − 1)πt]
π 2 m=1 (2m − 1)2
11. Z a
a
1 t2
a0 = 2t dt = =a
a 0 a 0
144 Advanced Engineering Mathematics with MATLAB
Z a
1 nπt
an = dt
2t cos
0 a a
2 a
2 a nπt at nπt 2a
= cos + sin = 2 2 [(−1)n − 1]
a n2 π 2 a nπ a 0 n π
Z a
1 nπt
bn = 2t sin dt
a 0 a
2 a
2 a nπt at nπt 2a
= sin − cos = − (−1)n
a n2 π 2 a nπ a 0 nπ
∞ ∞
a 4a X 1 (2m − 1)πt 2a X (−1)n nπt
f (t) = − 2 cos − sin
2 π m=1 (2m − 1)2 a π n=1 n a
12. Z π
π
1 t3 π2
a0 = t2 dt = =
π 0 3π 0 3
Z π π
1 2t cos(nt) n2 t2 − 2
1 2(−1)n
an = t2 cos(nt) dt = 2
− 3
sin(nt) =
π 0 π n n 0 n2
Z π π
1 2 1 2t sin(nt) n2 t2 − 2
bn = t sin(nt) dt = − cos(nt)
π 0 π n2 n3 0
1 2 − n2 π 2 2
= (−1)n − 3
π n3 n
X∞ ∞
π2 (−1)n 1 X (2 − n2 π 2 )(−1)n − 2
f (t) = +2 cos(nt) + sin(nt)
6 n=1
n2 π n=1 n3
13. Z 2
1 2 π−t πt t2
a0 = dt = − =π−1
1 0 2 2 4 0
Z
1 2 π−t
an = cos(nπt) dt
1 0 2
2 2
sin(nπt) 1 cos(nπt) t
= − + sin(nπt) =0
2n 0 2 n2 π 2 nπ 0
Z
1 2 π−t
bn = sin(nπt) dt
1 0 2
2 2
cos(nπt) 1 sin(nπt) t 1
=− − 2 π2
− cos(nπt) =
2n 0 2 n nπ 0 nπ
∞
π−1 1 X sin(nπt)
f (t) = +
2 π n=1 n
Worked Solutions 145
For n = 1,
Z L Z
2 πt 1 L πt2πt
b1 = t cos sin t sin dt =
dt
L0 L L 0 L L
L
1 L2 2πt Lt 2πt L
= 2
sin + cos =
L 4π L 2π L 0 2π
∞
L πt 2L X (−1)n n nπt
f (t) = sin − sin
2π L π n=2 n2 − 1 L
Thus,
∞
4a cosh(aπ/2) X cos[(2m − 1)t]
f (t) = .
π m=1
a2 + (2m − 1)2
because
Z 2L Z 4L
1 1 1 1 2 2
a0 = 2 x(2L − x) dt + 2L 2 x − 3Lx + 4L dt
2L 0 2L
2L 4L
1 Lx2 x3 1 x3 3Lx2
= − + − + 4L2 x = 0,
L 2 6 0 L 6 2 2L
Z 2L nπx Z 2L nπx
1
an = x cos dx − x2 cos
dx
0 2L 0 2L 2L
Z 4L nπx Z 4L nπx
1 2
+ x cos dx − 3 x cos dx
2L 2L 2L 2L 2L
Z 4L nπx
+ 4L cos dx
2L 2L
nπx 2Lx nπx 2L
4L2
an = cos + sin
n2 π 2 2L nπ 2L 0
2
nπx
2 2L
1 8L x nπx 2Lx 16L3
− cos + − 3 3 sin
2L n2 π 2 2L nπ n π 2L 0
2
nπx
2 3 4L
1 8L x nπx 2Lx 16L
+ cos + − 3 3 sin
2L n2 π 2 2L nπ n π 2L 2L
nπx 2Lx nπx 4L
4L2
−3 cos + sin
n2 π 2 2L nπ 2L 2L
8L 2 nπx 4L
− sin =0
nπ 2L 2L
and Z Z 2L
2L nπx
1 nπx
bn = x sin dx − x2 sin dx
0 2L 2L 0 2L
Z 4L nπx Z 4L nπx
1
+ x2 sin dx − 3 x sin dx
2L 2L 2L 2L 2L
Z 4L
nπx
+ 4L sin dx
2L 2L
Worked Solutions 147
nπx 2Lx nπx 2L
4L2
bn = sin − cos
n2 π 2 2L nπ 2L 0
2 2
nπx 2L
1 8L x nπx 2Lx 16L3
− sin − − cos
2L n2 π 2 2L nπ n3 π 3 2L 0
2
nπx
4L
1 8L x nπx 2Lx2 16L3
+ sin − − cos
2L n2 π 2 2L nπ n3 π 3 2L 2L
2 4L
4L nπx 2Lx nπx
−3 2 2
sin − cos
n π 2L nπ 2L 2L
8L 2 nπx 4L
16L 2
− cos = 3 3 [1 − (−1)n ]
nπ 2L 2L n π
Section 5.2
1. Z x X∞ Z x
π 2 − 2πτ cos[(2n + 1)τ ]
dτ = dτ
0 8 n=0 0
(2n + 1)2
x X∞ x
π 2 τ − πτ 2 sin[(2n + 1)τ ]
=
8 0 n=0
(2n + 1)3 0
2 2 ∞
X
π x − πx sin[(2n + 1)x]
=
8 n=0
(2n + 1)3
2. Z Z
x X∞
π 2 − 3τ 2 (−1)n+1 x
dτ = cos(nτ ) dτ
0 12 n=1
n2 0
x X∞ x
π2 τ − τ 3 (−1)n+1
= sin(nτ )
12 0 n=1
n3 0
2 3 ∞
X n+1
π x−x (−1)
= sin(nx)
12 n=1
n3
Then,
∞
32 X 1 (2m − 1)πt
f (t) = sin .
π 3 m=1 (2m − 1)3 2
Section 5.3
1. Z π
π
2 x2
a0 = x dx = =π
π 0 π 0
Z π π
2 2 cos(nx) x sin(nx) 2[(−1)n − 1]
an = x cos(nx) dx = + =
π 0 π n2 n 0 n2 π
∞
π 4 X cos[(2m − 1)x]
f (x) = −
2 π m=1 (2m − 1)2
Z π π
2 2 sin(nx) x cos(nx) 2(−1)n
bn = x sin(nx) dx = − = −
π 0 π n2 n 0 n
∞
2 X (−1)n+1 sin(nx)
f (x) =
π n=1 n
2. Z π
π
2 π x2
a0 = (π − x) dx = 2x|0 − =π
π 0 π 0
Z π
2
an = (π − x) cos(nx) dx
π 0
π π
sin(nx) 2 cos(nx) x sin(nx) 2[(−1)n − 1]
=2 − 2
+ =−
n 0 π n n 0 n2 π
∞
π 4 X cos[(2m − 1)x]
f (x) = +
2 π m=1 (2m − 1)2
Worked Solutions 149
Z π
2
bn = (π − x) sin(nx) dx
π 0
π π
2 cos(nx) 2 sin(nx) x cos(nx) 2
=− − 2
− =
n 0 π n n 0 n
X∞
sin(nx)
f (x) = 2
n=1
n
3. Z a
a
2 2 ax2 x3 a2
a0 = x(a − x) dx = − =
a 0 a 2 3 0 3
Z a nπx
2
an = x(a − x) cos dx
a a
Z 0a nπx nπx Z a
2
=2 x cos dx − x2 cos dx
0 a a 0 a
2 nπx ax nπx a
a
= 2 2 2 cos + sin
n π a nπ a 0
2 nπx a
2 2xa nπx n π ax − 2a3
2 2 2
− cos − sin
a n2 π 2 a n3 π 3 a 0
2a2
=− [1 + (−1)n ]
n2 π 2
∞
a3 a2 X 1 2mπx
f (x) = − 2 cos
6 π m=1 m2 a
Z a nπx
2
bn = x(a − x) sin dx
a 0 a
Z a nπx nπx Z a
2
=2 x sin dx − x2 sin dx
a a 0 a
0 2 nπx ax
nπx a
a
= 2 2 2 sin − cos
n π a nπ a 0
2 2 2 2 3 nπx a
2 2xa nπx n π ax − 2a
− sin − cos
a n2 π 2 a n3 π 3 a 0
4a2
= [1 − (−1)n ]
n3 π 3
∞
8a2 X 1 (2m − 1)πx
f (x) = 3 sin
π m=1 (2m − 1)3 a
150 Advanced Engineering Mathematics with MATLAB
4. Z a
2 2 kx a 2
a0 = ekx dx = e 0
= eak − 1
a 0 ak ak
Z nπx
2 a kx
an = e cos dx
a 0 a
nπx nπ nπx a
2 ekx
= k cos + sin
a k 2 + (nπ/a)2 a a a 0
2ka
= 2 2 (−1)n eka − 1
k a + n2 π 2
eak − 1 X∞
(−1)n eka − 1 nπx
f (x) = + 2ka cos
ak n=1
k 2 a2 + n2 π 2 a
Z nπx
2 a kx
bn = e sin dx
a 0 a
nπx nπ nπx a
2 ekx
= k sin − cos
a k 2 + (nπ/a)2 a a a 0
2nπ
=− 2 2 (−1)n eka − 1
k a + n2 π 2
X∞
n[(−1)n eka − 1] nπx
f (x) = −2π 2 2 2 2
sin
n=1
k a +n π a
5.
Z 1/2 Z 1
1/2 1 1
a0 = 2 x dx + 2 (1 − x) dx = x2 0
+ (2x − x2 ) 1/2
=
0 1/2 2
Z 1/2 Z 1
an = 2 x cos(nπx) dx + 2 (1 − x) cos(nπx) dx
0 1/2
1/2 1
cos(nπx) x sin(nπx) 2 sin(nπx)
=2 + +
n2 π 2 nπ 0 nπ 1/2
1
cos(nπx) x sin(nπx) 4 cos(nπ/2) 2[1 + (−1)n ]
−2 + = −
n2 π 2 nπ 1/2 n2 π 2 n2 π 2
∞
1 2 X cos[2(2m − 1)πx]
f (x) = − 2
4 π m=1 (2m − 1)2
Worked Solutions 151
Z 1/2 Z 1
bn = 2 x sin(nπx) dx + 2 (1 − x) sin(nπx) dx
0 1/2
1/2 1
sin(nπx) x cos(nπx) 2 cos(nπx)
=2 − −
n2 π 2 nπ 0 nπ 1/2
1
sin(nπx) x cos(nπx) 4 sin(nπ/2)
−2 − =
n2 π 2 nπ 1/2 n2 π 2
∞
4 X (−1)m+1 sin[(2m − 1)πx]
f (x) =
π 2 m=1 (2m − 1)2
6. Z Z
1 2 1
2 2 x2 2 3
a0 = x dx + 1 dx = + x|1 =
2 0 2 1 2 0 2
Z 1 nπx Z 2 nπx
2 2
an = x cos dx + 1 cos dx
2 0 2 2 1 2
nπx 2x nπx 1 nπx 2
4 2
= 2 2
cos + sin + sin
n π 2 nπ 2 0 nπ 2 1
4 h nπ i 8 nπ
= 2 2 1 + cos = 2 2 cos2
n π 2 n π 4
3
∞
8 X 1 nπ nπx
f (x) = + 2 2
cos2 cos
4 π n=1 n 4 2
Z 1 nπx Z 2 nπx
2 2
bn = x sin dx + 1 sin dx
2 0 2 2 1 2
nπx 2x nπx 1 nπx 2
4 2
= sin − cos − cos
n2 π 2 2 nπ 2 0 nπ 2 1
4 nπ 2
= 2 2 sin − (−1)n
n π 2 nπ
∞ ∞ nπx
4 X (−1)m+1 (2m − 1)πx 2 X (−1)n
f (x) = sin − sin
π 2 m=1 (2m − 1)2 2 π n=1 n 2
7. Z π
π
2 π 2x3 4π 2
a0 = (π 2 − x2 ) dx = 2πx|0 − =
π 0 3π 0 3
152 Advanced Engineering Mathematics with MATLAB
Z
2 π 2
an = (π − x2 ) cos(nx) dx
π 0
π π
2π sin(nx) 2 2x cos(nx) n2 x2 − 2 4(−1)n
= − 2
+ 3
sin(nx) =−
n 0 π n n 0 n2
X∞
2π 2 (−1)n
f (x) = −4 cos(nx)
3 n=1
n2
Z π
2
bn = (π 2 − x2 ) sin(nx) dx
π0
π π
2π cos(nx) 2 2x sin(nx) n2 x2 − 2
=− − − cos(nx)
n 0 π n2 n3 0
2π 4(−1)n 4
= − + 3
n n3 π n π
X∞ ∞
sin(nx) 8 X sin[(2m − 1)x]
f (x) = 2π +
n=1
n π m=1 (2m − 1)3
8. Z a
2
a0 = dx = 1
a a/2
Z a nπx nπx a nπ
2 2 2
an = cos dx = sin =− sin
a a/2 a nπ a a/2 nπ 2
∞
1 2 X (−1)m (2m − 1)πx
f (x) = + sin
2 π m=1 2m − 1 a
Z nπx nπx
2 a 2 a
bn = sin dx = − cos
a a/2 a nπ a a/2
2 h nπ i
= cos − (−1)n
nπ 2
∞ ∞ nπx
1 X (−1)m 2mπx 2 X (−1)n
f (x) = sin − sin
π m=1 m a π n=1 n a
Worked Solutions 153
9.
Z 2a/3 Z a
2 a
2 a
a0 = x− 3 dx + dx
a a/3 a 2a/3 3
2
2a/3 a
2 x ax 2x a
= − + =
a 2 3 a/3 3 2a/3 3
Z 2a/3 Z
nπx nπx
2 a
2 a a
an = x− cos 3 dx + cos dx
a a/3 a a 2a/3 3 a
nπx ax nπx 2a/3 nπx 2a/3
2 a2 2a
= cos + sin − sin
a n2 π 2 a nπ a a/3 3nπ a a/3
2a nπx a
+ sin
3nπ a 2a/3
nπ nπ nπ
2a 2nπ 4a
= 2 2 cos − cos = − 2 2 sin sin
n π 3 3 n π 2 6
∞
a 4a X (−1)m sin[(2m − 1)π/6] (2m − 1)πx
f (x) = + 2 cos
6 π m=1 (2m − 1)2 a
Z 2a/3 nπx Z
nπx a
2 a
a 2
bn = x− 3 sin dx + sin dx
a a/3 a 2a/3 3 a a
nπx ax nπx 2a/3 nπx 2a/3
2 a2 2a
= sin − cos + cos
a n2 π 2 a nπ a a/3 3nπ a a/3
2a nπx a
− cos
3nπ a 2a/3
nπ
2a 2nπ 2a
= sin − sin − cos(nπ)
n2 π 2 3 3 3nπ
4a nπ nπ 2a(−1)n
= cos sin −
n2 π 2 2 6 3nπ
∞
a X (−1)m sin(mπ/3) 2mπx
f (x) = sin
π 2 m=1 m2 a
∞
2a X (−1)n nπx
− sin
3π n=1 n a
154 Advanced Engineering Mathematics with MATLAB
Z 3a/4 nπx
nπx 3a/4
2 2
an = cossin dx =
aa/4 a nπ a a/4
2 3nπ nπ 4 nπ nπ
= sin − sin = cos sin
nπ 4 4 nπ 2 4
∞ mπ
1 2 X (−1)m 2mπx
f (x) = + sin cos
2 π m=1 m 2 a
11. Z Z
a/2 a a
2 1 2 x a/2 2x 3
a0 = 2 dx + 1 dx = + =
a 0 a a/2 a 0 a a/2 2
Z a/2 nπx Z a nπx
2 1 2
an = 2 cos dx + cos dx
a 0 a a a/2 a
1 nπx a/2 2 nπx a
= sin + sin
nπ a 0 nπ a a/2
1 nπ 2 nπ 1 nπ
= sin − sin =− sin
nπ 2 nπ 2 nπ 2
∞
3 1 X (−1)m (2m − 1)πx
f (x) = + cos
4 π m=1 2m − 1 a
Z a/2 nπx Z a nπx
2 1 2
bn = 2 sin dx + sin dx
a 0 a a a/2 a
1 2 nπx a/2
nπx a
=− cos − cos
nπ a 0 nπ a a/2
1 nπ 1 2 2 nπ
n
=− cos + − (−1) + cos
nπ 2 nπ nπ nπ 2
1 + cos(nπ/2) − 2 cos(nπ)
=
nπ
Worked Solutions 155
∞
1 X 1 + cos(nπ/2) − 2(−1)n nπx
f (x) = sin
π n=1 n a
12.
Z a/2 Z a
2 2x 2 3a − 2x
a0 = dx + dx
a 0 a a a/2 2a
2 a/2 a a
2x 3x x2 5
= + − =
a2 0 a a/2 a2 a/2 4
5
∞
2 X 3 cos(nπ/2) − 2 − (−1)n nπx
f (x) = + 2 cos
8 π n=1 n2 a
Z a/2 nπx Z nπx
2 2x 2 a 3a − 2x
bn = sin dx + sin dx
a0 a a a a/2 2a a
2 nπx ax nπx a/2 nπx a
4 a 3
= 2 2 2 sin − cos − cos
a n π a nπ a nπ a a/2
2 a0
2 a nπx ax nπx
− 2 2 2 sin − cos
a n π a nπ a a/2
4 nπ 3 2 h nπ i
= 2 2 sin − cos(nπ) + 2 2 sin + nπ cos(nπ)
n π 2 nπ n π 2
6 nπ (−1)n
= 2 2 sin −
n π 2 nπ
X∞ nπ (−1)n nπx
6
f (x) = sin − sin
n=1
n2 π 2 2 nπ a
156 Advanced Engineering Mathematics with MATLAB
13.
Z a/2 Z a a/2
2 2 a x2 a 3a
a0 = x dx + dx = + x|a/2 =
a 0 a a/2 2 a 0 4
∞
3a 2a X cos(nπ/2) − 1 nπx
f (x) = + 2 cos
8 π n=1 n2 a
∞ nπ (−1)n nπx
aX 2
f (x) = 2
sin − sin
π n=1 n π 2 n a
14. Z a
a
2 a−x 2 x2
a0 = dx = 2 ax − =1
a 0 a a 2 0
Z nπx
2 a a−x
an = cos dx
a 0 a a
Z a nπx Z a nπx
2 2
= cos dx − 2 x cos dx
a 0 a a 0 a
nπx a nπx ax nπx a
2 2 a2
= sin − 2 2 2 cos + sin
nπ a 0 a n π a nπ a 0
2
= 2 2 [1 − (−1)n ]
n π
Worked Solutions 157
∞
1 4 X 1 (2m − 1)πx
f (x) = + 2 cos
2 π m=1 (2m − 1)2 a
Z nπx
2 a a−x
bn = sin dx
a 0 a a
Z a nπx Z a nπx
2 2
= sin dx − 2 x sin dx
a 0 a a 0 a
nπx a nπx ax nπx a
2 2 a2 2
=− cos − 2 2 2 sin − cos =
nπ a 0 a n π a nπ a 0 nπ
2X1
∞ nπx
f (x) = sin
π n=1 n a
∞
1 a0 X
√ = + an cos(nπx),
1−x 2 2 n=1
where
Z 1 Z π/2
dx
a0 = 2 √ =2 du = π,
0 1 − x2 0
and
Z 1
cos(nπx)
an = 2 √ dx = πJ0 (nπ).
0 1 − x2
Substitution of a0 and an into the top line gives the final result. On the other
hand,
p X∞
1 − x2 = an cos[(2n − 1)πx/2], 0 < x < 1.
n=1
Here,
Z 1 p 2
an = 2 1 − x2 cos[(2n − 1)πx/2] dx = J1 [(2n − 1)π/2],
0 2n − 1
if we use ν = 1, u = 1, and a =
√ (2n−1)π/2 in the listed integrals. Substitution
of an into the expansion for 1 − x2 completes the problem.
158 Advanced Engineering Mathematics with MATLAB
16.
Z Z
2 π 2(a + 1) π
bn = sin(nx) dx − x sin(nx) dx
π 0 π2 0
Z π Z
2(a − 1) 2 2(a + 1) π 3
+ x sin(nx) dx + x sin(nx) dx
π3 0 π4 0
Z π
2a
− 5 x4 sin(nx) dx
π 0
π
2 π 2(a + 1) sin(nx) x cos(nx)
=− cos(nx)|0 − −
nπ π2 n2 n 0
2 2
π
2(a − 1) 2x n x −2
+ sin(nx) − cos(nx)
π3 n2 n3 0
π
2(a + 1) 3n2 x2 − 6 n2 x3 − 6x
+ sin(nx) − cos(nx)
π4 n4 n3 0
2 3 π
2a 4n x − 24x n4 x4 − 12n2 x2 + 24
− 5 sin(nx) − cos(nx)
π n4 n5 0
2 8(a − 1)(−1)n 4(a − 1) 48a
= − − − 5 5 [1 − (−1)n ]
nπ n3 π 3 n3 π 3 n π
X∞
2 8(a − 1)(−1)n 4(a − 1) 48a n
f (x) = − − − [1 − (−1) ] sin(nx)
n=1
nπ n3 π 3 n3 π 3 n5 π 5
To obtain the final solution, break the solution apart according whether you
have an even or odd harmonic. Upon simplification, the desired result follows.
Section 5.4
For the cosine series, ϕn = tan−1 (−bn /0) = (−1)n π/2 so that
X∞
1 h πi
f (t) = 2 cos nt + (−1)n .
n=1
n 2
X∞
1 n πo
f (t) = 2 sin nt + [1 + (−1)n ] .
n=1
n 2
ϕn = tan−1 (0) = 0 or π.
160 Advanced Engineering Mathematics with MATLAB
Section 5.5
1. For n 6= 0,
Z 0 Z π
1 1
cn = (−t)e−int dt + te−int dt
2π −π 2π 0
0 π
1 e−int 1 e−int [1 − (−1)n ]
= (−int − 1) − (−int − 1) =− .
2π n2 −π 2π n2 0 πn2
For n = 0,
Z Z " 0 π
#
0 π
1 1 1 t2 t2 π
c0 = (−t) dt + t dt = − + = .
2π −π 2π 0 2π 2 −π 2 0 2
∞
π 2 X ei(2m−1)t
f (t) = −
2 π m=−∞ (2m − 1)2
2. Z Z
2 2
1 t −inπt 1
cn = ee dt = e(1−inπ)t dt
2 0 2 0
2
1 e2 − 1
= e(1−inπt) =
2(1 − inπ) 0 2(1 − inπ)
∞
e − 1 X 1 + inπ inπt
2
f (t) = e
2 n=−∞ 1 + n2 π 2
3. If n 6= 0,
Z 2 2
1 e−nπit i
cn = te−nπit dt = − (−nπit − 1) = .
2 0 2n2 π 2 0 nπ
Worked Solutions 161
Z ∞
1 2
2 i X enπit
c0 = t dt = 14 t2 0
= 1, so that f (t) = 1 + .
2 0 π n=−∞ n
n6=0
4. If n 6= 0,
Z π 2 −int π
1 2 −nit 1 t e 2e−int 2(−1)n
cn = t e dt = − − (−int − 1) =
2π −π 2π in in3 −π n2
Z π π
1 t3 π2
c0 = t2 dt = =
2π −π 3π 0 3
X
2∞
π (−1)n int
f (t) = +2 e
3 n=−∞
n2
n6=0
5. If n 6= 0,
Z π/2 π/2
1 1 −2nit [(−1)n − 1]
cn = e−2nit dt = − e =− .
π 0 2nπi 0 2nπi
Z ∞
1 π/2
1 1 i X e2(2m−1)it
c0 = dt = , so that f (t) = − .
π 0 2 2 π m=−∞ 2m − 1
6. If n 6= 0,
Z 1 1
1 e−inπt (−1)n i
cn = te−nπit dt = − (−inπt − 1) =
2 −1 2n2 π 2 −1 nπ
Z 1
1
c0 = t dt = 0
2 −1
∞
i X (−1)n inπt
f (t) = e
π n=−∞ n
n6=0
Section 5.6
and
∞
X
yp′′ (t) =− (2n − 1)2 Bn sin[(2n − 1)t].
n=1
Therefore,
1 2
A0 = − and Bn = −
2 π(2n − 1)[1 + (2n − 1)2 ]
or
∞
1 2X sin[(2n − 1)t]
yp (t) = − − .
2 π n=1 (2n − 1) + (2n − 1)3
The general solution is y(t) = yH (t) + yp (t).
2. In problem 1, we already found the Fourier series for f (t). The comple-
mentary solution is
yH (t) = A cos(t) + B sin(t).
For the particular solution, we guess
∞
X
yp (t) = A0 + A1 t cos(t) + B1 t sin(t) + Bn sin[(2n − 1)t]
n=2
and
yp′′ (t) = − 2A1 sin(t) − A1 t cos(t) + 2B1 cos(t) − B1 t sin(t)
X∞
− (2n − 1)2 Bn sin[(2n − 1)t].
n=2
so that
1 1
A0 = , A1 = − , B1 = 0,
2 π
and
2
Bn = .
π(2n − 1)[1 − (2n − 1)2 ]
Therefore,
∞
1 t 2X sin[(2n − 1)t]
yp (t) = − cos(t) − .
2 π π n=2 (2n − 1)3 − (2n − 1)
3. In problem 1, we already found the Fourier series for f (t). The com-
plementary solution is yH (t) = Ae2t + Bet . For the particular solution we
have
X∞
yp (t) = A0 + An cos[(2n − 1)t] + Bn sin[(2n − 1)t],
n=1
∞
X
yp′ (t) = (2n − 1){Bn cos[(2n − 1)t] − An sin[(2n − 1)t]}
n=1
and
∞
X
yp′′ (t) = − (2n − 1)2 {An cos[(2n − 1)t] + Bn sin[(2n − 1)t]}.
n=1
Setting all of the terms of the same harmonic equal to each other, we find
that A0 = 1/4 and
and
2
−(2n − 1)2 Bn + 3(2n − 1)An + 2Bn =
π(2n − 1)
164 Advanced Engineering Mathematics with MATLAB
or
6
An =
π{[2 − (2n − 1)2 ]2 + 9(2n − 1)2 }
and
2[2 − (2n − 1)2 ]
Bn = .
(2n − 1)π{[2 − (2n − 1)2 ]2 + 9(2n − 1)2 }
The particular solution is then
∞
1 6X cos[(2n − 1)t]
yp (t) = +
4 π n=1 [2 − (2n − 1)2 ]2 + 9(2n − 1)2
∞
2X [2 − (2n − 1)2 ] sin[(2n − 1)t]
+ .
π n=1 (2n − 1){[2 − (2n − 1)2 ]2 + 9(2n − 1)2 }
with Z π
1 π
c0 = t dt = .
π 0 2
Therefore,
∞
π 2 X ei(2n−1)t
f (t) = − .
2 π n=−∞ (2n − 1)2
and
∞
X
yp′′ (t) = − (2n − 1)2 cn ei(2n−1)t .
n=−∞
Then
∞
X ∞
π 2 X ei(2n−1)t
−c0 − [1 + (2n − 1)2 ]cn ei(2n−1)t = − .
n=−∞
2 π n=−∞ (2n − 1)2
Worked Solutions 165
Then,
∞
X ∞
2 i(2n−1)t π 2 X ei(2n−1)t
4c0 + [4 − (2n − 1) ]cn e = − .
n=−∞
2 π n=−∞ (2n − 1)2
Setting all of the terms of the same harmonic equal to each other, we have
that
π 2
c0 = , cn = −
8 π(2n − 1)2 [4 − (2n − 1)2 ]
and
∞
π 2 X ei(2n−1)t
yp (t) = − .
8 π n=−∞ (2n − 1)2 [4 − (2n − 1)2 ]
6. The general solution y(t) is the sum of the complementary solution yH (t) =
Ee−at and the particular solution
∞
X
yp (t) = C0 + Cn cos(nωt) + Dn sin(nωt).
n=1
166 Advanced Engineering Mathematics with MATLAB
Substituting the particular solution into the differential equation and equating
the coefficients for each harmonic gives aC0 = A0 ,
aCn + nωDn = An
and
−nωCn + aDn = Bn
or
(a2 + n2 ω 2 )Dn = nωAn + aBn
and
(a2 + n2 ω 2 )Cn = aAn − nωBn .
Therefore, the solution is
∞
A0 X aAn − nωBn nωAn + aBn
y(t) = Ee−at + + 2 2 2
cos(nωt) + 2 sin(nωt).
a n=1
a +n ω a + n2 ω 2
7. Assuming that
∞
X
q(t) = cn einω0 t ,
n=−∞
we substitute this solution into the ordinary differential equation and find
that
X∞ ∞
X
[(inω0 )2 + 2iαnω0 + ω 2 ]cn einω0 t = ω 2 ϕn einω0 t .
n=−∞ n=−∞
Worked Solutions 167
Therefore,
ω 2 ϕn
[(inω0 )2 + 2iαnω0 + ω 2 ]cn = ω 2 ϕn or cn =
(inω0 )2 + 2iαnω0 + ω 2
and
∞
X ω 2 ϕn
q(t) = 2 + 2iαnω + ω 2
einω0 t .
n=−∞
(inω 0 ) 0
and
Z λ/4 Z λ/2
2 2
An = cos(nqx) dx − cos(nqx) dx
λ/2 0 λ/2 λ/4
4h λ/4 λ/2
i 4 nπ
= sin(nqx)|0 − sin(nqx)|λ/4 = sin ,
λ nπ 2
∞
X
y(x) = Cn cos(nqx).
n=1
Solving for Cn ,
VL 4 nπ
Cn = 2 2 2 sin .
n q /k − 1 nπ 2
Consequently, the final solution is
∞
4VL X sin(nπ/2)
y(x) = cos(nqx).
π n=1 n [n2 q 2 /k 2 − 1]
168 Advanced Engineering Mathematics with MATLAB
Section 5.7
1.
1
A0 = 2 [f (0) + f (1) + f (2) + f (3)] = 3
1
A1 = 2 [f (0) cos(0) + f (1) cos(π/2) + f (2) cos(π) + f (3) cos(3π/2)] = −1
1
A2 = 2 [f (0) cos(0) + f (1) cos(π) + f (2) cos(2π) + f (3) cos(3π)] = −1
1
B1 = 2 [f (0) sin(0) + f (1) sin(π/2) + f (2) sin(π) + f (3) sin(3π/2)] = −1
Thus, the final answer is
3 1
f (t) = 2 − cos(πx/2) − sin(πx/2) − 2 cos(πx).
2.
1
A0 = 2 [f (0) + f (1) + f (2) + f (3)] = 0
1
A1 = 2 [f (0) cos(0) + f (1) cos(π/2) + f (2) cos(π) + f (3) cos(3π/2)] = 1
1
A2 = 2 [f (0) cos(0) + f (1) cos(π) + f (2) cos(2π) + f (3) cos(3π)] = 0
1
B1 = 2 [f (0) sin(0) + f (1) sin(π/2) + f (2) sin(π) + f (3) sin(3π/2)] = 1
Thus, the final answer is
Section 6.1
and
√ √
y ′′ (L) = 2iA exp[(1 + i)kL/ 2] − 2iB exp[(−1 + i)kL/ 2]
√ √
+ 2iC exp[(−1 − i)kL/ 2] − 2iD exp[(1 − i)kL/ 2] = 0.
If λ = k 2 , then
q q
y(η) = Ee−η/2 cos η k 2 − 1
4 + F e−η/2 sin η k 2 − 1
4 .
15. There are three possibilities: λ4 < 0, λ = 0, and λ4 > 0. For λ4 < 0,
we write λ4 = k 4 eπi with k > 0. In this case, the solution is y(x) = Aeλ1 x +
Beλ2 x + Ceλ3 x + Deλ4 x , where λ1 = keπi/4 , λ2 = ke3πi/4 , λ3 = ke5πi/4 ,
λ4 = ke7πi/4 . Substituting this solution into the boundary conditions, we
obtain the following linear equations: A−B +C −D = 0, A−iB −C +iD = 0,
eλ1 A − eλ2 B + eλ3 C − eλ4 D = 0, and ieλ1 A − eλ2 B − ieλ3 C + eλ4 D = 0. Since
the determinant of this system of equations does not equal zero, A = B =
C = D = 0 and we have a trivial solution for λ4 < 0.
If λ = 0, then y(x) = A + Bx + Cx2 + Dx3 . Substituting into the boundary
conditions: y ′′′ (0) = 6D = 0, y ′′ (0) = 2C = 0, so that C = D = 0. Finally,
y ′ (1) = B = 0. Therefore, the eigenfunction here is y0 (x) = 1.
If λ4 > 0, then y(x) = A cosh(λx) + B sinh(λx) + C cos(λx) + B sin(λx).
Substituting into the boundary conditions: y ′′′ (0) = λ3 B − λ3 D = 0, y ′′ (0) =
176 Advanced Engineering Mathematics with MATLAB
Section 6.2
1. If n 6= m, then
Z L
nπx mπx
sin sin dx
0 L L
L
sin[(n − m)πx/L] sin[(n + m)πx/L]
= − =0
2(n − m)π/L 2(n + m)π/L 0
2. Z L nπx L nπx L
1 · cos dx = sin =0
0 L nπ L 0
If n 6= m, then
Z L nπx mπx
cos cos dx
0 L L
L
sin[(n − m)πx/L] sin[(n + m)πx/L]
= + =0
2(n − m)π/L 2(n + m)π/L 0
3. If n 6= m, then
Z L
(2n − 1)πx (2m − 1)πx
sin sin dx
0 2L 2L
L
sin[(n − m)πx/L] sin[(n + m − 1)πx/L]
= − =0
2(n − m)π/L 2(n + m − 1)π/L 0
4. If n 6= m, then
Z L
(2n − 1)πx (2m − 1)πx
cos cos dx
0 2L 2L
L
sin[(n − m)πx/L] sin[(n + m − 1)πx/L]
= + =0
2(n − m)π/L 2(n + m − 1)π/L 0
Worked Solutions 177
Section 6.3
1. If
∞
X nπx
f (x) = cn sin ,
n=1
L
then
RL
x sin(nπx/L) dx
cn = R0L
0
sin2 (nπx/L) dx
2 nπx
nπx nπx
L
2 L 2(−1)n+1
= sin − cos = .
L n2 π 2 L L L 0 nπ
2. If
∞
X nπx
f (x) = c0 + cn cos ,
n=1
L
then RL
x · 1 dx L
c0 = R0 L =
2
1 dx 2
0
and
RL
x cos(nπx/L) dx
cn = R0L
0
cos2 (nπx/L) dx
2 nπx nπx nπx L
2 L 2L[(−1)n − 1]
= cos + sin = .
L n2 π 2 L L L 0 n2 π 2
3. If
∞
X (2n − 1)πx
f (x) = cn sin ,
n=1
2L
178 Advanced Engineering Mathematics with MATLAB
then
RL
x sin[(2n − 1)πx/2L] dx
cn = R0L
0
sin2 [(2n − 1)πx/2L] dx
L
2 4L2 (2n − 1)πx (2n − 1)πx (2n − 1)πx
= sin − cos
L (2n − 1)2 π 2 2L 2L 2L 0
8L(−1)n+1
= .
(2n − 1)2 π 2
4. If
∞
X (2n − 1)πx
f (x) = cn cos ,
n=1
2L
then
RL
x cos[(2n − 1)πx/2L] dx
cn = R0L
0
cos2 [(2n − 1)πx/2L] dx
L
2 4L2 (2n − 1)πx (2n − 1)πx (2n − 1)πx
= cos + sin
L (2n − 1)2 π 2 2L 2L 2L 0
8L (2n − 1)π
= (−1)n+1 − 1 .
(2n − 1)2 π 2 2
with R1 R1
0
f (x)e−ax dx 2a 0
f (x)e−ax dx
C0 = R1 = ,
e−2ax dx 1 − e−2a
0
and R1
0
f (x)[a sin(nπx) − nπ cos(nπx)] dx
Cn = R1
0
[a sin(nπx) − nπ cos(nπx)]2 dx
R1
2 0 f (x)[a sin(nπx) − nπ cos(nπx)] dx
=
a2 + n2 π 2
with n = 1, 2, 3, . . ..
Because
κn − sin(κn ) = κn [1 − cos(κn )]/2,
we obtain
2
yn (x) = 1 − cos(κn x) + [sin(κn x) − κn x].
κn
′′′′
Next, we have that yn′′′′ + λn yn′′ = 0, and ym ′′
+ λm ym = 0. Multiplying
the first equation by ym (x) and second equation by yn (x) and subtracting, we
obtain
′
Next, we multiply each side of this equation by ym (x) and integrating from 0
to 1. We obtain
Z 1 ∞
X Z 1
f ′ (x)ym
′
(x) dx = Cn yn′ (x)ym′
(x) dx.
0 n=1 0
From the orthogonality condition, all of the terms on the right side vanish
except for n = m. Using n as the dummy integer, the simplified equation
gives the final result. Of course f ′ (x) must exist for this method to work.
Section 6.4
1. Z
∞
X 1
2n + 1
f (x) = An Pn (x) where An = xPn (x) dx.
n=0
2 0
Worked Solutions 181
Therefore,
Z 1 Z 1
1 1 3 1
A0 = x dx = , A1 = x2 dx =
2 0 4 2 0 2
and Z 1
5 5
A2 = x(3x2 − 1) dx = .
4 0 16
The final answer is
2. Z
∞
X ǫ
2n + 1 1
f (x) = An Pn (x), where An = Pn (x) dx.
n=0
2 −ǫ 2ǫ
and Z ǫ
9 9(7ǫ4 − 10ǫ2 + 3)
A4 = (35x4 − 30x2 + 3) dx = .
32ǫ −ǫ 16
The final answer is
3. Z
∞
X 1
2n + 1
f (x) = An Pn (x) where An = |x|Pn (x) dx.
n=0
2 −1
and Z 1
9 35x4 − 30x2 + 3 3
A4 = 2 x dx = − .
2 0 8 16
The final answer is
5. Z
∞
X 1
2n + 1
f (x) = An Pn (x) where An = f (x)Pn (x) dx.
n=0
2 −1
and Z 1
11 63x5 − 70x3 + 15x 11
A5 = 2 dx = .
2 0 8 16
The final answer is
6. Z
∞
X 1
2n + 1
f (x) = An Pn (x), where An = f (x)Pn (x) dx.
n=0
2 −1
Therefore, Z Z
0 1
1 1 1
A0 = −1 dx + x dx = − ,
2 −1 2 0 4
Z 0 Z 1
3 3 5
A1 = −x dx + x2 dx =
2 −1 2 0 4
and Z Z
0 1
5 3x2 − 1 5 3x2 − 1 5
A2 = − dx + x dx = .
2 −1 2 2 0 2 16
The final answer is
7.
1 d4 2 4
1 d4
P4 (x) = 4 4
(x − 1) = 4 4
x8 − 4x6 + 6x4 − 4x2 + 1
2 4! dx 2 4! dx
1
= 8 · 7 · 6 · 5x − 4 · 6 · 5 · 4 · 3x2 + 6 · 4 · 3 · 2 · 1
4
(16)(24)
= 81 35x4 − 30x2 + 3
Worked Solutions 183
9. (a) From
All of the terms vary with some positive power of x. Therefore, P2n+1 (0) = 0.
(d) For 2n, Equation 6.4.14 becomes
n
X (−1)k (4n − 2k)!
P2n (x) = x2n−2k .
22n k!(2n − k)!(2n − 2k)!
k=0
then
Z Z π
π
H(θ − x) cos n + 12 x
cn = p dx cos2 n + 21 x dx
0 2 cos(x) − 2 cos(θ) 0
Z θ
1
cos n + 2 x π
= p dx = Pn [cos(θ)].
0 2 cos(x) − 2 cos(θ) 2
Therefore,
∞
X
H(θ − t) 1
p = Pn [cos(θ)] cos n+ 2 t , 0 ≤ t < θ ≤ π.
2 cos(t) − 2 cos(θ) n=0
then
Z Z π
π
H(x − θ) sin n + 21 x
cn = p dx sin2 n + 21 x dx
0 2 cos(θ) − 2 cos(x) 0
Z π
1
sin n + 2 x π
= p dx = Pn [cos(θ)].
θ 2 cos(θ) − 2 cos(x) 2
Therefore,
∞
X
H(t − θ) 1
p = Pn [cos(θ)] sin n+ 2 t , 0 ≤ θ < t ≤ π.
2 cos(θ) − 2 cos(t) n=0
Worked Solutions 185
12. If
∞
X ∞
X
H(θ − t) 1
p = cos n+ 2 t Pn [cos(θ)] = An Pn [cos(θ)],
2 cos(t) − 2 cos(θ) n=0 n=0
then
Z π
1
2 H(θ − t)Pn [cos(θ)] sin(θ)
An = cos n+ 2 t = p dθ.
2n + 1 0 2 cos(t) − 2 cos(θ)
Therefore,
Z π
Pn [cos(θ)] sin(θ) cos n + 21 t
p dθ = .
t 2 cos(t) − 2 cos(θ) n + 21
If
∞
X ∞
X
H(t − θ) 1
p = sin n+ 2 t Pn [cos(θ)] = An Pn [cos(θ)],
2 cos(θ) − 2 cos(t) n=0 n=0
then
Z π
1
2 H(t − θ)Pn [cos(θ)] sin(θ)
An = sin n+ 2 t = p dθ.
2n + 1 0 2 cos(θ) − 2 cos(t)
Therefore,
Z t
Pn [cos(θ)] sin(θ) sin n + 21 t
p dθ = .
0 2 cos(θ) − 2 cos(t) n + 21
where
Z 1 Z
2n + 1 2n + 1 1
Pn (x) Pn (x)
An = p dx = √ √ dx
2 −1 cosh(µ) − x 2 −1 e −|µ| − 2x + e|µ|
Z 1
2n + 1 Pn (x)
= √ e|µ|/2 √ dx.
2 1 − 2xe |µ| + e2|µ|
−1
186 Advanced Engineering Mathematics with MATLAB
Using the results from part(a) with t = e|µ| and the orthogonality property
of Legendre polynomials,
∞ Z
2n + 1 −|µ|/2 X −m|µ| 1 √ 1
An = √ e e Pm (x)Pn (x) dx = 2e−(n+ 2 )|µ| .
2 m=0 −1
14. The first formula follows by simply letting h = 1. For the second formula,
we integrate the generating function from 0 to h or
X∞ Z h Z h
dτ
τ n Pn (x) dτ = √
n=0 0 0 1 − xτ + τ 2
X∞
Pn (x) p h
hn+1 = ln 2 1 − 2xτ + τ 2 + 2τ − 2x
n=0
n+1 0
√ !
1 − 2xh + h2 + h − x
= ln .
1−x
The final result is obtained by settingph = 1 and dividing the top and bottom
of the argument of the logarithm by (1 − x)/2 . The last formula is found
by direct substitution of earlier results into the two summations on the right
side.
Section 6.5
1. Because
X∞
(−1)m (kx/2)2m
J0 (kx) = ,
m=0
m!m!
X∞ X∞
(−1)m (kx/2)2m−1 (−1)i (kx/2)2i+1
J0′ (kx) = k = −k = −kJ1 (kx).
m=1
(m − 1)!m! i=0
i!(i + 1)!
2. Because J0′ (x) = −J1 (x), J0′′ (x) = −J1′ (x) = 12 [J2 (x) − J0 (x)] from Equa-
tion 6.5.30. Multiplying both sides by 2 finishes the job.
3. Starting with J0 (x) + J2 (x) = 2J1 (x)/x from Equation 6.5.29 and J2 (x) =
J0 (x) + 2J0′′ (x) from problem 2 and J1 (x) = −J0′ (x), we eliminate J1 (x) and
J0 (x) between these two equations.
Dividing by 2,
2 1
J0′′′ (x) = − 1 J0′ (x) + J0 (x).
x2 x
5. From problem 3,
6. From Equation 6.5.29,J4 (x) = 6J3 (x)/x − J2 (x), J3 (x) = 4J2 (x)/x − J1 (x)
and J2 (x) = 2J1 (x)/x − J0 (x). Eliminating J3 (x) and J2 (x) between these
equations gives the desired result.
7. From Equation 6.5.29, Jn−2 (x) + Jn (x) = 2(n − 1)Jn−1 (x)/x, Jn−1 (x) +
Jn+1 (x) = 2nJn (x)/x, and Jn (x) + Jn+2 (x) = 2(n + 1)Jn+1 (x)/x, we find
that
Jn−2 (x) + Jn (x) = 4n(n − 1)Jn (x)/x2 − (n − 1)[Jn (x) + Jn+2 (x)]/(n + 1).
′ ′
From Equation 6.5.30, 2Jn−1 (x) − 2Jn+1 (x) = 4Jn′′ (x), Jn−2 (x) − 2Jn (x) +
Jn+2 (x) = 4Jn′′ (x). Substituting into the last equation:
4n(n − 1) n−1
2
Jn (x) − [Jn (x) + Jn+2 (x)] − 3Jn (x) + Jn+2 (x) = 4Jn′′ (x).
x n+1
Simplifying this equation and solving for Jn+2 (x) gives the desired result.
8. Because J3 (x) = 4J2 (x)/x − J1 (x) and J2 (x) = 2J1 (x)/x − J0 (x), we can
eliminate J2 (x) between the two equations and obtain the desired result.
′ ′
9. From Equation 6.5.30, 2Jn−1 (x) − 2Jn+1 (x) = 4Jn′′ (x) after we take
′
the derivative. Using Equation 6.5.30 twice again to eliminate Jn−1 (x) and
′
Jn+1 (x) in the first equation, we obtain the desired result.
11.
d 2
x J3 (2x) = 2xJ3 (2x) + 2x2 J3′ (2x)
dx
= 2xJ3 (2x) + 2x2 [J2 (2x) − 3J3 (2x)/2x]
= 2x2 J2 (2x) − xJ3 (2x)
from Equation 6.5.27.
12.
d
xJ0 (x2 ) = J0 (x2 ) + 2x2 J0′ (x2 ) = J0 (x2 ) − 2x2 J1 (x2 ).
dx
13.
Z Z
1 1 3 1
x3 J2 (3x) dx = η 3 J2 (η) dη = η J3 (η) + C = x3 J3 (3x) + C
81 81 3
14.
Z Z
x−2 J3 (2x) dx = 2 η −2 J3 (η) dη = −2η −2 J2 (η) + C = − 21 x−2 J2 (2x) + C
15.
Z Z Z
x ln(x)J0 (x) dx = ln(x)[xJ0 (x) dx] = x ln(x)J1 (x) − J1 (x) dx
16.
Z a Z ka
1 1 ka a2
xJ0 (kx) dx = ηJ0 (η) dη = ηJ1 (η)|0 = J1 (ka)
0 k2 0 k 2 ka
17.
Z 1 Z 1 Z 1
x(1 − x2 )J0 (kx) dx = xJ0 (kx) dx − x3 J0 (kx) dx
0 0 0
Z k Z k
1 1
= ηJ0 (η) dη − 4 η 3 J0 (η) dη
k2 0 k 0
" Z k #
1 k 1 3 k 2
= ηJ1 (η)|0 − 4 η J1 (η) 0 − 2 η J1 (η) dη
k2 k 0
J1 (k) 1 h k
i
= − 4 k 3 J1 (k) − 2 η 2 J2 (η) 0
k k
2 2 2
= J2 (k) = 2 J1 (k) − J0 (k)
k2 k k
4 2
= J1 (k) − 2 J0 (k)
k3 k
Worked Solutions 189
18. Z Z
1 k
1
x3 J0 (kx) dx = η 3 J0 (η) dη
0 k4
"0 Z #
k
1 3 k 2
= 4 η J1 (η) 0
−2 η J1 (η) dη
k 0
1 h 3 k
i
= 4
k J1 (k) − 2 η 2 J2 (η) 0
k
1 3 2 2
= 4 k J1 (k) − 2k J1 (k) − J0 (k)
k k
k2 − 4 2
= J1 (k) + 2 J0 (k)
k3 k
19. Because
∞
X
f (x) = Ak J0 (µk x),
k=1
R1 Rµ
0
xJ0 (µk x) dx 2 0 k ηJ0 (η) dη 2µk J1 (µk ) 2
Ak = 1 2 = 2 2 = 2 2 = .
2 J1 (µk )
µk J1 (µk ) µk J1 (µk ) µk J1 (µk )
Therefore,
∞
X J0 (µk x)
f (x) = 2 .
µk J1 (µk )
k=1
20. Because
∞
X
f (x) = Ak J0 (µk x),
k=1
R1 R µk 1
R µk
1
x(1 − x2 )J0 (µk x) dx 0
ηJ0 (η) dη − µ2k 0
η 3 J0 (η) dη
8 0
Ak = 1 2 =
2 J1 (µk )
4µ2k J12 (µk )
1
µk J1 (µk ) − µ2k
[µ3k J1 (µk ) − 2µ2k J2 (µk )] 4J1 (µk )/µk 1
= = = 3 .
4µ2k J12 (µk ) 2 2
4µk J1 (µk ) µk J1 (µk )
Therefore
∞
X J0 (µk x)
f (x) = .
µ3k J1 (µk )
k=1
21. Because
∞
X
f (x) = Ak J1 (µk x),
k=1
190 Advanced Engineering Mathematics with MATLAB
R2
0
x(4x − x3 )J1 (µk x) dx
Ak =
2J22 (2µk )
R 2µk 2 R 2µ
4 0 η J1 (η) dη − µ12 0 k η 4 J1 (η) dη
k
=
2µ3k J22 (2µk )
1
16µ2k J2 (2µk ) − µ2k
[16µ4k J2 (2µk ) − 16µ3k J3 (2µk )]
=
2µ3k J22 (2µk )
16J3 (2µk ) 16 16
= = 3 =− 3 .
2µ2k J22 (2µk ) µk J2 (2µk ) µk J0 (2µk )
Therefore,
∞
X J1 (µk x)
f (x) = −16 .
µ3k J0 (2µk )
k=1
22. Because
∞
X
f (x) = Ak J1 (µk x),
k=1
R1 Rµ
0
x4 J1 (µk x) dx 2 0 k η 4 J1 (η) dη 2[µ4k J2 (µk ) − 2µ2k J3 (µk )]
Ak = 1 2 = 5 2 =
2 J2 (µk )
µk J2 (µk ) µ5k J22 (µk )
2[µk J2 (µk ) − 8J2 (µk )/µk ] 2(µ2k − 8)
= = .
µ2k J22 (µk ) µ3k J2 (µk )
Therefore,
∞
X (µ2k − 8)J1 (µk x)
f (x) = 2 .
µ3k J2 (µk )
k=1
23. Because
∞
X
f (x) = Ak J1 (µk x),
k=1
R1 Rµ
2µ2k 0 x2 J1 (µk x) dx 2 0 k η 2 J1 (η) dη 2µk J2 (µk )
Ak = = = 2 .
(µ2k − 1)J12 (µk ) µk (µ2k − 1)J12 (µk ) (µk − 1)J12 (µk )
Therefore,
∞
X µk J2 (µk )J1 (µk x)
f (x) = 2 .
(µ2k − 1)J12 (µk )
k=1
24. Because
∞
X
f (x) = Ak J0 (µk x),
k=1
Worked Solutions 191
R1 Z µk
0
(1 − x4 )xJ0 (µk x) dx 2 u4
Ak = 1 2 = 2 2 1 − 4 J0 (u) u du
2 J1 (µk )
µk J1 (µk ) 0 µk
µ Z µ
2 u4 k
4 k
4
= 1 − u J 1 (u) + u J 1 (u) du
µ2k J12 (µk ) µ4k 0
µ4k 0
Z µk
8
= u2 · u2 J1 (u) du
µ6k J12 (µk ) 0
Z µk
8 4 µk 3
= u J 2 (u) − 2 u J 2 (u) du
µ6k J12 (µk ) 0
0
8 h µk
i
4 3
= µ J 2 (µ k ) − 2u J 3 (u)
µ6k J12 (µk ) k 0
8
= 3 2 [µk J2 (µk ) − 2J3 (µk )]
µk J1 (µk )
32 2J2 (µk ) 32(µ2k − 4)
= J 1 (µ k ) − = .
µ3k J12 (µk ) µk µ5k J1 (µk )
Therefore,
∞
X (µ2k − 4)J0 (µk x)
f (x) = 32 .
µ5k J1 (µk )
k=1
25. Using Equation 6.5.31, Equation 6.5.35, and Equation 6.5.45 with h = α
and n = 0, we have that
∞
X
1= Ak J0 (λk x), 0 < x < L,
k=1
with
Z L
1
Ak = xJ0 (λk x) dx and Ck = (λ2k L2 + α2 L2 )J02 (λk L)/(2λ2k ),
Ck 0
26. Because
∞
X
f (x) = Ak J0 (µk x),
k=1
192 Advanced Engineering Mathematics with MATLAB
Ra
x[J0 (bx) − J0 (ba)]J0 (µk x) dx
0
Ak = 1 2 2
2 a J0 (ab)J1 (µk a)
2[abJ0 (µk a)J1 (ba) − aµk J0 (ba)J1 (µk a)] 2
= 2 2 2 2 −
a (b − µk )J0 (ba)J1 (µk a) aµk J1 (µk a)
2b2
= .
aµk (µ2k − b2 )J1 (µk a)
Therefore,
∞
2b2 X J0 (µk x)
f (x) = 2 .
a µk (µk − b2 )J1 (µk a)
k=1
27. Because
∞
X
f (x) = Ak J0 (µk x),
k=1
Rt √ R1 p
0
J0 (µk x) x dx/ t2 − x2 2t 0 J0 (bη) η dη/ 1 − η 2 2 sin(µk t)
Ak = 1 2 = 2 (µ ) = .
J
2 1 (µ k ) J 1 k µk J12 (µk )
Therefore,
∞
X sin(µk t)J0 (µk x)
f (x) = 2 .
µk J12 (µk )
k=1
28. Because
∞
X
f (x) = Ak J0 (µk x/b),
k=1
Ra √
J0 (µk x/b) x dx/ a2 − x2
0
Ak = 1 2 2
2 b J0 (µk )
R1 p
2a 0 J0 (µk aη/b) η dη/ 1 − η 2 2 sin(µk a/b)
= 2 =
2
b J0 (µk ) bµk J02 (µk )
from Equation 6.5.31, Equation 6.5.35, and Equation 6.5.44. Therefore,
∞
2 X sin(µk a/b)J0 (µk x/b)
f (x) = .
b µk J02 (µk )
k=1
29. Because √
X∞
cosh(b t2 − x2 )
√ H(t − x) = Ak J0 (µk x),
t2 − x 2 k=1
Worked Solutions 193
Z t
√
2 cosh b t2 − x2
Ak = 2 2 √ J0 (µk x) x dx
a J1 (µk a) 0 t2 − x 2
Z t p
2
= 2 2 cosh(bη) J0 µk t2 − η 2 dη
a J1 (µk a) 0
p
2 sin t µ2k − b2
= p ,
a2 µ2k − b2 J12 (µk a)
where η 2 = t2 − x2 . The final result is obtained by substituting Ak into the
first equation.
x X∞ nπx
√ H(t − x) = Bn sin .
t t2 − x 2 n=1
L
31. Because
∞
X
f (x) = Ak J0 (µk x/a),
k=1
Ra
0
δ(x − b)J0 (µk x/a) x dx 2bJ1 (µk b/a)
Ak = 1 2 2 = .
2 a J1 (µk )
a2 J12 (µk )
Therefore,
∞
2b X J1 (µk b/a)
f (x) = J1 (µk x/a).
a2 J12 (µk )
k=1
32. Because
∞
X
f (x) = Ak J0 (µk x/a),
k=1
Ra
0
[δ(x)/(2πx)]J0 (µk x/a) x dx 1
Ak = 1 2 2 = 2 2 .
2 a J1 (µk )
πa J 1 (µk )
Therefore
∞
1 X J0 (µk x/a)
f (x) = .
πa2 J12 (µk )
k=1
194 Advanced Engineering Mathematics with MATLAB
Section 6.6
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% MATLAB Code for Finite-Element Solution
% of Sturm-Liouville Problems
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function fem1d ( )
%
%
% Discussion:
%
% FEM1D solves a one dimensional ODE using
% the finite element method.
%
% The differential equation has the form:
%
% -d/dx ( p(x) du/dx ) + q(x) * u = f(x)
%
% The finite-element method uses piecewise
% linear basis functions.
%
% Here U is an unknown scalar function of X defined on the
% interval [XL,XR], and P, Q and F are GIVEN functions of X.
% See function value ff, pp and ff below that give P, Q and F.
%
% The values of U or U’ at XL and XR are also specified.
%
% The interval [XL,XR] is "meshed" with NSUB+1 points,
%
% XN(0) = XL, XN(1)=XL+H, XN(2)=XL+2*H, ..., XN(NSUB)=XR.
%
% This creates NSUB subintervals, with interval number 1
% having endpoints XN(0) and XN(1), and so on up to interval
% NSUB, which has endpoints XN(NSUB-1) and XN(NSUB).
%
% Licensing:
% This code is distributed under the GNU LGPL license.
%
% Author: MATLAB version by John Burkardt
%
% Parameters:
%
% real ADIAG(NU).
Worked Solutions 195
%
% real XQUAD(N)
% XQUAD(I) is the location of the single quadrature point
% in interval I.
%
% real XR, the right endpoint of the interval over which the
% differential equation is being solved.
%
n = 10; % Number of subintervals
nl = 2; % Number of basis functions
fprintf ( 1, ’\n’ );
timestamp ( );
fprintf ( 1, ’\n’ );
fprintf ( 1, ’FEM1D\n’ );
fprintf ( 1, ’ MATLAB version\n’ );
fprintf ( 1, ’\n’ );
fprintf ( 1, ’ Solve the two-point boundary value problem:\n’ );
fprintf ( 1, ’\n’ );
fprintf ( 1, ’ -d/dx [p(x) du/dx] + q(x)*u = f(x)\n’ );
fprintf ( 1, ’\n’ );
fprintf ( 1, ’ on an interval [xl,xr], with the values of\n’ );
fprintf ( 1, ’ u or u’’ specified at xl and xr.\n’ );
fprintf ( 1, ’\n’ );
fprintf ( 1, ’ The interval is broken into %d subintervals. ...
\n’, n );
fprintf ( 1, ’ The number of basis functions per element is ...
%d\n’, nl );
[h, indx, node, nu, xn, xquad] = geometry( ibc, nl, n, xl, xr );
fprintf ( 1, ’\n’ );
fprintf ( 1, ’FEM1D:\n’ );
fprintf ( 1, ’ Normal end of execution.\n’ );
return
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Output, real ADIAG(NU).
% ADIAG(I) is the "diagonal" coefficient of the I-th
% equation in the linear system. That is, ADIAG(I) is
% the coefficient of the I-th unknown in the I-th equation.
%
% Output, real ALEFT(NU).
% ALEFT(I) is the "left hand" coefficient of the I-th
% equation in the linear system. That is, ALEFT(I) is the
% coefficient of the (I-1)-th unknown in the I-th equation.
% There is no value in ALEFT(1), since the first equation
% does not refer to a "0-th" unknown.
%
% Output, real ARITE(NU).
% ARITE(I) is the "right hand" coefficient of the I-th
% equation in the linear system. ARITE(I) is the coefficient
% of the (I+1)-th unknown in the I-th equation. There is
% no value in ARITE(NU) because the NU-th equation does not
% refer to an "NU+1"-th unknown.
%
% Output, real F(NU), the right hand side
% the linear equations.
for ie = 1 : n
he = h(ie);
xleft = xn(node(1,ie)+1);
xrite = xn(node(2,ie)+1);
for iq = 1 : nquad
xqe = xquad(ie);
for il = 1 : nl
ig = node(il,ie);
Worked Solutions 201
iu = indx(ig+1);
if ( 0 < iu )
if ( ig == 0 )
x = xn(1); f(iu) = f(iu) - pp ( x ) * ul;
elseif ( ig == n )
x = xn(n+1); f(iu) = f(iu) + pp ( x ) * ur;
end
for jl = 1 : nl
jg = node(jl,ie);
ju = indx(jg+1);
if ( ju <= 0 )
if ( jg == 0 )
f(iu) = f(iu) - aij * ul;
elseif ( jg == n )
f(iu) = f(iu) - aij * ur;
end
elseif ( iu == ju )
adiag(iu) = adiag(iu) + aij;
elseif ( ju < iu )
aleft(iu) = aleft(iu) + aij;
else
arite(iu) = arite(iu) + aij;
end
end
end
end
202 Advanced Engineering Mathematics with MATLAB
end
end
return; end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function value = ff ( x )
%*************************************************************
%
% FF returns the right hand side of the differential equation.
%
% Licensing:
% This code is distributed under the GNU LGPL license.
%
% Author: MATLAB version by John Burkardt
%
% Parameters:
%
% Input, real X, the evaluation point.
%
% Output, real VALUE, the value of F(X).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%% This is where the right side of ode is loaded %%%%
value = 2*x*exp(2*x) + 3*exp(2*x)*sin(x);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
return
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%*************************************************************
%
% GEOMETRY sets up the geometry for the interval [XL,XR].
%
% Licensing:
% This code is distributed under the GNU LGPL license.
% Author: MATLAB version by John Burkardt
%
Worked Solutions 203
% Parameters:
%
% Input, integer IBC.
% IBC declares what the boundary conditions are.
% 1, at the left endpoint, U has the value UL,
% at the right endpoint, U’ has the value UR.
% 2, at the left endpoint, U’ has the value UL,
% at the right endpoint, U has the value UR.
% 3, at the left endpoint, U has the value UL,
% and at the right endpoint, U has the value UR.
% 4, at the left endpoint, U’ has the value UL,
% at the right endpoint U’ has the value UR.
%
% Input, integer NL.
% The number of basis functions used in a single
% subinterval. (NL-1) is the degree of the polynomials
% used. For this code, NL is fixed at 2, meaning that
% piecewise linear functions are used as the basis.
%
% Input, integer NSUB.
% The number of subintervals into which the interval
% [XL,XR] is broken.
%
% Input, real XL.
% XL is the left endpoint of the interval over which the
% differential equation is being solved.
%
% Input, real XR.
% XR is the right endpoint of the interval over which the
% differential equation is being solved.
%
% Output, real H(N), the length of the subintervals.
%
% Output, integer INDX(1:N+1).
% For a node I, INDX(I) is the index of the unknown
% associated with node I.
% If INDX(I) is equal to -1, then no unknown is associated
% with the node, because a boundary condition fixing the
% value of U has been applied at the node instead.
% Unknowns are numbered beginning with 1.
% If IBC is 2 or 4, then there is an unknown value of U
% at node 0, which will be unknown number 1. Otherwise,
% unknown number 1 will be associated with node 1.
% If IBC is 1 or 4, then there is an unknown value of U
% at node N, which will be unknown N or N+1,
204 Advanced Engineering Mathematics with MATLAB
for i = 0 : nsub
xn(i+1) = ( ( nsub - i ) * xl + ( i ) * xr ) / ( nsub );
fprintf ( 1, ’ %6d %12f\n’, i, xn(i+1) );
end
fprintf ( 1, ’\n’ );
fprintf ( 1, ’Subint Length\n’ );
fprintf ( 1, ’\n’ );
for i = 1 : nsub
h(i) = xn(i+1) - xn(i);
fprintf ( 1, ’ %6d %12f\n’, i, h(i) );
end
fprintf ( 1, ’\n’ );
fprintf ( 1, ’Subint Quadrature point\n’ );
fprintf ( 1, ’\n’ );
for i = 1 : nsub
xquad(i) = 0.5 * ( xn(i) + xn(i+1) );
fprintf ( 1, ’ %6d %12f\n’, i, xquad(i) );
end
% **** Set the value of NODE, which records, for each interval,
% **** the node numbers at the left and right.
fprintf ( 1, ’\n’ );
fprintf ( 1, ’Subint Left Node Right Node\n’ );
fprintf ( 1, ’\n’ );
for i = 1 : nsub
node(1,i) = i - 1; node(2,i) = i;
fprintf ( 1, ’ %6d %6d %6d\n’, i, node(1,i), node(2,i) );
end
nu = 0;
i = 0;
if ( ibc == 1 | ibc == 3 )
indx(i+1) = -1;
else
nu = nu + 1; indx(i+1) = nu;
end
for i = 1 : nsub-1
nu = nu + 1; indx(i+1) = nu;
end
i = nsub;
206 Advanced Engineering Mathematics with MATLAB
if ( ibc == 2 | ibc == 3 )
indx(i+1) = -1;
else
nu = nu + 1; indx(i+1) = nu;
end
fprintf ( 1, ’\n’ );
fprintf ( 1, ’ Node Unknown\n’ );
fprintf ( 1, ’\n’ );
for i = 0 : nsub
fprintf ( 1, ’ %6d %6d\n’, i, indx(i+1) );
end
return; end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% *************************************************************
%
% INIT initializes variables that define the problem.
%
% Licensing:
% This code is distributed under the GNU LGPL license.
%
% Author: MATLAB version by John Burkardt
%
% Parameters:
%
% Output, integer IBC.
% IBC declares what the boundary conditions are.
% 1, at the left endpoint, U has the value UL,
% at the right endpoint, U’ has the value UR.
% 2, at the left endpoint, U’ has the value UL,
% at the right endpoint, U has the value UR.
% 3, at the left endpoint, U has the value UL,
% and at the right endpoint, U has the value UR.
% 4, at the left endpoint, U’ has the value UL,
% at the right endpoint U’ has the value UR.
%
% Output, integer NQUAD.
% The number of quadrature points used in a subinterval.
% This code uses NQUAD = 1.
Worked Solutions 207
%
% Output, real UL.
% If IBC is 1 or 3, UL is the value that U is required
% to have at X = XL.
% If IBC is 2 or 4, UL is the value that U’ is required
% to have at X = XL.
%
% Output, real UR.
% If IBC is 2 or 3, UR is the value that U is required
% to have at X = XR.
% If IBC is 1 or 4, UR is the value that U’ is required
% to have at X = XR.
%
% Output, real XL.
% XL is the left endpoint of the interval over which the
% differential equation is being solved.
%
% Output, real XR.
% XR is the right endpoint of the interval over which the
% differential equation is being solved.
%
%%%%%% LOAD IN END POINT VALUES HERE %%%%%%
ibc = 4; nquad = 1; ul = -2.0; ur = 3.0; xl = 0.0; xr = 1.0;
fprintf ( 1, ’\n’ );
fprintf ( 1, ’The equation is to be solved for\n’ );
fprintf ( 1, ’X greater than XL = ’, xl );
fprintf ( 1, ’ and less than XR = ’, xr );
fprintf ( 1, ’\n’ );
fprintf ( 1, ’The boundary conditions are:\n’ );
fprintf ( 1, ’\n’ );
if ( ibc == 1 | ibc == 3 )
fprintf ( 1, ’ At X = XL, U = %f\n’, ul );
else
fprintf ( 1, ’ At X = XL, U’’ = %f\n’, ul );
end
if ( ibc == 2 | ibc == 3 )
fprintf ( 1, ’ At X = XR, U = %f\n’, ur );
else
fprintf ( 1, ’ At X = XR, U’’ = %f\n’, ur );
end
208 Advanced Engineering Mathematics with MATLAB
fprintf ( 1, ’\n’ );
fprintf ( 1, ’Number of quadrature points per element is ...
%d\n’, nquad );
return; end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%**********************************************************
%
% OUTPUT prints out the computed solution at the nodes.
%
% Licensing:
% This code is distributed under the GNU LGPL license.
%
% Author: MATLAB version by John Burkardt
%
% Parameters:
%
% Input, real F(NU), the solution of the linear equations.
%
% Input, integer IBC.
% IBC declares what the boundary conditions are.
% 1, at the left endpoint, U has the value UL,
% at the right endpoint, U’ has the value UR.
% 2, at the left endpoint, U’ has the value UL,
% at the right endpoint, U has the value UR.
% 3, at the left endpoint, U has the value UL,
% and at the right endpoint, U has the value UR.
% 4, at the left endpoint, U’ has the value UL,
% at the right endpoint U’ has the value UR.
%
% Input, integer INDX(1:N+1).
% For a node I, INDX(I) is the index of the unknown
% associated with node I.
% If INDX(I) is equal to -1, then no unknown is associated
% with the node, because a boundary condition fixing the
% value of U has been applied at the node instead.
% Unknowns are numbered beginning with 1.
% If IBC is 2 or 4, then there is an unknown value of U
% at node 0, which will be unknown number 1. Otherwise,
% unknown number 1 will be associated with node 1.
Worked Solutions 209
fprintf ( 1, ’\n’ );
fprintf ( 1, ’Computed solution:\n’ );
fprintf ( 1, ’\n’ );
fprintf ( 1, ’ Node X(I) U(I)\n’ );
fprintf ( 1, ’\n’ );
for i = 0 : nsub
if ( i == 0 )
if ( ibc == 1 | ibc == 3 )
u(i+1) = ul;
else
u(i+1) = f(indx(i+1));
end
elseif ( i == nsub )
210 Advanced Engineering Mathematics with MATLAB
if ( ibc == 2 | ibc == 3 )
u(i+1) = ur;
else
u(i+1) = f(indx(i+1));
end
else
u(i+1) = f(indx(i+1));
end
end
return; end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%**************************************************************
%
% PHI evaluates a linear basis function and its derivative.
%
% Discussion:
%
% In any interval, there are just two basis functions. The
% first basis function is a line which is 1 at the left endpoint
% and 0 at the right. The second basis function is 0 at
% the left endpoint and 1 at the right.
%
Worked Solutions 211
% Licensing:
% This code is distributed under the GNU LGPL license.
%
% Author: MATLAB version by John Burkardt
%
% Parameters:
%
% Input, integer IL, the index of the basis function.
% 1, the function which is 1 at XLEFT and 0 at XRITE.
% 2, the function which is 0 at XLEFT and 1 at XRITE.
%
% Input, real X, the evaluation point.
%
% Input, real XLEFT, XRITE, the left and right
% endpoints of the interval.
%
% Output, real PHII, PHIIX, the value of the
% basis function and its derivative at X.
if ( il == 1 )
phii = ( xrite - x ) / ( xrite - xleft );
phiix = -1.0 / ( xrite - xleft );
else
phii = ( x - xleft ) / ( xrite - xleft );
phiix = 1.0 / ( xrite - xleft );
end
else
phii = 0.0;
phiix = 0.0;
end
return; end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function value = pp ( x )
%*********************************************************
212 Advanced Engineering Mathematics with MATLAB
%
% PP returns the value of the coefficient function P(X).
%
% Licensing:
% This code is distributed under the GNU LGPL license.
%
% Author: MATLAB version by John Burkardt
%
% Parameters:
%
% Input, real X, the evaluation point.
%
% Output, real VALUE, the value of P(X).
value = -exp(2*x);
return; end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function value = qq ( x )
%********************************************************
%
% QQ returns the value of the coefficient function Q(X).
%
% Licensing:
% This code is distributed under the GNU LGPL license.
%
% Author: MATLAB version by John Burkardt
%
% Parameters:
%
% Input, real X, the evaluation point.
%
% Output, real VALUE, the value of Q(X).
value = exp(2*x);
return; end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%*********************************************************
%
% SOLVE solves a tridiagonal matrix system of the form A*x = b.
%
% Licensing:
% This code is distributed under the GNU LGPL license.
%
% Author: MATLAB version by John Burkardt
%
% Parameters:
%
% Input, real ADIAG(NU), ALEFT(NU), ARITE(NU).
% the diagonal, left and right entries of the equations.
% Note that for the first equation, there is no ALEFT
% coefficient, and for the last, there is no ARITE.
% So there is no need to store a value in ALEFT(1), nor
% in ARITE(NU).
%
% Input, real F(NU), the right hand side of the linear
% system to be solved.
%
% Input, integer NU.
% NU is the number of equations to be solved.
%
% Output, real U(NU), the solution of the linear system.
for i = 2 : nu-1
adiag(i) = adiag(i) - aleft(i) * arite(i-1);
arite(i) = arite(i) / adiag(i);
end
for i = 2 : nu
u(i) = ( f(i) - aleft(i) * u(i-1) ) / adiag(i);
end
for i = nu-1 : -1 : 1
u(i) = u(i) - arite(i) * u(i+1);
end
214 Advanced Engineering Mathematics with MATLAB
return; end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%***********************************************************
%
% SYSTEM PRINT prints out the tridiagonal linear
% system to be solved.
%
% Licensing:
% This code is distributed under the GNU LGPL license.
%
% Author: John Burkardt
%
% Parameters:
%
% Input, real ADIAG(NU), ALEFT(NU), ARITE(NU),
% the diagonal, left and right entries of the equations.
% Input, real F(NU), the right hand side of the linear system.
% Input, integer NU, the number of equations to be solved.
%
fprintf ( 1, ’\n’ );
fprintf ( 1, ’Printout of tridiagonal linear system:\n’ );
fprintf ( 1, ’\n’ );
fprintf ( 1, ’Equation ALEFT ADIAG ARITE RHS\n’ );
fprintf ( 1, ’\n’ );
for i = 1 : nu
fprintf ( 1, ’%3d’, i );
if ( i == 1 )
fprintf ( 1, ’ ’ );
else
fprintf ( 1, ’ %12f’, aleft(i) );
end
if ( i < nu )
fprintf ( 1, ’
else
fprintf ( 1, ’ ’ );
Worked Solutions 215
end
end
return; end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function timestamp ( )
%*********************************************************
%
% TIMESTAMP prints the current YMDHMS date as a timestamp.
%
% Licensing:
% This code is distributed under the GNU LGPL license.
%
% Author: John Burkardt
t = now;
c = datevec ( t );
s = datestr ( c, 0 );
fprintf ( 1, ’%s\n’, s );
return; end
Section 7.3
n2 π 2 nπx
λn = , Xn (x) = sin .
L2 L
The temporal equation is
a2 n2 π 2 nπct nπct
Tn′′ + Tn = 0 and Tn (t) = An cos + Bn sin .
L2 L L
and
∞
X nπx
nπct
nπct
u(x, t) = sin An cos + Bn sin .
n=1
L L L
At t = 0,
∞
X nπx
u(x, 0) = An sin = 0 or An = 0.
n=1
L
Because
X∞
nπc nπx
nπct
nπct
ut (x, t) = sin −An sin + Bn cos .
n=1
L L L L
Therefore,
X∞
nπc nπx
ut (x, 0) = Bn sin = 1.
n=1
L L
At t = 0,
∞
X nπx
u(x, 0) = An sin = 1.
n=1
L
Because
X∞
nπc nπx
nπct
nπct
ut (x, t) = sin −An sin + Bn cos ,
n=1
L L L L
Worked Solutions 217
X∞
nπc nπx
ut (x, 0) = Bn sin = 0 ⇒ Bn = 0.
n=1
L L
At t = 0,
∞
X nπx
u(x, 0) = An sin = f (x).
n=1
L
Because
X∞
nπc nπx
nπct
nπct
ut (x, t) = sin −An sin + Bn cos ,
n=1
L L L L
X∞
nπc nπx
ut (x, 0) = Bn sin = 0 or Bn = 0.
n=1
L L
At t = 0,
∞
X nπx πx
2πx
u(x, 0) = An sin = A1 sin + A2 sin
n=1
L L L
3πx 4πx
+ A3 sin + A4 sin + ···
L L
X∞
nπc nπx
nπct
nπct
ut (x, t) = sin −An sin + Bn cos ,
n=1
L L L L
X∞
nπc nπx
ut (x, 0) = Bn sin = 0 ⇒ Bn = 0.
n=1
L L
The final answer is
πx
1 πct 3πx 3πct
u(x, t) = 3 sin cos − sin cos .
4 L L L L
At t = 0,
∞
X nπx πx
2πx
u(x, 0) = An sin = A1 sin + A2 sin
n=1
L L L
3πx 4πx
+ A3 sin + A4 sin + ···
L L
By inspection, A1 = 1, A2 = A3 = · · · = 0. Because
X∞
nπc nπx
nπct
nπct
ut (x, t) = sin −An sin + Bn cos ,
n=1
L L L L
X∞
nπc nπx
ut (x, 0) = Bn sin = g(x).
n=1
L L
This is a half-range sine Fourier series. Therefore, we can immediately write
Z 3L/4 nπx
nπc 2
Bn = a sin dx
L L L/4 L
Worked Solutions 219
or
nπ nπ nπ
2aL 3nπ 4aL
Bn = 2 2 cos − cos = 2 2 sin sin .
n π c L L n π c 2 4
At t = 0,
∞
X nπx
u(x, 0) = An sin = 0 ⇒ An = 0.
n=1
L
Because
X∞
nπc nπx
nπct
nπct
ut (x, t) = sin −An sin + Bn cos ,
n=1
L L L L
X∞
nπc nπx
ut (x, 0) = Bn sin = g(x).
n=1
L L
or nπ
4aL
Bn = sin .
cn3 π 3 2
The final answer is
∞
4aL X (−1)m+1 (2m − 1)πx (2m − 1)πct
u(x, t) = sin sin .
cπ 3 m=1 (2m − 1)3 L L
220 Advanced Engineering Mathematics with MATLAB
At t = 0,
∞
X nπx
u(x, 0) = An sin = f (x).
n=1
L
This is a half-range sine expansion. Therefore,
Z nπx Z nπx
2 L/2 2 L
An = x sin dx + (L − x) sin dx
L 0 L L L/2 L
4L nπ
= 2 2 sin .
n π 2
Because
X∞
nπc nπx
nπct
nπct
ut (x, t) = sin −An sin + Bn cos ,
n=1
L L L L
X∞
nπc nπx
ut (x, 0) = Bn sin = 0 or Bn = 0.
n=1
L L
The final answer is
∞
4L X (−1)n+1 (2n − 1)πx (2n − 1)πct
u(x, t) = sin cos .
π 2 n=1 (2n − 1)2 L L
At t = 0,
∞
X
u(x, 0) = A0 + An cos (nx) = 0 ⇒ A0 = An = 0.
n=1
Because
∞
X
ut (x, t) = B0 + (nc) cos (nx) −An sin (nct) + Bn cos (nct) ,
n=1
u(r, 0) = 0, 0 ≤ r < 2,
and √
1, 0√
≤ r < 2 a,
ut (r, 0) =
0, 2 a < r < 2.
We now use separation of variables with u(r, t) = R(r)T (t). The product solu-
tion with satisfies the boundary conditions and the initial condition u(r, 0) = 0
is
∞
X
u(r, t) = An sin(kn t)J0 (kn r),
n=1
and √ √
aJ1 (2kn a )
An = .
kn2 J12 (2kn )
Therefore,
∞ √
√ X J1 (2kn a )J0 (kn r)
u(r, t) = a sin(kn t),
n=1
kn2 J12 (2kn )
or √ √
∞
√ X J1 (2kn a )J0 (2kn x )
u(x, t) = a sin(kn t).
n=1
kn2 J12 (2kn )
(2n − 1)2 c2 π 2
Tn′′ + 2hTn′ + Tn = 0.
4L2
The corresponding solution is
hp i hp i
Tn (t) = e−ht An cos t λn c2 − h2 + Bn sin t λn c2 − h2 .
At t = 0,
∞
X
(2n − 1)πx
u(x, 0) = An sin = x.
n=1
2L
p hp i
2 2 2
+ −An λn c − h − hBn sin t λn c − h 2
and
∞
X p
(2n − 1)πx
ut (x, 0) = sin Bn λn c2 − h2 − hAn .
n=1
2L
Consequently, p
Bn = hAn λ n c 2 − h2 .
(2n − 1)2 c2 π 2
Tn′′ + Tn = 0.
4L2
The corresponding solution is
(2n − 1)πct (2n − 1)πct
Tn (t) = An cos + Bn sin .
2L 2L
At t = 0,
X∞
(2n − 1)πc (2n − 1)πx
ut (x, 0) = Bn cos = −c2 s0 .
n=1
2L 2L
and
8Lcs0
Bn = (−1)n .
(2n − 1)2 π 2
Thus, the final solution is
∞
8Lcs0 X (−1)n (2n − 1)πx (2n − 1)πct
u(x, t) = cos sin .
π 2 n=1 (2n − 1)2 2L 2L
Worked Solutions 225
n2 π 2 nπx
λn = , Xn (x) = sin .
L2 L
The temporal equation is Tn′′ + n2 c2 π 2 Tn /L2 = 0. The corresponding solution
is
nπct nπct
Tn (t) = An cos + Bn sin .
L L
At t = 0,
∞
X nπx
u(x, 0) = An sin = f (x).
n=1
L
This is an eigenfunction expansion in Xn (x) and the coefficient An equals
Z nπx Z nπx
2 a βx 2 L β(L − x)
An = sin dx + sin dx
L 0 a L L a L−a L
nπx a
2βL nπx nπx
= sin − cos
an2 π 2 L L L 0
2βL nπx L
− cos
(L − a)nπ L a
nπx L
2βL nπx nπx
− sin − cos
(L − a)n2 π 2 L L L a
2βL 2 nπa
= sin .
a(L − a)n2 π 2 L
Substitution of An in the general solution yields the desired result.
At t = 0,
X∞
nπc nπx
ut (x, 0) = Bn sin = f (x).
n=1
L L
At t = 0,
X∞
nπc nπx 4βc(L − x)
ut (x, 0) = Bn sin = .
n=1
L L L2
or
8β
Bn = .
n2 π 2
Worked Solutions 227
Section 7.4
1.
u(x, t) = sin(x + ct) cos(x + ct) + sin(x − ct) cos(x − ct)
Z x+ct
1
+ cos(τ ) dτ
2c x−ct
1
= sin(2x) cos(2ct) + [sin(x + ct) − sin(x − ct)]
2c
1
= sin(2x) cos(2ct) + cos(x) sin(ct)
c
2.
Z x+ct
1 1
u(x, t) = 2 [(x + ct) sin(x + ct) + (x − ct) sin(x − ct)] + cos(2τ ) dτ
2c x−ct
= 21 [(x + ct)[sin(x) cos(ct) + cos(x) sin(ct)]
+ 21 [(x − ct)[sin(x) cos(ct) − cos(x) sin(ct)]
1
+ 4c [sin(2x + 2ct) − sin(2x − 2ct)]
1
= x sin(x) cos(ct) + ct cos(x) sin(ct) + cos(2x) sin(2ct)
2c
3.
Z x+ct
1 1 1 1
u(x, t) = + + eτ dτ
2 1 + (x + ct)2 1 + (x − ct)2 2c x−ct
1 1 1
= +
2 1 + x2 + 2xct + c2 t2 1 + x2 − 2xct + c2 t2
1 x+ct
+ e − ex−ct
2c
1 + x 2 + c 2 t2 ex
= + sinh(ct)
(1 + x2 + c2 t2 )2 + 4x2 c2 t2 c
4.
Z x+ct
1 h −(x+ct) i 1 dτ
u(x, t) = e + e−(x−ct) +
2 2c x−ct τ 2 + 1
1 −1
= e−x cosh(ct) + tan (x + ct) − tan−1 (x − ct)
2c
228 Advanced Engineering Mathematics with MATLAB
5.
Z x+ct
1 π(x + ct) π(x − ct) 1
u(x, t) = cos + cos + sinh(aτ ) dτ
2 2 2 2c x−ct
πx πx
1 πct πct
= cos cos − sin sin
2 2 2 2 2
πx πx
πct πct
+ cos cos + sin sin
2 2 2 2
1
+ {cosh[a(x + ct)] − cosh[a(x − ct)]}
2ac
πx πct 1
= cos cos + sinh(ax) sinh(act)
2 2 ac
6.
Z x+ct
1 1
u(x, t) = [sin(3x + 3ct) + sin(3x − 3ct)] +
2 [sin(2τ ) − sin(τ )] dτ
2c x−ct
u(x, t) = 12 sin(3x) cos(3ct) + cos(3x) sin(3ct)
+ sin(3x) cos(3ct) − cos(3x) sin(3ct)
− [cos(2x + 2ct) − cos(2x − 2ct)]/(4c)
+ [cos(x + ct) − cos(x − ct)]/(2c)
1 1
= sin(3x) cos(3ct) + sin(2x) sin(2ct) − cos(x) sin(ct)
2c c
7.
∂u ∂u
= EcF ′ (x + ct) + EcG′ (x − ct) − 14 kc2 t = E
∂t ∂t
and
∂u
= EF ′ (x + ct) − EG′ (x − ct) + 34 kx
∂t
= EF ′ (x + ct) − EG′ (x − ct) + kx − 41 kx
kρc2
= ρc2 F ′ (x + ct) − ρc2 G′ (x − ct) + kx − x + kx
4E
∂v
=ρ + kx.
∂t
where
Vmax χ2 Vmax χ χ
V0 (χ) = χ− = 1− .
c 2L c 2L
At x = 0, u(0, t) = 12 [V0 (ct) − V0 (−ct)] = 0. Therefore, V0 (χ) = V0 (−χ).
At x = L, u(L, t) = 21 [V0 (L + ct) − V0 (L − ct)] = 0. Therefore, V0 (L + χ) =
V0 (L − χ).
Consider the time t = t′ + 2nL/c, where 0 < t′ < 2L/c and 0 < n. Then,
u(x, t) = 1
2 [V0 (x + ct′ + 2nL) − V0 (x − ct′ − 2nL)] .
Using V0 (L + χ) = V0 (L − χ),
Similarly,
Therefore, we can relate any solution u(x, t) for 0 < x < L and at time t back
to the solution u(x, t′ ).
Because
u(x, t + L/c) = 21 [V0 (x + ct + L) − V0 (x − ct − L)]
= − 12 [V0 (L − x + ct) − V0 (L − x − ct)]
= −u(L − x, t)
for 0 < x < L, the solution at (x, t + L/c) when 0 < ct < L is the mirror
reflection of the solution at (L − x, t).
Consider 0 < x < ct. Then, for 0 < x + ct < L,
Vmax (x + ct)2 (x − ct)2 Vmax x ct
u(x, t) = x + ct − + x − ct + = 1− .
2c 2L 2L c L
For fixed time, the maximum occurs for largest value of x or x = ct. For
L < x + ct < 2L,
Vmax (2L − x − ct)2 (x − ct)2
u(x, t) = 2L − x − ct − + x − ct +
2c 2L 2L
Vmax x ct
= 1− .
c L
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% MATLAB Code for Lax-Wendroff Portion
% of the Wave Equation Project
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
clear
coeff = 2/3; coeffsq = coeff * coeff; % coeff = ∆t/∆x
ncount = 1; dx = 0.02; dt = coeff * dx; nselect = 1/dt;
N = 1481; x = 0:dx:1+dx; xx = 0:dx:1;
M = 1/dx + 2; % M = number of spatial grid points
F = zeros(M,1);
for m = 1:M
if x(m) >= 0.25 & x(m) <= 0.5
F(m) = 4 * x(m) - 1; end
if x(m) >= 0.5 & x(m) <= 0.75
F(m) = 3 - 4 * x(m); end; end
% at t = 0, the solution is:
u = zeros(M,N+1); u(1:M,1) = F(1:M);
tplot(1) = 0; solution(1:M-1,1) = u(1:M-1,1);
for n = 1:N
t = dt * n;
for m = 2:M-1
u(m,n+1) = u(m,n) - 0.5 * coeff * (u(m+1,n) - u(m-1,n)) ...
+ 0.5 * coeffsq * (u(m+1,n) - 2 * u(m,n) + u(m-1,n));
end
% plot results
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% MATLAB Code for Leapfrog Portion
% of the Wave Equation Project
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
clear
coeff = 2/3; coeffsq = coeff * coeff; % coeff = ∆t/∆x
ncount = 1; dx = 0.02; dt = coeff * dx; nselect = 1/dt;
N = 1481; x = 0:dx:1+dx; xx = 0:dx:1;
M = 1/dx + 2; % M = number of spatial grid points
F = zeros(M,1);
for m = 1:M
if x(m) >= 0.25 & x(m) <= 0.5
F(m) = 4 * x(m) - 1; end
if x(m) >= 0.5 & x(m) <= 0.75
F(m) = 3 - 4 * x(m); end; end
% at t = 0, the solution is:
u = zeros(M,N+1); u(1:M,1) = F(1:M);
tplot(1) = 0; solution(1:M-1,1) = u(1:M-1,1);
for m = 2:M-1
232 Advanced Engineering Mathematics with MATLAB
for n = 2:N
t = dt * n;
for m = 2:M-1
u(m,n+1) = u(m,n-1) - coeff * (u(m+1,n) - u(m-1,n));
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Section 8.3
At t = 0,
∞
X
u(x, 0) = Bn sin(nx) = A.
n=1
At t = 0,
At t = 0,
∞
X
u(x, 0) = Bn sin(nx) = x.
n=1
X∞
(−1)n 2 2
u(x, t) = −2 sin(nx)e−a n t .
n=1
n
At t = 0,
∞
X
u(x, 0) = Bn sin(nx) = π − x.
n=1
X∞
sin(nx) −a2 n2 t
u(x, t) = 2 e .
n=1
n
At t = 0,
∞
X
u(x, 0) = Bn sin(nx) = f (x).
n=1
At t = 0,
∞
X
u(x, 0) = 12 A0 + An cos(nx) = 1
n=1
so that
Z π Z π π
2 2 2 sin(nx)
A0 = 1 dx = 2, An = 1 cos(nx) dx = = 0.
π 0 π 0 nπ 0
At t = 0,
∞
X Z π
1 2
u(x, 0) = 2 A0 + An cos(nx) = x so that A0 = x dx = π
n=1
π 0
and
Z π π
2 2 cos(nx) x sin(nx) 2 [(−1)n − 1]
An = x cos(nx) dx = + = .
π 0 π n2 n 0 π n2
At t = 0,
At t = 0,
∞
X
u(x, 0) = 12 A0 + An cos(nx) = π − x.
n=1
and Z π
2
An = (π − x) cos(nx) dx,
π 0
or
Z π π
2 π 2 2 cos(nx) x sin(nx)
An = (π − x) cos(nx) dx = sin(nx) + +
π 0 n 0 π n2 n 0
2[(−1)n − 1]
= .
n2 π
∞
X 2
n2 t
u(x, t) = 12 A0 + An cos(nx)e−a .
n=1
At t = 0,
∞
X
u(x, 0) = 12 A0 + An cos(nx) = f (x).
n=1
Z π/2 Z π
2 2
An = T0 cos(nx) dx + T1 cos(nx) dx
π 0 π π/2
2T0
π/2
2T1
π
2(T0 − T1 ) nπ
= sin(nt) + sin(nt) = sin .
nπ 0 nπ π/2 nπ 2
(2n − 1)2 a2 2
(2n−1)2 t/4
Tn′ + Tn = 0 or Tn (t) = An e−a .
4
At t = 0,
∞
X
(2n − 1)x
u(x, 0) = An cos = x2 − π 2 .
n=1
2
12. Let us define u(x, t) = T0 +v(x, t). Then the problem to be solved becomes
∂v ∂2v
= a2 2 , 0 < x < π, t < 0,
∂t ∂x
with the boundary conditions v(0, t) = v(π, t) = 0, t < 0 and the initial
condition v(x, 0) = T1 − T0 for 0 < x < π. We can now use separation of
variables and find that
∞
X 2
n2 t
v(x, t) = Bn sin(nx)e−a .
n=1
(2n − 1)2 a2 2
(2n−1)2 t/4
Tn′ + Tn = 0 or Tn (t) = An e−a .
4
Thus, the general solution is
∞
X
(2n − 1)x −a2 (2n−1)2 t/4
u(x, t) = An sin e .
n=1
2
At t = 0,
∞
X
(2n − 1)x
u(x, 0) = An sin = 1.
n=1
2
240 Advanced Engineering Mathematics with MATLAB
At t = 0,
∞
X
(2n − 1)x
u(x, 0) = An sin = x.
n=1
2
(2n − 1)2 a2 2
(2n−1)2 t/4
Tn′ + Tn = 0 or Tn (t) = An e−a .
4
Thus, the general solution is
∞
X
(2n − 1)x −a2 (2n−1)2 t/4
u(x, t) = An sin e .
n=1
2
At t = 0,
∞
X
(2n − 1)x
u(x, 0) = An sin = π − x.
n=1
2
This is a generalized Fourier expansion with
Rπ π
(π − x) sin[(2n − 1)x/2] dx 4 (2n − 1)x
An = 0 R π 2 =− cos
sin [(2n − 1)x/2] dx 2n − 1 2 0
0 π
2 4 (2n − 1)x 2x (2n − 1)x
− sin − cos
π (2n − 1)2 2 2n − 1 2 0
4 8(−1)n+1
= − .
2n − 1 (2n − 1)2 π
16. Let us define u(x, t) = T0 +v(x, t). Then the problem to be solved becomes
∂v ∂2v
= a2 2 , 0 < x < π, t < 0,
∂t ∂x
with the boundary conditions v(0, t) = vx (π, t) = 0, t < 0 and the initial
condition v(x, 0) = T1 − T0 for 0 < x < π. We can now use separation of
variables and find that
X∞
(2n − 1)x (2n − 1)2 a2 t
v(x, t) = Bn sin exp − .
n=1
2 4
17. We first find the steady-state solution. We find it by solving w′′ = 0 with
w(0) = 0 and w(π) = T0 . The steady-state solution is w(x) = T0 x/π. To find
the transient solution, u(x, t) = T0 x/π + v(x, t). Then we must solve
∂v ∂2v
= a2 2 , 0 < x < π, t > 0,
∂t ∂x
with the boundary conditions v(0, t) = v(π, t) = 0, t > 0 and the initial
condition v(x, 0) = T0 − T0 x/π for 0 < x < π. We can now use separation of
variables and find that
∞
X 2
n2 t
v(x, t) = Bn sin(nx)e−a .
n=1
19. We first find the steady-state solution. We find it by solving w′′ = 0 with
w(0) = h1 and w(L) = h2 . The steady-state solution is w(x) = h1 + (h2 −
h1 )x/L. To find the transient solution, u(x, t) = w(x)+v(x, t). Then we must
solve
∂v ∂2v
= a2 2 , 0 < x < L, t > 0,
∂t ∂x
244 Advanced Engineering Mathematics with MATLAB
with the boundary conditions v(0, t) = v(L, t) = 0, t > 0 and the initial
condition v(x, 0) = −(h2 − h1 )x/L for 0 < x < L. We can now use separation
of variables and find that
X∞ nπx 2 2 2
a n π t
v(x, t) = Bn sin exp − .
n=1
L L2
At t = 0,
∞
X nπx 8H
u(x, 0) = Bn sin = L3 x − 3L2 x2 + 4Lx3 − 2x4 .
n=1
L L4
because
nπx Lx nπx L
16H L2
Bn = sin − cos
L2 n2 π 2 L nπ L 0
nπx L
48H 2xL2 nπx Lx2 2L3
− 3 sin − − cos
L n2 π 2 L nπ n3 π 3 L 0
2 2 4
3 nπx L
64H 3L x 6L nπx Lx 6xL3
+ 4 − 4 4 sin − − 3 3 cos
L n2 π 2 n π L nπ n π L 0
2 3 4
32H 4L x 24xL nπx
− 5 2 2
− 4 4 sin
L n π n π L
4 2 3
nπx L
Lx 12x L 24L5
− − 3 3 + 5 5 cos .
nπ n π n π L 0
∂v ∂2v
= a2 2 , 0 < x < L, t > 0,
∂t ∂x
with the boundary conditions v(0, t) = vx (L, t) = 0, t > 0 and the initial
condition v(x, 0) = −h0 for 0 < x < L. We can now use separation of
variables and find that
X∞ 2
(2n − 1)πx a (2n − 1)2 π 2 t
v(x, t) = Bn sin exp − .
n=1
2L 4L2
22. We first find the steady-state solution. We find it by solving −a2 w′′ =
e−x with w(0) = 0 and w′ (π) = 0. The steady-state solution is w(x) =
(1 − e−x − e−π x) /a2 . To find the transient solution, u(x, t) = w(x) + v(x, t).
Then we must solve
∂v ∂2v
= a2 2 , 0 < x < π, t < 0,
∂t ∂x
with the boundary conditions v(0, t) = vx (π, t) = 0, t < 0 and the initial
condition v(x, 0) = f (x) + (e−x + e−π x − 1)/a2 for 0 < x < π. We can now
use separation of variables and find that
∞
X
(2n − 1)x −a2 (2n−1)2 t/4
v(x, t) = Bn sin e .
n=1
2
23. Let us define u(x, t) = −t + v(x, t). Then the problem to be solved
becomes
∂v ∂2v
= a2 2 , 0 < x < 1, t > 0,
∂t ∂x
Worked Solutions 247
with the boundary conditions vx (0, t) = vx (1, t) = 0, t > 0 and the initial
condition v(x, 0) = 21 (1 − x2 ) for 0 < x < 1. We can now use separation of
variables and find that
∞
A0 X 2 2 2
v(x, t) = + An cos(nπx)e−a n π t .
2 n=1
and
Z 1
2 1
An = 2 (1 − x2 ) cos(nπx) dx
1 0
1 1
sin(nπx) 2x n2 π 2 x2 − 2 −2(−1)n
= − 2 2
cos(nπx) + sin(nπx) = .
nπ 0 n π n3 π 3 0 n2 π 2
24. Let us define u(x, t) = A sin(ωt)/ω + v(x, t). Then the problem to be
solved becomes
∂v ∂2v
= a2 2 , 0 < x < π, 0 < t,
∂t ∂x
with the boundary conditions vx (0, t) = vx (π, t) = 0, t < 0 and the initial
condition v(x, 0) = f (x) for 0 < x < π. We can now use separation of
variables and find that
∞
A0 X 2 2
v(x, t) = + An cos(nx)e−a n t .
2 n=1
25. We can expand the right side of the partial differential equation in a
half-range sine expansion:
∞
X
f (x) = bn sin(nx), 0 < x < π,
n=1
where Z Z
π/2 π
2 2
bn = x sin(nx) dx + (π − x) sin(nx) dx
π 0 π π/2
π/2 π
2 2 cos(nx)
= [sin(nx) − nx cos(nx)] −
n2 π 0 n π/2
2
π
4 nπ
− 2 [sin(nx) − nx cos(nx)] = 2 sin .
n π π/2 n π 2
Thus,
∞
4 X (−1)n+1
f (x) = sin[(2n − 1)x].
π n=1 (2n − 1)2
with w(0) = w(π) = 0. Integrating twice and applying the boundary condi-
tions,
∞
4 X (−1)n+1
w(x) = sin[(2n − 1)x].
π n=1 (2n − 1)4
To find the transient solution, u(x, t) = w(x) + v(x, t). Then we must solve
∂v ∂2v
= , 0 < x < π, t > 0,
∂t ∂x2
Worked Solutions 249
with the boundary conditions v(0, t) = v(π, t) = 0, t > 0 and the initial
condition v(x, 0) = −w(x) for 0 < x < π. We can now use separation of
variables and find that
∞
X 2
n2 t
v(x, t) = Bn sin(nx)e−a .
n=1
26. We first find the steady-state solution. We find it by solving −a2 w′′ = P
with w(0) = 0 and w(L) = 0. The steady-state solution is w(x) = P (Lx −
x2 )/(2a2 ). To find the transient solution, u(x, t) = w(x) + v(x, t). Then we
must solve
∂v ∂2v
= a2 2 , 0 < x < L, 0 < t,
∂t ∂x
with the boundary conditions v(0, t) = v(L, t) = 0, t < 0 and the initial
condition v(x, 0) = −w(x) for 0 < x < L. We can now use separation of
variables and find that
∞
X nπx 2
n2 π 2 t/L2
v(x, t) = Bn sin e−a .
n=1
L
27. Assuming that u(x, t) = w(x) + v(x, t), the steady-state solution is gov-
erned by a2 w′′ = −A0 /(cρ) with w′ (0) = κw′ (L) + hw(L) = 0. The general
solution to this differential equation is w(x) = Ax + B − A0 x2 /(2κ). Because
w′ (0) = 0, A = 0. The other boundary condition gives B = A0 L2 /(2κ) +
A0 L/h. Thus, the steady-state solution is w(x) = A0 (L2 − x2 )/(2κ) + A0 L/h.
To find the transient solution, we must solve
∂v ∂2v
= a2 2 , 0 < x < L, t > 0,
∂t ∂x
with the boundary conditions vx (0, t) = κvx (L, t)+hv(L, t) = 0, t > 0 and the
initial condition v(x, 0) = −w(x) for 0 < x < L. We can now use separation
of variables and find that
X∞ 2 2
βn x a β t
v(x, t) = An cos exp − 2n ,
n=1
L L
where βn tan(βn ) = hL/κ. Using the initial condition,
X∞
βn x
v(x, 0) = An cos = −w(x).
n=1
L
This is a generalized Fourier series and
RL
−w(x) cos(βn x/L) dx
An = 0 R L
0
cos2 (βn x/L) dx
RL 2
A0 0 [(L − x2 ) + 2κL/h] cos(βn x/L) dx
=− 1 L
2κ 2 [x + L sin(2βn x/L)/(2βn )]|0
RL 2
2A0 βn 0 [(L − x2 ) + 2κL/h] cos(βn x/L) dx
=−
κL 2βn + sin(2βn )
RL 2 2
A0 0 [(L − x ) + 2κL/h] cos(βn x/L) dx
=− .
κL 1 + κ sin2 (βn )/hL
Now,
Z L
2κL βn x
(L2 − x2 ) + cos dx
0 h L
L L
L3 βn x 2κL2 βn x
= sin + sin
βn L 0 hβn L 0
3
2 2 L
L 2βn x βn x βn x βn x
− 3 cos + − 2 sin
βn L L L2 L 0
2L3 2κL2 2L3 sin(βn )
= 3 [sin(βn ) − βn cos(βn )] + sin(βn ) = .
βn hβn βn3
Worked Solutions 251
A0 (L2 − x2 ) A0 L
u(x, t) = +
2κ h
∞ 2 2
2L2 A0 X sin(βn ) βn x a β t
− 2 cos exp − 2n .
κ n=1 βn [1 + κ sin (βn )/hL]
3 L L
To find the transient solution, u(x, t) = w(x) + v(x, t). Then we must solve
∂v ∂2v
= − v, 0 < x < L, t < 0,
∂t ∂x2
with the boundary conditions v(0, t) = v(L, t) = 0, t < 0 and the initial
condition v(x, 0) = −w(x) for 0 < x < L. We can now use separation of
variables and find that
∞
X nπx 2 2
n π
v(x, t) = Bn sin exp − + 1 t .
n=1
L L2
1 T′ X ′′
= = −k 2 ,
a2 T X
or
X ′′ + k 2 X = 0, 2a2 X ′ (0) = X(0), 2a2 X ′ (1) = −X(1).
The solution X(x) = sin(kx) + 2a2 k cos(kx) satisfies the differential equation
and the boundary condition 2a2 X ′ (0) = X(0). Substituting into the boundary
condition at x = 1, tan(k) = 4a2 k/(4a4 k 2 − 1). If kn denotes the nth root of
4a2 k cos(k) = (4a4 k 2 − 1) sin(k), then the T (t) equation is
2 2
Tn′ + a2 kn2 Tn = 0, or Tn (t) = Cn e−a kn t
.
Now Z 1
2 8a4 kn
e−x/(2a )
sin(kn x) + 2a2 kn cos(kn x) dx = ,
0 1 + 4a4 kn2
and Z 1 2
sin(kn x) + 2a2 kn cos(kn x) dx = 12 (1 + 4a2 + 4a4 kn2 ).
0
n=1
(1 + 4a n n
31. We begin by introducing the new variable v(r, t) = r u(r, t) and find that
∂v ∂2v
= 2, 0 ≤ r < 1, 0 < t,
∂t ∂r
with the boundary conditions v(0, t) = v(1, t) = 0, t > 0, and the initial
condition v(r, 0) = r, 0 ≤ r < 1. We can now use separation of variables and
find that
∞
X 2 2 2
v(r, t) = Bn sin(nπr)e−a n π t .
n=1
32. Let us introduce a new dependent variables v(r, t) = ru(r, t) so that the
problem now becomes
∂v ∂2v
= a2 2 , α < r < β, 0 < t,
∂t ∂r
with the boundary conditions
∂v(β, t)
v(α, t) = 0, and β = v(β, t), 0 < t,
∂r
R′′ T′
= 2 = −k 2 ,
R a T
or
R′′ + k 2 R = 0, R(α) = 0, βR′ (β) = R(β).
Worked Solutions 255
The solution R(r) = sin[k(r − α)] satisfies the differential equation and the
boundary condition R(α) = 0. Substituting into the other boundary condi-
tion, tan[k(β − α)] = βk. If kn denotes the nth root of tan[k(β − α)] = βk,
then the T (t) equation is
2 2
Tn′ + a2 kn2 Tn = 0, or Tn (t) = An e−a kn t
.
Now
Z β Z β−α Z β−α
r sin[kn (r − α)] dr = u sin(kn u) du + α sin(kn u) du
α 0 0
β−α β−α β−α
sin(kn u) u cos(kn u) α cos(kn u)
= − −
kn2 0 k n 0 kn 0
sin[kn (β − α)] (β − α) cos[kn (β − α)]
= −
kn2 kn
α{cos[kn (β − α)] − 1} α
− = ,
kn kn
and Z Z
β β
2 1
sin [kn (r − α)] dr = 2 {1 − cos[2kn (r − α)]} dr
α
α
1 sin[2kn (β − α)]
= 2 β−α−
2kn
1
2
= 2 β − α − β cos [kn (β − α)]
= 21 β sin2 [kn (β − α)] − α .
Substituting these integrals into An , we obtain the final answer
∞
αu0 X sin[kn (r − α)] −a2 kn2 t
u(r, t) = e ,
r n=1 kn c n
256 Advanced Engineering Mathematics with MATLAB
33. Introducing the new variable v(r, t) = r u(r, t), the problem becomes
∂v ∂2v
= a2 2 , 0 ≤ r < b, 0 < t,
∂t ∂r
Tn′ kn2
= − .
a2 Tn b2
2 2
kn t/b2
The general solution to this equation is Tn (t) = Cn e−a . Therefore, the
general production solution is
∞
X 2 2
kn t/b2
v(r, t) = Cn sin(kn r/b)e−a .
n=1
However,
Z b
kn r b2
u0 r sin dr = [sin(kn ) − kn cos(kn )] .
0 b kn2
and Z
b
2 kn r b
sin dr = [2kn − sin(2kn )] .
0 b 4kn
Therefore,
4bu0 sin(kn ) − kn cos(kn )
Cn = ,
kn 2kn − sin(2kn )
and
∞
4bu0 X sin(kn ) − kn cos(kn ) kn r 2 2 2
u(r, t) = sin e−a kn t/b .
r n=1 kn [2kn − sin(2kn )] b
with the boundary conditions limx→0 |v(x, t)| < ∞, v(b, t) = 0, t < 0 and
the initial condition v(r, 0) = −u0 for 0 ≤ r < b. We now use separation of
variables and find that
X∞ 2 2
kn r a k t
v(r, t) = An J0 exp − 2n ,
n=1
b b
where Z
b
2u0 kn r 2u0
An = − r J0 dr = − .
b2 J12 (kn ) 0 b kn J1 (kn )
258 Advanced Engineering Mathematics with MATLAB
with the boundary conditions limx→0 |v(x, t)| < ∞, v(b, t) = 0, t < 0 and the
initial condition v(r, 0) = 1 − θ for 0 ≤ r < b. We can now use separation of
variables and find that
∞
X 2 2
kn r a k
v(r, t) = An J0 exp − 2 n t ,
n=1
b b
∞
X
kn r
v(r, 0) = An J0 = 1 − θ,
n=1
b
where Z
b
2(1 − θ) kn r 2(1 − θ)
An = rJ0 dr = .
J12 (kn )b2 0 b kn J1 (kn )
The final solution is
X∞ 2 2
J0 (kn r/b) a k
u(r, t) = θ + 2(1 − θ) exp − 2 n t .
n=1
k n J 1 (k n ) b
where
Z b Z 1
2 2
An = 2 Ar J0 (kn r) dr + 2 Br J0 (kn r) dr
J1 (kn ) 0 J1 (kn ) b
Z kn b Z 1
2A 2B
= 2 2 u J0 (u) du + 2 2 u J0 (u) du
kn J1 (kn ) 0 kn J1 (kn ) kn b
2Ab J1 (kn b) 2B[J1 (kn ) − bJ1 (kn b)]
= +
kn J12 (kn ) kn J12 (kn )
2B 2b(A − B)J1 (kn b)
= + .
kn J1 (kn ) kn J12 (kn )
X∞
BJ1 (kn ) + b(A − B)J1 (kn b) 2 2
u(r, t) = 2 2 J0 (kn r)e−a kn t .
n=1
kn J1 (kn )
with the boundary conditions limx→0 |v(x, t)| < ∞, v(b, t) = 0, t > 0, and the
initial condition v(r, 0) = G(r2 − b2 )/(4ρν) for 0 ≤ r < b. We can now use
separation of variables and find that
∞
X
kn r νk 2
v(r, t) = An J0 exp − 2n t ,
n=1
b b
where
Z b
2 G kn r
An = r(r2 − b2 )J0 dr
J12 (kn )b2
0 4ρν b
Z 1 Z 1
G 4 3 4
= b x J0 (kn x) dx − b xJ0 (kn x) dx
2ρνJ12 (kn )b2 0 0
2
G 4 kn − 4 2b4 4 J1 (kn )
= b J1 (kn ) + 2 J0 (kn ) − b
2ρνJ12 (kn )b2 kn3 kn kn
2
2Gb
=− .
ρνJ1 (kn )kn3
where
Rb
2kn2 r(b2 − r2 )J0 (kn r/b) dr
0
An =
+ b2 /h2 )J02 (kn )
b2 (kn2
Z 1 Z 1
2 4 4 3
= 2 2 b xJ (k
0 n x) dx − b x J (k
0 n x) dx
b [J0 (kn ) + J12 (kn )] 0 0
2b2 J1 (kn ) kn2 − 4 2
= 2 − J (k
1 n ) + J (k
0 n )
J0 (kn ) + J12 (kn ) kn kn3 kn2
4b2 [2J1 (kn ) + kn J0 (kn )]
=
kn3 [J02 (kn ) + J12 (kn )]
from Equation 6.5.31, Equation 6.5.35 and Equation 6.5.45. The final solution
is 2 2
X∞
2J1 (kn ) + kn J0 (kn ) kn r a k
u(r, t) = 4b2 3 2 2 J 0 exp − 2n t .
k [J (kn ) + J1 (kn )]
n=1 n 0
b b
Worked Solutions 261
where
Z L
(kn2 L2 +h L 2 2
)J02 (kn L)An = 2kn2 T0 rJ0 (kn r) dr
b
Z kn L
kn2 L2 [J02 (kn L) + J12 (kn L)]An = 2T0 ηJ0 (η) dη
kn b
= 2T0 kn [LJ1 (kn L) − bJ1 (kn b)]
40. For the steady-state solution, the heat equations becomes the second-order
ordinary differential equation −a2 w′′ = J − P δ(x − b) or a2 w′′ = P δ(x − b) − J
with the boundary conditions w(0) = w(L) = 0. The general solution to the
differential equation can be written w(x) = Jx(L − x)/(2a2 ) + Ax + B(L −
x), where A and B are arbitrary constants needed to satisfy the boundary
conditions. For the solution valid between 0 < x < b, B = 0 because w(0) = 0.
For the solution valid between b < x < L, A = 0 because w(L) = 0. Therefore,
Jx(L − x)/2a2 + Ax, 0 < x < b,
w(x) =
Jx(L − x)/2a2 + B(L − x), b < x < L.
262 Advanced Engineering Mathematics with MATLAB
or
b+ǫ
− a2 w ′ b−ǫ
= 2ǫJ − P.
b+ǫ
In the limit of ǫ → 0, limǫ→0 a2 w′ b−ǫ
= P. Substituting w(x) into this equa-
tion,
Using this equation along with Ab = B(L − b), we find that B = −P b/(a2 L)
or A = −P (L − b)/(a2 L). Thus, w(x) is
Jx(L − x)/2a2 − P x(L − b)/a2 L, 0 < x < b,
w(x) =
Jx(L − x)/2a2 − P b(L − x)/a2 L, b < x < L.
where
Z L nπx Z nπx
2 Jx(L − x) 2 b
Bn = 2
sin dx + Ax sin dx
L 0 2a L L 0 L
Z nπx
2 L 2JL2 [1 − (−1)n ] 2LP sin(nπb/L)
+ B(L − x) sin dx = − 2 2 ,
L b L a2 π 3 n3 a π n2
or
∞ ∞
4JL2 X sin[(2m − 1)πx/L] 2LP X sin(nπb/L) sin(nπx/L)
w(x) = − .
a2 π 3 m=1 (2m − 1)3 a2 π 2 n=1 n2
To find the transient part, we have that u(x, t) = w(x) + v(x, t). Substitution
into the partial differential equation yields
∂v ∂2v
= a2 2 , 0 < x < L, 0 < t,
∂t ∂x
Worked Solutions 263
while the boundary conditions are v(0, t) = v(L, t) = 0 with the initial condi-
tion v(x, 0) = −w(x). Separation of variables yields
∞
X nπx
a2 n2 π 2 t
v(x, t) = −Bn sin exp − .
n=1
L L2
where we have already found Bn . Combining w(x) and v(x, t) gives u(x, t) or
41. Because
∂u ∂v
= e−ax − ae−ax v,
∂x ∂x
∂2u 2
−ax ∂ v ∂v
2
= e 2
− 2ae−ax + a2 e−ax v,
∂x ∂x ∂x
and
∂u ∂v
= e−ax ,
∂t ∂t
∂u ∂v ∂2v ∂v ∂v
= e−ax = e−ax 2 − 2ae−ax + a2 e−ax v + 2ae−ax − 2a2 e−ax v
∂t ∂t ∂x
2 ∂x ∂x
∂ v
= e−ax − a 2
v
∂x2
or
∂v ∂2v
= − a2 v.
∂t ∂x2
Similarly,
∂u(0, t) ∂v(0, t)
+ 2au(0, t) = − av(0, t) + 2av(0, t) = 0,
∂x ∂x
or
∂v(0, t)
+ av(0, t) = 0,
∂x
264 Advanced Engineering Mathematics with MATLAB
and
∂u(1, t) ∂v(1, t)
+ 2au(1, t) = e−a − av(1, t) + 2av(1, t) = 0,
∂x ∂x
or
∂v(1, t)
+ av(1, t) = 0.
∂x
Finally,
u(x, 0) = e−ax v(x, 0) = 1, =⇒ v(x, 0) = eax .
Let v(x, t) = X(x)T (t). Then separation of variables leads to
T′ X ′′
= − a2 = −λ,
T X
along with
and
T (t) [X ′ (1) + aX(1)] = 0 or X ′ (1) + aX(1) = 0.
The X(x) equation is solved in Section 6.3, Problem 5. For λ0 = 0, T0′ (t) = 0
or T0 (t) = A0 . When λn = a2 + n2 π 2 , we have Tn′ = −λn Tn , or Tn =
2 2 2
An e−(a +n π )t . From the principle of linear superposition,
∞
X 2
+n2 π 2 )t
v(x, t) = A0 e−ax + An [a sin(nπx) − nπ cos(nπx)] e−(a .
n=1
Therefore, R1
eax e−ax dx 2a
A0 = 0R 1 = ,
e −2ax dx 1 − e−2a
0
and
R1
eax [a sin(nπx) − nπ cos(nπx)] dx 4anπ [1 − (−1)n ea ]
An = 0R 1 = .
[a sin(nπx) − nπ cos(nπx)]2 dx (a2 + n2 π 2 )2
0
Therefore,
2ae−ax
v(x, t) =
1 − e−2a
X∞
n [1 − (−1)n ea ] 2 2 2
+ 4aπ 2 2 2 2
[a sin(nπx) − nπ cos(nπx)] e−(a +n π )t .
n=1
(a + n π )
Worked Solutions 265
X ′′′′ T′
′′
= = −k 2 ,
X T
along with
X ′′′′ + k 2 X ′′ = 0, and T ′ + k 2 T = 0,
where R1
0
f ′ (x)Xn′ (x) dx
An = R1
0
[Xn′ (x)]2 dx
with Xn (x) = 1 − cos(2nπx) and
R1
0
f ′ (x)Xn′ (x) dx
Bn = R1
0
[Xn′ (x)]2 dx
and
Z 1
x(x − 1) [κn sin(κn x) + 2 cos(κn x) − 2] dx
0
1
2x − 1 κ2n x2 − κ2n x − 2
= κn sin(κ n x) − cos(κ n x)
κ2n κ3n 0
1
2x − 1 κ2n x2 − κ2n x − 2
+2 cos(κn x) + sin(κn x)
κ2n κ3n 0
3 1
x x2 2 cos(κn ) − 2 1 + cos(κn ) 1 1
−2 − = + + = ,
3 2 0 κ2n 2 3 3
Worked Solutions 267
3(1 − A) 13 2(1 − A)
Bn = 1 2 = .
κ
2 n
κ2n
On the other hand, An = 0 because
Z 1
1
2 A + 3(1 − A)x(x − 1) sin(2nπx) dx
0
1
A
= cos(2nπx)
4nπ 0
1
2x 4n2 π 2 x2 − 1
+ 3(1 − A) sin(2nπx) − cos(2nπx)
4n2 π 2 8n3 π 3 0
1
sin(2nπx) x cos(2nπx)
− 3(1 − A) − = 0.
4n2 π 2 2nπ 0
43. Because
∂u ∂v ∂2u ∂2v
= , 2
= 2,
∂t ∂t ∂r ∂r
1 ∂u K 1 ∂v u K v
= + , and 2
= + 2,
r ∂r r r ∂r r r r
direct substitution into the partial differntial equation gives
2
∂v 2 ∂ v 1 ∂v v
=a + − 2 .
∂t ∂r2 r ∂r r
Now,
lim |u(r, t)| = lim |v(r, t)| < ∞,
r→0 r→0
The solution to the radial part is Rn (r) = J1 (kn r), where kn is the nth solution
2 2
of J1 (k) = 0 and n = 1, 2, 3, . . .. For Tn (t), we have that Tn (t) = An e−a kn t .
Therefore, linear superposition yields
∞
X 2 2
u(r, t) = An J1 (kn )e−a kn t
,
n=1
268 Advanced Engineering Mathematics with MATLAB
where
Z 1
2
An = [g(r) − Kr] J1 (kn r) r dr
J22 (kn ) 0
Z 1 Z 1
2 2
= 2 g(r)J1 (kn r) r dr − K r J1 (kn r) dr
J0 (kn ) 0 0
Z 1
2 K J2 (kn )
= 2 + g(r)J1 (kn r) r dr
J0 (kn ) kn 0
Z 1
2 K J2 (kn )
= 2 − + g(r)J1 (kn r) r dr
J0 (kn ) kn 0
Z 1
2 kn
= K+ g(r)J1 (kn r) r dr ,
kn J0 (kn ) J0 (kn ) 0
since from Equation 6.5.30, J0 (kn ) + J2 (kn ) = 2J1 (kn )/kn = 0 or J2 (kn ) =
−J0 (kn ). Therefore, the solution is
X∞ Z 1
J1 (kn r) kn 2 2
u(r, t) = Kr + 2 K+ g(r)J1 (kn r) r dr e−a kn t .
k J (k )
n=1 n 0 n
J0 (kn ) 0
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% MATLAB Code for Crank-Nicholson Scheme
% for the Heat Equation Project
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
for n = 1:N
tplot(n) = dt * (n-1);
for j = MM-1:-1:1
uu(j) = uu(j) - gamma(j+1) * uu(j+1);
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
270 Advanced Engineering Mathematics with MATLAB
Section 9.3
Then,
nπa Z b nπy
2 2[1 − (−1)n ]
sinh Bn = 1 sin dy = .
b b 0 b nπ
Thus, the final answer is
∞
4 X sinh[(2m − 1)π(a − x)/b] sin[(2m − 1)πy/b]
u(x, y) = .
π m=1 (2m − 1) sinh[(2m − 1)πa/b]
Then,
Z nπx
nπb 2 a
sinh Bn = x sin dx
a a 0 a
2 nπx ax nπx a
2 a
= sin − cos
a n2 π 2 a nπ a 0
2a(−1)n+1
= .
nπ
Thus, the final answer is
∞
2a X sinh(nπy/a) sin(nπx/a)
u(x, y) = (−1)n+1 .
π n=1 n sinh(nπb/a)
Then,
Z nπx
nπb 2 a
sinh Bn = (x − a) sin dx
a a 0 a
2 nπx ax nπx a nπx a
2 a 2a
= sin − cos + cos
a n2 π 2 a nπ a 0 nπ a 0
n n
2a(−1) 2a[(−1) − 1] 2a
=− + =− .
nπ nπ nπ
Thus, the final answer is
∞
2a X sinh(nπy/a) sin(nπx/a)
u(x, y) = − .
π n=1 n sinh(nπb/a)
272 Advanced Engineering Mathematics with MATLAB
Then,
Z nπx Z nπx
nπb 2 a/2 2x 2 a 2(a − x)
sinh Bn = sin dx + sin dx
a a 0 a a a a/2 a a
8 nπ
= 2 2 sin .
n π 2
Thus, the final answer is
∞
8 X sinh[(2m − 1)πy/a] sin[(2m − 1)πx/a]
u(x, y) = 2
(−1)m+1 .
π m=1 (2m − 1)2 sinh[(2m − 1)πb/a]
Then, Ra
(2n − 1)πb cos[(2n − 1)πx/2a] dx
sinh Bn = a0
R
2a 0
cos 2 [(2n − 1)πx/2a] dx
4 (2n − 1)π
= sin .
(2n − 1)π 2
Thus, the final answer is
∞
4X sinh[(2n − 1)πy/2a] cos[(2n − 1)πx/2a]
u(x, y) = (−1)n+1 .
π n=1 (2n − 1) sinh[(2n − 1)πb/2a]
Then,
Rb
(2n − 1)πa cos[(2n − 1)πy/2b] dy 4(−1)n
sinh Bn = − R b0 = .
2b cos2 [(2n − 1)πy/2b] dy (2n − 1)π
0
Consequently,
Z b Z b nπy
2 2
A0 = 1 dy = 2 and An = cos dy = 0.
b 0 b 0 b
Therefore,
∞
X nπx nπy
u(x, y) = 1 + 21 B0 x + Bn sinh cos .
n=1
b b
and
Then,
Ra
(2n − 1)πb sin[(2n − 1)πx/2a] dx 4
cosh An = R a0 2 = .
2a 0
sin [(2n − 1)πx/2a] dx (2n − 1)π
Solving for w(x, y), we assume that w(x, y) = X(x)Y (y) and −X ′′ /X =
Y ′′ /Y = −λ with Y (0) = Y ′ (b) = X ′ (a) = 0. The solution to the Sturm-
Liouville problem Y ′′ + λY = 0 with Y (0) = Y ′ (b) = 0 is Yn (y) = sin[(2n − 1)
πy/(2b)]. The most convenient solution for Xn (x) is
(2n − 1)π(x − a) (2n − 1)π(x − a)
Xn (x) = An cosh + Bn sinh .
2b 2b
Then,
Rb
(2n − 1)πa sin[(2n − 1)πy/2b] dy 4
cosh An = R b0 = .
2b 2
sin [(2n − 1)πy/2a] dy (2n − 1)π
0
276 Advanced Engineering Mathematics with MATLAB
Then,
Z a nπx
nπb 2 2
cosh An = − sin dx = [(−1)n − 1].
a a 0 a nπ
and
Then,
Z a nπx
nπb 2 2[1 − (−1)n ]
− sinh Bn = sin dx = .
a a 0 a nπ
Solving for w(x, y), we assume that w(x, y) = X(x)Y (y) and −X ′′ /X =
Y ′′ /Y = −λ with Y (0) = Y (b) = X(a) = 0. The solution to the Sturm-
Liouville problem Y ′′ + λY = 0 with Y (0) = Y (b) = 0 is Yn (y) = sin(nπy/b).
The most convenient solution for Xn (x) is
nπ(x − a) nπ(x − a)
Xn (x) = An cosh + Bn sinh .
b b
278 Advanced Engineering Mathematics with MATLAB
Then,
nπa Z b nπy
2 2[1 − (−1)n ]
− sinh Bn = sin dy = .
b b 0 b nπ
Thus, the w component is
∞
4 X sinh[(2m − 1)π(x − a)/b] sin[(2m − 1)πy/b]
w(x, y) = − .
π m=1 (2m − 1) sinh[(2m − 1)πa/b]
11. Let u(x, y) = 1 + v(x, y). Then we have to solve the problem:
12. Let u(x, y) = u1 + v(x, y). Then we have to solve the problem:
Then, at y = 0,
∞
X nπx
nπb
v(x, 0) = − 21 B0 b − Bn sinh cos .
n=1
a a
Therefore, Z Z
α a
2 2
−bB0 = [f (x) − u1 ] dx − u1 dx
a 0 a α
or Z α
2u1 2
B0 = − f (x) dx;
b ab 0
and
Z α nπx Z a nπx
nπb 2 2
− sinh Bn = f (x) cos dx − u1 cos dx,
a a 0 a a 0 a
or Z α nπx
2
Bn = − f (x) cos dx.
a sinh(nπb/a) 0 a
Consequently,
Z L
2 2g 1 2 a a
A0 = g[z0 + cx + a sin(bx)] dx = Lz0 + 2 cL + − cos(bL) ,
L 0 L b b
and
nπz Z L nπx
0 2
cosh An = g[z0 + cx + a sin(bx)] cos dx
L L 0 L
nπz 2gz0 nπx L
0
cosh An = sin
L nπ L 0
2 nπx L
2gc L nπx Lx
+ cos + sin
L n2 π 2 L nπ L 0
L
2ag cos[(b − nπ/L)x] cos[(b + nπ/L)x]
− +
L 2(b − nπ/L) 2(b + nπ/L) 0
2gcL n
= 2 2 [(−1) − 1]
n π
[cos(bL − nπ) − 1] cos(bL + nπ) − 1]
− ga +
bL − nπ bL + nπ
2gcL 2abgL
= 2 2 [(−1)n − 1] − 2 2 [(−1)n cos(bL) − 1].
n π b L − n2 π 2
∂2v ∂2v
+ = 0, 0 < x < 1, 0 < y < L,
∂x2 ∂y 2
and
vx (0, y) = 0, vx (1, y) = −1, 0 < y < L.
Separation of variables leads to
∞
X cosh(nπx/L) nπy
v(x, y) = An sin .
n=1
sinh(nπ/L) L
X∞
nπ nπy
−1 = An sin , 0 < y < L.
n=1
L L
Worked Solutions 281
Therefore,
Z L nπy nπy L
nπ 2 2 2
An = (−1) sin dy = cos = [(−1)n − 1] ,
L L 0 L nπ L 0 nπ
and
2L
An = [(−1)n − 1] .
n2 π 2
The final solution is
∞
4γL X cosh[(2m − 1)πx/L) nπy
u(x, y) = L − y − 2 2
sin .
π m=1 (2m − 1) sinh[(2m − 1)π/L] L
X∞
kn kn L kn r
uz (r, −L) = uz (r, L) = 1 = An cosh J0 .
n=1
a a a
X∞
sinh(kn z/a) J0 (kn r/a)
u(r, z) = 2a .
k 2 cosh(kn L/a)J1 (kn )
n=1 n
282 Advanced Engineering Mathematics with MATLAB
From Equation 6.5.35, Equation 6.5.44, Equation 6.5.46, and Equation 6.5.47,
Z
2 a Aa2
A0 = 2 A r dr = 2 ,
b 0 b
and Z a
2A
kn cosh(kn L)An = rJ0 (kn r) dr
b2 J02 (kn b) 0
Z kn a
2A
= 2 2 2 ηJ0 (kn η) dη
kn b J0 (kn b) 0
2AaJ1 (kn a)
= 2 2 2 .
kn b J0 (kn b)
Thus, the final answer is
∞
Aa2 z 2Aa X sinh(kn z) J1 (kn a) J0 (kn r)
u(r, z) = + .
b2 b2 n=1 kn2 cosh(kn L)J02 (kn b)
From Equation 6.5.46, Equation 6.5.47, Equation 6.5.35 and Equation 6.5.44,
Z a
2B
kn An cosh(kn L) = − J0 (kn r) r dr
b J02 (kn b)
2
0
Z kn a
2B
=− J0 (ξ) ξ dξ
kn2 b2 J02 (kn b) 0
2aBJ1 (kn a)
=− .
kn b2 J02 (kn b)
or
2aBJ1 (kn a)
An = − .
kn2 b2 cosh(kn L)J02 (kn b)
Thus, the final answer is
∞
2aB X J1 (kn a)J0 (kn r) sinh[kn (L − z)]
u(r, z) = A − .
b2 n=1 kn2 J02 (kn b) cosh(kn L)
X∞
kn An kn h kn r
uz (r, 0) = A0 + cosh J0 .
n=1
a a a
From Equation 6.5.46, Equation 6.5.47, Equation 6.5.35 and Equation 6.5.44,
Z r0
2 r2
A0 = 2 r dr = 02 ;
a 0 a
and
Z r0
kn An kn h 2 kn r 2r0 J1 (kn r0 /a)
cosh = 2 2 rJ0 dr = ,
a a a J0 (kn ) 0 a akn J02 (kn )
or
2r0 J1 (kn r0 /a)
An = .
kn2 cosh(kn h/a)J02 (kn )
Thus, the final answer is
X∞
(z − h)r02 sinh[kn (z − h)/a]J1 (kn r0 /a)J0 (kn r/a)
u(r, z) = + 2r0 .
a2 n=1
kn2 cosh(kn h/a)J02 (kn )
From Equation 6.5.46, Equation 6.5.47, Equation 6.5.35 and Equation 6.5.44,
Z b Z 1
r
A0 = 2 dr − 2 r dr = 0,
a b − a2
2
0
Worked Solutions 285
and
Z b Z 1
2 J0 (kn r) 2
An cosh(kn d) = r dr − J0 (kn r) r dr
J02 (kn ) a b2 − a2 J02 (kn ) 0
2[bJ1 (kn b) − aJ1 (kn a)] 2J1 (kn )
= −
(b2 − a2 )kn J02 (kn ) kn J02 (kn )
2[bJ1 (kn b) − aJ1 (kn a)]
= ,
(b2 − a2 )kn J02 (kn )
where n = 0, 1, 2, . . .. Therefore,
∞
X I1 [(2n − 1)πr/2]
u(r, z) = An sin[(2n − 1)π(z − 1)/2].
n=1
I1 [(2n − 1)π/2]
However, the Sturm-Liouville problem now involves R(r) with limr→0 |R(r)| <
∞ and R(1) = 0. This gives Rn (r) = J1 (kn r) with n = 1, 2, 3, . . ., where kn
is the nth root of J1 (k) = 0. Therefore,
∞
X cosh(kn z)
u(r, z) = An J1 (kn r).
n=1
cosh(kn )
X∞
cosh(kn z) J1 (kn r)
u(r, z) = −2 .
n=1
cosh(kn ) kn J0 (kn )
X∞
kn An kn h kn r
uz (r, h) = cosh J1 .
n=1
a a a
Worked Solutions 287
X∞
sinh(kn z/a)J1 (kn r/a)
u(r, z) = −2a2 A
k 2 cosh(kn h/a)J0 (kn )
n=1 n
X∞
kn An kn h kn r
uz (r, h) = r = cosh J1 .
n=1
a a a
or
2a2
An =
kn (kn2 − 1) cosh(kn h/a)J1 (kn )
because J0 (kn ) + J2 (kn ) = 2J1 (kn )/kn and J0 (kn ) = J2 (kn ). Thus, the final
answer is
X∞
sinh(kn z/a)J1 (kn r/a)
u(r, z) = 2a2 .
k (k 2 − 1) cosh(kn h/a)J1 (kn )
n=1 n n
with limr→0 |R(r)| < 0, and R′ (1) = −R(1). The solution to this singular
Sturm-Liouville problem is Rn (r) = J1 (kn r) with kn J1′ (kn ) = −J1 (kn ) or
kn J0 (kn ) = J1 (kn ). The most convenient solution for Zn (z) that satisfies
the boundary conditions at z = ±a is Zn (z) = An sinh(kn z). Therefore, a
superposition of the product solutions yields
∞
X
u(r, z) = An sinh(kn z)J1 (kn r).
n=1
or
Z kn
kn4 cosh(kn a)J12 (kn )An =2 η 2 J1 (η) dη
0
kn
= 2η 2 J2 (η) 0
= 2kn2 J2 (kn ) = 2kn J1 (kn ),
because J2 (kn ) = 2J1 (kn )/kn − J0 (kn ) and kn J0 (kn ) = J1 (kn ). Thus, the
final answer is
X∞
sinh(kn z)J1 (kn r)
u(r, z) = 2 3 cosh(k a)J (k )
.
k
n=1 n n 1 n
26. Substituting the Fourier-Bessel series into the partial differential equa-
tions, we find that Zn (z) is governed by the ordinary differential equation
∞
X
u0 = An J0 (kn r), 0 < r < 1.
n=1
Therefore,
h p i
∞ sinh (L − z) 1 + k 2
X kn J1 (kn ) n
u(r, z) = 2u0 2 + h2 )J 2 (k )
p J0 (kn r),
n=1
(k n 0 n sinh L 1 + kn 2
290 Advanced Engineering Mathematics with MATLAB
or h p i
∞
X J0 (kn r) sinh (L − z) 1 + kn2
u(r, z) = 2u0 h ,
n=1
(kn2 + h2 )J0 (kn ) sinh Lp1 + k 2
n
Turning to the radial portion first, the solution is Rn (r) = J0 (µn r/a)
with
−µn J0′ (µn ) = µn J1 (µn ) = βJ0 (µn ),
where β = aK/D and n = 1, 2, 3, . . .. On the other hand, the solution in the
z-direction is
cosh[µn (L − z)/a]
Zn (z) = An
cosh(µn L/a)
because Zn′ (L) = 0. Therefore, the general solution which satisfies most of
the boundary conditions is
∞
X cosh[µn (L − z)/a]
u(r, z) = An J0 (µn r/a) .
n=1
cosh(µn L/a)
because β 2 J02 (µn ) = µ2n J12 (µn ). Consequently, the final solution is
∞
X J1 (µn )J0 (µn r/a) cosh[µn (L − z)/a]
u(r, z) = 2u0 ,
µ [J 2 (µn ) + J12 (µn )] cosh(µn L/a)
n=1 n 0
Turning to the z-dependence first, Z1n = sin(kn z) with kn = nπ. On the other
hand, the radial part is given by R1n = I0 (γn r)/I0 (γn ) where γn2 = a2 + n2 π 2 .
Therefore, the general solution is
∞
X I0 (γn r)
u1 (r, z) = An sin(nπz).
n=1
I0 (γn )
2
where γm = a2 + (2m + 1)2 π 2 .
For the second part, if u2 (r, z) = R2 (r)Z2 (z), then
1 d dR2 Z”
r = − 2 + a2 = −k 2 ,
r dr dr Z2
292 Advanced Engineering Mathematics with MATLAB
Turning to the r-dependence first, R2n (r) = J0 (kn r) where kn is the nth root
of J0 (k) = 0. On the other hand, the z-dependence is given by
sinh[γn (1 − z)]
Z2n (z) = An ,
sinh(γn )
X∞
J0 (kn r) sinh[γn (1 − z)]
u2 (r, z) = 2 ,
k J (k )
m=0 n 1 n
sinh(γn )
Turning to the r-dependence first, R3n (r) = J0 (kn r) where kn is the nth root
of J0 (k) = 0. On the other hand, the z-dependence is given by
sinh(γn z)
Z3n (z) = An ,
sinh(γn )
Worked Solutions 293
29. If you substitute the given solutions into differential equation and bound-
ary conditions, they satisfy these conditions provided
kn d kn d
Bn = Cn sinh and An = −Cn exp − .
2a 2a
From the continuity equation u(r, d− /2) = u(r, d+ /2), we now have
∞
X
kn d kn d kn r
−V − Cn exp − cosh J0
n=1
2a 2a a
X∞
kn d kn d kn r
= Cn exp − sinh J0 ,
n=1
2a 2a a
294 Advanced Engineering Mathematics with MATLAB
or
∞
X kn r
−V = Cn J0 .
n=1
a
Computing the cofficients Cn ,
Z a
2V kn r
Cn = − rJ0 dr
a J12 (kn )
2
0 a
Z kn
2V 2V
=− τ J0 (τ ) dτ = − .
kn2 J12 (kn ) 0 kn J1 (kn )
X∞
sinh[kn d/(2a)] kn |z| kn r
u(r, z) = −2V exp − J0
n=1
kn J1 (kn ) a a
From Equation 6.5.35, Equation 6.5.44, Equation 6.5.46 and Equation 6.5.47,
Z
2 a a2 A
A0 = 2 A r dr = 2 ,
b 0 b
Worked Solutions 295
and Ra
A 0
rJ0 (kn r) dr 2aAJ1 (kn a)
An = = .
b J02 (kn b)/2
2 b2 kn J02 (kn b)
Thus, the final answer is
∞
a2 A 2aA X J1 (kn a)J0 (kn r) −kn z
u(r, z) = + e .
b2 b2 n=1 kn J02 (kn b)
R′′ R′ Z ′′
+ =− = −k 2 .
R rR Z
If k = 0, Z0 (z) = u∞ = constant and R0 (r) = 1. If k > 0, then Zn (z) =
−A(k)e−kz and Rn (r) = J0 (kr). From the principle of linear superposition,
Z ∞
u(r, z) = u∞ − A(k)e−kz J0 (kr) dk,
0
lim u(r, z) = u∞ .
z→∞
Therefore, our solution satisfies the differential equation and the boundary
conditions as r → 0, r → ∞, and z → ∞.
Because Z ∞
uz (r, z) = k A(k)e−kz J0 (kr) dk,
0
the boundary condition for the region a < r < ∞ yields
Z ∞
uz (r, 0) = k A(k)J0 (kr) dk = 0.
0
Since Z ∞
sin(ka)J0 (kr) dk = 0 if a < r < ∞,
0
a direct comparsion with the previous equation shows that kA(k) = C sin(ka).
Finally, because Z ∞
dk π
sin(ka)J0 (kr) = ,
0 k 2
Z ∞
dk Cπ
u(r, 0) = u∞ − C sin(ka)J0 (kr) = u∞ − = u∞ − ∆u.
0 k 2
Therefore, C = 2∆u/π. Substitution of C into the equation for u(r, z) com-
pletes the demonstration.
X ′′ Y ′′
=− = −k 2 .
X Y
The only nontrival solutions exist if k 2 > 0. If k > 0, then Y (y) = A(k)e−ky
and X(x) = cos(kx). The first solution satisfies the solution as y → ∞
and then second one satisfies the symmetry condition given by the boundary
condition along y = 0. From the principle of linear superposition,
Z ∞
u(x, y) = A(k)e−ky cos(kx) dk,
0
since k can take on any any value from 0 to ∞. Direct substitution of this
solution into boundary condition (1) leads to the dual integral equations given
in Step 2.
Substituting A(k) = −πJ1 (k)/(2k) into the dual integral equations yields
Z
π ∞ π
− cos(kx)J1 (k) dk = − , 0 ≤ |x| < 1,
2 0 2
298 Advanced Engineering Mathematics with MATLAB
and Z ∞
J1 (k)
cos(kx) dk = 0, 1 < |x| < ∞.
0 k
Integral tables confirm the truth of both of these equations. Substituting
√ A(k)
into the solution u(x, y) gives the final result. The result u(x, 0) = − 1 − x2
if |x| < 1 follows by setting y = 0 in the solution and using integral tables.
35. Because
∞
X r n
u(r, θ) = An Pn [cos(θ)],
n=0
a
∞
X
u(a, µ) = An Pn (µ) = 100(µ − µ5 ).
n=0
A1 − 23 A3 + 15
8 A5 = 100, 52 A3 − 70
8 A5 =0 and 63
8 A5 = −100.
36. Because
∞
X r n
u(r, θ) = An Pn [cos(θ)],
n=0
a
∞
X
100, 0 < µ < 1,
u(a, µ) = An Pn (µ) =
0, −1 < µ < 0.
n=0
Therefore, Z 1
1
A0 = 100 P0 (µ) dµ = 50,
2 0
and Z 1
2n + 1
An = 100 Pn (µ) dµ
2 0
Z 1
= 50(2n + 1) Pn (µ) dµ = 50[Pn−1 (0) − Pn+1 (0)]
0
Worked Solutions 299
37. Because
∞
X r n
u(r, θ) = An Pn [cos(θ)],
n=0
a
∞
X
T0 , cos(α) < µ < 1,
u(a, µ) = An Pn (µ) =
0, −1 < µ < cos(α).
n=0
Therefore,
Z 1
T0 [1 − cos(α)]T0
A0 = T0 Pn (µ) dµ = ,
2 cos(α) 2
and
Z 1
2n + 1
An = T0 Pn (µ) dµ = 12 T0 {Pn−1 [cos(α)] − Pn+1 [cos(α)]}
2 cos(α)
38. Z π
T0 1 − r2
u(r, ϕ) = 2
dθ
2π
−π 1 + r − 2r cos(θ − ϕ)
Z π
T0 1 − r 2 dη
= 2 2
2π 1 + r −π 1 − 2r cos(η)/(1 + r )
Z 2π
T0 1 − r 2 dτ
= 2
2π 1 + r 0 1 + 2r cos(τ )/(1 + r2 )
1 − r2 1
= T0 p = T0
1 + r2 1 − 4r /(1 + r2 )2
2
Section 9.4
300 Advanced Engineering Mathematics with MATLAB
1. When the analysis is redone with the new Sturm-Liouville problem, the
solution to Poisson’s equation is
∞ X
X ∞
4anm
u(x, y) = − 2 π 2 /a2 + (2m − 1)2 π 2 /b2
n=1 m=1
(2n − 1)
(2n − 1)πx (2m − 1)πy
× cos cos ,
2a 2b
where
Z bZ a
4 R (2n − 1)πx (2m − 1)πy
anm = − cos cos dx dy
ab 0 0 T 2a 2b
a
4R 2 (2n − 1)πx
=− sin
T (2n − 1)π 2a 0
b
2 (2m − 1)πy
× sin
(2m − 1)π 2b 0
16 R (−1)n+1 (−1)m+1
=− .
π 2 T (2n − 1)(2m − 1)
Thus, the final answer is
∞ ∞
64 R X X (−1)n+1 (−1)m+1
u(x, y) = 4
π T n=1 m=1 (2n − 1)(2m − 1)
cos[(2n − 1)πx/2a] cos[(2m − 1)πy/b]
× .
(2n − 1)(2m − 1)[(2n − 1)2 /a2 + (2m − 1)2 /b2 ]
with n = 1, 2, 3, . . ., and
1
Zm (z) = cos m + πz/b ,
2
with m = 0, 1, 2, . . . Thus, the product solution unm (r, z) follows by multiply-
ing Rn (r) and Zm (z) together. Let
∞
X r
f (r, z) = An (z)J0 kn ,
n=1
a
Worked Solutions 301
then Z a r
2
An (z) = 2 2 f (r, z)J0 kn r dr.
a J1 (kn ) 0 a
Now, we also have that
∞
" #
X m + 21 πz
An (z) = anm cos ,
m=0
b
where Z " #
1 b
m + 12 πz
anm = An (z) cos dz.
b −b b
with
Z Z " #
2 b a r m + 21 πz
anm = 2 2 f (r, z)J0 kn cos r dr dz.
a bJ1 (kn ) −b 0 a b
Finally, because
2
λnm = −(kn /a)2 − m+ 1
2 π/b ,
and
λnm unm (r, z) = anm J0 (kn r/a) cos m + 12 πz/b ,
we can find u(r, z) by summing unm (r, z) over all of the n’s and m’s.
Section 9.5
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% MATLAB Code for Test
% of the Successive Over-Relaxation
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
clear
error = 1.e-3; % allowable error
% M = number of x grid points
dx = 0.05; M = 1/dx + 1; x = 0:dx:1;
% N = number of y grid points
dy = 0.05; N = 1/dy + 1; y = 0:dy:1;
302 Advanced Engineering Mathematics with MATLAB
%*************************************************************
%
% find the "answer" using the Gauss-Seidel method
%
%*************************************************************
maxdiff = 1;
end
%*************************************************************
%
% find the number of iteration needed by successive
% over-relaxation (SOR) to yield an |absolute error| < error
%
%*************************************************************
end; end
end
end
% display results
plot(omega,icount); xlabel(’\omega’,’Fontsize’,20);
ylabel(’ITERATIIONS’,’Fontsize’,20)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Section 9.6
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% MATLAB Code for Finite Element Solution
% of Laplace’s Equation
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function fem 50 ( )
clear
load coordinates.dat;
load elements3.dat;
load elements4.dat;
load dirichlet.dat;
% Assembly.
for j = 1 : size(elements3,1)
A(elements3(j,:),elements3(j,:)) ...
= A(elements3(j,:),elements3(j,:)) ...
+ stima3(coordinates(elements3(j,:),:));
end
for j = 1 : size(elements4,1)
A(elements4(j,:),elements4(j,:)) ...
= A(elements4(j,:),elements4(j,:)) ...
+ stima4(coordinates(elements4(j,:),:));
end
% Volume Forces.
for j = 1 : size(elements3,1)
b(elements3(j,:)) = b(elements3(j,:)) ...
306 Advanced Engineering Mathematics with MATLAB
for j = 1 : size(elements4,1)
b(elements4(j,:)) = b(elements4(j,:)) ...
+ det([1,1,1; coordinates(elements4(j,1:3),:)’] ) * ...
f(sum(coordinates(elements4(j,:),:))/4)/4;
end
% Neumann conditions.
if ( isempty(neumann) )
for j = 1 : size(neumann,1)
b(neumann(j,:)) = b(neumann(j,:)) ...
+ norm(coordinates(neumann(j,1),:) ...
- coordinates(neumann(j,2),:)) * ...
g(sum(coordinates(neumann(j,:),:))/2)/2;
end
end
u = sparse ( size(coordinates,1), 1 );
BoundNodes = unique ( dirichlet );
u(BoundNodes) = u d ( coordinates(BoundNodes,:) );
b = b - A * u;
% Graphic representation.
return; end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Worked Solutions 307
%%%%%%%%%%% dirichlet.dat
1 1 2
2 2 3
3 3 4
4 4 5
5 5 6
6 6 7
7 7 8
8 8 9
9 9 10
10 10 11
11 11 12
12 12 13
13 13 14
14 14 15
15 15 16
16 16 17
17 17 18
18 18 19
19 19 20
20 20 21
21 21 22
22 22 23
23 23 24
24 24 25
25 25 26
26 26 27
27 27 28
28 28 29
29 29 30
30 30 31
31 31 32
32 32 33
33 33 34
34 34 35
35 35 36
36 36 37
37 37 38
38 38 39
39 39 40
40 40 41
41 41 42
42 42 43
43 43 44
308 Advanced Engineering Mathematics with MATLAB
44 44 45
45 45 46
46 46 47
47 47 48
48 48 49
49 49 50
50 50 51
51 51 52
52 52 53
53 53 54
54 54 55
55 55 56
56 56 57
57 57 58
58 58 59
59 59 1
%%%%%%%%%%% elements3.dat
12 13 88
14 97 96
14 15 97
16 107 106
16 17 107
18 118 117
18 19 118
%%%%%%%%%%% elements4.dat
1 2 60 59
2 3 61 60
3 4 62 61
4 5 63 62
5 6 64 63
6 7 65 64
7 8 66 65
8 9 10 66
59 60 67 58
60 61 68 67
61 62 69 68
62 63 70 69
63 64 71 70
64 65 72 71
65 66 73 72
66 10 11 73
Worked Solutions 309
58 67 74 57
67 68 75 74
68 69 76 75
69 70 77 76
70 71 78 77
71 72 79 78
72 73 80 79
73 11 12 80
57 74 81 56
74 75 82 81
75 76 83 82
76 77 84 83
77 78 85 84
78 79 86 85
79 80 87 86
80 12 88 87
56 81 89 55
81 82 90 89
82 83 91 90
83 84 92 91
84 85 93 92
85 86 94 93
86 87 95 94
87 88 96 95
88 13 14 96
55 89 98 54
89 90 99 98
90 91 100 99
91 92 101 100
92 93 102 101
93 94 103 102
94 95 104 103
95 96 105 104
96 97 106 105
97 15 16 106
54 98 108 53
98 99 109 108
99 100 110 109
100 101 111 110
101 102 112 111
102 103 113 112
103 104 114 113
104 105 115 114
105 106 116 115
106 107 117 116
310 Advanced Engineering Mathematics with MATLAB
107 17 18 117
53 108 119 52
108 109 120 119
109 110 121 120
110 111 122 121
111 112 123 122
112 113 124 123
113 114 125 124
114 115 126 125
115 116 127 126
116 117 128 127
117 118 129 128
118 19 130 129
19 20 131 130
20 21 132 131
21 22 23 132
52 119 133 51
119 120 134 133
120 121 135 134
121 122 136 135
122 123 137 136
123 124 138 137
124 125 139 138
125 126 140 139
126 127 141 140
127 128 142 141
128 129 143 142
129 130 144 143
130 131 145 144
131 132 146 145
132 23 24 146
51 133 147 50
133 134 148 147
134 135 149 148
135 136 150 149
136 137 151 150
137 138 152 151
138 139 153 152
139 140 154 153
140 141 155 154
141 142 156 155
142 143 157 156
143 144 158 157
144 145 159 158
145 146 160 159
Worked Solutions 311
146 24 25 160
50 147 161 49
147 148 162 161
148 149 163 162
149 150 164 163
150 151 165 164
151 152 166 165
152 153 167 166
153 154 168 167
154 155 169 168
155 156 170 169
156 157 171 170
157 158 172 171
158 159 173 172
159 160 174 173
160 25 26 174
49 161 175 48
161 162 176 175
162 163 177 176
163 164 178 177
164 165 179 178
165 166 180 179
166 167 181 180
167 168 182 181
168 169 183 182
169 170 184 183
170 171 185 184
171 172 186 185
172 173 187 186
173 174 188 187
174 26 27 188
48 175 189 47
175 176 190 189
176 177 191 190
177 178 192 191
178 179 193 192
179 180 194 193
180 181 195 194
181 182 196 195
182 183 197 196
183 184 198 197
184 185 199 198
185 186 200 199
186 187 201 200
187 188 202 201
312 Advanced Engineering Mathematics with MATLAB
188 27 28 202
47 189 203 46
189 190 204 203
190 191 205 204
191 192 206 205
192 193 207 206
193 194 208 207
194 195 209 208
195 196 210 209
196 197 211 210
197 198 212 211
198 199 213 212
199 200 214 213
200 201 215 214
201 202 216 215
202 28 29 216
46 203 44 45
203 204 43 44
204 205 42 43
205 206 41 42
206 207 40 41
207 208 39 40
208 209 38 39
209 210 37 38
210 211 36 37
211 212 35 36
212 213 34 35
213 214 33 34
214 215 32 33
215 216 31 32
216 29 30 31
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Section 10.1
1.
5i 5i 2−i 5 + 10i
= × = = 1 + 2i
2+i 2+i 2−i 4+1
2.
5 + 5i 20 5 + 5i 3 + 4i 20 4 − 3i
+ = × + ×
3 − 4i 4 + 3i 3 − 4i 3 + 4i 4 + 3i 4 − 3i
−1 + 7i 16 − 12i
= + =3−i
5 5
Worked Solutions 313
3.
1 + 2i 2 − i 1 + 2i 3 + 4i 2 − i −5i −1 + 2i 1 + 2i 2
+ = × + × = − =−
3 − 4i 5i 3 − 4i 3 + 4i 5i −5i 5 5 5
4.
(1 − i)4 = (1 − i)2 (1 − i)2 = (−2i)2 = −4
5. √ √ √ √ √
i(1 − i 3 )( 3 + i) = i( 3 − 3i + i + 3) = 2 + 2i 3
6. p
r= 02 + (−1)2 = 1
θ = tan−1 (−1/0) = π/2 or 3π/2
Because −i lies below the real axis, θ = 3π/2 and z = e3πi/2 .
7. p
r= 42 + 02 = 4 and θ = tan−1 (0/ − 4) = 0 or π
Because −4 lies in the left side of the complex plane, θ = π and z = 4eπi .
8. √
r= 4 + 12 = 4
√ √
θ = tan−1 (2 3/2) = tan−1 ( 3) = π/3 or 4π/3
√
Because 2 + 2 3i lies in the first quadrant, z = 4eπi/3 .
9. √ √
r= 25 + 25 = 5 2
θ = tan−1 [5/(−5)] = tan−1 (−1) = 3π/4 or 7π/4
√
Because −5 + 5i lies in the second quadrant, z = 5 2e3πi/4 .
10. √ √
r= 4+4=2 2
θ = tan−1 (−2/2) = tan−1 (−1) = 3π/4 or 7π/4
√
Because 2 − 2i lies in the fourth quadrant, z = 2 2e7πi/4 .
11. √
r= 1+3=2
√ √
θ = tan−1 [ 3/(−1)] = tan−1 (− 3) = 2π/3 or 5π/3
√
Because −1 + 3i lies in the second quadrant, z = 2e2πi/3 .
314 Advanced Engineering Mathematics with MATLAB
12.
and
sin(α + β) = cos(α) sin(β) + sin(α) cos(β).
13.
N
X 1 − exp[i(N + 1)t]
eint =
n=0
1 − exp(it)
exp[i(N + 1)t/2] − exp[−i(N + 1)t/2]
= exp(iN t/2)
exp(it/2) − exp(−it/2)
sin[(N + 1)t/2]
= eiN t/2 .
sin(t/2)
To obtain the final answer, take the real and imaginary parts of the last
equation.
14. (a)
∞
X 1 1
ǫn eint = =
n=0
1 − ǫ exp(it) 1 − ǫ cos(t) − iǫ sin(t)
1 − ǫ cos(t) + iǫ sin(t)
= .
1 + ǫ2 − 2ǫ cos(t)
To obtain the final answer, take the real and imaginary parts of the last
equation.
(b)
∞
X e−a sin(t) sin(t)
e−na sin(nt) = = .
n=1
1 + e−2a − 2e−a cos(t) 2 cosh(a) − 2 cos(t)
Section 10.2
1.
8 = 23 e0i+2kπi .
Therefore, √
zk = 2ekπi/3 , k = 0, 1, 2, 3, 4, 5
or " #
√ √ h π π i √ 1 √3i
z0 = 2, z1 = 2 cos + i sin = 2 + ,
3 3 2 2
" √ #
√ 2π 2π √ 1 3i
z2 = 2 cos + i sin = 2 − + ,
3 3 2 2
√ √
z3 = 2eπi = − 2,
" √ #
√ 4π 4π √ 1 3i
z4 = 2 cos + i sin = 2 − −
3 3 2 2
and " √ #
√ 5π 5π √ 1 3i
z5 = 2 cos + i sin = 2 − .
3 3 2 2
2.
−1 = eπi+2kπi .
Therefore,
zk = e(π+2kπ)i/3 , k = 0, 1, 2
or √
π π 1 3
πi/3
z0 = e = cos + i sin = + i, z1 = eπi = −1
3 3 2 2
and √
5πi/3 5π 5π 1 3
z2 = e = cos + i sin = − i.
3 3 2 2
3.
−i = e3πi/2+2kπi .
Therefore,
zk = eπi/2+2kπi/3 , k = 0, 1, 2
or
z0 = eπi/2 = i,
√
7π 7π 3 i
z1 = e7πi/6 = cos + i sin =− −
6 6 2 2
316 Advanced Engineering Mathematics with MATLAB
and √
11πi/6 11π 11π 3 i
z2 = e = cos + i sin = − .
6 6 2 2
4.
−27i = 33 e3πi/2+2kπi .
Therefore, √ πi/4+kπi/3
zk = 3e , k = 0, 1, 2, 3, 4, 5
or
√ h π π i √ 7π 7π
z0 = 3 cos + i sin , z1 = 3 cos + i sin ,
4 4 12 12
√ 11π 11π
z2 = 3 cos + i sin ,
12 12
√ 5π 5π
z3 = 3 cos + i sin ,
4 4
√ 19π 19π
z4 = 3 cos + i sin ,
12 12
and
√ 23π 23π
z5 = 3 cos + i sin .
12 12
5. If√we find one root w1 , then the other root is −w1 . Let z = reθi , where
r = a2 + b2 and θ = tan−1 (−b/a). The value of θ lies between 3π/2 and 2π
because z lies in the fourth quadrant. We know that
√ √
w1 = reθi/2 = r [cos(θ/2) + i sin(θ/2)].
p p
√ = ± [1 + cos(θ)]/2 and sin(θ/2) = ± [1 − cos(θ)]/2, where
But cos(θ/2)
cos(θ) = a/ a2 + b2 . Therefore,
s√ s√
(a2 + b2 )1/4 a 2 + b2 + a a 2 + b2 − a
w1 = √ − √ +i √
2 a 2 + b2 a 2 + b2
qp qp
1 2 2 2 2
=√ − a +b +a+i a +b +a .
2
Our choice of signs for cos(θ/2) and sin(θ/2) is determined by the fact that
3π/4 < θ/2 < π.
Worked Solutions 317
√
6. From the quadratic formula, z 2 = (3i ± −9 + 8)/2 = 2i, i. Therefore,
√ 1 i
z1,2 = ± 2eπi/4 = ±(1 + i) and z3,4 = ±e πi/4
=± √ +√ .
2 2
Section 10.3
1.
w = u + iv = i(x + iy) + 2 = 2 − y + xi
Therefore, u = 2 − y and v = x. Then, ux = 0, vy = 0, vx = 1 and uy = −1.
Thus, ux = vy and vx = −uy for all x and y. Therefore, iz + 2 is an entire
function because the derivatives are continuous.
3.
w = u + iv = (x + iy)3 = x3 − 3xy 2 + i(3x2 y − y 3 )
Therefore, u = x3 − 3xy 2 and v = 3x2 y − y 3 . Then, ux = 3x2 − 3y 2 , vy =
3x2 − 3y 2 , vx = 6xy and uy = −6xy. Thus, ux = vy and vx = −uy for
all x and y. Therefore, z 3 is an entire function because the derivatives are
continuous.
5.
3
f ′ (z) = (1 + z 2 )1/2 (2z) = 3z(1 + z 2 )1/2
2
318 Advanced Engineering Mathematics with MATLAB
6.
f ′ (z) = 31 (z + 2z 1/2 )−2/3 (1 + z −1/2 )
7.
f ′ (z) = 2(1 + 4i)z − 3
8.
2 2z − i 5i
f ′ (z) = − 2
=
z + 2i (z + 2i) (z + 2i)2
9.
f ′ (z) = −3i(iz − 1)−4
10.
z 2 − 2iz − 1 2z − 2i 2 1
lim = lim 3 = lim =−
z→i z 4 + 2z 2 + 1 z→i 4z + 4z z→i 12z 2 + 4 4
11.
z − sin(z) 1 − cos(z) sin(z) cos(z) 1
lim = lim = lim = lim =
z→0 z3 z→0 3z 2 z→0 6z z→0 6 6
13. Because uxx = 2 and uyy = −2, we have uxx + uyy = 0 and u(x, y) is
harmonic. To find v(x, y), we use the Cauchy-Riemann equations: vy = ux =
2x or v(x, y) = 2xy + f (x). To find f (x) we use vx = 2y + f ′ (x) = −uy = 2y
or f ′ (x) = 0. Therefore, the final answer is v(x, y) = 2xy + constant.
14. Because uxx = 12x2 − 12y 2 and uyy = −12x2 + 12y 2 , we have that uxx +
uyy = 0 and u(x, y) is harmonic. To find v(x, y), we use the Cauchy-Riemann
equations: vy = ux = 4x3 − 12xy 2 + 1 or v(x, y) = 4x3 y − 4xy 3 + y + f (x). To
find f (x) we use vx = 12x2 y − 4y 3 + f ′ (x) = −uy = 12x2 y − 4y 3 or f ′ (x) = 0.
Therefore, the final answer is v(x, y) = 4x3 y − 4xy 3 + y + constant.
15. Because
and
uyy = x cos(x)e−y + 2e−y sin(x) − ye−y sin(x),
Worked Solutions 319
we have uxx + uyy = 0 and u(x, y) is harmonic. To find v(x, y), we use the
Cauchy-Riemann equations:
or
v(x, y) = x sin(x)e−y + ye−y cos(x) + f (x).
16. Because
and
uyy = −2 cos(y)ex +4y sin(y)ex −(x2 −y 2 ) cos(y)ex −4x cos(y)ex +2xy sin(y)ex ,
we have that uxx + uyy = 0 and u(x, y) is harmonic. To find v(x, y), we use
the Cauchy-Riemann equations:
or
v(x, y) = 2xy cos(y)ex + (x2 − y 2 ) sin(y)ex + f (x).
Section 10.4
2. I I
2
|z| dz = (x2 + y 2 )(dx + i dy)
C C
Z Z Z Z
= |z|2 dz + |z|2 dz + |z|2 dz + |z|2 dz
C1 C2 C3 C4
Then
Z Z 1 Z Z 1
2 2 2 2
|z| dz = (x + 0 ) dx = 1
3, |z| dz = (12 + y 2 )i dy = i(1 + 13 ),
C1 0 C2 0
Z Z 0 Z Z 0
2 2 2 2
|z| dz = (x + 1 ) dx = − 31 − 1, |z| dz = (02 + y 2 )i dy = − 3i .
C3 1 C4 1
Finally, I
|z|2 dz = −1 + i.
C
3. We have z = eθi and dz = ieθi dθ with −π/2 < θ < π/2. Then
Z Z π/2
π/2
|z| dz = 1 × ieθi dθ = eθi −π/2
= 2i.
C −π/2
For (b)
Z Z 0 0
dz
√ = ieθi/2 dθ = 2eθi/2 = 2 + 2i.
C z −π −π
Note the jump in eθi/2 as we move across the negative real axis. Just above
the negative real axis, eθi/2 = i while below this axis we have eθi/2 = −i. This
jump occurs because of the presence of the branch cut along the negative real
axis associated with our multivalued, complex square root function.
Section 10.5
Section 10.6
1. I
sin6 (z) πi
dz = 2πi sin6 (π/6) =
|z|=1 z − π/6 32
2. I
sin6 (z) 2πi d2 [sin6 (z)]
dz =
|z|=1 (z − π/6)3 2! dz 2 z=π/6
= πi 30 sin (π/6) cos2 (π/6) − 6 sin6 (π/6)
4
= 21πi/16
3. I I
dz 1/(z 2 + 4) 1 πi
2
= dz = 2πi 2 =
|z|=1 z(z + 4) |z|=1 z z +4 z=0 2
4. I
tan(z)
dz = 2πi tan(z) z=0
=0
|z|=1 z
5.
I I
dz 1/(z − 2) 1
= dz = 2πi = −2πi
|z−1|=1/2 (z − 1)(z − 2) |z−1|=1/2 z−1 z−2 z=1
6.
I 2
exp(z 2 ) 2πi d2 (ez ) 2 2
dz = = πi 4z 2 ez + 2ez = 2πi
|z|=5 z3 2! dz 2 z=0 z=0
7.
I I
z2 + 1 (z 2 + 1)/(z + 1) z2 + 1
dz = dz = 2πi = 2πi
|z−1|=1 z2 − 1 |z−1|=1 z−1 z+1 z=1
8. I
z2 2πi d3 (z 2 )
dz = =0
|z|=2 (z − 1)4 3! dz 3 z=1
9. I
z3 2πi d2 (z 3 )
dz = = 6πiz|z=i = −6π
|z|=2 (z + i)3 2! dz 2 z=i
Worked Solutions 323
10. I
cos(z) 2πi d2n [cos(z)] 2πi
dz = = (−1)n
|z|=1 z 2n+1 (2n)! dz 2n z=0 (2n)!
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% MATLAB Code for Complex Variables Project
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% initialize parameters
clear
n = 11; R = 1; x 0 = 2; y 0 = 0;
% compute n!
for m = 1:85
for j = 1:M
for k = 1:5
theta = ave + h * x gauss(k);
324 Advanced Engineering Mathematics with MATLAB
x = x 0 + R * cos(theta);
y = y 0 + R * sin(theta);
z = x + i*y;
f = 8 * z / (z * z+4);
u = real(f);
v = imag(f);
cosine = cos(n * theta);
sine = sin(n * theta);
integrand1 = u * cosine + v * sine;
integrand2 = v * cosine - u * sine;
answer1 = answer1 + h * A(k) * integrand1;
answer2 = answer2 + h * A(k) * integrand2;
end
end
format long
answer1 = factorial * answer1 / (2 * pi * radius);
answer2 = factorial * answer2 / (2 * pi * radius);
derivative plot(m) = answer1;
answer ave = answer ave + derivative plot(m);
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Section 10.7
1.
X∞
1 f (n) (0) n
2
= z
(1 − z) n=0
n!
X∞ ∞
1 (n + 1)! n X
= z = (n + 1)z n .
(1 − z)2 n=0
n! n=0
Worked Solutions 325
2.
f (z) = e(z − 1)e(z−1)
z − 1 (z − 1)2 (z − 1)3
= e(z − 1) 1 + + + + ···
1! 2! 3!
= e(z − 1) + e(z − 1)2 + 12 e(z − 1)3 + 16 e(z − 1)4 + · · ·
3.
10 1 1 1 1
f (z) = z 1 − + 2 − 3 + ··· − + ···
z 2z 6z 11!z 11
= z 10 − z 9 + 12 z 8 − 61 z 7 + · · · − 1
11!z + ···
4.
f (z) = z −3 sin2 (z) = 12 z −3 [1 − cos(2z)]
2
(2z)4 (2z)6
= 21 z −3 1 − 1 + (2z)2! − 4! + 6! − · · ·
1 23 z 25 z 3
= − + − ···
z 4! 6!
We have a simple pole with a residue that equals 1.
5.
cosh(z) − 1 1 z2 z4 z6
f (z) = = 1 + + + + · · · − 1
z2 z2 2! 4! 6!
2 4
1 z z
= + + + ···
2! 4! 6!
We have a removable singularity where the value of the residue equals zero.
6.
z+2−2 2 1
f (z) = =− +
(z + 2)2 (z + 2)2 z+2
We have a second-order pole where the residue equals one.
7.
ez + 1 2 + z + 21 z 2 + 61 z 3 + · · ·
=
e−z − 1 1 − z + 12 z 2 − 61 z 3 + · · · − 1
= − z1 (2 + z + 21 z 2 + 61 z 3 + · · ·)(1 + 12 z + 1 2
12 z + · · ·)
= − z2 − 2 − 76 z − 21 z 2 − · · ·
8.
9.
1 1 1 z − 2 (z − 2)2
f (z) = = 1− + − ···
[2 + (z − 2)](z − 2) 2 z−2 2 4
1 1 1 1
= − + (z − 2) − · · ·
2z−2 4 8
10.
1 z4 z6 1 1 1 z2
f (z) = 1 + z2 + + + ··· = + 2+ + + ···
z4 2! 3! z 4 z 2 6
Section 10.8
1. I
z+1 z+1 3πi
dz = 2πi Res ;0 = − ,
|z|=1 z − 2z 3
4 4
z − 2z 3 4
because
z+1 1 d2 3 z+1
Res ; 0 = lim z 3
z 4 − 2z 3 z→0 2! dz 2 z (z − 2)
1 z+1 3
= lim − 2
+ 3
=− .
z→0 (z − 2) (z − 2) 8
2.
I
(z + 4)3 (z + 4)3 16πi
dz = 2πi Res 4 ;0 = −
|z|=1 z 4 + 5z 3 + 6z 2 z + 5z 3 + 6z 2 9
Worked Solutions 327
because
(z + 4)3 d 2 (z + 4)3
Res ; 0 = lim z 2 2
z 4 + 5z 3 + 6z 2 z→0 dz z (z + 5z + 6)
3(z + 4)2 (z + 4)3 (2z + 5) 8
= lim 2 − =− .
z→0 z + 5z + 6 (z 2 + 5z + 6)2 9
3. Because
1 1 1 1
= =−
1 − ez 1 − 1 − z − 21 z 2 − · · · z 1 + 21 z + · · ·
1 1
=− 1 − z − ··· ,
z 2
4. I 2
z2 − 4 z −4
dz = 2πi Res ; 1 =0
|z|=2 (z − 1)4 (z − 1)4
because
z2 − 4 1 d3 2
4 z −4
Res ;1 = lim (z − 1) = 0.
(z − 1)4 3! z→1 dz 3 (z − 1)4
Therefore, I
z3
dz = 2πi.
|z|=2 z4 − 1
1 2n+1
f (z) = z n + 2z n−1 + · · · + + ···,
(n + 1)! z
we have an essential singularity and the residue equals 2n+1 /(n+1)! Therefore,
I
2n
z n e2/z dz = 4πi .
|z|=1 (n + 1)!
7. Because
1 h (1+i)/z i 1 0
e1/z cos(1/z) = e + e(1−i)/z = 1 + + 2 + · · · ,
2 z z
we have an essential singularity and the residue equals one. Then
I
e1/z cos(1/z) dz = 2πi.
|z|=1
8. I
2 + 4 cos(πz) 2 + 4 cos(πz)
dz = 2πi Res ;0
|z|=2 z(z − 1)2 z(z − 1)2
2 + 4 cos(πz)
+ Res ; 1 = 16πi
z(z − 1)2
because
2 + 4 cos(πz) 2 + 4 cos(πz)
Res 2
; 0 = lim z =6
z(z − 1) z→0 z(z − 1)2
and
2 + 4 cos(πz) d 2 2 + 4 cos(πz)
Res ; 1 = lim (z − 1) = 2.
z(z − 1)2 z→1 dz z(z − 1)2
Section 10.9
1. Z ∞ Z ∞ I
dx 1 dx 1 dz
= = ,
0 x4 + 1 2 −∞ x4 + 1 2 C z4 + 1
Worked Solutions 329
2. Z ∞ I
dx dz
= ,
−∞ (x + 4x + 5)2
2
C (z 2 + 4z + 5)2
where C denotes a semicircle of infinite radius in the upper half-plane. This
contour encloses a second-order pole at z = −2 + i. Therefore,
I
dz 1
2 2
= 2πi Res ; −2 + i
C (z + 4z + 5) (z 2 + 4z + 5)2
d (z + 2 − i)2
= 2πi lim
z→−2+i dz (z + 2 − i)2 (z + 2 + i)2
−2 π
= 2πi lim 3
= .
z=−2+i (z + 2 + i) 2
3. Z ∞ I
x dx z dz
= ,
−∞ (x2 + 1)(x2 + 2x + 2) C (z 2 + 1)(z 2 + 2z + 2)
where C denotes a semicircle of infinite radius in the upper half-plane. This
contour encloses simple poles at z = i and z = −1 + i. Therefore,
I
z dz z
2 2
= 2πi Res ;i
C (z + 1)(z + 2z + 2) (z 2 + 1)(z 2 + 2z + 2)
z
+ 2πi Res ; −1 + i
(z 2 + 1)(z 2 + 2z + 2)
(z − i)z
= 2πi lim
z→i (z − i)(z + i)(z 2 + 2z + 2)
(z + 1 − i)z
+ 2πi lim
z→−1+i (z 2 + 1)(z + 1 − i)(z + 1 + i)
i −1 + i π
= 2πi + =− .
(2i)(1 + 2i) (2i)(1 − 2i) 5
330 Advanced Engineering Mathematics with MATLAB
4.
Z ∞ Z ∞ I
x2 dx 1 x2 dx 1 z 2 dz
6
= 6
= ,
0 x +1 2 −∞ x +1 2 C z6 + 1
5. Z Z I
∞ ∞
dx 1 dx 1 dz
2 2
= 2 2
= ,
0 (x + 1) 2 −∞ (x + 1) 2 C (z 2 + 1)2
6.
Z ∞ Z ∞ I
dx 1 dx 1 dz
2 2 2
= 2 2 2
= ,
0 (x + 1)(x + 4) 2 −∞ (x + 1)(x + 4) 2 C (z 2 + 1)(z 2 + 4)2
Therefore,
I
dz 1
2 2 2
= 2πi Res ; i
C (z + 1)(z + 4) (z 2 + 1)(z 2 + 4)2
1
+ 2πi Res ; 2i
(z 2 + 1)(z 2 + 4)2
z−i
= 2πi lim
z→i (z + i)(z − i)(z 2 + 4)2
d (z − 2i)2
+ 2πi lim
z→2i dz (z 2 + 1)(z − 2i)2 (z + 2i)2
7. Z ∞ I
x2 z2
2 2 2 2 2
dx = 2 2 2 2 2
dz,
−∞ (x + a )(x + b ) C (z + a )(z + b )
where C denotes a semicircle of infinite radius in the upper half-plane. This
contour encloses a simple pole at z = ai and a second-order pole at z = bi.
Therefore,
I
z2 z2
2 2 2 2 2
dz = 2πi Res ; ai
C (z + a )(z + b ) (z 2 + a2 )(z 2 + b2 )2
z2
+ 2πi Res ; bi .
(z 2 + a2 )(z 2 + b2 )2
At z = ai,
z2 (z − ai) z2
Res ; ai = lim lim
(z 2 + a2 )(z 2 + b2 )2 z→ai (z − ai)(z + ai) z→ai (z 2 + b2 )2
ai
= .
2(a2 − b2 )2
At z = bi,
z2 d z2
Res ; bi = lim
(z 2 + a2 )(z 2 + b2 )2 z→bi dz (z 2 + a2 )(z + bi)2
i bi i
=− − + .
2b(a2 − b2 ) 2(a2 − b2 )2 4b(a2 − b2 )
Therefore,
Z ∞
x2 ai i
2 + a2 )(x2 + b2 )2
dx = 2πi 2 − b2 ) 2
− 2 − b2 )
−∞ (x 2(a 2b(a
bi i
− +
2(a2 − b2 )2 4b(a2 − b2 )
π
= .
2b(a + b)2
332 Advanced Engineering Mathematics with MATLAB
8. Z ∞
t2
dt
0 (t2 + 1)[t2 (a/h+ 1) + (a/h − 1)]
Z
1 ∞ t2
= 2 2
dt
2 −∞ (t + 1)[t (a/h + 1) + (a/h − 1)]
I
1 z2
= dz
2(1 + a/h) C (z + 1)(z 2 + b2 )
2
(z − bi)z 2
+ 2πi lim 2
z→bi (z + 1)(z − bi)(z + bi)
−1 −b2 π(1 − b)
= 2πi 2
+ 2πi 2
=
(2i)(b − 1) (2bi)(1 − b ) 1 − b2
and
I s !
z2 π 1 − h/a
dz = 1− .
C (z + 1)(z 2 + b2 )
2 1 − [(1 − h/a)/(1 + h/a)] 1 + h/a
and
z (z − z2 )z 1
Res ; z 2 = lim ; z1 = − √ .
(z 2 − 1)2 − 4az 2 z→z2 (z 2 − 1)2 − 4az 2 8 a + a2
Employing the residue theorem and substituting into the top line, we have
that Z π/2
dθ π
2 = √ .
0 a + sin (θ) 2 a + a2
10. We begin by converting the real integral into a closed contour integration:
Z π/2 Z 2π
dθ 1 dθ
2 =
0
2 2 2
a cos (θ) + b sin (θ) 4 0 a2 + b2 sin2 (θ)
cos2 (θ)
I
z
= −i dz,
|z|=1 a (z + 1) − b2 (z 2 − 1)2
2 2 2
2 b+a 2 b−a
z+ = , and z− = .
b−a b+a
Only two are located inside the contour:
r r
(1) b−a (2) b−a
z− = , and z− = − .
b+a b+a
The corresponding residues are
(1)
z (1) z(z − z− )
Res ; z = lim
a2 (z 2 + 1)2 − b2 (z 2 − 1)2 − 2 2 2 2 2
z→z− a (z + 1) − b (z − 1)
(1) 2
1
= lim
(1)
z→z− 4a2 (z 2 + 1) − 4b2 (z 2 − 1)
1
= ,
8ab
and
(2)
z (2) z(z − z− )
Res ; z − = lim
a2 (z 2 + 1)2 − b2 (z 2 − 1)2 2 2 2 2 2
z→z− a (z + 1) − b (z − 1)
(2) 2
1
= lim
(2)
z→z− 4a2 (z 2 + 1) − 4b2 (z 2 − 1)
1
= .
8ab
334 Advanced Engineering Mathematics with MATLAB
Employing the residue theorem and substituting into the top line, we have
that Z π/2
dθ π
2 cos2 (θ) + b2 sin2 (θ)
= .
0 a 2ab
11. We begin by converting the real integral into a closed contour integration:
Z π Z
sin2 (θ) 1 2π sin2 (θ)
dθ = dθ
0 a + b cos(θ) 2 0 a + b cos(θ)
I
i (z 2 − 1)2
= dz,
4 |z|=1 [b(z 2 + 1) + 2az]z 2
and
(z 2 − 1)2 (z − z1 )(z 2 − 1)2
Res 2 2
; z 1 = lim
[b(z + 1) + 2az]z z→z1 [b(z 2 + 1) + 2az]z 2
(z 2 − 1)2 1
= lim lim
z→z1 z2 z→z1 2a + 2bz
√
2 a 2 − b2
= .
b2
Employing the residue theorem and substituting into the top line, we have
that Z π
sin2 (θ) π p
dθ = 2 a − a2 − b2 .
0 a + b cos(θ) b
12. We begin by converting the real integral into a closed contour integration:
Z 2π I
einθ zn
dθ = −i dz,
0 1 + 2r cos(θ) + r2 |z|=1 r(z 2 + 1) + (1 + r2 )z
where z = eθi . The integrand has two simple poles: z+ = −r, and z− = −1/r;
only the z+ pole lies inside the contour since |r| < 1. The corresponding
residue is
zn n z − z+ (−r)n
Res ; z + = lim z = .
r(z 2 + 1) + (1 + r2 )z z→z+ r(z 2 + 1) + (1 + r2 )z 1 − r2
Worked Solutions 335
Employing the residue theorem and substituting into the top line, we have
that Z 2π
einθ (−r)n
dθ = 2π .
0 1 + 2r cos(θ) + r2 1 − r2
13. We begin by converting the real integral into a closed contour integration:
Z 2π I
−i (z 2 − 1)2n
sin2n (θ) dθ = n 2n
dz,
0 (−1) 2 |z|=1 z 2n+1
(2n)!(−1)n 2n
(z 2 − 1)2n = z 4n − 2nz 4n−1 + · · · + z + ···.
n!n!
Therefore
(z 2 − 1)2n (2n)!(−1)n
Res ; 0 = .
z 2n+1 n!n!
Using the residue theorem and substituting into the top line,
Z 2π
2π(2n)!
sin2n (θ) dθ = n 2 .
0 (2 n!)
14. We begin by converting the real integral into a closed contour integration:
Z π Z π I
cos(nθ) einθ + e−inθ 1 z n + z −n
dθ = iθ −iθ + 2α
dθ = dz,
−π cos(θ) + α −π e + e i |z|=1z 2 + 2αz + 1
where z = eθi . √ The integrand has a n-order pole at z = 0 and √ simple poles
at z1,2 = −α ± α2 − 1. Since α > 1, only the root z1 = −α + α2 − 1 lies
inside the contour.
To facilitate the calculation of the residues, we note that
n
z n + z −n 1 z + z −n z n + z −n
= √ − .
z 2 + 2αz + 1 2 α2 − 1 z − z1 z − z2
Therefore,
z n + z −n 1
Res ;0 = − n.
z − z1 z1
Similarly, n
z + z −n 1
Res ; 0 = − n = −z1n .
z − z2 z2
Bringing everything together, we find that
Z π 2n
cos(nθ) 2πi 1 z1 + 1 1 n 2πz1n
dθ = √ − + z 1 = √ .
−π cos(θ) + α i 2 α2 − 1 z1n z1n α2 − 1
15. We begin by converting the real integral into a closed contour integration:
Z π Z
cos(nθ) 1 π cos(nθ)
dθ = − dθ
0 cosh(α) − cos(θ) 2 −π cos(θ) − cosh(α)
I
1 z n + z −n
=− 2
dz,
i |z|=1 z − 2z cosh(α) + 1
where z = eθi . The integrand has a n-order pole at z = 0 and simple poles at
z1,2 = eα , e−α . Because α can be taken as positive without loss of generality,
then only the poles located at z = 0 and z = e−α lie within the closed contour.
Because
n
z n + z −n 1 z + z −n z n + z −n
= − ,
z 2 − 2z cosh(α) + 1 2 sinh(α) z − eα z − eα
Therefore, I
1 z n + z −n 2πe−nα
dz = − .
i |z|=1 z 2 − 2z cosh(α) + 1 sinh(α)
Worked Solutions 337
Substitution of this result into the top line gives the final result.
16. As before,
Z ∞ Z ∞
x2 1 x2
dx = 2 dx
0 (1 − x2 )2 + a2 x2 −∞ (1 − x2 )2 + a2 x2
I
1 z2
= 2 dz,
C (1 − z 2 )2 + a2 z 2
where C denotes a semicircle of infinite radius in the upper half of the complex
plane. Now we must find the poles of the integrand. Solving (1−z 2 )2 +a2 z 2 =
0 for z 2 , we find that
√ √ 2
z 2 = 12 2 − a2 ± |a| a2 − 4 = − 14 |a| ± a2 − 4 .
Taking the square root of z 2 , gives the poles listed in the text. In general, the
residue for each simple poles zn is
z
Res[f (z); zn ] = lim .
z→zn 2a2 − 4(1 − z 2 )
Because we only need the poles in the upper half-plane, the simple poles are
1 √
2 ± 4 − a2 + |a|i , if 0 < |a| < 2,
zn = √
i
2 |a| ± a2 − 4 , if 2 < |a|.
If |a| = 2, we have second-order poles at zn = i. Upon substituting into the
residue formula, we have that
√
1
√ (± 4 − a2 + |a|i)/2
2
Res f (z); 2 ± 4 − a + |a|i = ± √ ,
2|a|i 4 − a2
√
√ i(|a| ± a2 − 4 )/2
Res f (z); 2i |a| ± a2 − 4 = ∓ √ ,
2|a| a2 − 4
and
d z2 i
Res [f (z); i ] = lim =− .
z→i dz (z + i)2 4
When we sum the residues for the cases 0 < |a| < 2 and 2 < |a|, we find
−i/2|a|. Multiplying the residues by 2πi, we obtain the final result. The
special case for |a| = 2 is handled in the same manner.
17. We begin by evaluating eiaz / cosh2 (bz) around the closed contour:
I Z Z
eiaz eiaz eiaz
2 dz = 2 dz + 2 dz
C cosh (bz) C1 cosh (bz) C2 cosh (bz)
Z Z
eiaz eiaz
+ 2 dz + 2 dz
C3 cosh (bz) C4 cosh (bz)
338 Advanced Engineering Mathematics with MATLAB
and Z Z ∞
eiaz eiax
dz = −e−πa/b dx,
C3 cosh2 (bz) −∞ cosh2 (bx)
because cosh(x + πi) = − cosh(x).
Within the closed contour C, we have a second order pole at zs = πi/(2b)
because the Laurent expansion of eiaz / cosh2 (bz) is
Therefore, Z ∞
−πa/b eiax 2πae−πa/(2b)
(1 − e ) 2 dx =
−∞ cosh (bx) b2
and
Z ∞
cos(ax) 2πae−πa/(2b)
2 dx =
0 cosh2 (bx) b2 (1 − e−πa/b )
Z ∞
cos(ax) πa πa
2 dx = 2 πa/(2b) −πa/(2b)
= 2 .
0 cosh (bx) b [e −e ] 2b sinh[πa/(2b)]
18. Let
z
f (z) = .
cosh(z) cosh(z + a)
If a 6= 0, we have two simple poles, z1 = πi/2 and z2 = −a + πi/2, within the
closed contour. Therefore,
I
f (z) dz = 2πi Res[f (z); z1 ] + 2πi Res[f (z); z2 ].
C
z z − z1 πi
Res[f (z); z1 ] = lim lim =− ,
z→z1 cosh(z + a) z→z1 cosh(z) 2 sinh(a)
and
z z − z2 πi 1
Res[f (z); z2 ] = lim lim = −a .
z→z2 cosh(z) z→z2 cosh(z + a) 2 sinh(a)
Worked Solutions 339
and Z
f (z) dz → 0 as x → −∞,
C4
while along the contour C3 , which runs parallel to the real axis but π units
above it,
Z Z −∞
x + πi
f (z) dz = dx
C3 ∞ cosh(x + πi) cosh(x + a + πi)
Z ∞
x + πi
=− dx.
−∞ cosh(x) cosh(x + a)
340 Advanced Engineering Mathematics with MATLAB
and
sinh(xz) sinh(xz) z − zn
Res ; zn = lim lim
cosh(πz) (z − σ) z→zn z − σ z→zn cosh(πz)
sin n + 21 x
=
−σ ± i n + 21 π sin n + 21 π
(−1)n sin n + 12 x
= .
−σ ± i n + 21 π
In the limit of |z| → ∞, the fraction goes to zero uniformly as long as |x| < π.
Therefore, by Equation 10.9.7 the contour integral vanishes.
∞ ∞
X (−1)n sin n + 21 x X (−1)n sin n + 21 x
= 2σ 2
n=−∞
σ − i n + 21 n=0 σ 2 + n + 12
∞
X cos n + 21 (x − π)
= 2σ 2
n=0 σ 2 + n + 12
because cos n + 21 (x − π) = (−1)n sin n + 12 x . Equating this sum
with π sinh(σx)/ cosh(σπ) finishes the problem.
Worked Solutions 341
Section 10.10
1. Z Z
π θ−ǫ
dϕ dϕ
PV = lim
0 cos(ϕ) − cos(θ) ǫ→0 cos(ϕ) − cos(θ)
Z 0π
dϕ
+ lim
ǫ→0 θ+ǫ cos(ϕ) − cos(θ)
1 sin(θ − ǫ/2)
= lim ln = 0.
sin(θ) ǫ→0 sin(θ + ǫ/2)
where the closed contour C consists of the real axis from −R to R and a
semicircle in the upper half of the z-plane where this segment is its diameter.
See Figure 1.10.1. Because the integrand has poles at z = ±1, which lie on
this contour, we modify C by making an indentation of radius η at −1 and
another of radius ǫ at 1. The integrand is now analytic within and on C
and the closed contour integral equals zero by the Cauchy-Goursat theorem.
Evaluation of this contour integral along each segment yields
Z π iπR cos(θ)/2−Rπ sin(θ)/2 Z
e θi eiπz/2
lim iRe dθ + dz
R→∞ 0 R2 e2θi − 1 2
C1 z − 1
Z Z −1−η iπx/2
eiπz/2 e
+ 2−1
dz + lim 2−1
dx
C2 z η→0 −R x
Z 1−ǫ iπx/2 Z R iπx/2
e e
+ lim dx + lim dx = 0,
ǫ,η→0 −1+η x2 − 1 ǫ→0 1+ǫ x2 − 1
Similarly,
Z Z 0
eiπz/2 exp iπ(1 + ǫeθi )/2
dz = lim iǫeθi dθ
C2 z2 − 1 ǫ→0 π 2ǫe θi + ǫ2 e2θi
Z π
exp iπ(1 + ǫeθi )/2 π
= lim dθ = .
ǫ→0 0 −2 − ǫeθi 2
Substituting these results into the second equation, we find that
Z ∞ iπx/2
e
PV 2−1
dx = −π.
−∞ x
1 − e2ia(z+ζ)
f (z) = .
(z + ζ)2 (z 2 + α2 )
Now,
and
d 1 − e2ia(z+ζ) 2ia
Res[f (z); −ζ] = lim =− 2 .
z→−ζ dz z 2 + α2 ζ + α2
Substituting into the integral and taking the real part completes the problem.
because the interior of the contour is analytic. Here C∞ denotes the semi-
circular contour of infinite radius and Cǫ is the semicircular indentation at
z = a. Taking the limit of R → ∞ and ǫ → 0,
Z ∞ imx imz
e e
PV dx = πi Res ; a = πieima .
−∞ x − a z−a
Taking the real and imaginary parts of the equation, we obtain the final
answer.
because the interior of the contour is analytic. Here C∞ denotes the semicir-
cular contour of infinite radius and Cǫ1 and Cǫ2 are semicircular indentations
at z = −π and z = π. Taking the limit of R → ∞ and ǫ → 0,
Z ∞
xeix z eiz z eiz
PV 2 2
dx = πi Res 2 ; −π + πi Res 2 ;π
−∞ x − π z − π2 z − π2
= 12 πie−πi + 12 πieπi = −πi
because the interior of the contour is analytic. Here C∞ denotes the semicir-
cular contour of infinite radius and Cǫ1 and Cǫ2 are semicircular indentations
at z = 1 and z = 3. Taking the limit of R → ∞ and ǫ → 0,
Z ∞
eimx eimz
PV dx = πi Res ;1
−∞ (x − 1)(x − 3) (z − 1)(z − 3)
eimz
+ πi Res ;3
(z − 1)(z − 3)
πi 3mi
= − 12 πiemi + 12 πie3mi = e − emi .
2
7. We only have to show that the integral of eiz /z along the sides and top
tends to zero. The integral along the real axis is the same for the square and
semicircle closed contours. Considering the left side first,
Z −R+Ri Z R Z R
eiz e−y 1 1
dz ≤ p dy < e−y dy = 1 − e−R ,
−R z 0 R2 + y 2 R 0 R
Worked Solutions 345
If α >
√1, there is a single singularity within the contours and it is located at
z = i α2 − 1 − αi. Therefore,
2πi π
G(α) = √ =√ .
2
2 α − 1 − 2iα + 2iα 2
α −1
Finally, if α < −1,
√ there is a single singularity within the contours and it is
located at z = −i α2 − 1 − αi. Therefore,
2πi π
G(α) = √ = −√ .
−2 α2 − 1 − 2iα + 2iα α2 − 1
346 Advanced Engineering Mathematics with MATLAB
Res[f (z); c]
f (z) = + a0 + a1 (z − c) + · · · .
z−c
Section 10.11
dz
= C ′ τ −1/2 ,
dτ
dz
= C ′ τ π/(3π)−1 ,
dτ
z = Cτ 1/3 , or τ = Az 3 .
Worked Solutions 347
dz
= C ′ τ 7π/(4π)−1 ,
dτ
because α1 = 7π/4 and k1 = α1 − 1. Integrating this differential equation,
Z τ
z = C′ η 3/4 dη = Cτ 7/4 + K.
dz
= C(τ + 1)−1/2 (τ − 1)−1/2 ,
dτ
because α1 = α2 = π/2 and kn = αn −1. Integrating this differential equation,
Z τ p
dη
z=C p + K = C log τ + τ 2 − 1 + K.
η2 − 1
2ai p p
z−a= log τ + τ 2 − 1 , −π/2 ≤ arg τ + τ 2 − 1 < 3π/2.
π
Solving for τ ,
πi p
τ − exp − (z − a) = − τ 2 − 1.
2a
Squaring both sides and solving for τ ,
πz πz
τ = sin , or = arcsin(τ ).
2a 2a
dz
= C(τ + 1)−1/2 (τ − 1)−1/2 ,
dτ
because α1 = α2 = π/2 and kn = αn −1. Integrating this differential equation,
Z τ
dη
z=C p + K = C cosh−1 (τ ) + K.
η2 − 1
348 Advanced Engineering Mathematics with MATLAB
Because (0, a) → (−1, 0) and (0, 0) → (1, 0), C = a/π and K = 0. Therefore,
a
z= cosh−1 (τ ), 0 ≤ ℑ cosh−1 (τ ) ≤ π.
π
Therefore,
If θ = 0,
ρ = rπ/α cos(0) > 0, σ = rπ/α sin(0) = 0.
If θ = α,
ρ = rπ/α cos(π) < 0, σ = rπ/α sin(π) = 0.
Using the Fourier method from Section 11.7,
Z
1 1 σ 1 −1 1 − ρ −1 1 + ρ
u(ρ, σ) = dt = tan + tan
π 0 (t − ρ)2 + σ 2 π σ σ
2 2
1 ρ +σ −ρ
= cot−1 .
π σ
Therefore,
For Step 4, we note that 1 − u(x, y) satisfies both Laplace’s equation and the
boundary condition.
Section 11.1
1.
Z 0 Z ∞
1 1 2a
F (ω) = e(a−ωi)t dt + e−(a+ωi)t dt = + = 2 .
−∞ 0 a − ωi a + ωi ω + a2
2. Z Z
0 ∞
(a−ωi)t
F (ω) = te dt + te−(a+ωi)t dt
−∞ 0
1 1 4aωi
=− + =− 2 .
(a − ωi)2 (a + ωi)2 (ω + a2 )2
3.
Z ∞ Z ∞
r
2 2 π ω2
F (ω) = e−at e−iωt dt = 2 e−at cos(ωt) dt = exp − .
−∞ 0 a 4a
4. Z Z
0 ∞
F (ω) = e(2−ωi)t dt + e−(1+ωi)t dt
−∞ 0
0 ∞
e(2−ωi)t e−(1+ωi)t 3
= − = .
2 − ωi −∞ 1 + ωi 0 (2 − iω)(1 + iω)
Worked Solutions 351
5.
Z ∞ Z 0
−(1+i+iω)t
F (ω) = e dt − e(1−i−iω)t dt
0 −∞
1 1 2i(ω + 1)
= − =− .
1 + (ω + 1)i 1 − (ω + 1)i (ω + 1)2 + 1
6.
Z 1 Z 1 h i
1
F (ω) = cos(at)e−iωt dt = ei(a−ω)t + e−i(a+ω)t dt
−1 2 −1
ei(a−ω) − e−i(a−ω) ei(a+ω) − e−i(a+ω)
= +
2i(a − ω) 2i(a + ω)
sin(ω − a) sin(ω + a)
= +
ω−a ω+a
7.
Z
1 1 i(1−ω)t
F (ω) = e − e−i(1+ω)t dt
2i 0
1 1 − cos(ω − 1) + i sin(ω − 1) cos(ω + 1) − i sin(ω + 1) − 1
=− +
2 ω−1 ω+1
1 1 − cos(ω − 1) cos(ω + 1) − 1 i sin(ω − 1) sin(ω + 1)
=− + − −
2 ω−1 ω+1 2 ω−1 ω+1
8.
Z a a
t −iωt e−iωt
F (ω) = e dt = (1 + iωt)
−a a aω 2 −a
(1 + iωa)e−iωa (1 − iωa)eiωa 2i cos(ωa) 2i sin(ωa)
= 2
− 2
= −
aω aω ω aω 2
9.
Z a 2 a
t e−iωt
F (ω) = e−iωt dt = 2 3 (2 + 2iωt − ω 2 t2 )
−a a ia ω −a
e−iωa eiωa
= 2 3 (2 + 2iωa − ω 2 a2 ) − 2 3 (2 − 2iωa − ω 2 a2 )
ia ω ia ω
4 cos(ωa) 2 sin(ωa) 4 sin(ωa)
= + −
aω 2 ω a2 ω 3
352 Advanced Engineering Mathematics with MATLAB
10.
Z 2τ 2τ 2τ
e−iωt e−iωt
F (ω) = (1 − t/τ ) e−iωt dt = − + (−iωt − 1)
0 iω 0 ω2 τ 0
1 −2iωτ e−2iωτ 1
=− e −1 − 2
(2iωτ + 1) + 2
ωi ω τ ω τ
1 e−2iωτ 1 − e−2iωτ 2e−iωτ sin(ωτ )
= + + = cos(ωτ ) −
ωi ωi ω2 τ ωi ωτ
11. "
Z a 2 #
t
F (ω) = 1− e−iωt dt
−a a
a
e−iωt 4 cos(ωa) 2 sin(ωa) 4 sin(ωa)
= − − +
−iω −a aω 2 ω a2 ω 3
4 sin(ωa) 4 cos(ωa)
= −
a2 ω 3 aω 2
12. Z Z
∞ 0
e−iωt e−iωt
F (ω) = dt + dt
0 (t + a2 )ν+1/2
2
−∞ (t2 + a2 )ν+1/2
Z ∞ Z ∞
e−iωt eiωt
= dt + dt
0 (t + a2 )ν+1/2
2
0 (t2
+ a2 )ν+1/2
Z
∞
cos(ωt) 2|ω|ν Γ 21 Kν (a|ω| )
=2 dt = .
0 (t2 + a2 )ν+1/2 Γ ν + 12 (2a)ν
14.
Z b Z b Z b
′ b
τ δ(τ − t) dτ = τ H (τ − t) dτ = τ H(τ − t)|a − H(τ − t) dτ.
a a a
If t < a,
Z b
τ δ(τ − t) dτ = b − a − (b − a) = 0.
a
Worked Solutions 353
If a < t < b,
Z b
τ δ(τ − t) dτ = b − (b − t) = t.
a
Finally, if b < t,
Z b
τ δ(τ − t) dτ = 0 − 0 = 0.
a
We may express the final solution in terms of Heavisides as given in the text.
and
Z ∞ Z ∞
F (−ω) = f (t) cos(ωt) dt − i f (t) sin(ωt) dt = P (ω) − iQ(ω).
−∞ −∞
Therefore, p
|F (ω)| = P 2 (ω) + Q2 (ω) = |F (−ω)|.
On the other hand, if F (ω) = |F (ω)|eiΦ(ω) ,
Section 11.2
1.
Z Z
1 ∞ 1 ∞
F (ω) = H(t)e−i(ω−ω0 )t dt − H(t)e−i(ω+ω0 )t dt
2i −∞ 2i −∞
1 1 ′ 1 1 ′
= + πδ(ω ) − + πδ(ω )
2i iω ′ ω ′ =ω−ω0 2i iω ′ ω ′ =ω+ω0
ω0 πi
= 2 + [δ(ω + ω0 ) − δ(ω − ω0 )].
ω0 − ω 2 2
2.
Z Z
1 ∞ 1 ∞
F (ω) = H(t)e−i(ω−ω0 )t dt + H(t)e−i(ω+ω0 )t dt
2 −∞ 2 −∞
1 1 ′ 1 1 ′
= + πδ(ω ) + + πδ(ω )
2 iω ′ ω ′ =ω−ω0 2 iω ′ ω ′ =ω+ω0
iω π
= 2 + [δ(ω + ω0 ) + δ(ω − ω0 )].
ω0 − ω 2 2
354 Advanced Engineering Mathematics with MATLAB
4.
Z 0
F[sgn(t) sin(ω0 t)] = lim − eǫt sin(ω0 t)e−iωt dt
ǫ→0 −∞
Z ∞
+ e−ǫt sin(ω0 t)e−iωt dt
0
0 0
1 eǫt+iω0 t−iωt 1 eǫt−iω0 t−iωt
= lim − +
ǫ→0 2i ǫ + iω0 − iω −∞ 2i ǫ − iω0 − iω −∞
−ǫt+iω0 t−iωt ∞ −ǫt−iω0 t−iωt ∞
1 e 1 e
+ −
2i −ǫ + iω0 − iω 0 2i −ǫ − iω0 − iω 0
1 i i i i
= + + +
2i ω0 − ω ω0 + ω ω0 − ω ω0 + ω
1 1 2ω0
= + = 2
ω0 − ω ω0 + ω ω0 − ω 2
Z 0
F[sgn(t) cos(ω0 t)] = lim − eǫt cos(ω0 t)e−iωt dt
ǫ→0 −∞
Z ∞
−ǫt −iωt
+ e cos(ω0 t)e dt
0
0 0
1 eǫt+iω0 t−iωt 1 eǫt−iω0 t−iωt
= lim − −
ǫ→0 2 ǫ + iω0 − iω −∞ 2 ǫ − iω0 − iω −∞
∞ ∞
1 e−ǫt+iω0 t−iωt 1 e−ǫt−iω0 t−iωt
+ −
2 −ǫ + iω0 − iω 0 2 −ǫ − iω0 − iω 0
−i i 2ωi
= + = 2
ω0 − ω ω0 + ω ω0 − ω 2
Section 11.3
2. Because
cos(at) eiat e−iat
= + ,
1 + t2 2(1 + t2 ) 2(1 + t2 )
we have that
cos(at) π −|ω−a| −|ω+a|
F = e + e .
1 + t2 2
after a little algebra. Solving for the integral gives the final result.
6.
F[e−bt sin(at)H(t)] = 1
2i F eiat e−bt − e−iat e−bt
1 1 1
= −
2i b + iω ′ ω′ =ω−a b + iω ′ ω′ =ω+a
1 1 1
= −
2i (b + iω) − ai (b + iω) + ai
a
=
(b + iω)2 + a2
Therefore,
∞
X 2
∞
X h i
2
exp −a(n + c)2 + 2b(n + c) = e−b /a exp −a (n + c − b/a) .
n=−∞ n=−∞
9. Using the fact that F[δ(t − a)] = e−iaω , direct substitution into the sum-
mation formula leads to the result with α = 2π/T .
or
∞
X ∞
X ∞
X ∞
X
g(0, 0) = f (2πk1 , 2πk2 ) = cn1 n2 .
k1 =−∞ k2 =−∞ n1 =−∞ n2 =−∞
× e−in1 x e−in2 y dx dy
∞Z Z
∞
1
= f (x, y) e−in1 x e−in2 y dx dy
4π 2 −∞ −∞
F (n1 , n2 )
= ,
4π 2
where F (ω1 , ω2 ) is the (double) Fourier transform of f (x, y). Substituting for
cn1 n2 in the equation for g(0, 0), we obtain
∞
X ∞
X ∞
X ∞
X
1
f (2πk1 , 2πk2 ) = F (n1 , n2 )
4π 2 n1 =−∞ n2 =−∞
k1 =−∞ k2 =−∞
or
∞
X ∞
X ∞
X ∞
X
1 2πn1 2πn2
f (α1 k1 , α2 k2 ) = F , .
α1 α2 n1 =−∞ n2 =−∞
α1 α2
k1 =−∞ k2 =−∞
358 Advanced Engineering Mathematics with MATLAB
Section 11.4
1. Z Z
0 ∞
iωπ −|ω| i i
F −1 e = ωeω eiωt dω + ωe−ω eiωt dω
2 4 −∞ 4 0
0
ie(1+it)ω
= [(1 + it)ω − 1]
4(1 + it)2 −∞
−(1−it)ω ∞
ie t
+ [−(1 − it)ω − 1] =−
4(1 − it)2 0 (1 + t2 )2
2.
1 2 1 1 1
= − = 1 −
(1 + iω)(1 + 2iω) 1 + 2iω 1 + iω 2 + iω 1 + iω
Taking the inverse term by term,
3.
1 1 1
= +
(1 + iω)(1 − iω) 2(1 + iω) 2(1 − iω)
Taking the inverse term by term,
4.
iω 1 1 1 1
= − = −
(1 + iω)(1 + 2iω) 1 + iω 1 + 2iω 1 + iω 2( 12 + iω)
Taking the inverse term by term,
5.
1 1 2 2
= − +
(1 + iω)(1 + 2iω)2 1 + iω 1 + 2iω (1 + 2iω)2
1 1 1
= − 1 + 1
1 + iω 2 + iω 2( 2 + iω)2
Taking the inverse term by term,
The poles are located at z = ±ai. For t < 0, we take the pole in the lower
half-plane and
izt
1 e (z + ai)eitz eat
f (t) = −2πi Res 2 2
; −ai = −i lim = .
2π z +a z→−ia (z + ai)(z − ai) 2a
The negative sign comes from taking the contour in the negative sense. For
t > 0, we use the pole z = ai and
izt
1 e (z − ai)eitz e−at
f (t) = 2πi Res 2 2
; ai = i lim = .
2π z +a z→ia (z + ai)(z − ai) 2a
e−a|t|
f (t) = .
2a
The poles are located at z = ±ai. For t < 0, we take the pole in the lower
half-plane and
1 zeizt
f (t) = −2πi Res ; −ai
2π z 2 + a2
(z + ai)zeitz −ieat
= −i lim = .
z→−ia (z + ai)(z − ai) 2
The negative sign comes from taking the contour in the negative sense. For
t > 0, we use the pole z = ai and
1 zeizt (z − ai)zeitz ie−at
f (t) = 2πi Res 2 2
; ai = i lim = .
2π z +a z→ia (z + ai)(z − ai) 2
The poles are located at z = ±ai and are second order. For t < 0, we take
the pole in the lower half-plane and
1 zeizt
f (t) = −2πi Res ; −ai
2π (z 2 + a2 )2
d (z + ai)2 zeitz
= −i lim
z→−ia dz (z + ai)2 (z − ai)2
eitz itzeitz 2zeitz
= −i lim + −
z→−ia (z − ai)2 (z − ai)2 (z − ai)3
at
e teat eat iteat
= −i − 2 − + 2 = .
4a 4a 4a 4a
The negative sign comes from taking the contour in the negative sense. For
t > 0, we use the pole z = ai and
1 zeizt d (z − ai)2 zeitz
f (t) = 2πi Res ; ai = i lim
2π (z 2 + a2 )2 z→ia dz (z + ai)2 (z − ai)2
eitz itzeitz 2zeitz
= i lim + −
z→−ia (z + ai)2 (z + ai)2 (z + ai)3
−at
e te−at e−at ite−at
=i − 2 + + 2
= .
4a 4a 4a 4a
Therefore, the total answer, using the absolute value sign, is
it −a|t|
f (t) = e .
4a
9. The inversion formula is
Z ∞
1 ω 2 eiωt
f (t) = dω.
2π −∞ (ω 2 + a2 )2
The poles are located at z = ±ai and are second order. For t < 0, we take
the pole in the lower half-plane and
1 z 2 eizt
f (t) = −2πi Res ; −ai
2π (z 2 + a2 )2
d (z + ai)2 z 2 eitz
= −i lim
z→−ia dz (z + ai)2 (z − ai)2
2zeitz itz 2 eitz 2z 2 eitz
= −i lim + −
z→−ia (z − ai)2 (z − ai)2 (z − ai)3
eat teat eat ateat eat
= + − = + .
2a 4 4a 4a 4a
Worked Solutions 361
The negative sign comes from taking the contour in the negative sense. For
t > 0, we use the pole z = ai and
1 z 2 eizt d (z − ai)2 z 2 eitz
f (t) = 2πi Res ; ai = i lim
2π (z 2 + a2 )2 z→ia dz (z + ai)2 (z − ai)2
2zeitz itz 2 eitz 2z 2 eitz
= i lim + −
z→ia (z + ai)2 (z + ai)2 (z + ai)3
e−at te−at e−at e−at ate−at
= − − = − .
2a 4 4a 4a 4a
Therefore, the total answer, using the absolute value sign, is
1
f (t) = (1 − a|t|)e−a|t| .
4a
and
p
z 2 eizt 2
Res ; − 1 − a + ai
(z 2 − 1)2 + 4a2 z 2
√
(z + 1 − a2 − ai)z 2 eizt
= √lim
z→− 1−a2 +ai (z 2 − 1)2 + 4a2 z 2
zeizt
= √lim
z→− 1−a2 +ai 4(z 2 − 1) + 8a2
√
−it 1−a2 −at
e e p
= √ (− 1 − a2 + ia).
−8ia 1 − a2
Worked Solutions 363
e−at p e−at p
= cos t 1 − a2 − √ sin t 1 − a2 .
4a 4 1 − a2
Similarly, for the lower half-plane,
p
z 2 eizt 2
Res ; 1 − a − ai
(z 2 − 1)2 + 4a2 z 2
√
(z − 1 − a2 + ai)z 2 eizt
= √lim
z→ 1−a2 −ai (z 2 − 1)2 + 4a2 z 2
zeizt
= √lim
z→ 1−a2 −ai 4(z 2 − 1) + 8a2
√
eit 1−a2 at
e p
= √ ( 1 − a2 − ia)
−8ia 1 − a2
and
p
z 2 eizt 2
Res ; − 1 − a − ai
(z 2 − 1)2 + 4a2 z 2
√
(z + 1 − a2 + ai)z 2 eizt
= √lim
z→− 1−a2 −ai (z 2 − 1)2 + 4a2 z 2
zeizt
= √lim
z→− 1−a2 −ai 4(z 2 − 1) + 8a2
√
e −it 1−a2 at
e p
= √ (− 1 − a2 − ia).
8ia 1 − a 2
eat p eat p
= cos t 1 − a2 + √ sin t 1 − a2 .
4a 4 1 − a2
364 Advanced Engineering Mathematics with MATLAB
Now,
√ let us consider
√ a > 1. √
The easiest method is to use the above results
with 1 − a2 = i a2 − 1 or −i a2 − 1. Therefore, the total answer is
−a|t| √ −a|t|
√
e cosh( a2 −1|t|) sinh( a2 −1|t|)
4a −e 4
√
a 2 −1
, a > 1,
f (t) = e−a|t| cos(√1−a2 |t|) e−a|t| sin(√1−a2 |t|)
− √ , 0 < a < 1.
4a 4 1−a2
For t < 0,
1 3eizt
f (t) = (−2πi) Res ; −2i
2π (2 − iz)(1 + iz)
3eizt
= −i lim (z + 2i) = e2t .
z→−2i (−i)(z + 2i)(1 + iz)
For the first integral, if t > −1, we close the contour with an infinite semi-circle
in the top half-plane and compute the residue of the enclosed singularities.
Thus,
Z ∞ i(t+1)ω i(t+1)z
e e π
2 + a2
dω = 2πi Res 2 2
; ai = e−a(t+1) .
−∞ ω z + a a
Worked Solutions 365
If t < −1, we close the contour with an infinite semi-circle in the bottom
half-plane and compute the residue of the enclosed singularities. Thus,
Z ∞ i(t+1)z
ei(t+1)ω e π
dω = −2πi Res ; −ai = ea(t+1) .
−∞ ω 2 + a2 z 2 + a2 a
For the second integral, if t > 1, we close the contour with an infinite semi-
circle in the top half-plane and compute the residue of the enclosed singular-
ities. Thus,
Z ∞ i(t−1)z
ei(t−1)ω e π
dω = 2πi Res ; ai = e−a(t−1) .
−∞ ω 2 + a2 z 2 + a2 a
If t < 1, we close the contour with an infinite semi-circle in the bottom half-
plane and compute the residue of the enclosed singularities. Thus,
Z ∞ i(t−1)z
ei(t−1)ω e π
dω = −2πi Res ; −ai = ea(t−1) .
−∞ ω 2 + a2 z 2 + a2 a
For t > 0, we close the contour with an infinite semi-circle in the top half-plane
and compute the residue of the enclosed singularities. Thus,
Z ∞
eitω eitz
dω = 2πi Res ; ai
−∞ (ω − ai)(R2 − e−2ωi ) (z − ai)(R2 − e−2zi )
X∞
eitz
+ 2πi Res ; z n .
n=−∞
(z − ai)(R2 − e−2zi )
366 Advanced Engineering Mathematics with MATLAB
Because
eitz eitz e−at
Res ; ai = lim =
(z − ai)(R2 − e−2zi ) z→ai R2 − e−2zi R2 − e2a
and
eitz eitz z − zn
Res 2 −2zi
; z n = lim lim 2 −2zi
(z − ai)(R − e ) z→z n z − ai z→z n R − e
−t ±inπt
R e
= 2
,
2iR {±nπ + [ln(R) − a] i}
X∞
i e−at 1 einπt
f+ (t) = 2 2a
+ t+2
.
R −e 2R n=−∞
nπ + [ln(R) − a] i
If t < 0, we close the contour with an infinite semi-circle in the bottom half-
plane and compute the residue of the enclosed singularities. Because there
are none, f+ (t) = 0 if t < 0. The final answer is
∞
i e−at H(t) X einπt
f+ (t) = 2 2a
H(t) + t+2
.
R −e 2R n=−∞
nπ + [ln(R) − a] i
For t > 2, we close the contour with an infinite semi-circle in the top half-plane
and compute the residue of the enclosed singularities. Thus,
Z ∞
ei(t−2)ω ei(t−2)z
2 −2ωi )
dω = 2πi Res ; ai
−∞ (ω − ai)(R − e (z − ai)(R2 − e−2zi )
X∞
ei(t−2)z
+ 2πi Res ; z n .
n=−∞
(z − ai)(R2 − e−2zi )
Because
ei(t−2)z ei(t−2)z e−at
Res 2 −2zi
; ai = lim 2 −2zi
= 2 −2a
(z − ai)(R − e ) z→ai R − e R e −1
and
ei(t−2)z ei(t−2)z z − zn
Res 2 −2zi
; z n = lim lim 2 −2zi
(z − ai)(R − e ) z→z n z − ai z→z n R − e
−t+2 ±inπt
R e
= 2
,
2iR {±nπ + [ln(R) − a] i}
Worked Solutions 367
∞
i e−at 1 X einπt
f− (t) = 2 −2a
+ t
.
R e − 1 2R n=−∞ nπ + [ln(R) − a] i
If t < 2, we close the contour with an infinite semi-circle in the bottom half-
plane and compute the residue of the enclosed singularities. Because there
are none, f− (t) = 0 if t < 2. The final answer is
∞
i e−at H(t − 2) X einπt
f− (t) = 2 −2a
H(t − 2) + t
.
R e −1 2R n=−∞
nπ + [ln(R) − a] i
and √
cosh(y z 2 + 1 )eizt
Res √ √ ; zn
z 2 + 1 sinh(p z 2 + 1/2)
√
(z − zn ) cosh(y z 2 + 1 )eizt
= lim √ √
z→zn z 2 + 1 sinh(p z 2 + 1/2)
√
cosh(y z 2 + 1 )eizt
= lim √
z→zn (pz/2) cosh(p z 2 + 1/2)
p
2 cos(2nπy/p) exp(− 1 + 4n2 π 2 /p2 t)
= p .
ip(−1)n 1 + 4n2 π 2 /p2
Therefore, the inverse equals i times the sum of the residues or
∞ p
e−t 2 X (−1)n cos(2nπy/p) exp(− 1 + 4n2 π 2 /p2 t)
f (t) = + p .
p p n=1 1 + 4n2 π 2 /p2
368 Advanced Engineering Mathematics with MATLAB
and √
cosh(y z 2 + 1 )eizt
Res √ √ ; zn
z 2 + 1 sinh(p z 2 + 1/2)
√
(z − zn ) cosh(y z 2 + 1 )eizt
= lim √ √
z→zn z 2 + 1 sinh(p z 2 + 1/2)
√
cosh(y z 2 + 1 )eizt
= lim √
z→zn (pz/2) cosh(p z 2 + 1/2)
p
2 cos(2nπy/p) exp( 1 + 4n2 π 2 /p2 t)
=− p .
ip(−1)n 1 + 4n2 π 2 /p2
Summing the residues and multiplying by −i,
∞ p
et 2 X (−1)n cos(2nπy/p) exp( 1 + 4n2 π 2 /p2 t)
f (t) = + p .
p p n=1 1 + 4n2 π 2 /p2
where
eitz (z − zn )eitz
Res n o ; z = zn = lim n o
zL z→zn zL
cos β[1+iγsgn(z)] cos β[1+iγsgn(z)]
eitzn
=± L n
β[1+iγsgn(zn )] (−1)
n
(−1) β
=± [1 + iγsgn(zn )]e−(2n−1)βγπt/2L
L
× e±(2n−1)βπit/2L .
Therefore,
∞
iβ X
f (t) = (−1)n e−(2n−1)βγπt/2L e(2n−1)βπit/2L + iγe±(2n−1)βπit/2L
L n=1
− e−(2n−1)βπit/2L + iγe±(2n−1)βπit/2L
∞
2β X
=− (−1)n e−(2n−1)βγπt/2L
L n=1
× {γ cos[(2n − 1)βπt/2L] + sin[(2n − 1)βπt/2L]} .
18. Z Z
∞ ∞
sin(x) eix
2
dx = ℑ 2
dx
−∞ x + 4x + 5 −∞ x + 4x + 5
I
eiz
=ℑ 2
dz ,
C z + 4z + 5
Because of our choice of CR , the second integral on the right side vanishes
and we must only evaluate the closed contour integral. It has a second-order
pole at z = bi. Therefore,
I 2 azi 2 azi
z 2 eazi z e d z e
dz = 2πi Res ; bi = 2πi lim
C (z 2 + b2 )2 (z 2 + b2 )2 z→2i dz (z + bi)2
iaz 2 eazi 2zeazi 2z 2 eazi
= 2πi lim + −
z→2i (z + bi)2 (z + bi)2 (z + bi)3
π
aπ −ab
= − e .
2b 2
Worked Solutions 371
Substituting this result into the second equation and then substituting the
second equation into the first, gives the desired result.
22.
Z ∞ Z ∞
cosh(hx) − 1 cosh(hx) − 1 aix
cos(ax) dx = ℜ e dx
−∞ x sinh(hx) −∞ x sinh(hx)
I
cosh(hz) − 1 aiz
=ℜ e dz ,
C z sinh(hz)
with
cosh(hz) − 1 aiz nπi cosh(hz) − 1 aiz
Res e ; = lim e
z sinh(hz) h z→nπi/h z
1
× lim
z→nπi/h h cosh(hz)
1 − (−1)n −nπa/h
= e .
nπi
Thus,
Z ∞ X∞
cosh(hx) − 1 exp[−(2m − 1)πa/h]
cos(ax) dx = 4
−∞ x sinh(hx) m=1
2m − 1
= ln[coth(πa/h)].
Because we get the same integral if we replace a by −a, we will get the same
answer except that we must place an absolute value sign around a in the final
answer.
Section 11.5
1. Z ∞ Z ∞
f (t) ∗ g(t) = e−(t−x) H(t − x)e−x dx = e−t H(t − x) dx
0 0
2.
Z ∞ Z ∞
f (t) ∗ g(t) = e(t−x) H(x − t)e−x dx = et e−2x H(x − t) dx
0 0
If t < 0, Z ∞
t
f (t) ∗ g(t) = e e−2x dx = 12 et .
0
If t > 0, Z ∞
t
f (t) ∗ g(t) = e e−2x dx = 12 e−t .
t
Therefore,
f (t) ∗ g(t) = 21 e−|t| .
3.
Z ∞ Z ∞
f (t) ∗ g(t) = e−(t−x) H(t − x)e−2x dx = e−t e−x H(t − x) dx
0 0
4.
Z ∞
t
e H(−t) ∗ [H(t) − H(t − 2)] = et−x H(x − t)[H(x) − H(x − 2)] dx
−∞
Z 2
= et−x H(x − t) dx.
0
If t > 2, the integrand is always zero and the convolution equals zero. If t < 0,
Z 2
et H(−t) ∗ [H(t) − H(t − 2)] = et−x dx = et − et−2 .
0
5.
Z ∞
[H(t) − H(t − 2)] ∗ [H(t) − H(t − 2)] = [H(t − x) − H(t − x − 2)]
−∞
× [H(x) − H(x − 2)] dx
Z 2
= [H(t − x) − H(t − x − 2)] dx.
0
If t < 0 or t > 4, the integrand is always zero and the convolution equals zero.
For 0 < t < 2, H(t − x − 2) equals zero for 0 < x < 2. Therefore,
Z t
[H(t) − H(t − 2)] ∗ [H(t) − H(t − 2)] = dx = t.
0
For 2 < t < 4, H(t − x) equals one for 0 < x < 2 while H(t − x − 2) equals
one for 0 < x < t − 2. Therefore,
Z 2 Z t−2
[H(t) − H(t − 2)] ∗ [H(t) − H(t − 2)] = dx − dx = 4 − t.
0 0
6. Z ∞
e−|t| ∗ e−|t| = e−|x| e−|t−x| dx
−∞
Z 0 Z ∞
= ex e−|t−x| dx + e−x e−|t−x| dx.
−∞ 0
If t < 0,
Z t Z 0 Z ∞
e−|t| ∗ e−|t| = ex e−(t−x) dx + ex e(t−x) dx + e−x e(t−x) dx
−∞ t 0
t 0 ∞
= 12 e−t e2x + et x − 21 et e−2x = et (1 − t).
−∞ t 0
If t > 0,
Z 0 Z t Z ∞
e−|t| ∗ e−|t| = ex e−(t−x) dx + e−x e−(t−x) dx + e−x e(t−x) dx
−∞ 0 t
0 t ∞
= 21 e−t e2x + e−t x − 21 et e−2x = e−t (1 + t).
−∞ 0 t
Section 11.6
1. Taking the Fourier transform of both sides of the equation, we have that
1 1
(2 + 3iω − ω 2 )Y (ω) = or Y (ω) = .
1 + iω (1 + iω)2 (2 + iω)
Therefore, I
1 eitz
y(t) = − dz,
2π C i(z − i)2 (z − 2i)
where C includes the singularities in the upper half-plane for t > 0 and in-
cludes the singularities in the lower half-plane if t < 0. Because there are no
singularities in the lower half-plane, y(t) = 0 for t < 0. For t > 0,
−1 eitz eitz
y(t) = (2πi) Res ; i + Res ; 2i ,
2π i(z − i)2 (z − 2i) i(z − i)2 (z − 2i)
where
eitz d 2 eitz
Res ; i = lim (z − i)
i(z − i)2 (z − 2i) z→i dz i(z − i)2 (z − 2i)
itz
te eitz t − 1 −t
= lim − 2
=− e
z→i (z − 2i) i(z − 2i) i
and
eitz eitz e−2t
Res ; 2i = lim (z − 2i) = −
i(z − i)2 (z − 2i) z→2i i(z − i)2 (z − 2i) i
so that
y(t) = (t − 1)e−t + e−2t
for t > 0. Therefore, the particular solution is y(t) = [(t − 1)e−t + e−2t ]H(t).
2. Taking the Fourier transform of both sides of the equation, we have that
1
[(iω)2 + 4iω + 4]Y (ω) =
ω2 + 1
or
1
Y (ω) = .
(ω 2 + 1)(iω + 2)2
Therefore, Z ∞
1 eitω
y(t) = − dω.
2π −∞ (ω 2 + 1)(ω − 2i)2
Worked Solutions 375
For t > 0 we close the line integral with an infinite semicircle in the upper
half-plane. The contribution from the additional arc vanishes by Jordan’s
lemma. The singularities within the closed contour integral
I
1 eitz
y(t) = − dz
2π C (z 2 + 1)(z − 2i)2
where
eitz eitz e−t
Res − 2 2
; i = − lim (z − i) 2
=
(z + 1)(z − 2i) z→i (z − i)(z + i)(z − 2i) 2i
and
eitz d 2 eitz
Res − 2 ; 2i = − lim (z − 2i) 2
(z + 1)(z − 2i)2 z→2i dz (z + 1)(z − 2i)2
itz
ite 2zeitz
= − lim − 2
z→2i z 2 + 1 (z + 1)2
it 4i
= e−2t + e−2t
3 9
so that
y(t) = 21 e−t − 13 te−2t − 94 e−2t
for t > 0. For t < 0 we close the line integral with an infinite semicircle in the
lower half-plane. The contribution from the arc vanishes by Jordan’s lemma.
Therefore, I
1 eitz
y(t) = − dz.
2π C (z 2 + 1)(z − 2i)2
The only singularity in the lower half-plane is at z = −i. Therefore,
1 eitz
y(t) = (−2πi)Res − 2 ; −i ,
2π (z + 1)(z − 2i)2
where
eitz eitz et
Res − 2 2
; −i = − lim (z + i) 2
=−
(z + 1)(z − 2i) z→−i (z − i)(z + i)(z − 2i) 18i
376 Advanced Engineering Mathematics with MATLAB
or
et
y(t) =
18
for t < 0. Thus, the particular solution is
1 −t 1 −2t 4 −2t
e − 3 te − 9e , t > 0,
y(t) = 2 1 t
18 e , t < 0.
3. Taking the Fourier transform of both sides of the equation, we have that
1 1
[(iω)2 − 4iω + 4]Y (ω) = or Y (ω) = .
1 + ωi (1 + ωi)(iω − 2)2
For t > 0 we close the line integral with an infinite semicircle in the upper
half-plane. The contribution from the additional arc vanishes by Jordan’s
lemma. The singularities within the closed contour integral
I
1 eitz
y(t) = dz
2π C (1 + zi)(iz − 2)2
where
eitz eitz e−t
Res ; i = lim (z − i) =
(1 + zi)(iz − 2)2 z→i i(z − i)(iz − 2)2 9i
so that y(t) = 91 e−t for t > 0. For t < 0 we close the line integral with
an infinite semicircle in the lower half-plane. The contribution from the arc
vanishes by Jordan’s lemma. Therefore,
I
1 eitz
y(t) = − dz.
2π C (1 + iz)(z + 2i)2
where
eitz d 2 eitz
Res ; −2i = − lim (z + 2i)
(1 + zi)(iz − 2)2 z→−2i dz (1 + iz)(z + 2i)2
itz
ite ieitz i it
= − lim − 2
= e2t − e2t
z→−2i 1 + iz (1 + iz) 9 3
4. Taking the Fourier transform of both sides of the equation, we have that
1
Y (ω) = .
ω 4 − λ4
Therefore, Z ∞
1 eiωx
y(x) = dω.
2π −∞ ω 4 − λ4
For x > 0, the poles iλ and −λ lie in the upper half-plane. Thus,
izx
eizx e
y(x) = i Res 4 ; iλ + Res 4 ; −λ ,
z − λ4 z − λ4
where izx
e (z − λi)eizx e−λx
Res 4 4
; iλ = lim 4 4
=− 3
z −λ z→iλ z −λ 4λ i
and
eizx (z + λ)eizx e−iλx
Res 4 ; −λ = lim = − .
z − λ4 z→−λ z 4 − λ4 4λ3
Therefore,
1
y(x) = − 3
e−λx + ie−iλx .
4λ
For x < 0, the poles −iλ and λ lie in the lower half-plane. Thus,
izx
eizx e
y(x) = (−i) Res 4 ; −iλ + Res 4 ;λ ,
z − λ4 z − λ4
where
eizx (z + λi)eizx eλx
Res ; −iλ = lim = 3
z − λ4
4 z→−iλ 4
z −λ 4 4λ i
378 Advanced Engineering Mathematics with MATLAB
and izx
e (z − λ)eizx eiλx
Res 4 ; λ = lim = .
z − λ4 z→λ z 4 − λ4 4λ3
Therefore,
1
y(x) = − 3
eλx + ieiλx .
4λ
In general,
1 −λ|x| −iλ|x|
y(x) = − e + ie .
4λ3
Section 11.7
1.
Z 1
1 1 y 1 −1 x − t
u(x, y) = dt = − tan
π 0 (x − t)2 + y 2 π y 0
1 1−x x
= tan−1 + tan−1
π y y
2.
Z ∞ Z
1 y 1 0 y
u(x, y) = 2 + y2
dt − 2 + y2
dt
π 0 (x − t) π −∞ (x − t)
∞ 0
1 x−t 1 x−t
= − tan−1 + tan−1
π y 0 π y −∞
1 1 −1 x 1 −1 x 1 2 x
= + tan + tan − = tan−1
2 π y π y 2 π y
3. 0
Z 0
T0 y T0 x−t
u(x, y) = 2 2
dt = −
π−∞ (x − t) + y π y −∞
T0 x π T 0 π x
= − tan−1 + = − tan−1
π y 2 π 2 y
4. Z Z
−1
2T0 y T0 1 y
u(x, y) = 2 2
dt + dt
π −∞ (x − t) + y π −1 (x − t)2 + y 2
−1 1
2T0 −1 x − t T0 −1 x − t
=− tan − tan
π y −∞ π y −1
Worked Solutions 379
2T0 −1 x + 1 T0 −1 x − 1
u(x, y) = − tan + T0 − tan
π y π y
T0 x + 1
+ tan−1
π y
T0 −1 1 + x −1 1 − x
= π − tan + tan
π y y
5.
Z 1 Z
T0 y T1 − T0 1 yt
u(x, y) = 2 2
dt + 2 2
dt
π −1 (x − t) + y π 0 (x − t) + y
1
T0 −1 x − t T1 − T0 1
=− tan + y ln[(x − t)2 + y 2 ] 0
π y −1 2π
1
T1 − T0 −1 x − t
− x tan
π y 0
T0 1−x 1+x
u(x, y) = tan−1 + tan−1
π y y
2 2
T1 − T0 (x − 1) + y
+ y ln
2π x2 + y 2
T1 − T0 1−x x
+ x tan−1 + tan−1
π y y
6.
Z Z
T 0 a1 y T 1 a2 y
u(x, y) = dt + dt
π −∞ (x − t)2 + y 2 π a1 (x − t)2 + y 2
Z Z
T 2 a3 y Tn ∞ y
+ dt + · · · + dt
π a2 (x − t)2 + y 2 π an (x − t)2 + y 2
a1 a2
T0 −1 x − t T1 −1 x − t
=− tan − tan
π y −∞ π y a
a3 1 ∞
T2 x − t T n x − t
− tan−1 − ··· − tan−1 ,
π y a2 π y an
or
T0 π a1 − x
u(x, y) = + tan−1
π 2 y
T1 a2 − x a1 − x
+ tan−1 − tan−1
π y y
T2 a3 − x a2 − x
+ tan−1 − tan−1
π y y
Tn π an − x
+ ··· + − tan−1
π 2 y
380 Advanced Engineering Mathematics with MATLAB
Section 11.8
1.
Z b
1 (ξ − x)2
u(x, t) = √ exp − dξ
4a2 πt −b 4a2 t
(Z Z x )
b
1 (ξ − x)2 (ξ − x)2
= √ exp − dξ + exp − dξ
4a2 πt x 4a2 t −b 4a2 t
Z (b−x)/√4a2 t Z 0
1 2 1 2
= √ e−τ dτ + √ √ e−τ dτ
π 0 π (−b−x)/ 4a2 t
Z (b−x)/√4a2 t Z (b+x)/√4a2 t
1 −τ 2 1 2
= √ e dτ + √ e−τ dτ
π 0 π 0
1 b−x 1 b+x
= 2 erf √ + 2 erf √ ,
4a2 t 4a2 t
2.
Z ∞ Z 0
1 −bξ (ξ − x)2 bξ (ξ − x)2
u(x, t) = √ e exp − dξ + e exp − dξ
4a2 πt 0 4a2 t −∞ 4a2 t
Z ∞
exp(−x2 /4a2 t) ξ2 4a2 bt − 2x
= √ exp − 2 − ξ dξ
4a2 πt 0 4a t 4a2 t
Z ∞
ξ2 4a2 bt + 2x
+ exp − 2 − ξ dξ
0 4a t 4a2 t
2 2 √ x 2 2 √ x
= 21 ea b t−bx erfc ab t − √ + 12 ea b t+bx erfc ab t + √ ,
2a t 2a t
3. If x < 0,
Z b Z (b−x)/√4a2 t
T0 (ξ − x)2 T0 2
u(x, t) = √ exp − 2t
dξ = √ √ e−τ dτ
2
4a πt 0 4a π 2
−x/ 4a t
b − x −x
= 21 T0 erf √ − 21 T0 erf √
4a2 t 4a2 t
1 b−x 1 x
= 2 T0 erf √ + 2 T0 erf √ ,
4a2 t 4a2 t
Worked Solutions 381
Z b Z (x−b)/√4a2 t
T0 (ξ − x)2 T0 2
u(x, t) = √ exp − 2
dξ = − √ √ e−τ dτ
4a2 πt 0 4a t π x/ 4a2 t
x x−b
= 21 T0 erf √ − 12 T0 erf √
2
4a t 4a2 t
b−x x
= 21 T0 erf √ + 12 T0 erf √ ,
4a2 t 4a2 t
4.
Z ∞
1 (ξ − x)2 1 x2
u(x, t) = √ δ(ξ) exp − dξ = √ exp −
4a2 πt −∞ 4a2 t 2a πt 4a2 t
∂u 1 ∂v v ∂2u 1 ∂2v 2 ∂v 2v
= − 2, and 2
= − 2 + 3.
∂r r ∂r r ∂r r ∂r2 r ∂r r
Therefore,
∂ 2 u 2 ∂u 1 ∂2v ∂u 1 ∂v
+ = , and =
∂r2 r ∂r r ∂r2 ∂t r ∂t
so that
∂v ∂2v
= a2 2 , 0 ≤ r < ∞, 0 < t,
∂t ∂r
382 Advanced Engineering Mathematics with MATLAB
Z ( " 2 # " 2 #)
∞
1 r−ρ r+ρ
u(r, t) = √ u0 (ρ) exp − √ − exp − √ ρ dρ.
2ar πt 0 2a t 2a t
Z r0 ( " 2 # " 2 #)
N0 r−ρ r+ρ
u(r, t) = √ exp − √ − exp − √ ρ dρ
2ar πt 0 2a t 2a t
Z r0 ( " 2 # " 2 #)
N0 r−ρ r+ρ
= √ exp − √ + exp − √ dρ
2a πt 0 2a t 2a t
Z r0 " 2 #
N0 r−ρ
− √ (r − ρ) exp − √
2ar πt 0 2a t
" 2 #
r+ρ
+ (r + ρ) exp − √ dρ
2a t
√ √
Z (r0 +r)/ 4a2 t Z (r0 −r)/ 4a2 t
N0 −η 2 N0 2
u(r, t) = √ e dη + √ e−η dη
π 0 π 0
√ Z √ √ Z √
2 2
2aN0 t (r0 −r)/ 4a t −η2 2aN0 t (r0 +r)/ 4a t −η2
+ √ e η dη − √ e η dη
r π r π
0 0
r0 − r r0 + r
= 12 N0 erf √ + erf √
2a t 2a t
√ " 2 # " 2 #
N0 a t r0 + r r0 − r
+ √ exp − √ − exp − √ ,
r π 2a t 2a t
Section 12.1
1.
Z ∞
L[cosh(at)] = cosh(at)e−st dt
0
Z ∞ Z ∞
1 −(s−a)t 1
= e dt + e−(s+a)t dt
2 0 2 0
∞ −(s+a)t ∞
1 e−(s−a)t 1e 1 1 1
=− − = +
2 s−a 0 2 s+a 0 2 s−a s+a
s
= 2
s − a2
2.
Z
1 ∞
L[cos2 (at)] = [1 + cos(2at)]e−st dt
2 0
−st ∞ ∞
1 e e−st
= − + −s cos(2at) + 2a sin(2at)
2 s 0 s2 + 4a2 0
1 1 s s2 + 2a2
= + 2 2
=
2 s s + 4a s(s2 + 4a2 )
3. Z ∞
2
L[(t + 1) ] = (t + 1)2 e−st dt
0
∞ Z
(t + 1)2 −st 2 ∞
=− e + (t + 1)e−st dt
s 0 s 0
∞ Z
1 2 (t + 1) −st 1 ∞ −st
= + − e + e dt
s s s 0 s 0
∞
1 2 2 1 2 2
= + 2 − 3 e−st = + 2+ 3
s s s 0 s s s
4. Z ∞
−t
L[(t + 1)e ] = (t + 1)e−t e−st dt
0
Z ∞ Z ∞
−(s+1)t
= te dt + e−(s+1)t dt
0 0
∞ ∞
e−(s+1)t e−(s+1)t
= [−(s + 1)t − 1] −
(s + 1)2 0 s+1 0
1 1 s+2
= + =
(s + 1)2 s+1 (s + 1)2
384 Advanced Engineering Mathematics with MATLAB
5. Z 2 2
e−(s−1)t 1 − e−2(s−1)
F (s) = et e−st dt = − =
0 s−1 0 s−1
6.
Z π π
[−s sin(t) − cos(t)] 1 + e−sπ
F (s) = sin(t)e−st dt = e−st =
0 s2 + 1 0 s2 + 1
7.
8.
10. Because
1 3! 1 3!
F (s) = 4
× = × 4, f (t) = 16 t3 .
s 3! 6 s
11. Because
3 1 1 3 1
F (s) = × = × 2 , f (t) = 3 sin(3t).
3 s2 + 9 3 s +9
12. Because
2s + 3 s 3
F (s) = =2 2 + ,
s2 + 9 s + 9 s2 + 9
then
f (t) = 2 cos(3t) + sin(3t)
by Equation 12.1.7 and Equation 12.1.9.
Worked Solutions 385
13. Because
1 2 1 s
f (t) = 2L−1 − 15 −1
2 L + 2L −1
− 6L −1
,
s2 + 1 s3 s+1 s2 + 4
then
15 2
f (t) = 2 sin(t) − 2 t + 2e−t − 6 cos(2t)
by Equation 12.1.7 and Equation 12.1.9.
14. Because
1 −1
15 −1 2 −1 s
f (t) = 3L + 2L +L
s s3 s2 + 1
1 1
+ 5L−1 − 6L−1
s2 + 1 s−2
then
15 2
f (t) = 3 + 2 t + cos(t) + 5 sin(t) − 6e2t
by Equation 12.1.3, Equation 12.1.5, Equation 12.1.7, Equation 12.1.9 and
Equation 12.1.10.
16. By definition
Z Z
∞
1 ∞
1 s
L[f (at)] = f (at)e−st dt = f (x)e−(s/a)x dx = F ,
0 a 0 a a
if t = x/a.
17.
F (s) = 12 L{[1 − cos(πt/T )]} = 21 L[1] − 12 L[cos(πt/T )]
1 s 1 sT 2
= − = −
2s 2(s2 + π 2 /T 2 ) 2s 2(s2 T 2 + π 2 )
Section 12.2
1.
f (t) =?H(t − 2)+?H(t − 3)
= [t − 2 − 0]H(t − 2) + [0 − (t − 2)]H(t − 3)
= (t − 2)H(t − 2) − (t − 2)H(t − 3)
386 Advanced Engineering Mathematics with MATLAB
2.
3. y ′′ + 3y ′ + 2y = H(t − 1) 4. y ′′ + 4y = 3H(t − 4)
5. y ′′ + 4y ′ + 4y = tH(t − 2) 6. y ′′ + 3y ′ + 2y = et H(t − 1)
Section 12.3
1. From the first shifting theorem a = 1 and f (t) = sin(2t). Then F (s) =
2/(s2 + 4). Finally
2 2
L e−t sin(2t) = 2
= 2 .
(s + 1) + 4 s + 2s + 5
2. From the first shifting theorem a = 2 and f (t) = cos(2t). Then F (s) =
s/(s2 + 4). Finally
s+2 s+2
L e−2t cos(2t) = = 2 .
(s + 2)2 + 4 s + 4s + 8
3.
2 −s 2 1
F (s) = e + 2 e−s + e−s .
s3 s s
4.
f (t) = e6 e2(t−3) H(t − 3).
Worked Solutions 387
5.
1 3 s′
F (s) = + +
s′2
s′ =s−1 s′2 + 9 s′ =s−1 s′2 + 25 s′ =s−2
1 3 s−2
= 2
+ 2 + 2
(s − 1) s − 2s + 10 s − 4s + 29
6.
4! 3 s′
F (s) = + + ′2
s′5
s′ =s+2 s′2
+ 9 s′ =s−1 s + 16 s′ =s−2
4! 3 s−2
= + 2 +
(s + 2)5 s − 2s + 10 s2 − 4s + 20
7.
2 2 s′
F (s) = + +
s′3
s′ =s+1 s′2 + 4 s′ =s−1 s′2 + 9 s′ =s+3
2 2 s+3
= + 2 +
(s + 1)3 s − 2s + 5 s2 + 6s + 18
8. Because
f (t) = [(t − 1) + 1]2 H(t − 1) + e2 et−2 H(t − 2)
= (t − 1)2 H(t − 1) + 2(t − 1)H(t − 1) + H(t − 1)
+ e2 et−2 H(t − 2),
then
2 −s 2 −s 1 −s e2 −2s
F (s) = e + e + e + e .
s3 s2 s s−1
9. Because
f (t) = {[(t − 1) + 1]2 + 2}H(t − 1) + H(t − 2)
= (t − 1)2 H(t − 1) + 2(t − 1)H(t − 1) + 3H(t − 1) + H(t − 2),
then
2 −s 2 3 1
F (s) = e + 2 e−s + e−s + e−2s .
s3 s s s
10. Because
f (t) = [(t − 1) + 2]2 H(t − 1) + e2 et−2 H(t − 2)
= (t − 1)2 H(t − 1) + 4(t − 1)H(t − 1) + 4H(t − 1) + e2 et−2 H(t − 2),
388 Advanced Engineering Mathematics with MATLAB
then
2 −s 4 4 e2 −2s
F (s) = 3
e + 2 e−s + e−s + e .
s s s s−1
11.
f (t) = sin(t)H(t) + sin(t − π)H(t − π)
By the second shifting theorem,
1 e−sπ
F (s) = + 2 .
s2 +1 s +1
12.
f (t) = t − (t − 2)H(t − 2)
By the second shifting theorem,
1 −2s
F (s) = 2 1 − e .
s
4(s + 3)
F (s) = .
(s2 + 6s + 13)2
14.
1 1
F (s) = 4
= ′4 .
(s + 2) s s′ =s+2
Therefore,
f (t) = 16 t3 e−2t .
15.
s (s + 2) − 2 1 2
F (s) = 4
= 4
= 3
−
(s + 2) (s + 2) (s + 2) (s + 2)4
Therefore, f (t) = 12 t2 e−2t − 31 t3 e−2t .
16.
s s s+1 1
F (s) = = = −
s2 + 2s + 2 2
(s + 1) + 1 (s + 1) + 1 (s + 1)2 + 1
2
Worked Solutions 389
Therefore,
f (t) = e−t cos(t) − e−t sin(t).
17.
s+3 s+1 2
F (s) = = +
s2 + 2s + 2 (s + 1)2 + 1 (s + 1)2 + 1
Therefore, f (t) = e−t cos(t) + 2e−t sin(t).
18. Because
1 1 s+1
F (s) = 2
− 3
+
(s + 1) (s + 1) (s + 1)2 + 1
1 1 s′
= ′2 − ′3 + ′2 ,
s s′ =s+1 s s′ =s+1 s + 1 s′ =s+1
then
f (t) = te−t − 21 t2 e−t + cos(t)e−t .
19. Because
1 2 s+1 1
F (s) = − + +
s + 2 (s + 2)2 (s + 1)2 + 1 (s + 1)2 + 1
1 2 s′ 1
= ′ − ′2 + ′2 +
s s′ =s+2 s s′ =s+2 s + 1 s′ =s+1 s′2 + 1 s′ =s+1
20. Because
1 2 s+2 2
F (s) = − + +
(s + 2)2 (s + 2)3 (s + 2)2 + 1 (s + 2)2 + 1
1 2 s′ 2
= ′2 − ′3 + ′2 + ,
s s′ =s+2 s s′ =s+2 s + 1 s′ =s+2 s′2 + 1 s′ =s+2
then
f (t) = te−2t − t2 e−2t + cos(t)e−2t + 2 sin(t)e−2t .
22.
1
L−1 = te−t
(s + 1)2
390 Advanced Engineering Mathematics with MATLAB
23.
s (s + 1) − 1
L−1 = L −1
s2 + 2s + 2 (s + 1)2 + 1
s+1 1
= L−1 − L −1
(s + 1)2 + 1 (s + 1)2 + 1
= e−t [cos(t) − sin(t)]
24.
−1 1 −1 1
L =L = e−2t sin(t)
s2 + 4s + 5 (s + 2)2 + 1
by the first shifting theorem. Then, by the second shifting theorem,
25. Because
s 1
L−1 = cos(2t) and L−1 = 16 t3 e2t ,
s2 + 4 (s − 2)4
26. Because
1 s−1 t2 t3
L−1 = 1
2 sin(2t) and L−1 = − ,
s2 + 4 s4 2 6
1 (t − 3)2 (t − 3)3
f (t) = 2 sin[2(t − 1)]H(t − 1) + − H(t − 3).
2 6
27. Because
−1 s+1 1 −1 1 t3
L = cos(2t) + 2 sin(2t) and L = ,
s2 + 4 s4 6
Worked Solutions 391
1 (t − 3)3
f (t) = {cos[2(t − 1)] + 2 sin[2(t − 1)]}H(t − 1) + H(t − 3).
6
For part (b), f (t) = et g(t), where g(t) = t[H(t − 1) − H(t − 2)]. Next, we note
that
or
e−s e−s e−2s e−2s
+ G(s) =
− − 2
s2 s s2 s
by the second shifting theorem. Finally,
On the other hand, f (t) = t − (t − a)H(t − a) − aH(t − a). Applying the second
shifting theorem term by term,
1 e−as ae−as
F (s) = 2
− 2 − .
s s s
30.
1 1 1 t−2
f (t) = t − tH(t − 2) = t − H(t − 2) − H(t − 2)
2 2 2 2
392 Advanced Engineering Mathematics with MATLAB
1 e−2s e−2s
F (s) = 2
− 2
− .
2s 2s s
31.
f (t) = t + (1 − t)H(t − 1) + (0 − 1)H(t − 2)
= t − (t − 1)H(t − 1) − H(t − 2).
From the second shifting theorem,
1 e−s e−2s
F (s) = − − .
s2 s2 s
32.
f (t) = t + (4 − t − t)H(t − 2) + [0 − (4 − t)]H(t − 4)
= t − 2(t − 2)H(t − 2) + (t − 4)H(t − 4)
From the second shifting theorem,
1 2e−2s e−4s
F (s) = − + .
s2 s2 s2
33.
34.
e−s
s2 Y (s) − sy(0) − y ′ (0) + 3sY (s) − 3y(0) + 2Y (s) =
s
e−s
Y (s) =
s(s + 1)(s + 2)
35.
3e−4s
s2 Y (s) − sy(0) − y ′ (0) + 4Y (s) =
s
s 3e−4s
Y (s) = +
s2 + 4 s(s2 + 4)
Worked Solutions 393
36.
e−2s 2e−2s
s2 Y (s) − sy(0) − y ′ (0) + 4sY (s) − 4y(0) + 4Y (s) = +
s2 s
2 e−2s 2e−2s
Y (s) = + +
(s + 2)2 s2 (s + 2)2 s(s + 2)2
37.
e e−s
s2 Y (s) − sy(0) − y ′ (0) + 3sY (s) − 3y(0) + 2Y (s) =
s−1
e−(s−1)
Y (s) =
(s − 1)(s + 1)(s + 2)
38.
e−2 e−2s
s2 Y (s) − sy(0) − y ′ (0) − 3sY (s) + 3y(0) + 2Y (s) =
s+1
2(s − 3) e−2 e−2s
Y (s) = +
(s − 1)(s − 2) (s + 1)(s − 1)(s − 2)
39.
5 e−s
Y (s) = + 3
(s − 1)(s − 2) s (s − 1)(s − 2)
2e−s e−s
+ 2 +
s (s − 1)(s − 2) s(s − 1)(s − 2)
40.
1 e−sπ
s2 Y (s) − sy(0) − y ′ (0) + Y (s) = + 2
s2 +1 s +1
1 e−sπ
Y (s) = + 2
(s2 + 1) 2 (s + 1)2
41.
1 ae−as
Y (s) = +
s2 (s
+ 2)(s + 1) (s + 1)2 (s + 2)
e−as ae−as
− 2 −
s (s + 1)(s + 2) s(s + 1)(s + 2)
44. f (0) = 0, F (s) = 1/(s + 1)2 , lims→∞ sF (s) = lims→∞ s/(s + 1)2 = 0 =
f (0).
46. No
49. No
51. No
Now, setting α = bη, ν = 0, and s′ = s + b and using the first shifting theorem
and the third equation, we obtain the desired result.
Section 12.4
1.
sin(t), 0 ≤ t ≤ π,
x(t) =
0, t ≥ π.
Therefore, Z π
1 + e−sπ
X(s) = sin(t)e−st dt = .
0 s2 + 1
Worked Solutions 395
Then
X(s) 1 + e−sπ 1 sπ
F (s) = = = coth .
1 − e−sπ (s2 + 1)(1 − e−sπ ) s2 + 1 2
2.
sin(t), 0 ≤ t ≤ π,
x(t) =
0, t > π.
Therefore Z π
1 + e−sπ
X(s) = sin(t)e−st dt = .
0 s2 + 1
Then
X(s) 1 + e−sπ 1
F (s) = −2sπ
= 2 −sπ −sπ
= 2 .
1−e (s + 1)(1 − e )(1 + e ) (s + 1)(1 − e−sπ )
3.
t, 0 ≤ t < a,
x(t) =
0, t > a.
Therefore Z a
−st 1 −as
X(s) = te dt = 2 1 − (1 + as)e .
0 s
Then
X(s) 1 − (1 + as)e−as
F (s) = = .
1 − e−2as s2 (1 − e−2as )
4.
1, 0 < t < a,
0, a < t < 2a,
x(t) =
−1,
2a < t < 3a,
0, t > 3a.
Therefore
Z a Z 3a
−st 1 − e−as e−3as − e−2as
X(s) = (1) e dt + (−1) e−st dt = + .
0 2a s s
Then
Section 12.5
1.
1 A B
F (s) = = + ,
(s + 1)(s + 2) s+2 s+1
where
Therefore,
1 1
F (s) = − or f (t) = e−t − e−2t .
s+1 s+2
2.
A B
F (s) = + ,
s+4 s−2
where
1
A = lim (s + 4)F (s) = 6
s→−4
and
B = lim (s − 2)F (s) = 65 .
s→2
Therefore,
1 1 5
F (s) = +
6 s+4 s−2
or
f (t) = 16 e−4t + 65 e2t .
3.
A B C
F (s) = + + ,
s+2 s+1 s−3
where
and
1
C = lim (s − 3)F (s) = − 20 .
s→3
Therefore,
f (t) = 54 e−t − 65 e−2t − 1 3t
20 e .
4.
A B C
F (s) = + + ,
s − 2i s + 2i s + 1
Worked Solutions 397
where
8−i
A = lim (s − 2i)F (s) = 20 ,
s→2i
8+i
B = lim (s + 2i)F (s) = 20
s→−2i
and
C = lim (s + 1)F (s) = − 54 .
s→−1
Therefore,
8−i 2it 8+i −2it
f (t) = 20 e + 20 e − 45 e−t
4 1
= 5 cos(2t) + 10 sin(2t) − 45 e−t .
5.
1 1 1/(2i) 1/(2i)
= = −
s2 + 4s + 5 (s + 2 + i)(s + 2 − i) s+2−i s+2+i
1 3πi/2 1 −3πi/2
2e 2e
= +
s+2−i s+2+i
f (t) = 12 e−2t+ti+3πi/2 + 21 e−2t−ti−3πi/2
−2t 3π
=e cos t +
2
6.
1 1
=
s2 + 6s + 13 (s + 3 + 2i)(s + 3 − 2i)
1/(4i) 1/(4i)
= −
s + 3 − 2i s + 3 + 2i
1 3πi/2 1 −3πi/2
e e
= 4 + 4
s + 3 − 2i s + 3 + 2i
f (t) = 14 e−3t+2ti+3πi/2 + 41 e−3t−2ti−3πi/2
= 12 e−3t cos 2t + 3π
2
7.
2s − 5 2s − 5
=
s2 + 16 (s + 4i)(s − 4i)
1 + 5i/8 1 − 5i/8
= +
s − 4i s + 4i
1.1792e0.5586i 1.1792e−0.5586i
= +
s − 4i s + 4i
f (t) = 1.1792e4ti+0.5586i + 1.1792e−4ti−0.5586i
= 2.3584 cos (4t + 0.5586)
398 Advanced Engineering Mathematics with MATLAB
8.
1 1
=
s(s2 + 2s + 2) s(s + 1 + i)(s + 1 − i)
1 −1/4 + i/4 −1/4 − i/4
= + +
2s s+1−i s+1+i
√ 3πi/4 √ −3πi/4
1 2e /4 2e /4
= + +
2s s+1−i s+1+i
√ √
1 2 −t+ti+3πi/4 2 −t−ti−3πi/4
f (t) = + e + e
2 √4 4
1 2 −t 3π
= + e cos t +
2 2 4
9.
Section 12.6
1. Z t
1
1∗1= dx = t and L(t) = = L(1)L(1)
0 s2
2. Z t t
sin(ax) sin(at)
1 ∗ cos(at) = cos(ax) dx = =
0 a 0 a
sin(at) 1
L = 2 = L(1)L[cos(at)]
a s + a2
3. Z t
t
1 ∗ et = ex dx = ex |0 = et − 1
0
1 1 1
L et − 1 = − = = L(1)L(et )
s−1 s s(s − 1)
Worked Solutions 399
4. Z t t t
tx2 x3
t∗t= (t − x)x dx = − = 61 t3
0 2 0 3 0
1
L(t3 /6) = 4 = L(t)L(t)
s
5. Z t
t ∗ sin(t) = (t − x) sin(x) dx
0
t t
= − t cos(x)|0 − [sin(x) − x cos(x)]|0 = t − sin(t)
1 1 1
L[t − sin(t)] = − 2 = 2 2 = L(t)L[sin(t)]
s2 s +1 s (s + 1)
6. Z t
t t
t ∗ et = (t − x)ex dx = tex 0
− ex (x − 1) 0
= et − t − 1
0
1 1 1 1
L(t ∗ et ) = − 2− = 2 = L(t)L(et )
s−1 s s s (s − 1)
7. Z t
2
t ∗ sin(at) = (t − x)2 sin(ax) dx
0
Z
1 2 t 2 t
= − (t − x) cos(ax) 0 − (t − x) cos(ax) dx
a a 0
Z t
t2 2 t 2
= − 2 (t − x) sin(ax) 0 − 2 sin(ax) dx
a a a 0
t2 2 t t2 2
= + 3 cos(ax) 0 = − 3 [1 − cos(at)]
a a a a
t2 4 2
= − 3 sin (at/2)
a a
2
t 2 2 a
L − 3 [1 − cos(at)] = 3 = L(t2 )L[sin(at)]
a a s s 2 + a2
8. Z t
t ∗ H(t − 1) = (t − x)H(x − 1) dx
0
Therefore,
t ∗ H(t − 1) = 12 (t − 1)2 H(t − 1).
From the second shifting theorem,
e−s e−s 1
L[t ∗ H(t − 1)] = 3
= × 2 = L[H(t − 1)]L[t]
s s s
and the convolution theorem holds.
or
H(t − b) ∗ H(t − a) = (t − a − b)H(t − a − b).
Then
e−as−bs e−as e−bs
L[H(t − b) ∗ H(t − a)] = =
s2 s s
10. Z t
t ∗ [H(t) − H(t − 2)] = (t − x)[H(x) − H(x − 2)] dx
0
If 0 < t < 2,
Z t
t ∗ [H(t) − H(t − 2)] = (t − x) dx = t2 /2.
0
If t > 2,
Z 2
t ∗ [H(t) − H(t − 2)] = (t − x) dx = 2t − 2.
0
Worked Solutions 401
t2 (t − 2)2
t ∗ [H(t) − H(t − 2)] = − H(t − 2).
2 2
From the second shifting theorem,
1 1 1 1 e−2s
L t ∗ [H(t) − H(t − 2)] = 3 − 3 e−2s = 2 −
s s s s s
11. Z Z
t t
f (t) = et ∗ t = et−x x dx = et xe−x dx
0 0
t
= et e−x (−x − 1) 0 = et − t − 1
12.
Z t Z t Z t
−at −ax −ax
f (t) = t ∗ te = (t − x)xe dx = t xe dx − x2 e−ax dx
0 0 0
t 2
= 2
1 + e−at + 3 e−at − 1
a a
13.
ea/s s ea/s 1 ea/s
= = 1+
s−1 s−1 s s−1 s
Because
ea/s √
L−1 = I0 2 at ,
s
√
ea/s
L−1 = δ(t) + et ∗ I0 2 at
s−1
Z t Z t
√ √
= δ(t − x)I0 2 ax dx + et e−x I0 2 ax dx
0
√ √ 0
= I0 2 at − et e−t I0 2 at + et
Z t
√ √ dx
+ et e−x I1 2 ax (2 a ) √
0 2 x
Z √4at 2
τ √ 2τ dτ /(4a)
= et + et exp − I1 (τ ) a √
0 4a τ /(2 a )
√
Z 4at 2
τ
= et + et exp − I1 (τ ) dτ,
0 4a
402 Advanced Engineering Mathematics with MATLAB
where τ 2 = 4ax.
Section 12.7
1.
1 1 1 2
F (s) = + 2F (s) , F (s) = + , f (t) = 1 + 2t
s s+2 s s2
2.
1 1 1 1
F (s) = + F (s) 2 , F (s) = + , f (t) = 1 + 12 t2
s s +1 s s3
3.
1 1 1 1
F (s) = + F (s) , F (s) = + 3, f (t) = t + 21 t2
s2 s+1 s2 s
4.
8 1 8(s + 1)
F (s) = 3
− F (s) , F (s) = , f (t) = 2t2 + 2t − 1 + e−2t
s s+1 s3 (s + 2)
5.
6 1 6 6
F (s) = + F (s) 2 , F (s) = + 6, f (t) = t3 + 1 5
20 t
s4 s +1 s4 s
6.
16 1 16(s2 + 1)
F (s) = 3
− 3F (s) 2 , F (s) = , f (t) = 3 + 2t2 − 3 cos(2t)
s s +1 s3 (s2 + 4)
7.
2 2 2 8
F (s) = 3
− 2F (s) 2 , F (s) = 3
− 5, f (t) = t2 − 13 t4
s s −4 s s
8.
1 s 1 2
F (s) = + 2F (s) 2 , F (s) = + , f (t) = 1 + 2tet
s s +1 s (s − 1)2
Worked Solutions 403
9.
1 s 5 4 2
F (s) = − 2F (s) 2 , F (s) = − −
s−2 s +1 s − 2 s − 1 (s − 1)2
10.
2 1 2 2
F (s) = 3
+ F (s) 2 , F (s) = 3
+ 5, f (t) = t2 + 1 4
12 t
s s +1 s s
11.
1 s
F (s) = − 2F (s) 2
s+1 s +1
s2 + 1 1 2 2
F (s) = = − +
(s + 1)3 s + 1 (s + 1)2 (s + 1)3
12.
6 2
F (s) = + 4F (s) 3
s2 s
1 s+1 3
F (s) = − +
s − 2 (s + 1)2 + 3 (s + 1)2 + 3
√ √ √
f (t) = e2t − e−t cos( 3 t) + 3 e−t sin( 3 t)
13. √ √
a π π
F (s) = 3/2 − √ F (s)
2s s
√
a π
F (s) = √
2s( π + s1/2 )
ah √ i
f (t) = 1 − eπt erfc( πt)
2
14.
1 s
sF (s) − f (0) = + F (s) 2
s2 s +1
5 4 1
F (s) = 3
+ + 5 or f (t) = 4 + 52 t2 + 1 4
24 t
s s s
404 Advanced Engineering Mathematics with MATLAB
15.
1 s
sF (s) − f (0) = + F (s) 2
s2 +1 s +1
1
F (s) = , f (t) = 12 t2
s3
16. Z t ′
√ x (τ )
L(A) = BL( t ) + CL √ dτ
0 t−τ
√ r
A B π π
= 3/2 + C [sX(s)]
s 2s s
or
A B 2A √ Bt
X(s) = √ − and x(t) = t− .
C πs3/2 2Cs2 πC 2C
17. Z
t
1 x′ (τ )
L[x(t)] + L(t) = √ L √ dτ
c π 0 t−τ
r
1 1 π
X(s) + 2 = √ [sX(s)]
s c π s
or √
c c(c + s )
X(s) = − √ = − .
s2 (c − s ) s2 (c2 − s)
Using partial fractions,
√ 2
1 s c 1 1
X(s) = − 1+ + − .
c2 c s2 s s − c2
or √ α
sF (s) + β s F (s) =
s
after substitution of the initial condition. Thus
α α s1/2 − β α αβ
F (s) = 3/2 1/2 = 3/2 = −
s s +β s (s − β 2 ) s (s − β 2 ) s3/2 (s − β 2 )
α α αβ
= 2 − − .
β (s − β 2 ) β 2 s s3/2 (s − β 2 )
Taking the inverse term-by-term,
2 Z
!
α β2 t 2β 3 eβ t t −β 2 x √
f (t) = 2 e − 1 − √ e x dx
β π 0
2 Z
√ !
α β2 t 4eβ t β t −u2 2
= 2 e −1− √ e u du
β π 0
√
√
2 β t 2 Z
α β2 t 2eβ t −u2 2eβ t β t −u2
= 2 e − 1 + √ ue − √ e du
β π π 0
0
√ 2 Z
√ !
α β2 t 2β t 2eβ t β t −u2
= 2 e −1+ √ − √ e du .
β π π 0
20. Because
d
L[(ty ′ )′ ] = sL(ty ′ ) − ty ′ (t)|t=0 = −s [sY (s) − y(0)] = −s[sY ′ (s) + Y ],
ds
and
d
[sY (s) − y(0)] = −sY ′ (s) − Y,
L(ty ′ ) = −s
ds
the Laplace transformed version of the differential equation is
−s2 Y ′ − sY + sY ′ + Y + nY = 0,
or
s(s − 1)Y ′ (s) = (n + 1 − s)Y (s).
Section 12.8
1 1
sY (s) − y(0) − 2Y (s) = − 2.
s s
Substituting the values of the initial conditions and solving for Y (s), we find
that
5 1 1
Y (s) = − + 2.
4(s − 2) 4s 2s
Taking the inverse of Y (s) term-by-term, the final answer is y(t) = 54 e2t − 41 +
1
2 t.
1
s2 Y (s) − sy(0) − y ′ (0) − 4sY (s) + 4y(0) + 3Y (s) = .
s−1
Substituting the values of the initial conditions and solving for Y (s), we find
that
1 1/4 1/4 1/2
Y (s) = = − − .
(s − 1)2 (s − 3) s − 3 s − 1 (s − 1)2
Taking the inverse of Y (s) term-by-term, the final answer is
1
s2 Y (s) − sy(0) − y ′ (0) − 4sY (s) + 4y(0) + 3Y (s) = .
s−2
Worked Solutions 407
Substituting the values of the initial conditions and solving for Y (s), we find
that
1 1 1
Y (s) = = − .
(s − 3)(s − 2) s−3 s−2
Taking the inverse of Y (s) term-by-term, the final answer is y(t) = e3t − e2t .
1
s2 Y (s) − sy(0) − y ′ (0) − 6sY (s) + 6y(0) + 8Y (s) = .
s−1
Substituting the values of the initial conditions and solving for Y (s), we find
that
1 5 1
Y (s) = + + .
3(s − 1) 3(s − 4) s − 2
Taking the inverse of Y (s) term-by-term, the final answer is
1
s2 Y (s) − sy(0) − y ′ (0) + 4sY (s) − 4y(0) + 3Y (s) = .
s+1
Substituting the values of the initial conditions and solving for Y (s), we find
that
s+5 1
Y (s) = +
(s + 3)(s + 1) (s + 1)2 (s + 3)
3 1 7 1 1
=− + + .
4 s + 3 4 s + 1 2(s + 1)2
Taking the inverse of Y (s) term-by-term, the final answer is y(t) = − 43 e−3t +
7 −t
4e + 21 te−t .
1
s2 Y (s) − sy(0) − y ′ (0) + Y (s) = .
s2
Substituting the values of the initial conditions and solving for Y (s), we find
that
s 1 s 1 1
Y (s) = 2 + 2 2 = 2 + 2− 2 .
s + 1 s (s + 1) s +1 s s +1
Taking the inverse of Y (s) term-by-term, the final answer is
Substituting the values of the initial conditions and solving for Y (s), we find
that
2(s − 2)
Y (s) = .
(s − 2)2 + 1
Taking the inverse of Y (s) by the first shifting theorem, the final answer is
y(t) = 2 cos(t)e2t .
e−s
s2 Y (s) − sy(0) − y ′ (0) − 3sY (s) + 3y(0) + 2Y (s) = .
s
Substituting the values of the initial conditions and solving for Y (s), we find
that
1 e−s
Y (s) = +
(s − 2)(s − 1) s(s − 2)(s − 1)
1 1 e−s e−s e−s
= − + + − .
s−2 s−1 2s 2(s − 2) s − 1
Taking the inverse of Y (s) term-by-term, the final answer is
y(t) = e2t − et + 12 + 21 e2(t−1) − et−1 H(t − 1).
Substituting the values of the initial conditions and solving for Y (s), we find
that
s 3 1 s
Y (s) = 2 + − 2 e−4s .
s +4 4 s s +4
Taking the inverse of Y (s) term-by-term, the final answer is
Substituting the values of the initial conditions and solving for Y (s), we find
that
4e−2s e−2s e−2s 2e−2s
Y (s) = = − − .
s(s + 2)2 s s + 2 (s + 2)2
Taking the inverse of Y (s) term-by-term, the final answer is
h i
y(t) = 1 − e−2(t−2) − 2(t − 2)e−2(t−2) H(t − 2).
410 Advanced Engineering Mathematics with MATLAB
e−s
s2 Y (s) − sy(0) − y ′ (0) + 3sY (s) − 3y(0) + 2Y (s) = .
s−1
Substituting the values of the initial conditions and solving for Y (s), we find
that
1 e−s
Y (s) = +
(s + 1)(s + 2) (s − 1)(s + 1)(s + 2)
1 1 1 e−s 1 e−s 1 e−s
= − + − + .
s+1 s+2 6s−1 2s+1 3s+2
Taking the inverse of Y (s) term-by-term, the final answer is
y(t) = e−t − e−2t + 16 et−1 − 21 e−(t−1) + 13 e−2(t−1) H(t − 1).
e−2s
s2 Y (s) − sy(0) − y ′ (0) − 3sY (s) + 3y(0) + 2Y (s) = .
s+1
Substituting the values of the initial conditions and solving for Y (s), we find
that
e−2s 1 e−2s 1 e−2s 1 e−2s
Y (s) = = − + .
(s − 2)(s − 1)(s + 1) 3s−2 2s−1 6s+1
e−s e−2s
s2 Y (s) − sy(0) − y ′ (0) − 3sY (s) + 3y(0) + 2Y (s) = − .
s s
Substituting the values of the initial conditions and solving for Y (s), we find
that
e−s e−2s
Y (s) = −
s(s − 1)(s − 2) s(s − 1)(s − 2)
e−s e−s e−s e−2s e−2s e−2s
= + − − − + .
2s 2(s − 2) s − 1 2s 2(s − 2) s − 1
1 e−sT
s2 Y (s) − sy(0) − y ′ (0) + Y (s) = − .
s s
Substituting the values of the initial conditions and solving for Y (s), we find
that
18. First we write the forcing function f (t) in terms of Heaviside step func-
tions:
f (t) = sin(t) + sin(t − π)H(t − π).
Then we take the Laplace transform of the ordinary differential equation and
find that
1 + e−sπ
s2 Y (s) − sy(0) − y ′ (0) + Y (s) = 2 .
s +1
Substituting the values of the initial conditions and solving for Y (s), we find
that
1 + e−sπ
Y (s) = 2 .
(s + 1)2
We must now invert the transform F (s) = 1/(s2 +1)2 . However, from Example
6.6.5, we have that
−1 1
L = 12 [sin(t) − t cos(t)].
(s2 + 1)2
19. First we write the forcing function f (t) in terms of Heaviside step func-
tions:
Then we take the Laplace transform of the ordinary differential equation and
find that
1 ae−as e−as ae−as
s2 Y (s)−sy(0)−y ′ (0)+3sY (s)−3y(0)+2Y (s) = 2
+ − 2 − .
s (s + 1) s s
Substituting the values of the initial conditions and solving for Y (s), we find
that
1 ae−as
Y (s) = 2 +
s (s + 2)(s + 1) (s + 1)2 (s + 2)
e−as ae−as
− 2 −
s (s + 2)(s + 1) s(s + 2)(s + 1)
1 1 1 3 1 ae−as
= − − + 2+
s + 1 4 s + 2 4s 2s s+2
−as −as −as
ae ae e 1 e−as
− + 2
− +
s+1 (s + 1) s+1 4s+2
−as −as −as
3e e ae ae−as ae−as
+ − 2
− − + .
4s 2s 2s 2(s + 2) s+1
Taking the inverse of Y (s) term-by-term, the final answer is
20. First we write the forcing function f (t) in terms of Heaviside step func-
tions:
t t−a t t−a
f (t) = + 1 − − H(t − a) − 1 − H(t − b)
a b−a a b−a
t t−a t−a t−b
= − + H(t − a) + H(t − b).
a a b−a b−a
Then we take the Laplace transform of the ordinary differential equation and
find that
1 e−as e−as e−bs
s2 Y (s) − sy(0) − y ′ (0) + ω 2 Y (s) = 2
− 2
− 2
+ .
as as (b − a)s (b − a)s2
Substituting the values of the initial conditions and solving for Y (s), we find
that
1 1 1 1 1 1
Y (s) = − 2 − − 2 e−as
aω 2 s2 s + ω2 aω 2 s2 s + ω2
1 1 1 −as 1 1 1
− − 2 e + − 2 e−bs .
(b − a)ω 2 s2 s + ω2 (b − a)ω 2 s2 s + ω2
Worked Solutions 413
Substituting the values of the initial conditions and solving for Y (s), we find
that
1 3
Y (s) = + e−2s .
(s − 1)2 (s − 1)2
Taking the inverse of Y (s) term-by-term, the final answer is
Substituting the values of the initial conditions and solving for Y (s), we find
that
1 e−s e−s
Y (s) = e−s = − .
(s − 4)(s − 1) 3(s − 4) 3(s − 1)
Taking the inverse of Y (s) term-by-term, the final answer is
1
y(t) = 3 e4(t−1) − et−1 H(t − 1).
Substituting the values of the initial conditions and solving for Y (s), we find
that
3 −2s 3 −2s 4 −5s 4 −5s
Y (s) = e − e + e − e .
s+2 s+3 s+3 s+2
414 Advanced Engineering Mathematics with MATLAB
Substituting the values of the initial conditions and solving for Y (s), we find
that
Ae−sτ Be−sτ
Y (s) = − 2
s(s + ω) s (s + ω)
A e−sτ e−sτ B ωe−sτ e−sτ e−sτ
= − − 2 − +
ω s s+ω ω s2 s2 s+ω
and
sY (s) − y(0) − 3X(s) − 4Y (s) = 0.
Substituting the values of the initial conditions and solving for X(s) and Y (s),
we find that
s−4 s−3 1
X(s) = = −
(s − 3)2 + 2 (s − 3)2 + 2 (s − 3)2 + 2
and
3
Y (s) = .
(s − 3)2 + 2
Taking the inverse of X(s) and Y (s) term-by-term, the final answer is
√ √
x(t) = cos( 2t)e3t − √1
2
sin( 2t)e3t
and √
y(t) = √3 sin( 2t)e3t .
2
Worked Solutions 415
and
sX(s) − x(0) + Y (s) − X(s) = 0.
Substituting the values of the initial conditions and solving for X(s) and Y (s),
we find that
1 4 2 1
X(s) = 2 = − −
s (2s − 1) 2s − 1 s s2
and
1−s 2 1 1
Y (s) = = − − 2.
s2 (2s
− 1) 2s − 1 s s
Taking the inverse of X(s) and Y (s) term-by-term, the final answer is
and
sX(s) − x(0) + Y (s) + X(s) = 2/s3 .
Substituting the values of the initial conditions and solving for X(s) and Y (s),
we find that
2 1 1 s+1
X(s) = = 2− +
s2 (s2 + 2s + 2) s s (s + 1)2 + 1
and
2 1 1
Y (s) = 3
− 2+ .
s s (s + 1)2 + 1
Taking the inverse of X(s) and Y (s) term-by-term, the final answer is
1
sX(s) − x(0) + 3X(s) − Y (s) =
s
and
sX(s) − x(0) + 3X(s) + sY (s) − y(0) = 0.
416 Advanced Engineering Mathematics with MATLAB
Substituting the values of the initial conditions and solving for X(s) and Y (s),
we find that
1 2 1 1 3
X(s) = + − = +
s(s + 3) s + 3 s(s + 1)(s + 3) 2(s + 1) 2(s + 3)
and
1 1 1
Y (s) = − = − .
s(s + 1) s+1 s
Taking the inverse of X(s) and Y (s) term-by-term, the final answer is
F1
(s2 − 1)X(s) − 2(s + 1)Y (s) =
s
and
F2
2(s − 1)X(s) + (s2 − 3)Y (s) = .
s
Solving for X(s) and Y (s),
and
(s2 − 1)F2 − 2(s − 1)F1
Y (s) = .
s(s2 − 1)(s2 + 1)
Using partial fraction, we find that
3F1 − 2F2 F1 F2 − F1 /2
X(s) = − +
s 2(s + 1) s−1
(1 + i)F2 /2 − F1 (1 − i)F2 /2 − F1
+ +
s−i s+i
and
and
y(t) = F2 − 2F1 + F1 e−t − F2 cos(t) + F1 cos(t) + F1 sin(t).
or 2
1 8 32 Aes /4
Y (s) = + 3 + 5 + .
s s s s5
In order for Y (s) to exist for all s, A = 0 and Y (s) = 1/s + 8/s3 + 32/s5 .
Inverting Y (s) term by term, we obtain y(t) = 1 + 4t2 + 4t4 /3.
Integrating from 0 to s,
2 2
s 3 es /2
Y (s) = A − 2 + (2 − s2 )es /2
,
or 2
2 1 (A − 2)e−s /2
Y (s) =
3
− + .
s s s3
In order for Y (s) to exist for all s, A = 2 and Y (s) = 2/s3 − 1/s. Inverting
Y (s) term by term, we obtain y(t) = t2 − 1.
s2 Y ′ (s) + 2sY (s) − y(0) + 2sY (s) − 2y(0) + sY ′ (s) + Y (s) + Y (s) = 0,
or
s(s + 1)Y ′ (s) + 2(2s + 1)Y (s) = 3y(0),
or
s2 (s + 1)2 Y ′ (s) + 2(2s + 1)(s2 + s)Y (s) = 3y(0)(s2 + s).
This last differential equation can be rewritten
d 2
s (s + 1)2 Y (s) = 3y(0)s(s + 1).
ds
Integrating with respect to s,
2 2 1 3 1 2
s (s + 1) Y (s) = A + 3y(0) s + s ,
3 2
or
A y(0) y(0)
Y (s) = + + .
s2 (s + 1)2 s + 1 2(s + 1)2
Using the convolution theorem to invert the first term on the right side and
tables for the others,
y(t) = A te−t + 2e−t + t − 2 + 21 y(0) te−t + 2e−t = C1 (t+2)e−t +C2 (t−2)
or
(s − b)2 Y ′ (s) + 2(1 + a)(s − b)Y (s) = (1 + 2a)y(0),
or
2(1 + a) (1 + 2a)y(0)
Y ′ (s) + Y (s) = .
s−b (s − b)2
This last differential equation can be rewritten
d
(s − b)2+2a Y (s) = (1 + 2a)y(0)(s − b)2a
ds
after multiplying the previous differential equation with its integrating factor
µ(s) = (s − b)2a+2 . Integrating with respect to s,
or
A y(0)
Y (s) = 2+2a
+ .
(s − b) s−b
Inverting the previous equation,
A
y(t) = y(0)ebt + t1+2a ebt = C1 + C2 t1+2a ebt .
(2a + 1)!
Section 12.9
and
(z + 1)etz (z + 1)etz
Res 2
; −3 = lim (z + 3) = −2e−3t .
(z + 2) (z + 3) z→−3 (z + 2)2 (z + 3)
420 Advanced Engineering Mathematics with MATLAB
Therefore,
f (t) = (2 − t)e−2t − 2e−3t .
where C is a semicircle of infinite radius with the diameter running along the
imaginary axis, and just to the right of it, and closed in the left half-plane.
The singularities are simple poles at z = 0 and z = ±bi and a second-order
pole at z = −a. The corresponding residues are
etz etz 1
Res 2 2 2
; 0 = lim z = 2 2,
z(z + a) (z + b ) z→0 z(z + a)2 (z 2 + b2 ) a b
etz etz
Res ; bi = lim (z − bi)
z(z + a)2 (z 2 + b2 ) z→bi z(z + a)2 (z 2 + b2 )
ebti a2 − b2 − 2iab
=− ,
2b2 (a2 + b2 )2
etz etz
Res 2 2 2
; −bi = lim (z + bi)
z(z + a) (z + b ) z→−bi z(z + a)2 (z 2 + b2 )
e−bti a2 − b2 + 2iab
=−
2b2 (a2 + b2 )2
and
etz d 2 etz
Res ; −a = lim (z + a)
z(z + a)2 (z 2 + b2 ) z→−a dz z(z + a)2 (z 2 + b2 )
tz
te etz 2etz
= lim − 2 2 +
z→−a z(z 2 + b2 ) z (z + b2 ) (z 2 + b2 )2
at e−at e−at 2 e−at
=− 2 2 − − .
a (a + b2 ) a2 (a2 + b2 ) (a2 + b2 )2
1 1 + at 2
f (t) = − 2 2 e−at − 2 e−at
a 2 b2 a (a + b2 ) (a + b2 )2
(a2 − b2 ) 2ab
− 2 2 cos(bt) − 2 2 sin(bt).
b (a + b2 )2 b (a + b2 )2
422 Advanced Engineering Mathematics with MATLAB
where C is a semicircle of infinite radius with the diameter running along the
imaginary axis, and just to the right of it, and closed in the left half-plane.
From Jordan’s lemma, this holds only for t > 1. If t < 1, then the contour
is closed in the right half-plane and f (t) = 0. The singularities are a second-
order pole at z = 0 and a simple pole at z = −2. The corresponding residues
are (t−1)z
e d e(t−1)z
Res 2 ; 0 = lim z2 2
z (z + 2) z→0 dz z (z + 2)
t − 1 (t−1)z 1 (t−1)z
= lim e − e
z→0 z+2 (z + 2)2
t−1 1
= −
2 4
and
e(t−1)z e(t−1)z 1
Res 2 ; −2 = lim (z + 2) 2 = e−2(t−1) .
z (z + 2) z→−2 z (z + 2) 4
Therefore, the inverse equals the sum of the residues or
t − 1 1 1 −2(t−1)
f (t) = − + e H(t − 1).
2 4 4
and
etz etz
Res ; z n = lim (z − z n )
z(1 + e−az ) z→zn z(1 + e−az )
exp[±(2n − 1)πit/a]
=± .
(2n − 1)πi
Worked Solutions 423
Therefore,
∞
1 2 X sin[(2n − 1)πt/a]
f (t) = + .
2 π n=1 (2n − 1)π
and
etz etz
Res ; zn = lim (z − zn )
(z + b) cosh(az) z→zn (z + b) cosh(az)
exp[±(2n − 1)πit/(2a)]
=± .
ai[b ± (2n − 1)πi/(2a)] sin[(2n − 1)π/2]
X ∞
e−bt exp[(2n − 1)πit/(2a)]
f (t) = +
cosh(ab) n=1 ai[b + (2n − 1)πi/(2a)](−1)n+1
∞
X exp[−(2n − 1)πit/(2a)]
−
n=1
ai[b − (2n − 1)πi/(2a)](−1)n+1
X∞
e−bt sin[(2n − 1)πt/(2a)]
= − 8ab (−1)n 2 2
cosh(ab) n=1
4a b + (2n − 1)2 π 2
∞
X (2n − 1)π cos[(2n − 1)πt/(2a)]
+4 (−1)n .
n=1
4a2 b2 + (2n − 1)2 π 2
where C is a semicircle of infinite radius with the diameter running along, and
just to the right of, the imaginary axis and closed in the left half-plane. The
singularities are located at z = 0 and zn = ±2nπi/a, where n = 1, 2, 3, . . ..
Near z = 0,
etz 1 + tz + · · · 1 az
= = 1 + tz + + · · ·
z(1 − e−az ) az 2 (1 − az/2 + · · ·) az 2 2
so that
etz t 1
Res ; 0 = + .
z(1 − e−az ) a 2
The remaining residues are
etz etz exp(±2nπit/a)
Res ; z n = lim (z − z n ) =± .
z(1 − e−az ) z→zn z(1 − e−az ) 2nπi
Therefore,
∞
t 1 1 X sin(2nπt/a)
f (t) = + + .
a 2 π n=1 n
√ √
Finally, the inverse of exp(−τ z ) is τ exp(−τ 2 /4t)/2 πt3 .
Worked Solutions 425
Section 12.10
d2 U (x, s)
s2 U (x, s) − su(x, 0) − ut (x, 0) − = 0, 0 < x < 1,
dx2
d2 U (x, s)
− s2 U (x, s) = −x, 0 < x < 1.
dx2
xs cosh(s) − sinh(sx)
U (x, s) = .
s3 cosh(s)
Therefore,
X∞
16(−1)n+1 (2n − 1)πx
u(x, t) = sin
n=1
(2n − 1)3 π 3 2
exp[(2n − 1)πti/2] − exp[−(2n − 1)πti/2]
×
2i
∞
16 X (−1)n+1 (2n − 1)πx (2n − 1)πt
= 3 sin sin .
π n=1 (2n − 1)3 2 2
Worked Solutions 427
d2 U (x, s)
s2 U (x, s) − su(x, 0) − ut (x, 0) − = 0, 0 < x < 1,
dx2
with the boundary conditions U (0, s) = U (1, s) = 0. Substituting the initial
conditions into the first equation, we obtain
d2 U (x, s)
− s2 U (x, s) = −s sin(πx) + sin(πx), 0 < x < 1.
dx2
The general solution is
s−1
U (x, s) = A cosh(sx) + B sinh(sx) + sin(πx).
s2 + π 2
Using the boundary conditions, the transformed solution equals
s−1
U (x, s) = sin(πx).
s2+ π2
Inverting by inspection,
1
u(x, t) = sin(πx) cos(πt) − sin(πx) sin(πt).
π
d2 U (x, s)
s2 U (x, s) − su(x, 0) − ut (x, 0) − c2 = 0, 0 < x < a,
dx2
with the boundary condition U (0, s) = ω/(s2 + ω 2 ), U (a, s) = 0. Substituting
the initial conditions into the first equation, we obtain
d2 U (x, s) s2
− 2 U (x, s) = 0, 0 < x < a.
dx2 c
The general solution is
The transformed solution has simple poles at z = ±ωi and zn = ±nπci/a with
n = 1, 2, 3, . . . and a removable pole at z = 0. From Bromwich’s integral,
I
1 ω sinh[z(a − x)/c]etz
u(x, t) = dz.
2πi C (z 2 + ω 2 ) sinh(za/c)
428 Advanced Engineering Mathematics with MATLAB
where F (s) is the Laplace transform of f (t). Substituting the initial conditions
into the first equation, we obtain
d2 U (x, s) s2
− 2 U (x, s) = 0.
dx2 c
The general solution is
Replacing sinh and cosh by their definitions and expanding the denominator
as a geometric series,
cF (s) h −sx/c i
U (x, s) = e + e−s(2L−x)/c 1 + e−2sL/c + e−4sL/c + · · · .
s
Multiplying everything out and inverting term by term, we obtain
∞
X
u(x, t) = c f (t − x/c − 2nL/c)H(t − x/c − 2nL/c)
n=0
X∞
+c f (t + x/c − 2mL/c)H(t + x/c − 2mL/c).
m=1
d2 U (x, s)
s2 U (x, s) − su(x, 0) − ut (x, 0) = c2 − sQ(s) + q(0), a < x < b,
dx2
with the boundary conditions
Substituting the initial conditions into the first equation, we finally obtain
d2 U (x, s)
c2 − s2 U (x, s) = sQ(s), a < x < b.
dx2
The homogeneous solution to this equation is UH (x, s) = A sin[k(x − a)].
Substituting into the boudary condition, kn = (2n + 1)π/[2(b − a)], where
n = 0, 1, 2, . . ..
430 Advanced Engineering Mathematics with MATLAB
∞
4sQ(s) X 1 (2n + 1)π(x − a)
sQ(s) = sin .
π n=0
2n + 1 2(b − a)
Assuming that
∞
X
(2n + 1)π(x − a)
U (x, s) = An sin ,
n=0
2(b − a)
d2 U (x, s) e−x
s2 U (x, s) − su(x, 0) − ut (x, 0) − 2
= 2
dx s
1 1
U (0, s) = − and lim |U (x, s)| ∼ xn .
s s+1 x→∞
Substituting the initial conditions into the first equation, we finally obtain
d2 U (x, s) 2 e−x
− s U (x, s) = −x − .
dx2 s2
x e−x
U (x, s) = Ae−sx + + .
s2 s2 (s2 − 1)
Worked Solutions 431
d2 U (x, s) x
s2 U (x, s) − su(x, 0) − ut (x, 0) − 2
=
dx s+1
with the boundary conditions U (0, s) = s/(s2 +1) and limx→∞ |U (x, s)| ∼ xn .
Substituting the initial conditions into the first equation, we finally obtain
d2 U (x, s) x
− s2 U (x, s) = −s − .
dx2 s+1
1 x
U (x, s) = Ae−sx + + .
s s2 (s + 1)
d2 U (x, s)
s2 U (x, s) − su(x, 0) − ut (x, 0) − = 0, 0 < x < L,
dx2
with the boundary conditions
g
U (0, s) = 0, s2 U (L, s) − su(L, 0) − ut (L, 0) + ω 2 U ′ (L, s) = ,
s
432 Advanced Engineering Mathematics with MATLAB
d2 U (x, s)
− s2 U (x, s) = 0, 0<x<L
dx2
with
g
U (0, s) = 0, s2 U (L, s) + ω 2 U ′ (L, s) =
.
s
The general solution is U (x, s) = A cosh(sx)+B sinh(sx). Using the boundary
conditions, the transformed solution equals
g sinh(sx)
U (x, s) = .
s2 [s sinh(sL) + ω 2 cosh(sL)]
The transformed solution has simple poles at z = 0 and zn = ±λn i, where
λn = ω 2 cot(λn L) with n = 1, 2, 3, . . . From Bromwich’s integral,
I
1 g sinh(xz) etz
u(x, t) = dz.
2πi C z 2 [z sinh(zL) + ω 2 cosh(zL)]
Now, the residues equal
g sinh(xz) etz
Res 2 ; 0
z [z sinh(zL) + ω 2 cosh(zL)]
g etz sinh(xz) gx
= lim 2
lim = 2
z→0 z sinh(zL) + ω cosh(zL) z→0 z ω
and
g sinh(xz) etz
Res 2 ; ±λn i
z [z sinh(zL) + ω 2 cosh(zL)]
g sinh(xz) etz z − zn
= lim 2
lim 2
z→zn z z→z n z sinh(zL) + ω cosh(zL)
g sin(λn x) exp(±iλn t)
=− 2
λn [sin(λn L) + λn L cos(λn L) + ω 2 L sin(λn L)]
gω 2 sin(λn x) exp(±iλn t)
=− 2 4 .
λn (ω L + ω 2 + Lλ2n ) sin(λn L)
Therefore, the final answer is
∞
gx 2gω 2 X sin(λn x) cos(λn t)
u(x, t) = − .
ω2 L n=1 λ2n (ω 4 + ω 2 /L + λ2n ) sin(λn L)
with the boundary conditions limx→0 |U (x, s)| < ∞ and U (1, s) = Aω/ (s2 +
ω 2 ). Substituting the initial conditions into these equations,
d dU (x, s) s2
x − 2 U (x, s) = 0, 0 < x < 1.
dx dx c
The transformed solution has simple poles at z = ±ωi and zn = ±cβn i/2,
where J0 (βn ) = 0, n = 1, 2, 3, ... From Bromwich’s integral,
I √
1 Aω I0 (2z x/c)etz
u(x, t) = dz.
2πi C z 2 + ω 2 I0 (2z/c)
and
√
Aω I0 (2z x/c)etz
Res ; ±cβn i/2
z2 + ω2 I0 (2z/c)
√
(z ∓ cβn i/2) AωI0 (2z x/c)etz
= lim lim
z→±cβn i/2 I0 (2z/c) z→±cβn i/2 z2 + ω2
√
Aωc J0 (βn x ) exp(±iβn ct/2)
=± .
2i (ω 2 − c2 βn2 /4)J1 (βn )
d2 U (x, s)
s2 U (x, s) − su(x, 0) − ut (x, 0) − c2 = 0, 0 < x < ℓ,
dx2
434 Advanced Engineering Mathematics with MATLAB
d2 U (x, s) s2
− 2 U (x, s) = 0, 0 < x < ℓ.
dx2 c
E cosh[s(ℓ − x)/c]
U (x, s) = .
s cosh(sℓ/c)
and
E cosh[z(ℓ − x)/c] etz
Res ; zn
z cosh(zℓ/c)
E cosh[z(ℓ − x)/c] etz z − zn
= lim lim
z→zn z z→zn cosh(zℓ/c)
after using the summation rule for the geometric series. Taking the inverse
by inspection,
∞
X X∞
n x + 2nℓ n [(2n + 2)ℓ − x]
u(x, t) = E (−1) H t − +E (−1) H t − .
n=0
c n=0
c
d2 U (x, s)
= CR[sU (x, s) − u(x, 0)] + CL[s2 U (x, s) − su(x, 0) − ut (x, 0)].
dx2
d2 U (x, s)
− s(CR + CLs)U (x, s) = 0
dx2
with the boundary conditions U (0, s) = 0 and U (ℓ, s) = E/s. Applying the
boundary conditions,
p p
E sinh[x s(CR + CLs) ] E sinh[x s(1/T + s)/c]
U (x, s) = p = p ,
s sinh[ℓ s(CR + CLs) ] s sinh[ℓ s(1/T + s)/c]
√
where T = L/R and c = 1/ LC. Using Bromwich’s integral,
I p
E sinh[x z(1/T + z)/c]etz
u(x, t) = p dz.
2πi C z sinh[ℓ z(1/T + z)/c]
p
There is a simple poles at z = 0 and the points where sinh[ℓ z(1/T + z)
/c] = 0 or
p
zn = −1 ± 1 − 4n2 π 2 c2 T 2 /ℓ2 /(2T ).
436 Advanced Engineering Mathematics with MATLAB
Assuming 4π 2 L/R2 Cℓ2 > 1, then all of these latter poles can be written
p
zn = −1 ± i n2 δ 2 − 1 /(2T ),
At z = zn ,
" p #
sinh[x z(1/T + z)/c]etz
Res p ; zn
z sinh[ℓ z(1/T + z)/c]
p
z − zn sinh[x z(1/T + z)/c]etz
= lim p lim
z→zn sinh[ℓ z(1/T + z)/c] z→zn z
2nπic2 sinh(nπxi/ℓ) exp(zn t)
=
ℓ2 cosh(nπi)zn (1/T + 2zn )
√ nπx
4(−1)n πc2 T 2 i[−1 ∓ i n2 δ 2 − 1 ] √
2 2
=± √ sin e−t/2T ±it n δ −1/2T .
2 2 2
ℓ δ n n δ −1 2 ℓ
u(x, t) x
∞
2 −t/2T X (−1)n nπx sin(t√n2 δ 2 − 1/2T )
= − e sin √
E ℓ π n=1
n ℓ n2 δ 2 − 1
p
2 2
+ cos t n δ − 1/2T .
d2 P (x, s)
s2 P (x, s) − sp(x, 0) − pt (x, 0) − c2 = 0, 0 < x < L,
dx2
with the boundary conditions
p0
P (0, s) = , P ′ (L, s) = −ρU (L, s) + ρu(L, 0) = ρu0
s
from the x-momentum equation. Substituting the initial conditions into the
first equation, we obtain
d2 P (x, s) s2 s
− 2 P (x, s) = − 2 p0 , 0 < x < L.
dx2 c c
Worked Solutions 437
p0 ρu0 c sinh(sx/c)
P (x, s) = + .
s s cosh(sL/c)
d2 U (r, s) 2 dU (r, s) 2 s2
+ − U (r, s) − U (r, s) = 0, a < r < ∞,
dr2 r dr r2 c2
with the boundary condition
A A
U (a, s) = − , lim |U (r, s)| < ∞.
s s + c/a r→∞
cA −s(r−a)/c c2 A
U (r, s) = e + e−s(r−a)/c
(s + c/a)2 r s(s + c/a)2 r2
2
a a2 c a2 a 1
=A − 2 − − e−s(r−a)/c .
sr2 r (s + c/a) a r2 r (s + c/a)2
where τ = t − (r − a)/c.
as well as limr→∞ |U (r, s)| < ∞. Substituting the initial conditions into the
differential equation, we obtain
A −s(r−a)/c B s(r−a)/c
U (r, s) = e + e .
r r
Because the solution must be finite as r → ∞, B = 0. Using the other
boundary condition, the transformed solution equals
For t < (r − a)/c we close the Bromwich’s contour in the right half of the
z-plane according to Jordan’s lemma. Because there are no singularities,
u(r, t) = 0 for this case. For t > (r − a)/c, we close the contour in the left
half of the z-plane and compute the values of the residues. They are
exp(τ z)
Res ; −α
(z + α)[z 2 + 4zc/(3a) + 4c2 /(3a2 )]
exp(τ z)
= lim 2
z→−α z + 4zc/(3a) + 4c2 /(3a2 )
exp(−ατ ) exp(−ατ )
= 2 = √
α − 4αc/(3a) + 4c2 /(3a2 ) (β/ 2 − α)2 + β 2
and
exp(τ z) 2c
Res ; − ± βi
(z + α)[z 2 + 4zc/(3a) + 4c2 /(3a2 )] 3a
eτ z (z + 2c/(3a) ∓ βi)
= lim lim
z→−2c/(3a)±βi z + α z→−2c/(3a)±βi z 2 + 4zc/(3a) + 4c2 /(3a2 )
exp{[−2c/(3a) ± βi]τ }
=± ,
2βi[α − 2c/(3a) ± βi]
or
d2 U g
s2 U (x, s) − su(x, 0) − ut (x, 0) = c2 + .
dx2 s
Because u(x, 0) = −gx2 /2c2 and ut (x, 0) = 0,
d2 U (x, s) s2 sgx2 g
2
− 2 U (x, s) = − 2, U ′ (0, s) = U ′ (L, s) = 0.
dx c 2c4 sc
The solution to this differential equation is
sx sx gx2
U (x, s) = A cosh + B sinh − .
c c 2sc2
440 Advanced Engineering Mathematics with MATLAB
gL cosh(sx/c) gx2
U (x, s) = − .
cs2 sinh(sL/c) 2sc2
To finish the problem, we must invert the Laplace transform. This is given
by the Bromwich’s integral,
I ∞
gL cosh(zx/c) etz gL X cosh(zx/c) etz
dz = Res ; z n .
2πic C z 2 sinh(zL/c) c n=0 z 2 sinh(zL/c)
Therefore,
cosh(zx/c) etz x2 ct2 L
Res 2
; 0 = + − .
z sinh(zL/c) 2cL 2L 6c
For zn = ±nπci/L,
cosh(zx/c) etz cosh(zx/c) etz z − zn
Res 2
; z n = lim lim
z sinh(zL/c) z→zn z2 z→zn sinh(zL/c)
L cos(nπx/L) exp(±nπcti/L)
=− .
n2 π 2 c cos(nπ)
or
d2 U 1
s2 U (x, s) − su(x, 0) − ut (x, 0) = − .
dx2 s
Because u(x, 0) = 0 and ut (x, 0) = 1 − x2 ,
d2 U (x, s) 1 1
− s2 U (x, s) = + x2 − 1, U ′ (0, s) = 0, U ′ (1, s) = .
dx2 s s
The solution to this differential equation is
1 − x2 1 2
U (x, s) = A cosh (sx) + B sinh (sx) + − 3 − 4.
s2 s s
Satisfying the boundary conditions,
1 − x2 1 2 cosh(sx) 2 cosh(sx)
U (x, s) = 2
− 3− 4+ 2 + 3 .
s s s s sinh(s) s sinh(s)
To finish the problem, we must invert the Laplace transforms. This is given
by the Bromwich’s integral,
I X∞
1 cosh(zx)etz cosh(zx)etz
dz = Res ; z n
2πi C z 2 sinh(z) n=0
z 2 sinh(z)
and I
X∞
1 cosh(zx)etz cosh(zx)etz
dz = 2 Res ; z n .
πi C z 3 sinh(z) n=0
z 3 sinh(z)
cosh(zx)etz (1 + z 2 x2 /2 + · · ·)(1 + tz + t2 z 2 /2 + t3 z 3 /6 + · · ·)
=
z 2 sinh(z) z 3 (1 + z 2 /6 + · · ·)
2
1 t t x2 1 1
= 3+ 2+ + − + ···,
z z 2 2 6 z
and
cosh(zx)etz (1 + z 2 x2 /2 + · · ·)(1 + tz + t2 z 2 /2 + t3 z 3 /6 + · · ·)
3
=
z sinh(z) z 4 (1 + z 2 /6 + · · ·)
2 3
1 t t x2 1 1 t x2 t t 1
= 4+ 3+ + − + + − + ···.
z z 2 2 6 z2 6 2 6 z
442 Advanced Engineering Mathematics with MATLAB
Therefore,
cosh(zx)etz t2 x2 1
Res ; 0 = + − ,
z 2 sinh(z) 2 2 6
and
cosh(zx)etz t3 x2 t t
Res 3
; 0 = + − .
z sinh(z) 6 2 6
For zn = nπi,
cosh(zx)etz cosh(zx)etz
Res 2 +2 2 ; nπi
z sinh(z) z sinh(z)
cosh(zx)etz 2 cosh(zx)etz z − nπi
= lim +
z→nπi z2 z3 sinh(z)
cos(nπx) nπit cos(nπx)
=− 2 2 e −2 3 3 enπit .
n π cos(nπ) n π i cos(nπ)
For zn = −nπi,
cosh(zx)etz cosh(zx)etz
Res 2 +2 2 ; −nπi
z sinh(z) z sinh(z)
cosh(zx)etz 2 cosh(zx)etz z + nπi
= lim +
z→−nπi z2 z3 sinh(z)
cos(nπx) −nπit cos(nπx)
=− 2 2 e +2 3 3 e−nπit .
n π cos(nπ) n π i cos(nπ)
X∞
2t x2 1 cos(nπt) 2 sin(nπt)
u(x, t) = + − −2 (−1)n cos(nπx) + .
3 2 6 n=1
n2 π 2 n3 π 3
or
d2 U dU
s2 U (x, s) − su(x, 0) − ut (x, 0) + ksU (x, s) − ku(x, 0) = c2 + αc2 .
dx2 dx
Substitution into the u(x, t) equation and simplification leads to the final
answer.
P
L[utt ] = c2 L[uxx ] + L[δ(t − x/V )]
ρV
or
d2 U P −sx/V
s2 U (x, s) − su(x, 0) − ut (x, 0) = c2 + e .
dx2 ρV
Because u(x, 0) = ut (x, 0) = 0,
d2 U (x, s) P −xs/V
s2 U (x, s) = c2 + e .
dx2 ρV
∞
X nπx
e−sx/V = An sin , 0 < x < L,
n=1
L
where Z
2 L nπx
An = e−sx/V sin dx
L 0 L
L
2 −sx/V s sin(nπx/L)/V − nπ cos(nπx/L)/L
= e
L s2 /V 2 + n2 π 2 /L2 0
2nπV 2 h i
= 2 2 2
1 − (−1)n e−sL/V .
L (s + βn )
Thus, we must solve the ordinary differential equation,
2P X βn h i nπx
∞
d2 U s2 n −sL/V
− U = − 1 − (−1) e sin .
dx2 c2 ρLc2 n=1 s2 + βn2 L
Substituting in
∞
X nπx
U (x, s) = Bn sin ,
n=1
L
2P βn h i
n −sL/V
Bn = 1 − (−1) e
ρL(s2 + αn2 )(s2 + βn2 )
h i
2P βn 1 1 n −Ls/V
= − 1 − (−1) e .
ρL(βn2 − αn2 ) s2 + αn2 s2 + βn2
Worked Solutions 445
Therefore,
∞
2P X βn 1 1
U (x, s) = − 2
ρL n=1 (βn2 − αn2 ) s2 + αn2 s + βn2
h i nπx
× 1 − (−1)n e−Ls/V sin .
L
Term-by-term inversion plus the second shifting theorem yields
∞ nπx
2P X βn sin(αn t) sin(βn t)
u(x, t) = − sin
ρL n=1 αn (βn2 − αn2 ) βn2 − αn2 L
X ∞
2P L nπx
− H t− (−1)n sin
ρL V n=1 L
βn sin[αn (t − L/V )] sin[βn (t − L/V )]
× −
αn (βn2 − αn2 ) βn2 − αn2
∞ nπx
2P X sin(βn t) V sin(αn t)
= 2 2
− 2 2
sin
ρL n=1 αn − βn c αn − βn L
X ∞ nπx
2P L
− H t− (−1)n sin
ρL V n=1 L
sin[βn (t − L/V )] V sin[αn (t − L/V )]
× − .
αn2 − βn2 c αn2 − βn2
where Z a
2βn2 /a2 βn r
An = δ(r − α) J 1 r dr
(βn2 + h2 − 1) J12 (βn ) 0 a
2αβ 2 J1 (βn α/a)
= 2 2 n 2
a (βn + h − 1)J12 (βn )
and βn is the nth root of βJ1′ (β) + h J1 (β) = βJ0 (β) + (h − 1)J1 (β) = 0
because β[J0 (β) − J2 (β)] + 2h J1 (β)/a = 0. Thus, we must solve the ordinary
differential equation,
2
d2 U (r, s) 1 dU (r, s) s 1
+ − + 2 U (r, s)
dr2 r dr c2 r
∞
2c2 X βn2 J1 (βn α/a)
=− J1 (βn r/a).
sαa n=1 (βn + h2 − 1)J12 (βn )
2 2
Substituting
∞
X
βn r
U (r, s) = Bn J1
n=1
a
d
[sU (x, s) − u(x, 0)] + U (x, s) = 0.
dx
Substituting in the initial condition and simplifying, the differential equation
becomes
dU (x, s)
s + U (x, s) = 0.
dx
Taking the Laplace transform of the bounday conditions gives
1
U (0, s) = , and lim |U (x, s)| < ∞.
s+1 x→∞
d dU (x, s)
[sU (x, s) − u(x, 0)] + asU (x, s) − au(x, 0) + b = 0.
dx dx
Substituting in the initial condition and simplifying, the differential equation
becomes
dU (x, s)
(s + b) + asU (x, s) = a.
dx
Taking the Laplace transform of the boundary condition gives
1
U (0, s) = , and lim |U (x, s)| < ∞.
s−c x→∞
Using tables, the first shifting theorem, and the convolution theorem yields
the final solution:
Z t √
ct−ax
u(x, t) = 1 + c e e−(b+c)τ I0 2 bxτ dτ.
0
448 Advanced Engineering Mathematics with MATLAB
Section 12.11
1. Taking the Laplace transform of both sides of the partial differential equa-
tion,
d2 U (x, s)
sU (x, s) − u(x, 0) = − a2 [U (x, s) − T0 /s], 0 < x < 1,
dx2
subject to the boundary conditions U ′ (0, s) = U ′ (1, s) = 0. Substituting in
the initial condition yields the ordinary differential equation
d2 U (x, s) 2 a2 T0
− (s + a )U (x, s) = − .
dx2 s
The general solution is
a2 T0 p p
U (x, s) = + A cosh x s + a 2 + B sinh x s + a2 .
s(s + a2 )
Taking the derivative,
p h p p i
U ′ (x, s) = s + a2 A sinh x s + a2 + B cosh x s + a2 .
√
Applying the boundary condition at x = 0, U ′ (0, s) = s + a2 B = 0 or
B = 0. At x = 1,
p p
U ′ (1, s) = s + a2 A sinh s + a2 = 0,
2. Taking the Laplace transform of both sides of the partial differential equa-
tion,
d2 U (x, s)
sU (x, s) − u(x, 0) = , 0 < x < 1,
dx2
subject to the boundary conditions U ′ (0, s) = 0 and U (1, s) = 1/s2 . Substi-
tuting in the initial condition yields the ordinary differential equation
d2 U (x, s)
− sU (x, s) = 0.
dx2
√ √
The general solution is U (x, s) = A cosh (x s ) + B sinh (x s ) . Taking the
derivative,
√ √ √ √
U ′ (x, s) = A s sinh x s + B s cosh x s .
Worked Solutions 449
√
Applying the boundary condition
√ at x = 0, U ′ (0, s) = sB = 0 or B = 0. At
x = 1, U (1, s) = A cosh ( s ) = 1/s2 . Therefore, the transformed solution is
√
cosh (x s )
U (x, s) = 2 √ .
s cosh ( s )
and the residue equals t + (x2 − 1)/2. The residues for the poles at zn equals
√
cosh (x z ) etz
Res 2 √ ; zn
z cosh ( z )
√
cosh (x z ) etz z − zn
= lim 2
lim √
z→zn z z→z n cosh ( z)
cosh[(2n − 1)πxi/2] exp[−(2n − 1)2 π 2 t/4]
=
(2n − 1)4 π 4 /16
1
×
sinh[(2n − 1)πi/2]/[(2n − 1)πi]
16(−1)n+1 (2n − 1)πx (2n − 1)2 π 2 t
= cos exp − .
(2n − 1)3 π 3 2 4
3. Taking the Laplace transform of both sides of the partial differential equa-
tion,
d2 U (x, s)
sU (x, s) − u(x, 0) = , 0 < x < 1,
dx2
450 Advanced Engineering Mathematics with MATLAB
d2 U (x, s)
− sU (x, s) = 0.
dx2
√ √
The general solution is U (x, s) = A cosh (x s ) + B sinh (x s ) . Applying
the boundary condition
√ at x = 0, U (0, s) = A = 0 or A = 0. At x = 1,
U (1, s)√= B sinh ( s√) = 1/s. Therefore, the transformed solution is U (x, s) =
sinh (x s ) /[s sinh ( s )]. Taking the inverse,
I √
1 sinh (x z ) etz
u(x, t) = √ dz.
2πi C z sinh ( z )
√
The contour integral has simple poles at z = 0 and zn = −n2 π 2 with zn =
nπi. The residue at z = 0 is
√ √
sinh (x z ) etz sinh(x z )etz
Res √ ; 0 = lim √ = x.
z sinh ( z ) z→0 sinh( z )
sinh(nπxi) exp(−n2 π 2 t) 1
=
−n2 π 2 cosh(nπi)/(2nπi)
2(−1)n
= sin(nπx) exp(−n2 π 2 t).
nπ
4. Taking the Laplace transform of both sides of the partial differential equa-
tion,
d2 U (x, s)
sU (x, s) − u(x, 0) = , − 21 < x < 21 ,
dx2
subject to the boundary conditions U ′ − 21 , s = 0 and U ′ 12 , s = 1. Substi-
tuting in the initial condition yields the ordinary differential equation
d2 U (x, s)
− sU (x, s) = 0.
dx2
Worked Solutions 451
√ √
The general solution is U (x, s) = A cosh (x s ) + B sinh (x s ) . Applying the
boundary conditions, the transformed solution is
√
cosh (x + 21 ) s
U (x, s) = √ √ .
s sinh ( s )
There are two way of inverting the transform. First, replacing the hyperbolic
functions by their exponential definition, we have that
√ √
1 exp x + 21 s + exp − x + 12 s
U (x, s) = √ √ √
s s
e −e − s
1 1
√ √
= √ exp x − 2 s + exp − x + 23 s
s
√ √
× 1 + e−2 s + e−4 s + · · · .
On the other hand, we can use Bromwich’s integral and find that
I √ tz
1 cosh x + 21 z e
u(x, t) = √ √ dz.
2πi C z sinh( z )
√
The contour integral has simple poles at z = 0 and zn = −n2 π 2 with zn =
nπi. The residue at z = 0 is
√ tz
cosh x + 12 z e
Res √ √ ;0
z sinh( z )
h 2 i
1 + x + 21 z/2 + · · · [1 + tz + t2 z 2 /2 + · · ·]
= lim = 1.
z→0 1 + z/6 + · · ·
5. Taking the Laplace transform of both sides of the partial differential equa-
tion,
d2 U (x, s) 1
sU (x, s) − u(x, 0) − = , 0 < x < 1,
dx2 s
subject to the boundary conditions U (0, s) = U (1, s) = 0. Substituting in the
initial condition yields the ordinary differential equation
d2 U (x, s) 1
− sU (x, s) = − .
dx2 s
√ √
The general solution is U (x, s) = 1/s2 + A cosh (x s ) + B sinh (x s ) . Apply-
ing the boundary condition at x =√0, U (0, s) = 1/s2√+ A = 0 or A = −1/s2 .
At x = 1, U (1, s) = 1/s2 − cosh( s )/s2 + B sinh( s ) = 0. Therefore, the
transformed solution is
√ √ √
1 − cosh(x s ) [1 − cosh( s )] sinh(x s )
U (x, s) = − √ .
s2 s2 sinh( s )
The residue equals −x/2. The residues for the poles at zn equals
√ √
[1 − cosh( z )] sinh(x z )etz
Res √ ; z n
z 2 sinh( z )
√ √
[1 − cosh( z )] sinh(x z )etz z − zn
= lim lim √
z→zn z2 z→zn sinh ( z )
6. Taking the Laplace transform of both sides of the partial differential equa-
tion,
d2 U (x, s)
sU (x, s) − u(x, 0) = a2 , 0 < x < ∞,
dx2
subject to the boundary conditions U (0, s) = 1/s and limx→∞ |U (x, s)| < ∞.
Substituting in the initial condition yields the ordinary differential equation
d2 U (x, s) s
− 2 U (x, s) = 0.
dx2 a
√ √
The general solution is U (x, s) = Aex s/a +Be−x s/a . Applying the boundary
condition as x → ∞, A√ = 0. Using the boundary condition at x = 0, we
have that U√(x,s) = e−x s/a /s. From an extensive table of inverses, u(x, t) =
erfc x/(2a t ) , where erfc(·) is the complementary error function.
7. Taking the Laplace transform of both sides of the partial differential equa-
tion,
d2 U (x, s)
sU (x, s) − u(x, 0) = , 0 < x < ∞,
dx2
subject to the boundary conditions U ′ (0, s) = 1/s and limx→∞ |U (x, s)| < ∞.
Substituting in the initial condition yields the ordinary differential equation
d2 U (x, s)
− sU (x, s) = 0.
dx2
454 Advanced Engineering Mathematics with MATLAB
√ √
The general solution is U (x, s) = Aex s + Be−x s . Applying
√ √the boundary
′ −x s
condition
√ as x → ∞, A = 0. Because U (x, s) = − sBe , U ′√(1, s) =
− sB = 1/s. Therefore, the transformed solution is U (x, s) = −e−x s /s3/2 .
From an extensive table of inverses,
r 2
x t x
u(x, t) = x erfc √ −2 exp − ,
2 t π 4t
8. Taking the Laplace transform of both sides of the partial differential equa-
tion,
d2 U (x, s)
sU (x, s) − u(x, 0) = , 0 < x < ∞,
dx2
subject to the boundary conditions U (0, s) = 1/s and limx→∞ |U (x, s)| < ∞.
Substituting in the initial condition yields the ordinary differential equation
d2 U (x, s)
− sU (x, s) = −e−x .
dx2
√ √
The general solution is U (x, s) = e−x /(s−1)+Aex s +Be−x s . Applying the
boundary condition as x → ∞, A = 0. At x = 0, U (0, s) = 1/(s−1)+B = 1/s.
Therefore, the transformed solution is
e−x 1 1 √
U (x, s) = + − e−x s
.
s−1 s s−1
9. Taking the Laplace transform of both sides of the partial differential equa-
tion,
d2 U (x, s) dU (x, s)
sU (x, s) − u(x, 0) = a2 2
+ a2 (1 + δ) + a2 δU (x, s),
dx dx
subject to the boundary conditions U (0, s) = u0 /s and limx→∞ |U (x, s)| < ∞.
Substituting in the initial condition yields the ordinary differential equation
d2 U (x, s) dU (x, s) s
+ (1 + δ) + δ − U (x, s) = 0.
dx2 dx a2
Worked Solutions 455
10. Taking the Laplace transform of both sides of the partial differential
equation,
d2 U (x, s)
sU (x, s) − u(x, 0) = a2 , 0 < x < ∞,
dx2
subject to the boundary conditions limx→∞ |U (x, s)| < ∞ and
d2 U (x, s) s
− 2 U (x, s) = 0.
dx2 a
The general solution is
√ √
U (x, s) = Aex s/a
+ Be−x s/a
.
11. Taking the Laplace transform of both sides of the partial differential
equation,
d2 U (x, s)
sU (x, s) − u(x, 0) = − βU (x, s), 0 < x < ∞,
dx2
subject to the boundary conditions
1
ρU (0, s) − U ′ (0, s) = , lim |U (x, s)| < ∞.
s + β − σ2 x→∞
d2 U (x, s)
− (s + β)U (x, s) = 0.
dx2
The general solution is
√ √
U (x, s) = Aex s+β
+ Be−x s+β
.
where s′ = s + β. Using the first shifting theorem and the fact that
√ ! 2
−1 e−k s 1 k 2 √ k
L √ = √ exp − − aeak ea t erfc a t + √ ,
a+ s πt 4t 2 t
Worked Solutions 457
1 σ 2 t−βte−σx x √ eσx x √
u(x, t) = 2e erfc √ − σ t + erfc √ + σ t
ρ+σ 2 t ρ−σ 2 t
ρ 2 x √
− 2 eρx+ρ t−βt erfc √ + ρ t .
ρ − σ2 2 t
12. Taking the Laplace transform of both sides of the partial differential
equation,
d2 U (x, s) A −kx
sU (x, s) − u(x, 0) = a2 + e , 0 < x < ∞,
dx2 s
subject to the boundary conditions U ′ (0, s) = 0 and limx→∞ U (x, s) = u0 /s.
Substituting in the initial condition yields the ordinary differential equation
d2 U (x, s) s u0 A
− 2 U (x, s) = − 2 − 2 e−kx .
dx2 a a a s
The general solution is
u0 Ae−kx
U (x, s) = − 2 2 + Be−qx ,
s a s(k − q 2 )
√
where q = s/a. Applying the boundary conditions, the general solution
becomes
u0 A −kx k −qx
U (x, s) = + e − e
s s(s − a2 k 2 ) q
−kx
u0 Ae 1 1 Ae−qx Ae−qx
= + 2 2 2 2
− + √ − √ .
s a k s−a k s aks s ak s(s − a2 k 2 )
Ae−kx 2 2
u(x, t) = u0 + 2 2 ea k t − 1
" ra k
#
A t x2 x x
+ 2 exp − 2 − erfc √
ak π 4a t a 2a t
2 2 Z
Aea k t t −a2 k2 τ x2 dτ
− e exp − 2 √ .
ak 0 4a τ πτ
13. Taking the Laplace transform of both sides of the partial differential
equation,
d2 U (x, s) P
sU (x, s) − u(x, 0) = a2 − , 0 < x < L,
dx2 s
458 Advanced Engineering Mathematics with MATLAB
d2 U (x, s) s P
− 2 U (x, s) = 2 .
dx2 a sa
Now
I tz
1 sinh(qx) 1 e sinh(qx)
L−1 − 1 = − 1 dz.
s2 sinh(qL) 2πi C z 2 sinh(qL)
Because
etz sinh(qx) (1 + tz + t2 z 2 /2 + · · ·)[(x − L) + z(x3 − L3 )/6a2 + · · ·]
− 1 =
z 2 sinh(qL) z 2 L(1 + zL2 /6a2 + · · ·)
x − L t(x − L) x(x2 − L2 )
= + + + ···,
Lz 2 Lz 6a2 Lz
the residue at z = 0 is
tz
e sinh(qx) t(x − L) x(x2 − L2 )
Res 2
− 1 ;0 = + .
z sinh(qL) L 6a2 L
Because
the residue at z = 0 is
tz
e sinh[q(L − x)] t(L − x) (L − x)3 L(L − x)
Res ; 0 = + − .
z2 sinh(qL) L 6a2 L 6a2
14. Taking the Laplace transform of both sides of the partial differential
equation,
d2 U (x, s)
sU (x, s) − u(x, 0) = a2 + kU (x, s), 0 < x < L,
dx2
d2 U (x, s) s − k T0
− U (x, s) = − 2 .
dx2 a2 a
The general solution is
T0
U (x, s) = + A sinh(qx) + B sinh[q(L − x)],
s−k
√
where q = s − k/a. Applying the boundary conditions, the particular solu-
tion is
T0 kT0 sinh(qx) + sinh[q(L − x)]
U (x, s) = − .
s − k s(s − k) sinh(qL)
460 Advanced Engineering Mathematics with MATLAB
Now
I
−1 sinh(qx) + sinh[q(L − x)] 1 sinh(qx) + sinh[q(L − x)] tz
L = e dz.
s (s − k) sinh(qL) 2πi C z (z − k) sinh(qL)
There are simple poles at z = 0, z = k, and zn = k − n2 π 2 a2 /L2 , where
n = 1, 2, 3, . . .. Note here that qn = nπi/L.
The residues at z = 0 and z = k are
sinh(qx) + sinh[q(L − x)] tz sinh(qx) + sinh[q(L − x)] tz
Res e ; 0 = lim e
z (z − k) sinh(qL) z→0 (z − k) sinh(qL)
p p
sin(x k/a2 ) + sin[(L − x) k/a2 ]
= p
−k sin(L k/a2 )
p p
2 sin( L2 k/a2 ) cos[( L2 − x) k/a2 ]
= p
−k sin(L k/a2 )
p
cos[(L/2 − x) k/a2 ]
=− p ,
k cos(L k/a2 /2)
and
sinh(qx) + sinh[q(L − x)] tz sinh(qx) + sinh[q(L − x)] tz
Res e ; k = lim e
z (z − k) sinh(qL) z→k z sinh(qL)
ekt
= .
k
The residues for z = zn are
sinh(qx) + sinh[q(L − x)] tz
Res e ; zn
z (z − k) sinh(qL)
sinh(qx) + sinh[q(L − x)] tz z − zn
= lim e lim
z→zn z(z − k) z→zn sinh(qL)
15. Taking the Laplace transform of both sides of the partial differential
equation,
2
2 d U (x, s) 1
sU (x, s) − u(x, 0) = a +q + αU (x, s) , −L < x < L,
dx2 s
subject to the boundary conditions U (−L, s) = U (L, s) = 0. Substituting in
the initial condition yields the ordinary differential equation
d2 U (x, s) αq − s q
2
+ 2
U (x, s) = − 2 .
dx a a s
The general solution is
q √ √
U (x, s) = + A cosh x s − αq/a + B sinh x s − αq/a .
s(s − αq)
Applying the boundary conditions, the general solution becomes
√
q q cosh (x s − αq/a)
sU (x, s) = − √ .
s − αq (s − αq) cosh (L s − αq/a)
The transform sU (x, s) has a removable singularity at s = αq and simple
√
poles at sn = αq − (2n − 1)2 π 2 a2 /4L2 with sn − αq = (2n − 1)πai/2L.
From Bromwich’s integral,
I √
1 q q cosh (x z − αq/a)
ut (x, t) = − √ etz dz.
2πi C z − αq (z − αq) cosh (L z − αq/a)
Now the residue at zn = αq − (2n − 1)2 π 2 a2 /4L2 is
√
q cosh (x z − αq/a) etz
Res − √ ; zn
(z − αq) cosh (L z − αq/a)
√
z − zn q cosh (x z − αq/a) etz
= lim √ lim −
z→zn cosh (L z − αq/a) z→zn z − αq
q cos[(2n − 1)πx/2L] exp[αqt − (2n − 1)2 π 2 a2 t/4L2 ]
=
(2n − 1)2 π 2 a2 /4L2
(2n − 1)πai/L
×
sinh[(2n − 1)πi/2](L/a)
4q(−1)n
=− cos[(2n − 1)πx/2L] exp[αqt − (2n − 1)2 π 2 a2 t/4L2 ].
π(2n − 1)
Summing the residues,
∞
4q X (−1)n
ut (x, t) = − cos[(2n − 1)πx/2L]
π n=1 2n − 1
× exp[αqt − (2n − 1)2 π 2 a2 t/4L2 ].
462 Advanced Engineering Mathematics with MATLAB
Finally, we integrate the previous equation with respect to time and obtain
∞
4q X (−1)n cos[(2n − 1)πx/2L]
u(x, t) =
π n=1 (2n − 1)[αq − (2n − 1)2 π 2 a2 /4L2 ]
× 1 − exp[αqt − (2n − 1)2 π 2 a2 t/4L2 ] ,
where the constant of integration ensures that u(x, 0) = 0.
16. We begin by introducing the new variable v(r, t) = r u(r, t) and find that
∂v ∂2v
= 2, 0 ≤ r < 1, t > 0,
∂t ∂r
with the boundary conditions limr→0 v(r, t) → 0 and
∂v(1, t)
− v(1, t) = 1, t>0
∂r
and the initial condition v(r, 0) = 0, 0 ≤ r < 1. Taking the Laplace transform
of both sides of the partial differential equation,
d2 V (r, s)
sV (r, s) − v(r, 0) = , 0 ≤ r < 1,
dr2
subject to the boundary conditions limr→0 V (r, s) → 0 and V ′ (1, s)−V (1, s) =
1/s. Substituting in the initial condition yields the ordinary differential equa-
tion
d2 V (r, s)
− sV (r, s) = 0.
dr2
√ √
The general solution is V (r, s) = A cosh(r s ) + B sinh(r s ). Applying the
boundary √
√ condition as r√ → 0, A = 0. At r = 1, V ′ (1, s) − V (1, s) =
sB cosh( s ) − B sinh( s ) = 1/s. Therefore, the transformed solution is
√
sinh(r s )
V (r, s) = √ √ √ .
s [ s cosh( s ) − sinh( s )]
Because
√
sinh(r z )etz
√ √ √
z [ z cosh( z ) − sinh( z )]
(rz 1/2 + r3 z 3/2 /3! + · · ·)(1 + tz + t2 z 2 /2! + · · ·)
= √
z[ z(1 + z/2 + · · ·) − (z 1/2 + z 3/2 /3! + · · ·)]
(r + r3 z/3! + · · ·)(1 + tz + t2 z 2 /2! + · · ·)
=
z(1 + z/2 + z 2 /24 + · · · − 1 − z/6 − z 2 /5! − · · ·)
(r + r3 z/3! + · · ·)(1 + tz + t2 z 2 /2! + · · ·)
=
z(z/3 + z 2 /10 + · · ·)
3
3r r /2 + 3tr − 3r/10
= 2 + + ···,
z z
Worked Solutions 463
where tan(λn ) = λn .
17. Taking the Laplace transform of both sides of the partial differential
equation,
u0 + Q(s)
U ′ (b, s) = U (b, s), lim U (r, s) = .
r→∞ s
Substituting in the initial condition yields the ordinary differential equation
Q(s) + u0 A e−q(r−b)
U (r, s) = + ,
s r
√
where q = s/a. Applying the boundary condition at r = b,
[Q(s) + u0 ]b
A=− ,
s(q + 1/β)
Because
−√s (r−b)/a
−1 e
L √
s( s/a + 1/β)
√
r−b r − b a2 t a t r−b
= β erfc √ − exp + 2 erfc + √ ,
2a t β β β 2a t
the final solution is
Z t
b−β b−β
u(r, t) = u0 1 − f (r, t) + 1− f (r, t − τ ) q(τ ) dτ,
r 0 r
where
√
r−b r − b a2 t a t r−b
f (r, t) = erfc √ − exp + 2 erfc + √ .
2a t β β β 2a t
18. Taking the Laplace transform of both sides of the partial differential
equation,
d2 U (x, s)
sU (x, s) − u(x, 0) − ν = 0, 0 < x < L,
dx2
subject to the boundary conditions U (L, s) = 0 and sU (0, s) − 2µU ′ (0, s)
/m = g/s. Substituting in the initial condition yields the ordinary differential
equation
d2 U (x, s) s
− U (x, s) = 0.
dx2 ν
The general solution that satisfies the boundary condition U (L, s) = 0 is
r
s
U (x, s) = A sinh (L − x) .
ν
The contour integral has simple poles at z = 0 and zn = −νλ2n /L2 , where
λn tan(λn ) = 2µL/(mν) ≡ k. The residue at z = 0 is
p
g sinh[(L − x) z/ν ]etz
Res p √ p √ ; 0
z[z sinh(L z/ν ) + 2µ z cosh(L z/ν )/(m ν )]
p
g sinh[(L − x) z/ν ]etz
= lim p √ p √
z→0 z sinh(L z/ν ) + 2µ z cosh(L z/ν )/(m ν )
mg(L − x)
= ,
2µ
19. Taking the Laplace transform of both sides of the partial differential
equation,
d2 U (x, s)
sU (x, s) − u(x, 0) − ν = 0, 0 < x < L,
dx2
subject to the boundary conditions U (L, s) = 0 and
ms2 Y (s) − 2µU ′ (0, s) + mω 2 Y (s) = −msA and sY (s) − A = U (0, s).
d2 U (x, s) s
− U (x, s) = 0.
dx2 ν
The general solution that satisfies the boundary condition U (L, s) = 0 is
r
s
U (x, s) = B sinh (L − x) .
ν
466 Advanced Engineering Mathematics with MATLAB
and r
s
sY (s) − A = B sinh L .
ν
Eliminating B between the two equations,
r r r r
2 s s 2 s s
ms + 2µs coth L + mω Y (s) = msA + 2µA coth L ,
ν ν ν ν
or p
p
ms + 2µ s/ν coth L s/ν
Y (s) = A p p .
ms2 + 2µs s/ν coth L s/ν + mω 2
The contour integral has simple poles at λn which are the roots of
p √
λ2n + 2µλn3/2 coth L λn /ν /(m ν ) + ω 2 = 0.
The residue at z = λn is
h p p i
mz + 2µ z/ν coth L z/ν etz
Res p p ; λ n
mz 2 + 2µz z/ν coth L z/ν + mω 2
h p p i
(z − λn ) mz + 2µ z/ν coth L z/ν etz
= lim p p
z→λn
mz 2 + 2µz z/ν coth L z/ν + mω 2
h p p i
mλn + 2µ λn /ν coth L λn /ν eλn t
= q q
1/2 √ √
2mλn + 3µλn coth L λνn / ν − µLλn csch2 L λνn / ν
4µω 2 λ n eλ n t
= 2µ 2µL 6ω 2 µ
mL λ4n − ( 3 2 2 + ω4
mL )(1 + mν )λn + 2ω λn + mL λn
Worked Solutions 467
p √ 3/2
because coth L λn /ν = −m ν(ω 2 + λ2n )/(2µλn ). The final solution is
∞
4µAω 2 X λ n eλ n t
y(t) = 6ω 2 µ
.
mL n=1 λ4n − ( 2µ )(1 + 2µL 3 + 2ω 2 λ2n + + ω4
mL mν )λn mL λn
20. Taking the Laplace transform of both sides of the partial differential
equation,
d2 U (x, s)
sU (x, s) − u(x, 0) − a2 = 0, 0 < x < L,
dx2
F cosh(qx)
U (x, s) = .
s[a2 q sinh(qL) + α cosh(qL)]
The contour integral has simple poles at s = 0 and sn = −a2 λ2n /L2 , where λn
is the nth root of λ tan(λ) = αL/a2 , and qn = iλn /L. The residue at z = 0 is
cosh(qx) etz cosh(qx) etz 1
Res 2
; 0 = lim 2 = ,
z[a q sinh(qL) + α cosh(qL)] z→0 a q sinh(qL) + α cosh(qL) α
21. Taking the Laplace transform of both sides of the partial differential
equation,
d2 U (x, s)
sU (x, s) − u(x, 0) = , 0 ≤ x < 1,
dx2
subject to the boundary conditions U (0, s) = 0 and 3a[U ′ (1, s) − U (1, s)]
+sU (1, s) = 1. Substituting in the initial condition yields the ordinary differ-
ential equation
d2 U (x, s)
− sU (x, s) = 0.
dx2
√ √
The general solution is U (x, s) = A cosh(x s ) + B sinh(x s ). Applying the
boundary condition as U (0, s) = 0, A = 0. At x = 1,
√ √ √ √
3a s cosh( s ) − sinh( s ) + s sinh( s ) B = 1.
Therefore, the transformed solution is
√
sinh(x s )
U (x, s) = √ √ √ √ .
3a [ s cosh( s ) − sinh( s )] + s sinh( s )
We have simple poles at s = 0 and sn = −λ2n where λn cot(λn ) = (3a+λ2n )/3a.
From Bromwich’s integral,
I √
1 sinh(x z )etz
u(x, t) = √ √ √ √ dz.
2πi C 3a [ z cosh( z ) − sinh( z )] + z sinh( z)
Now
√
sinh(x z )etz
Res √ √ √ √ ;0
3a [ z cosh( z ) − sinh( z )] + z sinh( z )
xz(1 + x2 z/3! + · · ·)(1 + tz + · · ·) x
= lim = ,
z→0 3a(1 + z/2! + · · · − 1 − z/3! − · · ·) + z(1 + z/3! + · · ·) a+1
and
√
sinh(x z )etz
Res √ √ √ √ ; zn
3a [ z cosh( z ) − sinh( z )] + z sinh( z )
√
(z − zn ) sinh(x z )etz
= lim √ √ √ √
z→zn 3a [ z cosh( z ) − sinh( z )] + z sinh( z )
2 sin(λn x) exp(−λ2n t)
=
3a sin(λn ) + 2 sin(λn ) + λn cos(λn )
2 sin(λn x) exp(−λ2n t)
= .
[3a + 3 + λ2n /(3a)] sin(λn )
Worked Solutions 469
22. Taking the Laplace transform of both sides of the partial differential
equation,
dU (x, s) d2 U (x, s)
sU (x, s) − u(x, 0) + V = , 0 < x < 1,
dx dx2
subject to the boundary conditions U (0, s) = 1/s and U ′ (1, s) = 0. Substi-
tuting in the initial condition yields the ordinary differential equation
d2 U (x, s) dU (x, s)
2
−V − sU (x, s) = 0.
dx dx
The general solution is
h p i h p i
U (x, s) = AeV x/2 cosh (1 − x) s + V 2 /4 +BeV x/2 sinh (1 − x) s + V 2 /4 .
Now,
√ √ √
{ z cosh [(1 − x) z ] + (V /2) sinh [(1 − x) z ]} etz V 2
Res √ √ √ ;
(z − V 2 /4) [ z cosh ( z ) + (V /2) sinh ( z )] 4
√ √ √
{ z cosh [(1 − x) z ] + (V /2) sinh [(1 − x) z ]} etz
= lim2 √ √ √
z→V /4 z cosh ( z ) + (V /2) sinh ( z )
2
= eV t/4−V x/2
,
470 Advanced Engineering Mathematics with MATLAB
and
√ √ √
{ z cosh [(1 − x) z ] + (V /2) sinh [(1 − x) z ]} etz 2
Res √ √ √ ; −λ n
(z − V 2 /4) [ z cosh ( z ) + (V /2) sinh ( z )]
√ √ √
{ z cosh [(1 − x) z ] + (V /2) sinh [(1 − x) z ]} etz
= lim 2
z→−λn z − V 2 /4
z + λ2n
× lim 2 √ √ √
z→−λn z cosh ( z ) + (V /2) sinh ( z )
2
2λn {λn cos[λn (1 − x)] + (V /2) sin[λn (1 − x)]}e−λn t
= .
(λ2n + V 2 /4)[cos(λn ) − λn sin(λn ) + (V /2) cos(λn )]
23. Taking the Laplace transform of both sides of the partial differential
equation,
(s + b)U ′ (x, s) + asU (x, s) = 0, 0 < x < ∞,
subject to the boundary conditions limx→0 |U (x, s)| < ∞ and U (0, s) = 1/s.
The solution to this boundary-value problem
1 asx
U (x, s) = exp − .
s s+b
Because Z ξ
e−cξ = 1 − c e−cη dη,
0
Z ax
1 −η bη dη
U (x, s) = − e exp .
s 0 s+b s+b
Inverting the Laplace transform term-by-term and using the first shifting the-
orem, Z ax p
u(x, t) = 1 − e−bt e−η I0 2 btη dη.
0
24. Taking the Laplace transform of both sides of the partial differential
equation,
1 d dU (r, s)
r − sU (r, s) = 1, 0 ≤ r < a,
r dr dr
Worked Solutions 471
subject to the boundary conditions lim √r→0 |U (r, s)|√< ∞ and U (a, s) = 0.
The general solution is U (r, s) = AI0 (r s ) + BK0 (r s ) − 1/s. Applying the
boundary conditions,
√ √
I0 (r s ) − I0 (a s )
U (r, s) = √ .
s I0 (a s )
We have a removable singularity at s = 0 and simple poles at sn = −kn2 /a2 ,
where J0 (kn ) = 0 and n = 1, 2, 3, . . . From Bromwich’s integral,
I √ √
1 I0 (r z ) − I0 (a z ) tz
u(r, t) = √ e dz.
2πi C z I0 (a z )
Now,
√ √ √ √
I0 (r z ) − I0 (a z ) tz z − zn I0 (r z ) − I0 (a z ) tz
Res √ e ; zn = lim √ lim e
z I0 (a z ) z→zn I0 (a z ) z→zn z
2 J0 (kn r/a) −kn2 t/a2
=− e .
kn J1 (kn )
Thus, the final answer is
X∞
J0 (kn r/a) −kn2 t/a2
u(r, t) = −2 e .
k J (k )
n=1 n 1 n
25. Taking the Laplace transform of both sides of the partial differential
equation,
1 d dU (r, s) 1
r − sU (r, s) = − , 0 ≤ r < a,
r dr dr s
subject to the boundary conditions lim√ r→0 |U (r, s)| < √∞ and U (a, s) = 0.
The general solution is U (r, s) = AI0 (r s ) + BK0 (r s ) + 1/s2 . Applying
the boundary conditions,
√ √
I0 (a s ) − I0 (r s )
U (r, s) = √ .
s2 I0 (a s)
We have simple poles at s = 0 and sn = −kn2 /a2 where J0 (kn ) = 0 and
n = 1, 2, 3, . . . From Bromwich’s integral,
I √ √
1 I0 (a z ) − I0 (r z ) tz
u(r, t) = √ e dz.
2πi C z 2 I0 (a z)
Now,
√ √
I0 (a z ) − I0 (r z ) tz
Res √ e ; 0
z 2 I0 (a z)
[1 + a2 z/4 + · · · − 1 − r2 z/4 − · · ·][1 + tz + · · ·] a2 − r 2
= lim 2
= ,
z→0 z[1 + a z/4 + · · ·] 4
472 Advanced Engineering Mathematics with MATLAB
and
√ √ √ √
I0 (a z ) − I0 (r z ) tz z − zn I0 (a z ) − I0 (r z ) tz
Res √ e ; zn = lim √ lim e
z 2 I0 (a z) z→zn I0 (a z) z→zn z2
2a2 J0 (kn r/a) −kn2 t/a2
=− e .
kn3 J1 (kn )
Thus, the final answer is
X∞
a2 − r 2 J0 (kn r/a) −kn2 t/a2
u(r, t) = − 2a2 e .
4 k 3 J (k )
n=1 n 1 n
26. Taking the Laplace transform of both sides of the partial differential
equation,
1 d dU (r, s)
r − sU (r, s) = −1, 0 ≤ r < a,
r dr dr
subject to the boundary conditions limr→0 |U (r, s)| < √
∞ and U (a, s)√= 1/(s+
1/τ0 ). The general solution is U (r, s) = 1/s + AI0 (r s ) + BK0 (r s ). Ap-
plying the boundary conditions,
√
1 1 1 I0 (r s )
U (r, s) = + − √ .
s s + 1/τ0 s I0 (a s )
We have simple poles at s = 0, s = −1/τ0 and sn = −kn2 /a2 , where J0 (kn ) = 0
and n = 1, 2, 3, . . . From Bromwich’s integral,
I √
1 1 1 I0 (r z ) tz
u(r, t) = 1 + − √ e dz.
2πi C z + 1/τ0 z I0 (a z )
Now,
√ √
1 1 I0 (r z ) tz I0 (r z ) tz
Res − √ e ; 0 = − lim √ e = −1,
z + 1/τ0 z I0 (a z ) z→0 I0 (a z )
√ √
1 1 I0 (r z ) tz 1 I0 (r z ) tz
Res − √ e ;− = lim √ e
z + 1/τ0 z I0 (a z ) τ0 z→−1/τ0 I0 (a z )
p
J0 (r 1/τ0 ) −t/τ0
= p e ,
J0 (a 1/τ0 )
and
√
1 1 I0 (r z ) tz
Res − √ e ; zn
z + 1/τ0 z I0 (a z)
z − zn 1 1 √
= lim √ lim − I0 (r z )etz
z→zn I0 (a z ) z→zn z + 1/τ0 z
2kn 1 1 J0 (kn r/a) −kn2 t/a2
= 2 + 2 2 e
a −kn2 /a2 + 1/τ0 kn /a J1 (kn )
2a2 J0 (kn r/a) 2 2
= 2 2
e−kn t/a .
kn (a − kn τ0 )J1 (kn )
Worked Solutions 473
27. Taking the Laplace transform of both sides of the partial differential
equation,
1 d dU (r, s) s
r − 2 U (r, s) = 0, 0 ≤ r < b,
r dr dr a
2
subject to the boundary conditions limr→0 √ |U (r, s)| < ∞√and U (b, s) = k/s .
The general solution is U (r, s) = AI0 (r s/a) + BK0 (r s/a). Applying the
boundary conditions, √
k I0 (r s/a)
U (r, s) = 2 √ .
s I0 (b s/a)
√
We have second-order pole at z = 0 and simple poles at iκn = zn /a or
2 2
zn = −a κn , where J0 (κn b) = 0 and n = 1, 2, 3, . . . From Bromwich’s integral,
I √
k I0 (r z/a)etz
u(r, t) = √ dz.
2πi C z 2 I0 (b z/a)
Now,
√
I0 (r z/a)etz d (1 + r2 z/4a2 + · · ·)(1 + tz + · · ·)
Res 2 √ ; 0 = lim
z I0 (b z/a) z→0 dz 1 + b2 z/4a2 + · · ·
b2 − r 2
=t− ,
4a2
and
√ √
I0 (r z/a)etz z − zn I0 (r z/a)etz
Res √ ; z n = lim √ lim
z 2 I0 (b z/a) z→zn I0 (b z/a) z→zn z2
√ √
2a zn I0 (r zn /a)etzn
= ′ √
bI0 (b z/a) zn2
2 2 2 2
2iI0 (irκn )e−a κn t 2J0 (κn r)e−a κn t
= = .
a2 bκ3n I0′ (ibκn ) a2 bκ3n J1 (κn b)
∂u 1 ∂v ∂u 1 ∂v v ∂2u 1 ∂2v 2 ∂v 2v
= , = − 2, 2
= 2
− 2 + 3.
∂t r ∂t ∂r r ∂r r ∂r r ∂r r ∂r r
Substituting these equations into the original differential equation and bound-
ary conditions yields the desired result.
Taking the Laplace transform of the partial differential equation in Step
1 gives
d2 V (r, s) s A
− 2 V (r, s) = − 3 , α < r < β,
dr2 a sr
along with
V (α, s)
V ′ (α, s) + = V (β, s) = 0.
α
To find the particular solution, we use the variation of parameters:
Then,
W1 W2
u′1 (r, s) = and u′2 (r, s) = ,
W W
where
cosh(qr) sinh(qr)
W = = q,
q sinh(qr) q cosh(qr)
0 sinh(qr) A
W1 = = 3 sinh(qr),
−A/sr3 q cosh(qr) sr
and
cosh(qr) 0 A
W2 = = − 3 cosh(qr).
q sinh(qr) −A/sr3 sr
Thus,
Z r Z r
A sinh(qτ ) A cosh(qτ )
u1 (r, s) = dτ, and u2 (r, s) = − dτ.
sq β τ3 sq β τ3
Z β
A cosh[q(α − τ )]
V ′ (α, s) = Cq cosh[q(β − α)] + dτ,
s α τ3
and
Z β
A sinh[q(α − τ )]
V (α, s) = C sinh[q(α − β)] + dτ,
sq α τ3
Z β
A sinh[q(α − τ )]
[qα cosh(qℓ ) + sinh(qℓ )]C = dτ
sq α τ3
Z β
αA cosh[q(α − τ )]
− dτ.
s α τ3
Thus,
sinh[q(r − β)]
V (r, s) =
αq cosh(qℓ ) + sinh(qℓ )
" Z #
A β αq cosh[q(α − τ )] − sinh[q(α − τ )]
× − dτ
sq α τ3
Z
A β sinh[q(τ − r)]
− dτ
sq r τ3
Z ℓ
A sinh[q(β − r)] αq cosh(qη) + sinh(qη)
= dη
sq αq cosh(qℓ ) + sinh(qℓ ) 0 (α + η)3
Z β−r
sinh(qη)
− dη ,
0 (r + η)3
Z ℓ
etz sinh[q(β − r)] αq cosh(qη) + sinh(qη)
F (z) = dη
rzq αq cosh(qℓ ) + sinh(qℓ ) 0 (α + η)3
Z β−r
sinh(qη)
− dη ,
0 (r + η)3
476 Advanced Engineering Mathematics with MATLAB
Section 12.12
1. Let A(x, t) = w(x) + v(x, t), where w(x) is the steady-state solution and
v(x, t) is the transient part. We find the steady-state solution by solving
Worked Solutions 477
∂v ∂2v
= a2 2 , 0 < x < L, t > 0,
∂t ∂x
with the boundary conditions v(0, t) = v(L, t) = 0, t > 0 and the initial
condition v(x, 0) = −1 for 0 < x < L. We can now use separation of variables
and find that
X∞ nπx 2 2 2 2
v(x, t) = Bn sin e−a n π t/L .
n=1
L
Now
∞
4a2 π X (2m − 1)πx −a2 (2m−1)2 π2 t/L2
At (x, t) = (2m − 1) sin e .
L2 m=1 L
2. Let A(r, t) = w(r) + v(r, t) where w(r) is the steady-state solution and
v(r, t) is the transient part. We find the steady-state solution by solving
d dw
r = 0, lim |w(r)| < ∞, w(b) = 1.
dr dr r→0
with the boundary conditions limr→0 |v(r, t)| < ∞, v(b, t) = 0, t > 0 and the
initial condition v(r, 0) = −1 for 0 ≤ r < b. We can now use separation of
variables and find that
∞
X
kn r a2 kn2
v(r, t) = An J0 exp − 2 t ,
n=1
b b
where Z
b
2 kn r 2
An = − 2 rJ0 dr = − .
J1 (kn )b2 0 b kn J1 (kn )
The final solution is
X∞ 2 2
J0 (kn r/b) a k
A(r, t) = 1 − 2 exp − 2 n t .
k J
n=1 n 1 n
(k ) b
Now 2 2
∞
2a2 X kn J0 (kn r/b) a k
At (r, t) = 2 exp − 2 n t .
b n=1 J1 (kn ) b
For ϕ(τ ) = Gτ ,
∞ Z
2a2 X kn J0 (kn r/b) −a2 kn2 t/b2 t 2 2 2
u(r, t) = 2 e Gτ ea kn τ /b dτ
b n=1 J1 (kn ) 0
∞
X J0 (kn r/b) t
−a2 kn
2
t/b2 a2 k n
2
τ /b2 b2
= 2G e e τ− 2 2
k J (k )
n=1 n 1 n
a kn 0
∞
X J0 (kn r/b)
b2 b2 2 2 2
= 2G t − 2 2 + 2 2 e−a kn t/b .
k J (k )
n=1 n 1 n
a kn a kn
3. Taking the Laplace transform of both sides of the partial differential equa-
tion,
d2 A(x, s)
sA(x, s) − A(x, 0) = ν , 0<x<∞
dx2
subject to the boundary conditions A(0, s) = 1/s and limx→∞ A(x, s) < ∞.
Substituting in the initial condition yields the ordinary differential equation
d2 A(x, s) s
− A(x, s) = 0.
dx2 ν
The general solution is
√ √
A(x, s) = Cex s/ν
+ De−x s/ν
.
5. Let A(x, t) = 1 − hx/(1 + h) + ϕ(x, t), where the term 1 − hx/(1 + h) was
introduced so that we have a homogeneous boundary condition at x = 0. To
find ϕ, we solve
∂ϕ ∂2ϕ
= , 0 < x < 1, 0 < t,
∂t ∂x2
with the boundary conditions ϕ(0, t) = 0, ϕx (1, t) = −hϕ(1, t), 0 < t, and
the initial condition ϕ(x, 0) = hx/(1 + h) − 1. We can now use separation of
variables and find that
∞
X 2
ϕ(x, t) = Cn sin(kn x)e−kn t ,
n=1
where kn is the nth root of k cot(k) = −h. Using the initial condition,
∞
X hx
ϕ(x, 0) = Cn sin(kn x) = − 1,
n=1
1+h
where
R1
0
[hx/(1 + h) − 1] sin(kn x) dx 2 kn2 + h2
Cn = R1 2 =− .
sin (kn x) dx kn kn2 + h2 + h
0
X∞
hx kn2 + h2 2
A(x, t) = 1 − −2 2 2
sin(kn x)e−kn t .
1+h k (k + h + h)
m=1 n n
Worked Solutions 481
X∞
kn (kn2 + h2 ) 2
At (x, t) = 2 2 2
sin(kn x)e−kn t .
k +h +h
m=1 n
Section 12.13
d2 U
+ s2 U − su(0, y) − ux (0, y) = 0,
dy 2
or
d2 U
+ s2 U = s + f (s, y).
dy 2
Because
∞
2 X [1 − (−1)n ] nπy
1= sin
π n=1 n a
∞
d2 U 2
X 2s[1 − (−1)n ] nπy
+ s U = + An sin ,
dy 2 n=1
nπ a
and
X∞
2s[1 − (−1)n ] + nπAn nπy
U (s, y) = sin .
n=1
nπ(s2 − n2 π 2 /a2 ) a
X∞
2[1 − (−1)n ] nπy
U (s, y) = sin .
n=1
nπ(s + nπ/a) a
482 Advanced Engineering Mathematics with MATLAB
with |U (0, s)| < ∞ and U (a, s) = 0. Let us rewrite f (r) as the Fourier-Bessel
series:
∞
X
f (r) = An J0 (kn r/a),
n=1
Because
X∞
J0 (kn r/a)
1=2 , 0 ≤ r < a,
k J (k )
n=1 n 1 n
∞
1 d dU (r, s) 2 X sa2 J1 (kn ) − kn ak kn r
r + s2 U (r, s) = 2 J 0 ,
r dr dr a n=1 kn J12 (kn ) a
Ra
where ak = 0 f (r)J0 (kn r/a) r dr. Therefore,
∞
2 X sa2 J1 (kn ) − kn ak
U (r, s) = J0 (kn r/a), 0 ≤ r < a.
a2 n=1 (s2 − kn2 /a2 )kn J12 (kn )
The inverse of U (r, s) then follows directly from simple inversion and equals
X∞
J0 (kn r/a) −kn z/a
u(r, z) = 2 e .
k J (k )
n=1 n 1 n
Worked Solutions 483
Section 13.1
1.
∞ n
X X∞ n
1 1 1 2z
F (z) = z −n = = −1
=
n=0
2 n=0
2z 1 − (2z) 2z − 1
2.
∞
X ∞ iθ n
X e 1 z
F (z) = einθ z −n = = =
n=0 n=0
z 1 − (eθi /z) z − eθi
if |z| > 1.
3.
5 n
X 1 1 − (1/z)6 z6 − 1
F (z) = = = 6
n=0
z 1 − (1/z) z − z5
if |z| > 0.
4.
X10 n X∞ n 11 X∞ m
1 1 1 − (1/2z)11 1 1
F (z) = + = +
n=0
2z n=11
4z 1 − (1/2z) 4z m=0
4z
1 − (1/2z)11 1 1 (2z)11 − 1 1
= + 11
= +
1 − (1/2z) (4z) 1 − (1/4z) (2z)11 − (2z)10 (4z)11 − (4z)10
if |z| > 4.
5.
1 a 2 X a m
∞ ∞
1 X n −n a2 1 a2 + a − z
F (z) = − + a z =− + 2 = 2 − =
z n=2 z z m=0 z z − az z z(z − a)
if |z| > a.
Section 13.2
by Equation 13.2.25.
4. We first write
1
F (z) = 2 Z an ein + Z an e−in .
Because Z an ein = z/(z − aei ) and Z an e−in = z/(z − ae−i ),
1 z z
F (z) = +
2 z − aei z − ae−i
1 z z
= +
2 z − a cos(1) − ia sin(1) z − a cos(1) + ia sin(1)
1 z[z − a cos(1)]
= .
2 z − 2az cos(1) + a2
2
5.
z − cos(1)
F (z) = z −2 Z[cos(n)] =
z[z 2 − 2z cos(1) + 1]
6.
3z z
F (z) = Z(3) + Z e−2nT = +
z − 1 z − e−2T
7. Because
then
F (z) = cos(θ)Z[sin(nω0 T )] + sin(θ)Z[cos(nω0 T )]
z sin(θ)[z − cos(ω0 T )] + z cos(θ) sin(ω0 T )
=
z 2 − 2z cos(ω0 T ) + 1
z[z sin(θ) + sin(ω0 T − θ)]
=
z 2 − 2z cos(ω0 T ) + 1
8.
X(z)
F (z) = ,
1 − z −4
where
1 2 1
X(z) = 0 + + 2 + 3.
z z z
Worked Solutions 485
Therefore,
z 3 + 2z 2 + z z(z + 1)
F (z) = = .
z4 − 1 (z − 1)(z 2 + 1)
9.
X(z) 1
F (z) = , where X(z) = 1 − .
1 − z −2 z
Therefore,
z(z − 1) z
F (z) = = .
z2 − 1 z+1
10.
d d z z
Z(n) = −z Z(1) = −z =
dz dz z − 1 (z − 1)2
2 d d z z(z + 1)
Z(n ) = −z Z(n) = −z =
dz dz (z − 1)2 (z − 1)3
Therefore, W (z) = z 2 /(z −1)2 = F (z)G(z), because F (z) = G(z) = z/(z −1).
Therefore,
z2
W (z) = = F (z)G(z)
(z − 1)3
because F (z) = z/(z − 1) and G(z) = z/(z − 1)2 .
14.
∞
X ∞
X a n ∞
X
Z[an fn ] = an fn z −n = fn = fn ζ −n = F (ζ) = F (z/a),
n=0 n=0
z n=0
where ζ = z/a.
Section 13.3
1.
0.007143 + 0.08503z −1 + 0.1626z −2 + 0.2328z −3 + ···
2
2
12.6z −24z+11.4 0.09z + 0.9000z + 0.0900
0.09z 2 − 0.1714z + 0.0814
1.0714z + 0.0086
1.0714z − 2.0407 + 0.9693z −1
2.0493 − 0.9693z −1
2.0493 − 3.9024z −1 + · · ·
2.9331z −1 + · · ·
2.
0.5z −3 + z −4 + z −5 + 0.5z −6 + 0z −7 + 0z −8 + ···
2z 4 −2z 3 +2z−2 z +1
z −1 + 0z −1 + z −2 − z −3
2 + 0z −1 − z −2 + z −3
2 − 2z −1 + 0z −2 + 2z −3 − 2z −4
2z −1 − z −2 − z −3 + 2z −4 + · · ·
2z −1 − 2z −2 + 0z −3 + 2z −4 − · · ·
z −2 − z −3 + 0z −4 + · · ·
z −2 − z −3 + 0z −4 + · · ·
+ ···
3.
0.09836 + 0.3345z −1 + 0.6099z −2 + 0.7935z −3 + ···
2
15.25z −36.75z+30.75 1.5z 2
+ 1.5000z
1.5z 2 − 3.6147z + 3.0246
5.1147z − 3.0246
5.1147z − 12.3260 + 10.3136z −1
9.3014 − 10.3136z −1
9.3014 − 22.4138z −1 + ···
12.1002z −1 + ···
Worked Solutions 487
4.
0.3158z −1 + 0.8643z −2 + 1.1521z −3 + 1.1620z −4 + ···
5.
F (z) z+1 A B C
= = + + ,
z (z − 1)(z − 1/2)2 z − 1 z − 1/2 (z − 1/2)2
where
F (z) d F (z)
A = lim (z − 1) = 8, B = lim (z − 1/2)2 = −8
z→1 z z→1/2 dz z
and
F (z)
C = lim (z − 1/2)2 = −3.
z→1/2 z
Therefore,
8z 8z 3z
F (z) = − −
z − 1 z − 1/2 (z − 1/2)2
or
1 n 1 n
fn = 8 − 8 2 − 6n 2 .
6.
F (z) 1 − e−aT A B
= = + ,
z (z − 1)(z − e−aT ) z − 1 z − e−aT
where
F (z)
A = lim (z − 1) =1
z→1 z
and
F (z)
B= lim (z − e−aT ) = −1.
z→e−aT z
Therefore,
z z
F (z) = −
z − 1 z − e−aT
or
fn = 1 − e−anT .
488 Advanced Engineering Mathematics with MATLAB
7.
F (z) z A B
= = + ,
z (z − 1)(z − α) z−1 z−α
where
F (z) 1
A = lim (z − 1) =
z→1 z 1−α
and
F (z) α
B = lim (z − α) =− .
z→α z 1−α
Therefore,
1 z α z 1 − αn+1
F (z) = − or fn = .
1−αz−1 1−αz−α 1−α
8.
F (z) 2z − a − b A B
= = + ,
z (z − a)(z − b) z−a z−b
where
F (z)
A = lim (z − a) =1
z→a z
and
F (z)
B = lim (z − b) = 1.
z→b z
Therefore,
z z
F (z) = +
z−a z−b
or
f n = a n + bn .
9.
z+1 z z
F (z) = z −10 = z −10 + z −11
z − 1/2 z − 1/2 z − 1/2
or
1 n−10 1 n−11
fn = 2 Hn−10 + 2 Hn−11
from Equation 11.2.10.
10.
I
1 z+3 n 1 d2 n+1 n
fn = z dz = z + 3z
2πi C (z − 1/2)3 2 dz 2 z=1/2
h i
n−1 n−2 1 n
= 12 n(n + 1) 12 + 3n(n − 1) 21 = n(7n − 5) 2 .
Worked Solutions 489
11.
I
1 zn
fn = dz
2πi (z + 1)2 (z − 1/2)
C
zn zn 1
= Res ; −1 + Res ; ,
(z + 1)2 (z − 1/2) (z + 1)2 (z − 1/2) 2
where
zn d zn
Res ; −1 = lim
(z + 1)2 (z − 1/2) z→−1 dz z − 1/2
n−1
nz zn
= lim −
z→−1 z − 1/2 (z − 1/2)2
6n − 4
= (−1)n
9
and n
zn 1 zn 4 1
Res ; = lim = .
(z + 1)2 (z − 1/2) 2 z→1/2 (z + 1)2 9 2
Therefore, n
6n − 4 4 1
fn = (−1)n + .
9 9 2
12. I
1 zn
fn = 2 2
dz
2πi
C (z + 1) (z − 1)
zn zn
= Res ; −1 + Res ; 1 ,
(z + 1)2 (z − 1)2 (z + 1)2 (z − 1)2
where
zn d 2 zn
Res ; 1 = lim (z − 1)
(z + 1)2 (z − 1)2 z→1 dz (z − 1)2 (z + 1)2
nz n−1 2z n n−1
= lim − =
z→1 (z + 1)2 (z + 1)3 4
and
zn d 2 zn
Res ; −1 = lim (z + 1)
(z + 1)2 (z − 1)2 z→−1 dz (z − 1)2 (z + 1)2
n−1
nz 2z n 1−n
= lim 2
− 3
= (−1)n .
z→−1 (z − 1) (z − 1) 4
Therefore,
n−1
fn = [1 − (−1)n ].
4
490 Advanced Engineering Mathematics with MATLAB
13. I h i
1
fn = ea/z z n−1 dz = Res ea/z z n−1 ; 0
2πi C
Because
a a2
ea/z z n−1 = z n−1 + z n−2 + z n−3 + · · · ,
1! 2!
h i
Res ea/z z n−1 ; 0 = an /n!.
Therefore, fn = an /(n!).
Section 13.4
z(z + 1)
Z(yn+1 ) − Z(yn ) = Z(n2 ) or zY (z) − zy0 − Y (z) =
(z − 1)3
or
z z(z + 1)
Y (z) = + .
z − 1 (z − 1)4
Taking the inverse,
−1 z(z + 1)
yn = 1 + Z .
(z − 1)4
From the inversion integral,
I
−1 z(z + 1) 1 z+1 n 1 d3 n+1 n
Z = z dz = lim z +z
(z − 1)4 2πi C (z − 1)4 z→1 3! dz 3
or
z 2 Y (z) − z 2 y0 − zy1 − 2zY (z) + 2zy0 + Y (z) = 0
or
z
Y (z) = .
z−1
Taking the inverse, yn = 1.
or
z z
z 2 Y (z) − z 2 y0 − zy1 − 2zY (z) + 2zy0 + Y (z) = or Y (z) = .
z−1 (z − 1)3
or
z
zY (z) − zy0 + 3Y (z) =
(z − 1)2
or
z
Y (z) = .
(z − 1)2 (z + 3)
From the inversion integral,
I
1 zn
yn = dz
2πi C (z − 1)2 (z + 3)
zn zn
= Res ; 1 + Res ; −3 ,
(z − 1)2 (z + 3) (z − 1)2 (z + 3)
where n
zn d z n 1
Res ; 1 = lim = −
(z − 1)2 (z + 3) z→1 dz z+3 4 16
and
zn zn (−3)n
Res ; −3 = lim = .
(z − 1)2 (z + 3) z→−3 (z − 1)2 16
Therefore,
n (−3)n − 1
yn = + .
4 16
or
z
z 2 Y (z) − z 2 y0 − zy1 − 4Y (z) =
z−1
or
z
(z 2 − 4)Y (z) = z 2 + .
z−1
Using partial fractions,
3 z 7 z 1 z
Y (z) = + − .
4 z − 2 12 z + 2 3 z − 1
or
z
z 2 Y (z) − z 2 y0 − zy1 − 41 Y (z) =
z − 1/2
or I
1 zn
yn = dz.
2πi C (z − 1/2)2 (z + 1/2)
Computing the residues,
zn 1 d zn
Res ; = lim
(z − 1/2)2 (z + 1/2) 2 z→1/2 dz z + 1/2
nz n−1 zn
= lim −
z→1/2 z + 1/2 (z + 1/2)2
1 n
= (2n − 1) 2
and
n
zn 1 zn 1
Res ; − = lim = − .
(z − 1/2)2 (z + 1/2) 2 z→−1/2 (z − 1/2)2 2
1 n
n
Therefore, yn = (2n − 1) 2 + − 21 .
or
z 2 Y (z) − z 2 y0 − zy1 − 5zY (z) + 5zy0 + 6Y (z) = 0
or
2z z
Y (z) = −
z−2 z−3
by partial fractions. Inverting term-by-term, yn = 2n+1 − 3n .
or
z
z 2 Y (z) − z 2 y0 − zy1 − 3[zY (z) − zy0 ] + 2Y (z) =
z−1
or
z
Y (z) = .
(z − 1)2 (z − 2)
From the inversion integral,
I
1 zn
yn = dz
2πi C (z − 1)2 (z − 2)
zn zn
= Res ; 1 + Res ;2 ,
(z − 1)2 (z − 2) (z − 1)2 (z − 2)
where n
zn d z
Res ; 1 = lim = −n − 1
(z − 1)2 (z − 2) z→1 dz z−2
and
zn zn
Res 2
; 2 = lim = 2n .
(z − 1) (z − 2) z→2 (z − 1)2
Therefore, yn = 2n − n − 1.
or
2z
z 2 Y (z) − z 2 y0 − zy1 − 2[zY (z) − zy0 ] + Y (z) =
z−1
or
2z 2
Y (z) = .
(z − 1)3
From the inversion integral,
I
1 2z n+1 2z n+1
yn = dz = Res ; 1 ,
2πi C (z − 1)3 (z − 1)3
494 Advanced Engineering Mathematics with MATLAB
where
2z n+1 1 d2 3 2z
n+1
Res ; 1 = lim (z − 1) = n(n + 1).
(z − 1)3 2 z→1 dz 2 (z − 1)3
or
(z − 3)X(z) + 4Y (z) = 3z, −2X(z) + (z + 3)Y (z) = 2z.
Solving for X(z) and Y (z),
z(3z + 1) 2z z 2z 2 z z
X(z) = = + and Y (z) = = + .
z2 − 1 z−1 z+1 z2 − 1 z−1 z+1
z(3z + 23) 5z 2z
X(z) = = −
(z − 4)(z + 3) z−4 z+3
and
z(1 − 2z) z z
Y (z) = =− − .
(z − 4)(z + 3) z−4 z+3
Taking the inverse term-by-term, xn = 5 4n − 2(−3)n and yn = −4n − (−3)n .
or
(z − 1)X(z) + 2Y (z) = −z, (z + 6)Y (z) = −7z.
Worked Solutions 495
z(z − 8) z 2z 7z
X(z) = − = − and Y (z) = − .
(z − 1)(z + 6) z−1 z+6 z+6
6z 2 + 2z 5z z
X(z) = = +
(z − 3)(z + 1) z−3 z+1
and
2z(z − 1) z z
Y (z) = = + .
(z − 3)(z + 1) z−3 z+1
Taking the inverse term-by-term, xn = 5 3n + (−1)n and yn = 3n + (−1)n .
Section 13.5
Y (z) z
G(z) = =
X(z) z−1
Therefore,
Y (z) z2
G(z) = =
X(z) (z − 1)2
and the system is marginally stable.
496 Advanced Engineering Mathematics with MATLAB
Y (z) z
G(z) = =
X(z) z−3
Therefore,
Y (z) z2
G(z) = = 2 1
X(z) z − 4
Section 14.1
1.
Z ∞
dτ R t−ǫ
H(A) = A = −A lim ln |t − τ ||t+ǫ − A lim ln |t − τ ||−R
−∞ t−τ R→∞
ǫ→0
R→∞
ǫ→0
t−R
= −A lim ln =0
R→∞ t+R
If x = t − τ , then
Z Z
1 ∞ cos[ω(t − x)] sin(ωt) ∞ sin(ωx)
H [cos(ωt)] = − dτ = dx
π −∞ x π −∞ x
= sin(ωt) sgn(ω).
and
1 z−i 1
Res 2
; i = lim 2
= .
(t − z)(z + 1) z→i (t − z)(z + 1) 2i(t − i)
Therefore,
Z ∞
1 πi π (t + i)
PV dτ = − 2 + 2 .
−∞ (t − τ )(τ 2 + 1) t +1 t +1
5.
Z ∞
sin[2πω(t − τ )]
y(t) = x(τ ) dτ
−∞ π(t − τ )
Z
1 ∞ sin(2πωt) cos(2πωτ ) − cos(2πωt) sin(2πωτ )
= x(τ ) dτ
π −∞ t−τ
Z Z
sin(2πωt) ∞ cos(2πωτ ) cos(2πωt) ∞ sin(2πωτ )
= x(τ ) dτ − x(τ ) dτ
π −∞ t − τ π −∞ t−τ
= sin(2πωt)H [x(t) cos(2πωt)] − cos(2πωt)H [x(τ ) sin(2πωτ )]
498 Advanced Engineering Mathematics with MATLAB
8.
1 1
H[f (t) ∗ g(t)] = ∗ [f (t) ∗ g(t)] = [f (t) ∗ g(t)] ∗
πt πt
1 1
= ∗ f (t) ∗ g(t) = f (t) ∗ g(t) ∗
πt πt
= fb(t) ∗ g(t) = f (t) ∗ gb(t).
Section 14.2
√
b(t) = t(1 + t2 )/
1. Since x 2 (1 + t4 ) ,
Z ∞ Z ∞
t(1 + t2 )
x(t)b
x(t) dt = √ dt = 0,
−∞ −∞ 2 (1 + t4 )2
3. Since x
b(t) = ln |t/(t − a)|,
Z ∞ Z
1 a
x(t)b
x(t) dt = [ln(t) − ln(a − t)] dt
−∞ π 0
1 a a
= { [t ln(t) − t]|0 [(a − t) ln(a − t) + t]|0 } = 0.
π
Worked Solutions 499
so that w(t)
b = sin(t − a) − sin(t).
Because vb(t) = − cos(t),
Z a
a
u(t) ∗ vb(t) = − cos(t − x) dx = sin(t − x)|0 = sin(t − a) − sin(t) = w(t)
b
0
b = −πe−1 cos(t).
so that w(t)
Because vb(t) = t/(1 + t2 ),
Z ∞
x
u(t) ∗ vb(t) = sin(t − x) dx
−∞ 1 + x2
Z ∞ Z ∞
sin(t)x cos(x) cos(t)x sin(x)
= dx − dx
−∞ 1 + x2 −∞ 1 + x2
Z ∞
x sin(x)
= − cos(t) 2
dx = −πe−1 cos(t) = w(t)
b
−∞ 1 + x
Section 14.3
Section 14.4
where Z ∞
be (ω) = 1
X
Xe (τ )
dτ.
π −∞ ω−τ
t
If x(t) = e H(−t),
1 1 + ωi
X(ω) = = 2 .
1 − ωi ω +1
From this, we find that
1 t
x(t) = and x
b(t) = .
t2 + 1 t2 + 1
Checking the tables, we find this is true, verifying this version of Kramers-
Kronig relationship.
Therefore,
1 − t2 2t
x(t) = and x
b(t) = .
(1 + t2 )2 (1 + t2 )2
Therefore,
1 + a 2 + t2 1 − a 2 + t2
x(t) = and x
b(t) = t .
(1 + a2 − t2 )2 + 4t2 (1 + a2 − t2 )2 + 4t2
To evaluate the integral, we find the Cauchy principal value of the integral
via the residue theorem:
Z
1 ∞ dτ 1
= i Res ; ω
π −∞ (τ 2 + 1)(ω − τ ) (z 2 + 1)(ω − z)
1
+ 2i Res ; i
(z 2 + 1)(ω − z)
i 1 ω
=− 2 + = 2 .
ω +1 ω−i ω +1
Because the value of the integral and left side of the first line are the same,
we have verified the Kramers-Kronig relationship.
Section 15.2
g ′ + kg = δ(t − τ ), g(0|τ ) = 0.
The transfer function is 1/(s + k). Then the impulse response is e−kt .
Taking the inverse Laplace transform, the Green’s function is
The step response is given by a′ + ka = H(t) and A(s) = 1/[s(s + k)].
Taking the inverse, a(t) = 1 − e−kt /k.
or
(s − 3)(s + 1)G(s|τ ) = e−sτ .
The transfer function is 1/(s2 − 2s − 3) and the impulse response is
1 3t
g(t|0) = e − e−t .
4
Worked Solutions 503
The step response is given by a′′ − 2a′ − 3a = H(t) and A(s) = 1/[s(s −
1 3t
3)(s + 1)]. Taking the inverse, a(t) = 12 e + 41 e−t − 13 .
or
(s + 3)(s + 1)G(s|τ ) = e−sτ .
The transfer function is 1/(s2 + 4s + 3) and the impulse response is
1 −t
g(t|0) = e − e−3t .
2
Solving for G(s|τ ),
The step response is given by a′′ + 4a′ + 3a = H(t) and A(s) = 1/[s(s +
3)(s + 1)]. Taking the inverse, a(t) = 61 e−3t − 21 e−t + 13 .
or
[(s − 1)2 + 4]G(s|τ ) = e−sτ .
The transfer function is 1/[(s−1)2 +4] and the impulse response is 21 et sin(2t).
Solving for G(s|τ ),
e−sτ
G(s|τ ) = .
(s − 1)2 + 4
Using the first and second shifting theorems, the Green’s function is
The step response is given by a′′ − 2a′ + 5a = H(t) and A(s) = 1/{s[(s −
1) + 4]}. Taking the inverse, a(t) = 51 − 15 et cos(2t) + 10
2 1 t
e sin(2t).
or
(s − 2)(s − 1)G(s|τ ) = e−sτ .
The transfer function is 1/[(s − 2)(s − 1)] and the impulse response is g(t) =
e2t − et .
Solving for G(s|τ ),
The step response is given by a′′ − 3a′ + 2a = H(t) and A(s) = 1/[s(s −
2)(s − 1)]. Taking the inverse, a(t) = 21 + 21 e2t − et .
or
(s + 2)2 G(s|τ ) = e−sτ .
The transfer function is 1/(s + 2)2 and the impulse response is te−2t .
Solving for G(s|τ ), the Green’s function is
e−sτ
G(s|τ ) = .
(s + 2)2
Using the first and second shifting theorems, the Green’s function is
The step response is given by a′′ +4a′ +4a = H(t) and A(s) = 1/[s(s+2)2 ].
Taking the inverse, a(t) = 41 − 14 e−2t − 21 te−2t .
or
(s − 3)(s + 3)G(s|τ ) = e−sτ .
The transfer function is 1/(s2 − 9) and the impulse response is
g(t|0) = e3t − e−3t /6.
or
(s2 + 1)G(s|τ ) = e−sτ .
The transfer function is 1/(s2 + 1) and the impulse response is g(t) = sin(t).
Solving for G(s|τ ),
e−sτ
G(s|τ ) = 2 .
s +1
Inverting G(s|τ ) term by term, the Green’s function is
The step response is given by a′′ + a = H(t) and A(s) = 1/[s(s2 + 1)].
Taking the inverse, a(t) = 1 − cos(t).
or
s(s − 1)G(s|τ ) = e−sτ .
The transfer function is 1/[s(s − 1)] and the impulse response is g(t) = et − 1.
Solving for G(s|τ ),
The step response is given by a′′ + a′ = H(t) and A(s) = 1/[s2 (s − 1)].
Taking the inverse, a(t) = et − t − 1
(L − x> )(x< + α)
g(x|ξ) = .
L+α
To find the eigenfunction expansion, we note that p(x) = 1, q(x) = 0,
r(x) = 1, and λ = 0. Let λn = kn2 . The solution to the Sturm-Liouville
problem is
ϕn (x) = An sin[kn (L − x)].
This solution satisfies the boundary condition ϕn (L) = 0. From the boundary
condition ϕn (0) − αϕ′n (0) = 0,
or
tan(kn L) = −αkn .
To find the value of An so that ϕn (x) is orthonormal,
Z L
A2n sin2 [kn (L − x)] dx = 1,
0
Z L
1 2
2 An {1 − cos[2kn (L − x)]} dx = 1,
0
( )
L
1 2 1
2 An L+
2kn
sin[2kn (L − x)] = 1,
0
and
1 2 sin(kn L) cos(kn L)
2 An L−
kn
= 1.
X∞
sin[kn (L − ξ)] sin[kn (L − x)]
g(x|ξ) = 2 ,
n=1
[L + α cos2 (kn L)]kn2
or
X∞
(1 + α2 kn2 )sin[kn (L − ξ)] sin[kn (L − x)]
g(x|ξ) = 2 ,
n=1
[α + L(1 + α2 kn2 )]kn2
because [1 − cos2 (kn L)]2 = α2 kn2 cos2 (kn L) or (1 + α2 kn2 ) cos2 (kn L) = 1 from
the dispersion relationship.
or
[cos(kn L) + kn sin(kn L)]An + [sin(kn L) − kn cos(kn L)]Bn = 0.
Eliminating Bn from these equation, we see that
(1 + kn2 ) sin(kn L) = 0,
or
k02 = −1, kn L = nπ, n = 1, 2, 3, . . . .
The eigenfunctions are as follows:
λ0 = −1; ϕ0 (x) = A0 ex ,
and
and Z L h nπ nπx
nπx i2
A2n sin cos + dx = 1,
0 L L L
Z L nπx 2nπ nπx nπx
A2n sin2 + sin cos
0 L L L L
n2 π 2 nπx
+ cos2 dx = 1,
L2 L
and
L n2 π 2
A2n + = 1.
2 2L
Therefore, substituting these eigenfunctions into Equation 15.2.123,
∞
2ex+ξ 2L3 X ϕn (ξ)ϕn (x)
g(x|ξ) = − + ,
e2L − 1 π 2 n=1 n2 (n2 π 2 + L2 )
or more conveniently,
2kn
= tan(kn L), n = 1, 2, 3, . . . .
kn2 − 1
Now, because (kn2 − 1) sin(kn L) = 2kn cos(kn L), we can square this equation
and use cos2 (kn L) = 1 − sin2 (kn L) to obtain (1 + kn2 ) sin2 (kn L) = 4kn2 . Elim-
inating sin2 (kn L) from the previous displayed equation, we obtain the simple
result that
Bn2 (2 + L + kn2 L) = 2.
Therefore, substituting these eigenfunctions into Equation 15.2.123,
∞
X ϕ(ξ)ϕ(x)
g(x|ξ) = 2 ,
n=1
(2 + L + kn2 L)kn2
Therefore,
sinh[k(L − ξ)] sinh(kx)
g(x|ξ) =
k sinh(kL)
if x < ξ, and
sinh(kξ) sinh[k(L − x)]
g(x|ξ) =
k sinh(kL)
if x > ξ. More conveniently,
X∞
sin(nπξ/L) sin(nπx/L)
g(x|ξ) = 2L .
n=1
n2 π 2 + k 2 L2
if x < ξ, and
cosh(kξ) cosh[k(L − x)]
g(x|ξ) =
k sinh(kL)
if x > ξ. More conveniently,
Therefore,
if x < ξ, and
sinh(kξ){k cosh[k(x − L)] − sinh[k(x − L)]}
g(x|ξ) =
k sinh(kL) + k 2 cosh(kL)
if x > ξ. More conveniently,
sinh(kx< ){k cosh[k(x> − L)] − sinh[k(x> − L)]}
g(x|ξ) = .
k sinh(kL) + k 2 cosh(kL)
or
1 2 sin(2kn L)
2 An L− = 21 A2n L + cos2 (kn L) = 1.
2kn
Now, (1 + kn2 ) cos2 (kn L) = 1 since tan2 (kn L) = kn2 and eliminating sin2 (kn L)
from this equation. Therefore, substituting this orthonormal eigenfunctions
into Equation 15.2.123,
X∞
(1 + kn2 ) sin(kn ξ) sin(kn x)
g(x|ξ) = 2 .
n=1
[1 + (1 + kn2 )L](kn2 + k 2 )
if x < ξ, and
or
1 2 sin(2kn L)
2 An L− = 21 A2n L − cos2 (kn L) = 1.
2kn
Now, (1 + kn2 ) cos2 (kn L) = 1 since tan2 (kn L) = kn2 and eliminating sin2 (kn L)
from this equation. Therefore, substituting this orthonormal eigenfunctions
into Equation 15.2.123,
X∞
(1 + kn2 ) sin(kn ξ) sin(kn x)
g(x|ξ) = 2 .
n=1
[(1 + kn2 )L − 1](kn2 + k 2 )
Therefore,
Therefore,
if x < ξ, and
or
sin(2kn L) 1 2
1 2
2 An L+ = A aL − sin2 (kn L) = 1.
2kn 2a n
Now, (a2 + kn2 ) sin2 (kn L) = a2 since kn2 sin2 (kn L) = a2 cos2 (kn L) and elimi-
nating cos2 (kn L) from this equation. Therefore, substituting this orthonormal
eigenfunctions into Equation 15.2.123,
X∞
(a2 + kn2 ) cos[kn (ξ − L)] cos[kn (x − L)]
g(x|ξ) = 2 .
n=1
[(a2 + kn2 )L − a](kn2 + k 2 )
Therefore,
sinh[k(L − ξ)] − k cosh[k(L − ξ)]
A= ,
k[(k 2 + 1) sinh(kL) − 2k cosh(kL)]
and
sinh(kL) − k cosh(kL)
B= .
k[(k 2 + 1) sinh(kL) − 2k cosh(kL)]
Therefore,
if x < ξ, and
Z L
L
1 2
2 An [1 − cos(2kn x)] dx − A2n sin2 (kn x) 0
0
Z L
+ 12 kn2 A2n [1 + cos(2kn x)] dx = 1,
0
sin(2kn L) sin(2kn L)
A2n L − − 2A2n sin2 (kn L) + kn2 A2n L + = 2,
2kn 2kn
518 Advanced Engineering Mathematics with MATLAB
sin(kn L) cos(kn L)
A2n L(1 + kn2 )−2 sin2 (kn L) −
kn
+ kn sin(kn L) cos(kn L) = 2.
Now, 4kn2 cos2 (kn L) = (1−kn2 )2 sin2 (kn L) or 4kn2 = (1+kn2 )2 sin2 (kn L). Then,
A2n [(1+kn2 )L−2] = 2. Therefore, substituting this orthonormal eigenfunctions
into Equation 15.2.123,
∞
X ϕn (ξ)ϕn (x)
g(x|ξ) = 2 ,
n=1
[(1 + kn2 )L − 2](kn2 + k 2 )
Section 15.4
√
1. Let ξ = xt. Then,
√
∂g(x, t|0, 0) x
= J0′ (ξ) √ H(x)H(t) + J0 (ξ)H(x)δ(t),
∂t 2 t
and
∂ 2 g(x, t|0, 0) 1
= 41 J0′′ (ξ)H(x)H(t) + J0′ (ξ) √ H(x)H(t)
∂x∂t 4 xt
√ √
′ x ′ t
+ J0 (ξ) √ δ(x)H(t) + J0 (ξ) √ H(x)δ(t)
2 t 2 x
+ J0 (ξ)δ(x)δ(t).
Now, √
x
J0 (ξ)δ(x)δ(t) = δ(x)δ(t), J0′ (ξ) √ δ(x)H(t) = 0,
2 t
and √
t
J0′ (ξ) √ H(x)δ(t) = 0.
2 x
Therefore,
∂ 2 g(x, t|0, 0) 1
+ 4 g(x, t|0, 0)
∂x∂t
= 41 [J”0 (ξ) + J0′ (ξ)/ξ + J0 (ξ)] H(x)H(t) + δ(x)δ(t)
= δ(x)δ(t),
because the quantity in the square brackets equals zero since it satisfies Equa-
tion 6.5.1.
Worked Solutions 519
If we now substitute for g(x, t|ξ, τ ) and reverse the order of integration and
summation,
Z L
u(ξ, 0)gτ (x, t|ξ, 0) dξ
0
Z L
2 X nπx
∞
nπt πξ nπξ
=− sin cos cos sin dξ
L n=1 L L 0 L L
∞
8 X m 2mπx 2mπt
=− sin cos .
L m=1 4m2 − 1 L L
If we now substitute for g(x, t|ξ, τ ) and reverse the order of integration and
summation,
Z t
u(0, τ )gξ (x, t|0, τ ) dτ
0
∞ nπx Z t
2 X nπ(t − τ )
= (−1)n sin e−τ sin dτ
L n=1 L 0 L
Worked Solutions 521
Z
2 X nπx −t t s nπs
∞
= sin e e sin ds
L n=1 L 0 L
∞
X nπx
=2 sin
n=1
L
nπ −t nπt L nπt
× e − cos + sin ,
L2 + n2 π 2 L L2 + n2 π 2 L
Z L
u(ξ, 0)gτ (x, t|ξ, 0) dξ
0
Z L
2 X nπx
∞
nπt πξ nπξ
=− sin cos sin sin dξ
L n=1 L L 0 L L
πx
πt
= −2 sin cos ,
L L
and
Z L
uτ (ξ, 0)g(x, t|ξ, 0) dξ
0
2X1
∞ nπx nπt Z L
nπξ
= sin sin 1 sin dξ
π n=1 n L L 0 L
∞
2L X 1 nπx nπt
nπξ
L
=− 2 sin sin cos
π n=1 n2 L L L 0
X∞
4L 1 (2m − 1)πx (2m − 1)πt
= 2 sin sin .
π m=1 (2m − 1)2 L L
∞
X nπx
u(x, t) = 2 sin
n=1
L
nπ −t nπt L nπt
× e − cos + sin
L2 + n2 π 2 L L2 + n2 π 2 L
πx
πt
+ 2 sin cos
L L
X∞
4L 1 (2m − 1)πx (2m − 1)πt
+ 2 sin sin .
π m=1 (2m − 1)2 L L
522 Advanced Engineering Mathematics with MATLAB
If we now substitute for g(x, t|ξ, τ ) and reverse the order of integration and
summation,
Z t
uξ (L, τ )g(x, t|L, τ ) dτ
0
∞ Z t
4 X (−1)n+1 (2n − 1)πx (2n − 1)π(t − τ )
= sin sin dτ
π n=1 2n − 1 2L 0 2L
∞ τ =t
8L X (−1)n+1 (2n − 1)πx (2n − 1)π(t − τ )
= 2 sin cos
π n=1 (2n − 1)2 2L 2L τ =0
∞
8L X (−1)n+1 (2n − 1)πx (2n − 1)πt
=− 2 2
sin 1 − cos ,
π n=1 (2n − 1) 2L 2L
Z L
u(ξ, 0)gτ (x, t|ξ, 0) dξ
0
∞ Z L
2 X (2n − 1)πx (2n − 1)πt (2n − 1)πξ
=− sin cos ξ sin dξ
L n=1 2L 2L 0 2L
∞
8L X (−1)n+1 (2n − 1)πx (2n − 1)πt
=− 2 sin cos ,
π n=1 (2n − 1)2 2L 2L
and
Z L
uτ (ξ, 0)g(x, t|ξ, 0) dξ
0
Worked Solutions 523
∞ Z L
4X 1 (2n − 1)πx (2n − 1)πt (2n − 1)πξ
= sin sin 1 sin dξ
π n=1 2n = 1 2L 2L 0 2L
∞ L
8L X 1 (2n − 1)πx (2n − 1)πt (2n − 1)πξ
=− 2 sin sin cos
π n=1 (2n − 1)2 2L 2L 2L 0
∞
8L X 1 (2n − 1)πx (2n − 1)πt
= 2 2
sin sin .
π n=1 (2n − 1) 2L 2L
If we now substitute for g(x, t|ξ, τ ) and reverse the order of integration and
summation,
Z t Z
1 t
uξ (0, τ )g(x, t|0, τ ) dτ = (t − τ ) dτ
0 L 0
2X1
∞ nπx Z t nπ(t − τ )
+ cos sin dτ
π n=1 n L 0 L
t2
∞
2L X 1 nπx
nπt
= + 2 cos 1 − cos ,
2L π n=1 n2 L L
524 Advanced Engineering Mathematics with MATLAB
and
Z L Z
1 L
u(ξ, 0)gτ (x, t|ξ, 0) dξ = − 1 dξ
0 L 0
∞ nπx Z L
2 X nπt nπξ
− cos cos cos dξ
L n=1 L L 0 L
= −1.
t2
∞
2L X 1 nπx
nπt
u(x, t) = 1 − − 2 cos 1 − cos .
2L π n=1 n2 L L
Section 15.5
1. Let us define
Z ∞
1
G(x, s|ξ, τ ) = G(k, s|ξ, τ )eikx dk,
2π −∞
where Z ∞
G(k, s|ξ, τ ) = G(x, s|ξ, τ )e−ikx dx.
−∞
Because Z ∞
d2 G −ikx
e dx = −k 2 G(k, s|ξ, τ ),
−∞ dx2
and Z ∞
dG −ikx
e dx = ikG(k, s|ξ, τ ),
−∞ dx
the Fourier transform of the differential equation in Step 1 is
e−ikξ−sτ
G(k, s|ξ, τ ) = .
bk 2 + ikv + s − a
Taking the inverse Fourier transform,
Z ∞
e−sτ eik(x−ξ)
G(x, s|ξ, τ ) = dk.
2π −∞ s − a + bk 2 + ikv
Worked Solutions 525
where we broke the integral from (−∞, ∞) into two integrals from (−∞, 0)
and (0, ∞). In the integral from (−∞, 0) we substitute k with −k and change
the limits. This gives the second integral in the second line.
Equation 15.5.15 gives the Green’s function. Because g(−∞, t|ξ, τ ), gx (−∞, t
|ξ, τ ), g(∞, t|ξ, τ ), and gx (∞, t|ξ, τ ) tend to zero, the first two integrals van-
ishes. Therefore, the third integral gives u(x, t) and
Z ∞ 2
1 x + ξ2 xξ
u(x, t) = √ f (ξ) exp − sinh dξ.
πa2 t 0 4a2 t 2a2 t
3. Because
r
2 (2n − 1)πx (2n − 1)π
ϕn (x) = sin and kn = ,
L 2L 2L
and
Z L
u(ξ, 0)g(x, t|ξ, 0) dξ
0
2 2 Z L
2 X nπx
∞
n π t nπξ
= sin exp − 2 sin dξ
L n=1 L L 0 L
∞ nπx 2 2
2 X 1 − (−1)n n π t
= sin exp − 2
π n=1 n L L
∞
4 X 1 (2m − 1)πx (2m − 1)2 π 2 t
= sin exp − .
π m=1 2m − 1 L L2
Worked Solutions 527
and
Z L
u(ξ, 0)g(x, t|ξ, 0) dξ
0
Z ∞ nπx 2 2 Z L
L
dξ 2 X n π t nπξ
= + cos exp − 2 cos dξ
0 L L n=1 L L 0 L
= 1.
t
∞
2L X 1 nπx 2 2
n π t
u(x, t) = 1 − − 2 2
cos 1 − exp − 2 .
L π n=1 n L L
Worked Solutions 529
and
∞
2 X (2n − 1)πξ (2n − 1)πx
δ(x − ξ) = sin sin ,
L n=1 2L 2L
we find
(2n − 1)2 π 2 a2 2 2 2 (2n − 1)πξ
+ a k + s Gn = sin .
4L2 L 2L
Therefore,
2 sin[(2n − 1)πξ/(2L)]
Gn = e−sτ ,
L s + a k 2 + (2n − 1)2 π 2 a2 /(4L2 )
2
and
∞
2 X e−sτ
G(x, s|ξ, τ ) =
L n=1 s + a2 k 2 + (2n − 1)2 π 2 a2 /(4L2 )
(2n − 1)πξ (2n − 1)πx
× sin sin .
2L 2L
X∞
2 −a2 k2 (t−τ ) (2n − 1)πξ (2n − 1)πx
g(x, t|ξ, τ ) = e H(t − τ ) sin sin
L n=1
2L 2L
2 2 2
(2n − 1) π a (t − τ )
× exp − .
4L2
Section 15.6
1. Because we have
nπx
∞
2X nπξ
δ(x − ξ) = sin sin ,
a n=1 a a
530 Advanced Engineering Mathematics with MATLAB
we write
∞
X nπξ nπx
g(x, y|ξ, η) = Gn (y|η) sin sin .
n=1
a a
d2 Gn n2 π 2 2
2
− 2 Gn = − δ(y − η)
dy a a
1 nπ
Gn (y|η) = exp − |y − η| .
nπ a
Therefore, the final answer is
1X1
∞ nπ nπξ nπx
g(x, y|ξ, η) = exp − |y − η| sin sin .
π n=1 n a a a
2. Because we have
∞
2X (2n − 1)πξ (2n − 1)πx
δ(x − ξ) = cos cos ,
a n=1 2a 2a
we write
∞
X
(2n − 1)πξ (2n − 1)πx
g(x, y|ξ, η) = Gn (y|η) cos cos .
n=1
2a 2a
d2 Gn (2n − 1)2 π 2 2
2
− Gn = − δ(y − η)
dy 4a2 a
3. Because we have
2 X nπη nπy
∞
δ(y − η) = sin sin ,
b n=1 b b
we write
∞
X nπη nπy
g(x, y|ξ, η) = Gn (x|ξ) sin sin .
n=1
b b
d2 Gn n2 π 2 2
− Gn = − δ(x − ξ)
dx2 b2 b
and
nπ(a − x) nπ nπ(a − x)
Gn (x|ξ) = B β sinh + cosh .
b b b
The condition that the Green’s function must be continuous yields
nπ(a − ξ) nπ nπ(a − ξ)
A sinh(nπξ/b) = B β sinh + cosh .
b b b
532 Advanced Engineering Mathematics with MATLAB
and
g0 (r|ρ) = B ln(b/r), ρ < r < b.
From the continuity requirement on the Green’s function,
A ln(ρ/a) = B ln(b/ρ).
or
1
B+A= .
2π
Solving for A and B, we find that
ln(b/ρ)
ln(b/a)A = ,
2π
and
ln(ρ/a)
ln(b/a)B = .
2π
Therefore, the g0 (r|ρ) can be written
The solution to this ordinary differential equation that satisfies the boundary
conditions gn (a|ρ) = gn (b|ρ) = 0 is
n
r an
gn (r|ρ) = A n − n , a < r < ρ,
a r
and
rn bn
gn (r|ρ) = B − . ρ < r < b.
bn rn
From the continuity requirement on the Green’s function,
n n
ρ an ρ bn
A n − n =B n − n .
a ρ b ρ
and
bn an 1 ρn an
2B − = − − .
an bn nπ an ρn
Therefore,
1 1/ρn − ρn /b2n rn − a2n /rn
gn (r|ρ) =
2nπ 1 − (a/b)2n
for a < r < ρ, and
1 1/rn − rn /b2n ρn − a2n /ρn
gn (r|ρ) =
2nπ 1 − (a/b)2n
for ρ < r < b. Therefore, the final solution is
ln(r< /a) ln(b/r> )
g(r, θ|ρ, θ′ ) =
2π ln(b/a)
∞
1 X cos[n(θ − θ′ )] n
+ r< − a2n /r<
n n
1/r> n
− r> /b2n .
2π n=1
n [1 − (a/b)2n ]
is nπ/β
r
gn (r|ρ) = A , 0 < r < ρ,
ρ
and ρ nπ/β
gn (r|ρ) = B , ρ < r < ∞.
r
From the continuity requirement on the Green’s function, A = B. Integrating
the ordinary differential equation from r = ρ− to r = ρ+ , the second condition
is
ρ+
dgn 2
r =− ,
dr ρ− β
Worked Solutions 535
or
2
nπB + nπA = .
β
Solving for A and B,
1
A=B= .
nπ
Therefore,
nπ/β
1 r
gn (r|ρ) = , 0 < r < ρ,
nπ ρ
and
1 ρ nπ/β
gn (r|ρ) = , ρ < r < ∞.
nπ r
Therefore, the final solution is
∞
′ 1 X 1 nπ/β −nπ/β nπθ′ nπθ
g(r, θ|ρ, θ ) = r r> sin sin .
π n=1 n < β β
The solution to this ordinary differential equation that satisfies the boundary
conditions
lim |gn (r|ρ)| < ∞ and gn (a|ρ) = 0,
r→0
is r nπ/β
gn (r|ρ) = A , 0 < r < ρ,
a
and
r nπ/β a nπ/β
gn (r|ρ) = B − , ρ < r ≤ a.
a r
From the continuity requirement on the Green’s function,
" nπ/β #
ρ nπ/β ρ nπ/β a
A =B − .
a a ρ
536 Advanced Engineering Mathematics with MATLAB
and
1 ρ nπ/β
B=− .
nπ a
Therefore, Therefore, the final solution is
" #
1 X 1 r< nπ/β r nπ/β
∞ nπ/β
′ a >
g(r, θ|ρ, θ ) = −
π n=1 n a r> a
nπθ′ nπθ
× sin sin .
β β
7. Because
nπz
∞
2 X nπζ
δ(z − ζ) = sin sin ,
L n=1 L L
then
∞
X nπζ nπz
g(r, z|ρ, ζ) = gn (r|ρ) sin sin .
n=1
L L
Substituting into the partial differential equation and equating harmonics,
d2 g n 1 dgn n2 π 2 δ(r − ρ)
+ − gn = − .
dr2 r dr L2 πLr
Now
∞
δ(r − ρ) 1 X 1 km ρ km r
= J 0 J 0 ,
2πr πa2 m=1 J12 (km ) a a
where km in the mth root of J0 (k) = 0. Therefore, we can write g(r|ρ) as the
eigenfunction expansion
∞
X
km ρ km r
g(r|ρ) = Anm J0 J0 .
m=1
a a
Worked Solutions 537
Substituting this solution into the differential equation and equating harmon-
ics,
2
km n2 π 2 2
+ = ,
a2 L2 πa2 LJ12 (km )
or
2
Anm = .
πa2 LJ12 (km )(km
2 /a2 + n2 π 2 /L2 )
Therefore, the final answer is
∞ ∞
2 XX J0 (km ρ/a)J0 (km r/a)
g(r, z|ρ, ζ) =
πa2 L n=1 m=1 πa2 LJ12 (km )(km
2 /a2 + n2 π 2 /L2 )
nπζ nπz
× sin sin .
L L
8. Because
2X
∞
nπξ nπx
δ(x − ξ) = αn cos cos
a n=0 a a
and
2 X
∞ mπη mπy
δ(y − η) = αm cos cos ,
b m=0 b b
1
where α0 = 2 and αn = 1 for n > 0, then
∞ X
X ∞ nπx mπη mπy
nπξ
g(x, y|ξ, η) = Gnm cos cos cos cos .
n=0 m=0
a a b b
Substituting g(x, y|ξ, η) into the partial differential equation and equating
harmonics,
2 n2 π 2 m2 π 2 4
k0 − 2 − 2
Gnm = − αn αm ,
a b ab
or
4 αn αm
Gnm = .
ab n2 π 2 /a2 + m2 π 2 /b2 − k02
Therefore, the final solution is
∞ ∞
4 XX αn αm nπξ
g(x, y|ξ, η) = Gnm 2 2 2 cos
ab n=0 m=0 n π /a + m2 π 2 /b2 − k02 a
nπx mπη mπy
× cos cos cos .
a b b
538 Advanced Engineering Mathematics with MATLAB
Next, we must solve the ordinary differential equation. First, we find the
particular solution. For y > η and y < η, Gp (k, y|ξ, η) = Ae−k|y−η| . This
solution is continuous at y = η. Integrating the ordinary differential equation
from y = η − to y = η + , we find that
η+
dGp
= − sin(kξ).
dy η−
10. From the definition of Fourier transform given in the textbook, we have
that Z ∞ 2
∂ g −ikx
2
e dx = −k 2 G(k, y|ξ, η),
−∞ ∂x
Z ∞ 2
∂ g −ikx d2 G(k, y|ξ, η)
2
e dx = ,
−∞ ∂y dy 2
and Z ∞
δ(x − ξ)δ(y − η)e−ikx dx = e−ikx δ(y − η).
−∞
d2 G
2
− k 2 + 1 G = −e−ikx δ(y − η).
dy
Let Z ∞
1
G(k, y|ξ, η) = G(k, ℓ|ξ, η)eiℓy dℓ,
2π −∞
where Z ∞
G(k, ℓ|ξ, η) = G(k, y|ξ, η)e−iℓy dy.
−∞
where we have used the results from Gradshteyn, I. S., and I. M. Ryzhik,
1965: Table of Integrals, Series, and Products. Academic Press, Section 6.532,
Formula 4.
540 Advanced Engineering Mathematics with MATLAB
gxx (x, y|ξ, η) = 41 ex/2 ϕ(x, y|ξ, η) + ex/2 ϕx (x, y|ξ, η) + ex/2 ϕxx (x, y|ξ, η),
and
gyy (x, y|ξ, η) = ex/2 ϕyy (x, y|ξ, η).
To solve the partial differential equation, we follow very closely the pre-
vious problem. We take the Fourier transform in both the x and y directions.
When we take the inverses in the k and ℓ dimensions, this yields
Z ∞ Z ∞
e−ξ/2 eik(x−ξ) eiℓ(y−η)
ϕ(x, y|ξ, η) = dℓ dk
4π 2 −∞ −∞ ℓ2 + k 2 + 14
K0 (r/2)
= e−ξ/2 .
2π
We obtain the second line by again transforming the first line so that we can
do the double integral exactly. The final answer follows from back substitution
and is
K0 (r/2)
g(x, y|ξ, η) = e(x−ξ)/2 .
2π
Section 16.2
1.(a)
S = {HH, HT, T H, T T }
(b)
S = {ab, ac, ba, bc, ca, cb}
(c)
S = {aa, ab, ac, ba, bb, bc, ca, cb, cc}
(d)
S = {bbb, bbg, bgb, bgg, ggb, ggg, gbb, gbg}
(e)
S = {bbb, bbg, bgb, bgg, ggb, ggg, gbb, gbg}
Worked Solutions 541
3. This is an example of two events that are mutually exclusive. The chance
that any one side with the number of dots varying from 1 to 6 is 1/6. There-
fore, the probability of obtaining a one or two is the sum of the probabilities
for the appearance of a one or two, 1/3.
4. (a)
2 4
6! 1 1 15
P (X = 2) = = = 0.2344
4!2! 2 2 16
(b)
3 3
6! 1 1 20
P (X = 3) = = = 0.3125
3!3! 2 2 64
5. The sample space is the elements rr, rb, rg, bb, br, bg, gg, gr and gb,
where r, g and b denote a red, green, and blue ball, respectively. Therefore,
X = 0, 1, 2, denote the choice of no, one, and two green balls, respectively.
Of the 9 members of the sample space, three of the members contains one
green ball. Assuming that all of the members are equally likely to be chosen,
P (X = 1) = 1/3.
6. After the first selection, P (r) = 50/80 and P (b) = 30/80. After the
second selection, P (rr) = (50/80)(49/79) and P (bb) = (30/80)(29/79). After
the third selection, P (rrr) = (50/80)(49/79)(48/78) = 0.2386 and P (bbb) =
(30/80)(29/79)(28/78) = 0.0494.
7. This is similar to the previous problem. Here P (jack) = 4/52 and P (ten) =
4/52. Therefore, the answer is
P (jack ∪ ten) = P (jack) + P (ten) = 2/13.
9. The sample space consists of all three digit numbers chosen from 10 different
and nonrepeating digits. Therefore, n(S) equals 10!/(3!7!) = 720. If order
matters, then there will be a single winner and the probability of winning is
1/720. On the other hand, if order does not matter, then there are 3! = 6
possible winners. The probability therefore rises to 6/720 = 1/120.
10. The area of the sample space is 4. If A denotes the event that the point
falls inside the circle, its area is π. Therefore,
11. Let A denote the event that Ed plays football and B denotes the event
that he wrestles. We know that P (A) = 0.2 and P (A ∩ B) = 0.1. Therefore,
P (B|A) = P (A ∩ B)/P (A) = 0.5.
12.
P (A2 ) = P (A2 |A1 )P (A1 ) + P (A2 |Ac1 )P (Ac1 )
3 4 4 48 4
= + =
51 51 51 51 52
13.
4 1 6 1 1
P (red) = P (red|H)P (H) + P (red|T )P (T ) = + = .
10 2 10 2 2
14. (a)
P (C) = 1 − P (E) = 0.8, P (D|E) = 1 − P (L|E) = 0.2,
P (L|C) = 1 − P (D|C) = 0.3
(b)
(c)
P (E|L)P (L) = P (L|E)P (E), P (L) = 1 − P (D).
P (E|L) = (0.8)(0.2)/(0.72) = 0.16/0.72 = 0.2083
15. Let A denote the event that the first selected point is greater than 1/4
while B denotes the event that the second selected point is less than 3/4.
Because P (A) = 3/4 and P (B) = 3/4, P (A ∩ B) = P (A)P (B) = 9/16.
Worked Solutions 543
3!
P3 (3) = (0.01)3 = 1 × 10−6 ,
3!0!
3!
P3 (2) = (0.99)(0.01)2 = 2.97 × 10−4 ,
2!1!
3!
P3 (1) = (0.99)2 (0.01) = 2.94 × 10−2 ,
1!2!
and
3!
P3 (0) = (0.99)3 = 0.9703.
0!3!
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% MATLAB Code For Experimenting
% with Intrinsic Function rand
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
for j = 1:tests
X1 = rand(1,N); icount = 0;
for i = 1:N
if (X1(i) <= 0.333333333) icount = icount + 1; end
end
num1(j) = j;
prob1(j) = icount / N;
end
N = 1000;
for j = 1:tests
X2 = rand(1,N); icount = 0;
for i = 1:N
if (X2(i) <= 0.333333333) icount = icount + 1; end
end
num2(j) = j;
prob2(j) = icount / N;
end
N = 10000;
for j = 1:tests
X3 = rand(1,N); icount = 0;
for i = 1:N
544 Advanced Engineering Mathematics with MATLAB
plot(num1,prob1,’k’,num2,prob2,’b’,...
num3,prob3,’r’,’LineWidth’,1.5)
xlabel(’experiment number’,’FontSize’,20);
ylabel(’probability’,’FontSize’,20);
legend(’n = 100’,’n = 1000’,’n = 10000’)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% MATLAB Code For Experimenting
% with Intrinsic Function randper
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
for n = 1:N
perm = randperm(365); birthday(n) = perm(1);
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Section 16.3
P
1. Because xk pX [xk ] = 1, we have
X 1
X
pX [xk ] = pX [xk ] = (1 − p) + p = 1.
xk k=0
2. The chance of success during any one experiment is p = 0.1 while the
chance of failure q = 1 − p = 0.9. Because we have a Bernoulli distribution,
p[xi ] = 0.1 · 0.9i−1 , where i = 1, 2, 3, . . ..
P (X ≤ N ) = 1 − P (X > N ) = 0.75.
Therefore,
∞
X
P (X > N ) = (0.5)(0.95)n−1 = 0.25,
n=N +1
546 Advanced Engineering Mathematics with MATLAB
or
(0.95)N = 0.25.
Section 16.4
In summary,
0, x ≤ 0,
FX (x) =
1 − e−λx , 0 < x.
R∞
2. Because −∞
pX (x) dx = 1, then
Z 2 2
kx2
k x dx = = 2k = 1.
0 2 0
Therefore, k = 21 .
For x < 0, FX (x) = 0. For 0 < x < 2,
Z x
1 x2
FX (x) = 2 x dx = .
0 4
For x > 2,
Z 2
1
FX (x) = 2 x dx = 1.
0
In summary,
( 0, x ≤ 0,
FX (x) = x2 /4, 0 ≤ x < 2,
1, 2 ≤ x.
Finally,
1
P (1 < X ≤ 2) = FX (2) − FX (1) = 1 − 4 = 34 .
Worked Solutions 547
R∞
3. Because −∞
pX (x) dx = 1, then
Z ∞ Z 0 Z 1
pX (x) dx = k (1 + x) dx + k (1 − x) dx = 1
−∞ −1 0
0 1
x2 x2
=k x+ +k x− =1
2 −1 2 0
= k = 1.
For 1 < x, Z Z
0 1
FX (x) = (1 + ξ) dξ + (1 − ξ) dξ
−1 0
0 1
ξ ξ
= ξ+ +ξ− = 1.
2 −1 2 0
In summary,
0, x < −1,
(1 + x)2 /2, −1 ≤ x < 0,
FX (x) = 2
1 − (x − 1) /2,
0 ≤ x < 1,
1, 1 ≤ x.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% MATLAB Code for Central Limit Theorem
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Section 16.5
E(X) = 12 (1 + 0) = 12 ,
and
1 1 2 1 1 2
Var(X) = 2 0− 2 + 2 1− 2 = 14 .
∞
X ∞
X
E[X(X − 1)] = k(k − 1)p(1 − p)k−1 = k(k − 1)pq k−2
k=1 k=2
2pq 2(1 − p)
= = ,
(1 − q)3 p2
then
2(1 − p) 1 2−p
E(X 2 ) = E[X(X − 1)] + E(X) = + = .
p2 p p2
Finally,
2 2−p 1 1−p
σX = Var(X) = E(X 2 ) − µ2X = 2
− 2 = .
p p p2
Worked Solutions 549
Therefore, k = 3/4.
To find the mean,
Z 2 2
3 2 3 2x3 x4
E(X) = x (2 − x) dx = − = 1.
4 0 4 3 4 0
Therefore,
6 1
Var(X) = E(X 2 ) − [E(X)]2 = −1= .
5 5
4.
Z 2 ν
1 √ 2a
φ(ω) = 2 (a2 − x2 )ν− 2 cos(ωx) dx = π Γ ν+ 1
2 Jν (aω),
0 ω
where we have used Formula 3.771.8 from Gradshteyn, I. S., and I. M. Ryzhik,
1965: Table of Integrals, Series and Products. Academic Press, 1086 pp.
Now,
n−1
φ′X (ω) = nipeiω peiω + q
and
2 n−2 n−1
φ′′X (ω) = n(n − 1) ipeiω peiω + q + ni2 peiω peiω + q .
Therefore, φ′X (0) = inp and µX = np. Furthermore, φ′′X (0) = −n(n−1)p2 −np
and E(X 2 ) = (np)2 + npq. Therefore, Var(X) = npq.
Now,
ωi
φ′X (ω) = iλeωi e−λ(1−e ) ,
and ωi ωi
φ′′X (ω) = −λ2 e2ωi e−λ(1−e ) − λeωi e−λ(1−e ) .
Therefore, φ′X (0) = λi and µX = λ. Furthermore, φ′′X (0) = −λ2 − λ and
E(X 2 ) = λ2 + λ. Therefore, Var(X) = λ.
Now,
ipqeωi
φ′X (ω) = 2,
(1 − qeωi )
and
2pq 2 eωi pqeωi
φ′′X (ω) = − 3 − 2.
(1 − qeωi ) (1 − qeωi )
Therefore, φ′X (0) = iq/p and µX = q/p. Furthermore, φ′′X (0) = −2q 2 /p2 −q/p
and E(X 2 ) = 2q 2 /p2 + q/p. Therefore, Var(X) = q/p2 .
Now,
i ω
φ′X (ω) = (b + a) − (a2 + ab + b2 ) + · · · ,
2 3
and
1
φ′′X (ω) = − (a2 + ab + b2 ) + · · · .
3
Therefore, φX (0) = i(a + b)/2 and µX = (a + b)/2. Furthermore, φ′′X (0) =
′
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Worked Solutions 551
clear f x;
subplot(2,2,2)
bar h = bar(xout 2,n 2); bar child = get(bar h,’Children’);
set(bar child,’CData’,n 2); title(’M = 50’,’FontSize’,20)
colormap(autumn); hold on
subplot(2,2,3)
bar h = bar(xout 3,n 3); bar child = get(bar h,’Children’);
set(bar child,’CData’,n 3); title(’M = 100’,’FontSize’,20)
colormap(autumn): hold on
xlabel(’approximate - exact value of the integral’,
’FontSize’,20)
ylabel(’probability density’,’FontSize’,20)
subplot(2,2,4)
bar h = bar(xout 4,n 4); bar child = get(bar h,’Children’);
set(bar child,’CData’,n 4); title(’M = 500’,’FontSize’,20)
colormap(autumn); hold on
xlabel(’approximate - exact value of the integral’,...
’FontSize’,20)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Section 16.6
Therefore,
(a)
0 4
4 1 1 1
pX [0] = = ,
0 2 2 16
(b)
1 3
4 1 1 1
pX [1] = = ,
1 2 2 4
(c)
15
pX [1] + pX [2] + pX [3] + pX [4] = 1 − pX [0] = ,
16
and
(d)
4 0
4 1 1 1
pX [4] = = .
4 2 2 16
P (X ≥ 3) = 1 − P (X ≤ 2).
Now
2 k 6−k
X
6 1 1 1 6! 6! 6!
P (X ≤ 2) = = + +
k 2 2 26 0!6! 1!5! 2!4!
k=0
1 22
= (1 + 6 + 15) = = 0.34375.
64 64
Therefore,
P (X ≥ 3) = 1 − 0.34375 = 0.65625.
(λt)k −λt
P (k) = e ,
k!
with
3 times
λ= = 1 time/hr.
3 hr
The probability of no calls is
30 −3
P (0) = e = 0.0498.
0!
The probability that you will receive 6 or more calls is
∞
X 3k
P (k ≥ 6) = e−3 = 0.0839.
k!
k=6
The probability that you will not receive more than two calls is
2
X 3k
P (k ≤ 2) = pX [0] + pX [1] + pX [2 = e−3 = 0.4232.
k!
k=0
5. Let the discrete random variable X denote the number of defective DVDs.
A package has defective DVDs if X > 0. Therefore, the probability that a
package contains a defective DVD,
10!
P (X > 0) = 1 − P (X = 0) = 1 − (0.999)10 (0.001)0 = 0.01,
0!10!
and
P (X > 1) = 1 − P (X = 0) − P (X = 1)
10! 10!
=1− (0.999)10 (0.001)0 − (0.999)9 (0.001)1 = 9 × 10−5 .
0!10! 1!9!
6. Let X denote the discrete random variable that equals the number of
students who show up. Then the probability of overbooking the class is
22! 22!
P (X = 21) + P (X = 22) = (0.95)21 (0.05)1 + (0.95)22 (0.05)0
21!1! 22!0!
= 0.6992.
7. Z 150 150
100 100 1
P (T < 150) = =− =
100 t2 t 100 3
Worked Solutions 555
Therefore,
3 2
5 1 2
P (X) = = 0.1646
3 3 3
Section 16.7
1.
7 8 5
xi yj 5 − x i − yj
pXY [xi , yj ] = ,
20
5
where xi = 0, 1, 2, 3, 4, 5, yj = 0, 1, 2, 3, 4, 5 and 0 ≤ xi + yj ≤ 5.
2. In the first toss, pX [xi ] = 1/6 for i = 1, 2, 3, 4, 5, 6 and pY [yj ] = 1/6 for
j = 1, 2, 3, 4, 5, 6 on the second toss. Then by the convolution theorem,
6
X
pZ [zk ] = pX [xi ]pY [zk − xi ],
i=1
3.
Convolution Project
If z < 0 or z > 2, then the integrand is always zero. If 0 < z < 1, the second
term in the square brackets always equals zero and
Z z
pZ (z) = dy = z.
0
556 Advanced Engineering Mathematics with MATLAB
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% MATLAB Code For Convolution Project
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Section 17.0
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% MATLAB Code for Gambler’s Ruin Problem
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
clear
icount = 0; t = [0:1:100000]; tosses = length(t); b = [10];
levels = length(b); iruns = 5000; y = zeros(1,tosses+1);
subplot(2,1,1); hold on
plot(t,y1,’k-’); plot(t,y2,’b-’); plot(t,y3,’r-’);
axis([0 1000 -50 50])
xlabel(’number of tosses’,’FontSize’,20)
ylabel(’gain/loss (in dimes)’,’FontSize’,20)
temp = zeros(1,iruns);
y = cumsum(z);
% save the time at which you would win all of the money
if (length(b 1) > 0)
icount = icount+1; temp(icount) = t(b 1(1));
end
end
icount
mean(temp)
M = length(nn)-1;
for n = 1:M
mm(n) = nn(n);
edge(n) = (edges(n+1)+edges(n))/2;
end
bar h = bar(edge,mm); bar child = get(bar h,’Children’);
set(bar child,’CData’,mm); axis([0 1000 0 0.005])
colormap(Autumn)
xlabel(’N’,’fontsize’,20)
ylabel(’Estimated PDF’,’fontsize’,20)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Section 17.1
Similarly,
2 2
σX (t) = Var[X(t)] = σX cos(ωt) = cos(ωt).
3. For t1 = t2 ,
For t1 = t2 ,
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% MATLAB Code for Autocorrelation Project
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
clear
deltat = 0.01; t = [0:deltat:12]; N = length(t)
for m = 1:500
random = rand(1,1);
icount = 1;
for k = 2:N
if ( t(k) >= V(icount) )
sgn = - sgn; icount = icount+1;
end
telegraph(k,m) = sgn;
end
560 Advanced Engineering Mathematics with MATLAB
t s = 2; istart = t s/deltat + 1;
tau = [0:deltat:0.75]; length(tau)
for i = 1:length(tau)
R X(i) = 0;
for m = 1:500
R X(i) = R X(i) + telegraph(istart,m)*telegraph(istart+i-1,m);
end
end
subplot(1,2,1)
plot(tau,R X,’LineWidth’,2)
hold on
plot(tau,exact,’--k’,’LineWidth’,2)
hold on
xlabel(’\tau’,’FontSize’,25)
ylabel(’\it R X’,’FontSize’,25)
clear R X
for i = 1:length(tau)
for m = 1:istop
R X(i) = R X(i) + telegraph(m,200)*telegraph(m+i-1,200);
end
end
subplot(1,2,2)
plot(tau,R X,’LineWidth’,2)
hold on
plot(tau,exact,’--k’,’LineWidth’,2)
Worked Solutions 561
xlabel(’\tau’,’FontSize’,25)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Section 17.2
1.
Z ∞ Z ∞
SX (ω) = RX (τ )e−iωτ dτ = RX (τ ) [cos(ωτ ) − sin(ωτ )] dτ
−∞ −∞
Z ∞ Z ∞
= RX (τ ) cos(ωτ ) dτ = 2 RX (τ ) cos(ωτ ) dτ.
−∞ 0
Section 17.3
a 1 b 1 1 3
= , , 1−a−b= , a+b= .
a+b 3 a+b4 4 4
Because a = 0 and b = α,
(n) 1 0
P = ,
1 − (1 − α)n (1 − α)n
Section 17.4
N
∂φ X n
z = nz pn (t),
∂z n=0
and
N
X −1
∂φ
= (n + 1)z n pn+1 (t),
∂z n=0
we substitute these results into the first equation. This gives the partial
differential equation.
From the partial differential equation, we obtain
dt dz
= .
e−t/α ρ − (ρ + ν)z
ln[ρ − (ρ + ν)z]
ξ(z, t) = αet/α − .
ρ+ν
There, the general solution is φ(z, t) = Φ[ξ(z, t)]. Turning to initial condition,
ln[ρ − (ρ + ν)z]
φ(z, 0) = Φ α − = zN .
ρ+ν
Worked Solutions 563
Setting
ln[ρ − (ρ + ν)z]
y =α− ,
ρ+ν
we find that
ρ exp[(ρ + ν)(α − y)]
z= − .
ρ+ν ρ+ν
Therefore,
N
ρ exp[(ρ + ν)(α − y)]
Φ(y) = − .
ρ+ν ρ+ν
The final solution follows by substituting ξ(z, t) for y.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% MATLAB Code for Stochastic Chemical Reaction
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
for n = 1:3000000
else
x(n+1) = x(n);
if (p guess(n) <= p3)
y(n+1) = y(n)-1;
else
y(n+1) = y(n);
end
end
if (mod(n,10000) == 0)
icount = icount+1;
t(icount) = n*deltat; X(icount) = X(icount) + x(n+1);
Y(icount) = Y(icount) + y(n+1);
end % end of sampling of the x and y values
end % end of i loop
subplot(2,1,1); hold on; plot(t,X,’-k’)
xlabel(’\it time’,’FontSize’,25)
ylabel(’\it number of x molecules’,’FontSize’,25)
axis([0 30 0 3000])
clear
const1 = 10; const2 = 0.01; const3 = 10; N = 1000000;
% initial x and y
icount = 1; t(1) = 0; x(1) = 1000; y(1) = 1000;
x np1 = x(1); y np1 = y(1); time = 0;
% introduce the value from the uniformly distributed
r1 = rand(1,N); r2 = rand(1,N); r3 = log(1./r1);
% compute a sample function
format long g
for n = 1:N
Worked Solutions 565
x n = x np1; y n = y np1;
if (mod(n,1000) == 0)
icount = icount + 1;
t(icount) = time; x(icount) = x np1; y(icount) = y np1;
end
end % end of i loop
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Section 17.5
Now, because
X∞
∂F dpn n
= z ,
∂t n=0
dt
566 Advanced Engineering Mathematics with MATLAB
and
∞
X ∞
X ∞
X
zF = pn (t)z n+1 = pk−1 (t)z k = pn−1 (t)z n ,
n=0 k=1 n=0
since p−1 (t) = 0, the first equation becomes the partial differential equation
∂F
= λ(z − 1)F, F (z, 0) = 1.
∂t
Consequently,
(λt)n
pn (t) = e−λt .
n!
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% MATLAB Code for Output from a Filter
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
clear
random = rand(1,1);
if (random >= 0.5)
sgn = 1;
forcing(1) = sgn;
else
sgn = -1;
forcing(1) = sgn;
end
T = - log(S)/lambda;
V = cumsum(T); % Switching times
icount = 1;
for k = 2:N
if ( t(k) >= V(icount) )
random = rand(1,1);
if (random >= 0.5)
sgn = 1;
else
sgn = -1;
end;
icount = icount+1;
end
forcing(k) = sgn;
end
for n = 2:N
clear vector
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Section 18.0
2.
Because dN (t) is either zero or one for all t, (−1)dN (t) − 1 = 0 or −2, respec-
tively. Therefore,
dX(t) == −2X(t) dN (t).
3.
Section 18.1
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% MATLAB Code Used in Low-Pass Filter With Random Input
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
y(1) = x 0;
forcing = randn(1,N);
vector = eexp pos(1:N-1).*forcing(1:N-1)
+ eexp pos(2:N).*forcing(2:N);
integral = cumsum(vector);
Worked Solutions 569
for n = 1:N
for m = 1:iruns
temp1(m) = forcing save(n,m); temp2(m) = y save(n,m);
end
t1(n) = 0.2*(n-1);
end
% plot results
subplot(2,2,2); hold on
plot(t,mean response,’k-’); plot(t1,exact mean,’r+’)
ylabel(’mean of response’,’FontSize’,20)
subplot(2,2,4); hold on
plot(t,var response,’k-’); plot(t1,exact var,’r+’)
xlabel(’t’,’FontSize’,20)
570 Advanced Engineering Mathematics with MATLAB
ylabel(’variance of response’,’FontSize’,20)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
if (length(b 1) > 0)
icount 1 = icount 1+1; temp1(icount 1) = t(b 1(1)); end
if (length(b 2) > 0)
icount 2 = icount 2+1; temp2(icount 2) = t(b 2(1)); end
if (length(b 3) > 0)
icount 3 = icount 3+1; temp3(icount 3) = t(b 3(1)); end
if (length(b 4) > 0)
icount 4 = icount 4+1; temp4(icount 4) = t(b 4(1)); end
clear ccos cos neg cos pos eexp neg eexp pos ssin sin neg sin pos
clear forcing integral1 integral2 vector1 vector2 y
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
for TT = 1:50
clear tau
for XX = 1:121
x = -6 + dx*(XX-1);
t array(1:M) = t; t plot(XX,TT) = t;
x array(1:M) = x; x plot(XX,TT) = x;
X = randn(1,M);
arg = t array - tau - abs(X - x array);
u(irun) = 0;
if (length(b) > 0)
cosine(1:M) = ccos(1:M);
N = max(b); dummy = cosine(b); u(irun) = sum(dummy);
average(XX,TT) = mean(u);
variance(XX,TT) = var(u);
% plot solution
574 Advanced Engineering Mathematics with MATLAB
subplot(1,2,1); hold on
surf(x plot,t plot,average); axis([-6 6 0 5 -0.2 0.2]);
colormap(autumn)
xlabel(’\it x’,’Fontsize’,25); ylabel(’\it t’,’Fontsize’,25)
zlabel(’\it mean’,’Fontsize’,25)
subplot(1,2,2); hold on
surf(x plot,t plot,variance); axis([-6 6 0 5 0 0.001]);
colormap(autumn)
xlabel(’\it x’,’Fontsize’,25); ylabel(’\it t’,’Fontsize’,25)
zlabel(’\it variance’,’Fontsize’,25)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Section 18.2
1. " #
X∞
(−1)n−1 a2n−1 2n−1
E{sin[aB(t)]} = E B (t)
n=1
(2n − 1)!
X∞
(−1)n−1 a2n−1 2n−1
= E B (t) = 0
n=1
(2n − 1)!
2.
" ∞
# ∞
X (−1)n a2n 2n X (−1)n a2n 2n
E{cos[aB(t)]} = E B (t) = E B (t)
n=0
(2n)! n=0
(2n)!
X∞
(−1)n 2 n
= (a t)
n=0
2n n!
3. " #
X∞ X∞
an n an
E{exp[aB(t)]} = E B (t) = E[B n (t)]
n=0
n! n=0
n!
X∞ 2 n 2
1 a t a t
= = exp
n=0
n! 2 2
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% MATLAB Code Used In the Probabilistic Solution Method
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Worked Solutions 575
clear
V = zeros(N,N);
V (1:N, N ) = [0:1/(N-1):1];
V1(1:N,1:N) = V(1:N,1:N); V2(1:N,1:N) = V(1:N,1:N);
V3(1:N,1:N) = V(1:N,1:N); V4(1:N,1:N) = V(1:N,1:N);
for j = 1:N
for i = 1:N
XX(i,j) = (i-1)/(N-1);
YY(i,j) = (j-1)/(N-1);
end; end
for j = 2:N-1
for i = 2:N-1
iwalk(1) = i; jwalk(1) = j;
for istep = 2:isteps
% for each time step, get the value from an uniform distribution
random = rand(1,isteps);
iwalk(1) = i; jwalk(1) = j;
for istep = 2:isteps
end
V boundary(irun) = V(index,jndex);
% plot solution
subplot(2,2,1)
hold on
surf(XX,YY,V1); axis([0 1 0 1 0 1]);
colormap(Spring)
xlabel(’\it x’,’Fontsize’,25); ylabel(’\it y’,’Fontsize’,25)
zlabel(’\it u(x,y)’,’Fontsize’,25)
Worked Solutions 577
subplot(2,2,2)
hold on
surf(XX,YY,V2); axis([0 1 0 1 0 1]);
colormap(Spring)
xlabel(’\it x’,’Fontsize’,25); ylabel(’\it y’,’Fontsize’,25)
zlabel(’\it u(x,y)’,’Fontsize’,25)
title(’ 200 realizations ’,’FontSize’,25)
subplot(2,2,3)
hold on
surf(XX,YY,V3); axis([0 1 0 1 0 1]);
colormap(Spring)
xlabel(’\it x’,’Fontsize’,25); ylabel(’\it y’,’Fontsize’,25)
zlabel(’\it u(x,y)’,’Fontsize’,25)
title(’ 800 realizations ’,’FontSize’,25)
subplot(2,2,4)
hold on
surf(XX,YY,V4); axis([0 1 0 1 0 1]);
colormap(Spring)
xlabel(’\it x’,’Fontsize’,25); ylabel(’\it y’,’Fontsize’,25)
zlabel(’\it u(x,y)’,’Fontsize’,25)
title(’ 3200 realizations ’,’FontSize’,25)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Section 18.3
1. Z b
2
E(X) = 0, Var(X) = E(X ) = t2 dt = (b3 − a3 )/3
a
2.
E(X) = 0
Z b Z b
Var(X) = E(X 2 ) = E{|tB(t)|2 } dt = t2 E{|B(t)|2 } dt
a a
Z b
= t3 dt = (b4 − a4 )/4
a
3.
Z b Z b
2 2
E(X) = 0, Var(X) = E(X ) = E{|B(t)| } dt = t dt = (b2 − a2 )/2
a a
578 Advanced Engineering Mathematics with MATLAB
4.
E(X) = 0
Z b n√ o Z b
2 2
Var(X) = E(X ) = E t exp[B(t)] dt = t E{exp[2B(t)]} dt
a a
Z b
= te2t dt = 1
2 be2b − ae2a − 1
4 e2b − e2a
a
5. Because E(X) = 0,
Z b n o
2
Var(X) = E(X 2 ) = E |f (t){sin[B(t)] + cos[B(t)]}| dt
a
Z b
= E[f 2 (t)]E({sin[B(t)] + cos[B(t)]}2 ) dt
a
Z b Z b
2
= f (t)E({1 + sin[2B(t)]}) dt = f 2 (t) dt,
a a
since E{sin[2B(t)]} = 0.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% MATLAB Code for Testing Equation 18.3.5
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
for i = 1:N
t1(i) = t(i); t2(i) = t(i+1);
end
for i = 1:N
product(i) = W(i)*(W(i+1) - W(i));
end
[j LHS RHS] % print out the results for the jth test
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% MATLAB Code for the Numerical Check
% of Equations 18.3.19 and 18.3.24
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
for i = 1:N
t1(i) = t(i); t2(i) = t(i+1);
end
for i = 1:N
func = sqrt(t1(i))*sin(W(i));
product(i) = func*(W(i+1) - W(i));
end
S(j) = sum(product);
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Section 18.4
2. Because
ft = −x, fx = x2 − t, and fxx = 2x,
df = −B(t) dt + [B 2 (t) − t] dB(t) + B(t) dt = [B 2 (t) − t] dB(t).
580 Advanced Engineering Mathematics with MATLAB
10. Because
λ3 λ2 t 2 λ2 t
ft = ∓ exp ±λx − , fx = λ exp ±λx − ,
2 2 2
3 λ2 t
fxx = ±λ exp ±λx − ,
2
we get
Z t
λ2 t 2 λ2 η
±λ exp ±λB(t) − −1 = λ exp ±λB(η) − dB(η).
2 0 2
11. Because
2
λ2 λ t λ2 t
ft = exp sin(λx), fx = −λ exp cos(λx),
2 2 2
2 λ2 t
fxx = −λ exp sin(λx),
2
we get the desired result by direct substitution.
12. Because
2
λ2 λ t λ2 t
ft = − exp cos(λx), fx = λ exp sin(λx),
2 2 2
λ2 t
fxx = λ2 exp cos(λx),
2
we get the desired result by direct substitution.
13. Because
2 2
x2 x2 x x x
ft = − 12 t−3/2 exp − 5/2 exp , fx = 3/2 exp ,
2t 2t 2t t 2t
2 2
−3/2 x x2 x
fxx =t exp + 5/2 exp ,
2t 2t 2t
we get the desired result by direct substitution.
16.
d [tG(t)] = eB(t) dt, t G(t) dt + t dG(t) = eB(t) dt
Worked Solutions 581
h i
t dG(t) = eB(t) − G(t) dt
Section 18.5
1. h i
dX(t) = d et/2 B(t)
2.
dX(t) = e2t d[B 2 (t)] + d(e2t )B 2 (t) = d e2t B 2 (t)
Integrating both sides,
X(t) = e2t B 2 (t) + X0 .
3.
dX(t) = d[B 2 (t)] + d[tB(t)]
Integrating both sides,
4.
dX(t) = d(t3 ) + d[tB(t)]
Integrating both sides,
X(t) = t3 + tB(t) + X0 .
5.
X(t) = tB 2 (t) − t2 /2 + X0 .
6.
e−2t dX(t) − 2e−2t X(t) dt = e−2t dt + dB(t)
d e−2t X(t) = e−2t dt + dB(t)
582 Advanced Engineering Mathematics with MATLAB
e−2t X(t) − X(0) = − 12 e−2t − 1 + B(t)
X(t) = X(0)e2t + 21 e2t − 1 + e2t B(t)
2
8. Multiplying the stochastic differential equation by e−t , we find
2 2 2 2
e−t dX = 2te−t X(t) dt + e−t −t
dt + e−t dB.
9.
e−4t dX(t) − 4e−4t X(t) dt = −e−4t dt + 2e−4t dB(t)
d e−4t X(t) = −e−4t dt + 2e−4t dB(t)
Z t
e−4t X(t) − X(0) = 41 e−4t − 1 + 2 e−4η dB(η)
0
Worked Solutions 583
Z t
X(t) = X(0)e4t + 1
4 1 − e−4t + 2 e4(t−η) dB(η)
0
10.
et dX(t) + et X(t) dt = 2et dt + B(t) dB(t)
d et X(t) = 2et dt + 21 d[B 2 (t) − t]
11.
e−t dX(t) − e−t X(t) dt = e−t dt + B(t) dB(t)
d e−t X(t) = e−t dt + B(t) dB(t)
X(t) = X0 et + et − 1 + 12 et [B 2 (t) − t]
12.
e−t/2 dX(t) − 12 e−t/2 X(t) dt = e−t/2 dt + et/2 cos[B(t)] dB(t)
h i
d e−t/2 X(t) = e−t/2 dt + et/2 cos[B(t)] dB(t)
e−t/2 X(t) − X0 = 2 1 − e−t/2 + et/2 sin[B(t)]
X(t) = X0 et/2 + 2 et/2 − 1 + et sin[B(t)]
13.
e−t/2 dX(t) − 21 e−t/2 X(t) dt = te−t/2 dt + et/2 sin[B(t)] dB(t)
h i
d e−t/2 X(t) = te−t/2 dt + et/2 sin[B(t)] dB(t)
16.
Z t Z t 3 Z t
1 2 t
X(t) = X0 exp 2η dη + η dB(η) = X0 exp + η dB(η)
0 0 6 0
584 Advanced Engineering Mathematics with MATLAB
17.
Z t Z t
X(t) = X0 exp cos(η) − 1
sin2 (η) dη +
sin(η) dB(η)
2
0 0
Z t
= X0 exp 18 sin(2t) + sin(t) − 41 t + sin(η) dB(η)
0
18.
Z t Z tp
1
X(t) = X0 exp 2 ln(η + 1) dη + ln(η + 1) dB(η)
0 0
Z tp
1 1 1
= X0 exp 2 t ln(t + 1) + 2 ln(t + 1) − 2t + ln(η + 1) dB(η)
0
19. Z Z
t t
1 2
X(t) = X0 exp ln(η + 1) − 2η dη + η dB(η)
0 0
Z t
1 3
= X0 exp (t + 1) ln(t + 1) − t − 6t + η dB(η)
0
dΦ(t) = d[X 1−n (t)] = (1 − n)X −n (t) dX(t) − 21 n(1 − n)X −n−1 (t)[dX(t)]2 .
Substituting for dX(t) and neglecting terms containing (dt)2 and dt dB(t), we
have that
Substituting for dX(t) and neglecting terms containing (dt)2 and dt dB(t), we
have that
nh i o
dΦ(t) = −ce−cX(t) aecX(t) + b dt + σ dB(t) + 12 c2 σ 2 e−cX(t) [dB(t)]2
= −ac dt − bcΦ(t) dt − σcΦ(t) dB(t) + 21 σ 2 c2 dt
= −(bc − σ 2 c2 /2)Φ(t) dt − σcΦ(t) dB(t) − ac dt.
Worked Solutions 585
Now,
Z t Z t
Y (t) = exp −bc dη − bc dB(η) = exp[−bct − bcB(t)] ,
0 0
and Z t
Φ(t) = e−ǫ(t) Φ(0) − ac eǫ(η) dη ,
0
where ǫ(t) = bct+bcB(t). Upon substituting Φ(0) = e−cX0 and Φ(t) = e−cX(t)
into this equation and taking the log of both sides, we obtain the final result.
Substituting for dX(t) and neglecting terms containing (dt)2 and dt dB(t), we
have that
1
dΦ(t) = [1 + X(t)][1 + X 2 (t)] dt + [1 + X 2 (t)] dB(t)
X 2 (t) + 1
2X(t)
+ 21 − 2 [1 + X 2 (t)]2 dt
[X (t) + 1]2
= dt + dB(t).
Upon substituting Φ(0) = tan−1 (X0 ) and Φ(t) = tan−1 (t) into this equation
and solving for X(t), we obtain the final result.
Section 18.6
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% MATLAB Code for Noisy RL Circuit
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
clear; clf
t student = 2.228 % t for 95% and 10 degrees of freedom
alpha over L = 1; beta over L = 0; T = 4; % maximum time
h = 0.02; % time step
t = [0:h:T]; % create time
586 Advanced Engineering Mathematics with MATLAB
t exact = [0:5*h:T];
N = length(t); N exact = length(t exact);
M = 11; % number of realizations
hold on
I(1:N) = zeros(N,1);
plot(t,average,’k’,’LineWidth’,2)
plot(t exact,exact,’b+’,’LineWidth’,3)
plot(t,upper,’k--’,’LineWidth’,2)
plot(t,lower,’k--’,’LineWidth’,2)
xlabel(’Rt/L’,’FontSize’,20); ylabel(’I(t)’,’FontSize’,20)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% MATLAB Code for Nonlinear Oscillator
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
clear clf
a = 0.8; tau = 100; m = 1.2; T = 1000; % maximum time
h = 0.1; % time step
t = [0:h:T]; N = length(t); % time array
M = 10000; % number of realizations
hold on
x0(1:N) = zeros(N,1); y0(1:N) = zeros(N,1); y0(1) = 1;
for i=1:N
x save(j,i) = x(i);
end
end
sigma = 0.1;
for j = 1:M % for M realizations
for i=1:N
x save(j,i) = x(i);
end
end
plot(time,data1,’-kx’,time,data2,’-bo’,
time,data3,’-r+’,’LineWidth’,2)
xlabel(’time’,’FontSize’,20); ylabel(’E[x(t)]’,’FontSize’,20);
legend(’\sigma = 0’,’\sigma = 0.01’,’\sigma = 0.1’)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% MATLAB Code for Stochastic Damped Harmonic Oscillator
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
clear, clf
alpha = 0.1; gamma = 0.25; k = 1; T = 30; % maximum time t
h = 0.1; % time step
Worked Solutions 589
for j = 1:M
x(1) = 1; u(1) = 0; y(1) = 1; v(1) = 0; z(1) = 1; w(1) = 0;
% Heun method
% leapfrog method
xi = randn;
y(i+1) = y(i+1) - alpha*y(i)*sqrt(h)*xi
+ 0.5*gamma*alpha*y(i)*sqrt(h*h*h)*xi;
v(i+1) = v(i+1) - alpha*y(i)*sqrt(h*h*h)*xi/sqrt(3);
590 Advanced Engineering Mathematics with MATLAB
end
% Euler method
end
icount = 0;
for i = 1:N
if (mod(i-1,4) == 0)
icount = icount + 1;
time(icount) = t(i); xxx(icount) = Mean1(i);
yyy(icount) = Mean2(i); zzz(icount) = Mean3(i);
end; end
plot(time,xxx,’-kx’,time,yyy,’-bo’,time,zzz,’-r+’,’LineWidth’,2)
xlabel(’time’,’FontSize’,20); ylabel(’E[x(t)]’,’FontSize’,20);
legend({’Euler method’,’Heun method’,’leapfrog method’},...
’FontSize’,10)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% MATLAB Code for First Passage Time
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Euler method
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
x(1) = X0;
if (x(k+1) >= 0)
m = m+1; tau(m) = h*(k+1); break
end
end; end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Milstein method
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
y(1) = X0;
if (y(k+1) >= 0)
mm = mm+1; ttau(mm) = h*(k+1); break
end
end; end
end
[temp1,ErrorEst] = polyfit(xxx,yyy,1)
y fit = polyval(temp1,xxx,ErrorEst)
[temp2,ErrorEst] = polyfit(xxx,zzz,1)
z fit = polyval(temp2,xxx,ErrorEst)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% MATLAB Code for Business Bankruptcy
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
clear, clf
mu = 1.001;
T = 3; % maximum time to go to
h = 0.005;
temp1 = mu*h;
t = [0:h:T];
N = length(t);
M = 1000000; % number of realizations
D = 100;
X0 = 500;
x(1:N) = zeros(N,1);
for i = 1:41
interest(i) = 0.25*(i-1); m = 0;
iD = interest(i)*D/100; temp2 = iD*h;
end
end; end
plot(interest,probability1,’-kx’,interest,probability2,’-bo’,...
interest,probability3,’-r+’,’LineWidth’,2)
xlabel(’interest (%/yr)’,’FontSize’,20);
ylabel(’probability of bankruptcy’,’FontSize’,20);
legend({′ \sigma = 1.5’,’\sigma = 2.0’,’\sigma = 2.5’},
’FontSize’,15)