Advanced Engineering Mathematics with MATLAB, Fourth Edition (Solutions, Instructor Solution Manual) [4 ed.] 1498739644, 9781498739641

Advanced Engineering Mathematics with MATLAB, Fourth Edition builds upon three successful previous editions. It is writt

137 65 2MB

English Pages 594 Year 2016

Report DMCA / Copyright

DOWNLOAD PDF FILE

Recommend Papers

Advanced Engineering Mathematics with MATLAB, Fourth Edition (Solutions, Instructor Solution Manual) [4 ed.]
 1498739644, 9781498739641

  • 0 0 0
  • Like this paper and download? You can publish your own PDF file online for free in a few minutes! Sign Up
File loading please wait...
Citation preview

Solution Manual Section 1.1 1. first-order, linear

2. first-order, nonlinear

3. first-order, nonlinear

4. third-order, linear

5. second-order, linear

6. first-order, nonlinear

7. third-order, nonlinear

8. second-order, linear

9. second-order, nonlinear

10. first-order, nonlinear

11. first-order, nonlinear

12. second-order, nonlinear

13. first-order, nonlinear

14. third-order, linear

15. second-order, nonlinear

16. third-order, nonlinear

Section 1.2 1. Because the differential equation can be rewritten e−y dy = x dx, integration immediately gives −e−y = 12 x2 − C, or y = − ln(C − x2 /2). 2. Separating variables, we have that dx/(1 + x2 ) = dy/(1 + y 2 ). Integrating this equation, we find that tan−1 (x)−tan−1 (y) = tan(C), or (x−y)/(1+xy) = C. 3. Because the differential equation can be rewritten ln(x)dx/x = y dy, integration immediately gives 12 ln2 (x) + C = 21 y 2 , or y 2 (x) − ln2 (x) = 2C. 4. Because the differential equation can be rewritten y 2 dy = (x + x3 ) dx, integration immediately gives y 3 (x)/3 = x2 /2 + x4 /4 + C. 5. Because the differential equation can be rewritten y dy/(2+y 2 ) = x dx/(1+ x2 ), integration immediately gives 12 ln(2 + y 2 ) = 12 ln(1 + x2 ) + 12 ln(C), or 2 + y 2 (x) = C(1 + x2 ). 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

7. Because the differential equation can be rewritten e−y dy = ex dx, integration immediately gives −e−y = ex − C, or y(x) = − ln(C − ex ). 8. Because the differential equation can be rewritten dy/(y 2 + 1) = (x3 + 5) dx, integration immediately gives tan−1 (y) = 41 x4 + 5x + C, or y(x) = tan 14 x4 + 5x + C .

9. Because the differential equation can be rewritten y 2 dy/(b − ay 3 ) = dt, y integration immediately gives ln[b − ay 3 ] y0 = −3at, or (ay 3 − b)/(ay03 − b) = e−3at . 10. Because the differential equation can be written du/u = dx/x2 , integration 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), g dp =− dz. p R(T0 − Γz) Integrating from 0 to z, ln



   p(z) g T0 − Γz = , ln p0 RΓ T0

or

p(z) = p0



T0 − Γz T0

g/(RΓ)

.

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. 13. Separating variables, we find that dV dV R dV dt = − =− . 2 V + RV /S V S(1 + RV /S) RC Integration yields 

V ln 1 + RV /S



=−

t + ln(C). RC

Upon applying the initial conditions, V (t) =

V0 RV0 /S e−t/(RC) + e−t/(RC) V (t). 1 + RV0 /S 1 + RV0 /S

3

Worked Solutions Solving for V (t), we obtain V (t) =

SV0 e−t/(RC)  . S + RV0 1 − e−t/(RC)

14. From the definition of γ, we can write the differential equation A dT + T 4 = γ4, B dt or

  B 1 dT 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. 15. Separating the variables yields dN = b dt, N ln(K/N )

or

d[ln(K/N )] = −b dt. ln(K/N )

Integration leads to ln [ln(K/N )] − ln {ln[K/N (0)]} = −bt 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 .

16. Separating the variables yields dI dI β − = −α dz. I α 1 + βI/α Integration leads to ln



 1 + βI(0)/α I(z) = −αz, 1 + βI(z)/α I(0)

4

Advanced Engineering Mathematics with MATLAB

or I(z) I(0) = e−αz , 1 + βI(z)/α 1 + βI(0)/α

or

I(z) =

αI(0)e−αz . α + βI(0) [1 − e−αz ]

17. Separating the variables yields 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   [A]0 1 ln ([A]0 − [B]0 ) ([A]0 − [C]0 ) [A] − [X]   0 [B]0 1 ln + ([B]0 − [A]0 ) ([B]0 − [C]0 ) [B] − [X]   0 [C]0 1 + = kt. ln ([C]0 − [A]0 ) ([C]0 − [B]0 ) [C]0 − [X] 18. Separation of variables yields d[X] = (k1 + k2 ) dt. α − [X] Integrating both sides, ln(α − [X]) − ln(α − [X]0 ) = −(k1 + k2 )t. Because [X]0 = 0, α − [X] = αe−(k1 +k2 )t ,

or

h i [X] = α 1 − e−(k1 +k2 )t .

Section 1.3 1. Because M (x, y) = −y and N (x, y) = x + y, we have that M (tx, ty) = −ty = tM (x, y), and N (tx, ty) = tx + ty = tN (x, y). Therefore, the differential equation is homogeneous.

5

Worked Solutions

Let y = ux. Substituting into the differential equation, (ux + x)(u dx + x du) = ux dx, or −u2 x dx = (1 + u)x2 du, or   dx 1 1 − du. = + x u u2 Integrating this last equation, − ln |x| = ln(u) −

1 − C, u

or

ln |y| −

x = C. y

2. Because M (x, y) = y − x and N (x, y) = x + y, we have that M (tx, ty) = ty − tx = tM (x, y), and N (tx, ty) = tx + ty = tN (x, y). Therefore, the differential equation is homogeneous. Let y = ux. Substituting into the differential equation, (u − 1)x dx + (u + 1)x(u dx + x du) = 0, or (u2 + 2u − 1) dx = −(u + 1)x du,

or



u+1 dx = 2 du. x u + 2u − 1

Integrating this last equation, − ln |x| =

1 2

2

ln |u +2u−1|+C,

or

x

2



 y2 y + 2 − 1 = y 2 +2xy −x2 = C. x2 x

3. Because M (x, y) = x2 + y 2 and N (x, y) = 2xy, we have that M (tx, ty) = t2 x2 + t2 y 2 = t2 (x2 + y 2 ) = t2 M (x, y), and N (tx, ty) = 2t2 xy = t2 N (x, y). Therefore, the differential equation is homogeneous. Let y = ux. Substituting into the differential equation, 2x(ux)(u dx + x du) + (x2 + x2 u2 ) dx = 0 or 2xu du + (1 + 3u2 ) dx = 0,

or

2u dx =− du. x 1 + 3u2

Integrating this last equation, ln |x| = − 13 ln(1 + 3u2 ) + ln(C1 ). Inverting the logarithms, |x|(1 + 3y 2 /x2 )1/3 = C1 ,

or

|x|(x2 + 3y 2 ) = C.

4. Because M (x, y) = y(y − x) and N (x, y) = x(x + y), we have that M (tx, ty) = ty(ty − tx) = t2 M (x, y), and N (tx, ty) = tx(tx + ty) = t2 N (x, y). Therefore, the differential equation is homogeneous.

6

Advanced Engineering Mathematics with MATLAB Let y = ux. Substituting into the differential equation, x2 u(u − 1) dx + x2 (u + 1)(u dx + x du) = 0

or 2u2 dx + (u + 1)x du = 0,

or

2

u+1 dx = − 2 du. x u

Integrating this last equation, ln |x|2 = − ln |u| +

1 + C, u2

or

ln |ux2 | = C −

x , y

or

ln |xy| = C −

x . 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, √ x(u dx + x du) = (xu + 2x u ) dx,

or

du dx √ = . x 2 u

Integrating this last equation, u1/2 = ln |x| + C,

or

2

y = x (ln |x| + C) .

p 6. Because M (x, y) = x2 + y 2 − y and N (x, y) = x, we have that M (tx, ty) p p x2 + y 2 − y = tM (x, y), and N (tx, ty) = tx = = t2 x2 + t2 y 2 − ty = t tN (x, y). Therefore, the differential equation is homogeneous. Let y = ux. Substituting into the differential equation, p  x2 + x2 u2 − ux dx + x(x du + u dx) = 0,

or

p x 1 + u2 dx + x2 du = 0,

or

dx du . = −√ x 1 + u2

Integrating this last equation,

  p − ln(x) = − ln u + 1 + u2 − ln(C).

Inverting the logarithms, p ux + u2 x2 + x2 = C,

or

y+

p

x2 + y 2 = C.

7. Because M (x, y) = sec(y/x) + y/x and N (x, y) = −1, we have that M (tx, ty) = sec[(ty)/(tx)] + (ty)/(tx) = sec(y/x) + y/x = M (x, y), and

7

Worked Solutions

N (tx, ty) = −1 = N (x, y). Therefore, the differential equation is homogeneous. Let y = ux. Substituting into the differential equation, u dx + x du = [sec(u) + u] dx,

or

cos(u) du =

dx . 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, u dx + x du = (eu + u) dx,

or

e−u du =

Integrating and substituting for u, the final answer is y(x) = −x ln (C − ln |x|) . Section 1.4 1. Since M (x, y) = y 2 − x2 , and N (x, y) = 2xy, ∂N ∂M = 2y = . ∂y ∂x The exactness criteria is satisfied. Now, since ∂u = y 2 − x2 , ∂x then u(x, y) = xy 2 − 31 x3 + f (y). To find f (y), we use ∂u = 2xy + f ′ (y) = 2xy. ∂y Therefore, f ′ (y) = 0, and u(x, y) = xy 2 − 13 x3 = C. 2. Since M (x, y) = y − x, and N (x, y) = x + y, ∂N ∂M =1= . ∂y ∂x

dx . x

8

Advanced Engineering Mathematics with MATLAB

The exactness criteria is satisfied. Now, since ∂u = y − x, ∂x then u(x, y) = xy − 21 x2 + f (y). To find f (y), we use ∂u = x + f ′ (y) = x + y. ∂y Therefore, f ′ (y) = y, and u(x, y) = xy + 12 y 2 − 21 x2 = C. 3. Since M (x, y) = y 2 − 1, and N (x, y) = 2xy − sin(y), ∂M ∂N = 2y = . ∂y ∂x The exactness criteria is satisfied. Now, since ∂u = y 2 − 1, ∂x then u(x, y) = xy 2 − x + f (y). To find f (y), we use ∂u = 2xy + f ′ (y) = 2xy − sin(y). ∂y Therefore, f ′ (y) = − sin(y), and u(x, y) = xy 2 − x + cos(y) = C. 4. Since M (x, y) = sin(y) − 2xy + x2 , and N (x, y) = x cos(y) − x2 , ∂N ∂M = cos(y) − 2x = . ∂y ∂x The exactness criteria is satisfied. Now, since ∂u = sin(y) − 2xy + x2 , ∂x then u(x, y) = x sin(y) − x2 y + 13 x3 + f (y). To find f (y), we use ∂u = x cos(y) − x2 + f ′ (y) = x cos(y) − x2 . ∂y Therefore, f ′ (y) = 0, and u(x, y) = x sin(y) − x2 y + 31 x3 = C. 5. Since M (x, y) = −y/x2 , and N (x, y) = 1/x + 1/y, ∂M ∂N 1 =− 2 = . ∂y x ∂x

9

Worked Solutions The exactness criteria is satisfied. Now, since ∂u y = − 2, ∂x x then u(x, y) = y/x + f (y). To find f (y), we use 1 1 1 ∂u = + f ′ (y) = + . ∂y x x y Therefore, f ′ (y) = 1/y, and u(x, y) = y/x + ln(y) = C. 6. Since M (x, y) = 3x2 − 6xy, and N (x, y) = −3x2 − 2y, ∂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 Therefore, f ′ (y) = −2y, and u(x, y) = x3 − 3x2 y − y 2 = C. 7. Since M (x, y) = y sin(xy), and N (x, y) = x sin(xy), ∂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 Therefore, f ′ (y) = 0, and u(x, y) = − cos(xy) = C. 8. Since M (x, y) = 2xy 2 + 3x2 , and N (x, y) = 2x2 y, ∂N ∂M = 4xy = . ∂y ∂x

10

Advanced Engineering Mathematics with MATLAB

The exactness criteria is satisfied. Now, since ∂u = 2xy 2 + 3x2 , ∂x then u(x, y) = x2 y 2 + x3 + f (y). To find f (y), we use ∂u = 2x2 y + f ′ (y) = 2x2 y. ∂y Therefore, f ′ (y) = 0, and u(x, y) = x2 y 2 + x3 = C. 9. Since M (x, y) = 2xy 3 + 5x4 y, and N (x, y) = 3x2 y 2 + x5 + 1, ∂M ∂N = 6xy 2 + 5x4 = . ∂y ∂x The exactness criteria is satisfied. Now, since ∂u = 2xy 3 + 5x4 y, ∂x then u(x, y) = x2 y 3 + x5 y + f (y). To find f (y), we use ∂u = 3x2 y 2 + x5 + f ′ (y) = 3x2 y 2 + x5 + 1. ∂y Therefore, f ′ (y) = 1, and u(x, y) = x2 y 3 + x5 y + y = C. 10. Since M (x, y) = x3 + y/x, and N (x, y) = y 2 + ln(x), 1 ∂N ∂M = = . ∂y x ∂x The exactness criteria is satisfied. Now, since ∂u y = x3 + , ∂x x then u(x, y) = 41 x4 + y ln(x) + f (y). To find f (y), we use ∂u = ln(x) + f ′ (y) = y 2 + ln(x). ∂y Therefore, f ′ (y) = y 2 , and u(x, y) = 41 x4 + y ln(x) + 31 y 3 = C. 11. [x + e−y + x ln(y)] dy + [y ln(y) + ex ] dx = 0

11

Worked Solutions Since M (x, y) = y ln(y) + ex , and N (x, y) = x + e−y + x ln(y), ∂N ∂M = 1 + ln(y) = . ∂y ∂x The exactness criteria is satisfied. Now, since ∂u = y ln(y) + ex , ∂x then u(x, y) = xy ln(y) + ex + f (y). To find f (y), we use ∂u = x[ln(y) + 1] + f ′ (y) = x + e−y + x ln(y). ∂y Therefore, f ′ (y) = e−y , and u(x, y) = xy ln(y) + ex − e−y = C. 12. Since M (x, y) = cos(4y 2 ), and N (x, y) = −8xy sin(4y 2 ), ∂M ∂N = −8y sin(4y 2 ) = . ∂y ∂x The exactness criteria is satisfied. Now, since ∂u = cos(4y 2 ), ∂x then u(x, y) = x cos(4y 2 ) + f (y). To find f (y), we use ∂u = −8xy sin(4y 2 ) + f ′ (y) = −8xy sin(4y 2 ). ∂y Therefore, f ′ (y) = 0, and u(x, y) = x cos(4y 2 ) = C. 13. Since M (x, y) = sin2 (x + y), and N (x, y) = − cos2 (x + y), ∂M ∂N = 2 sin(x + y) cos(x + y) = . ∂y ∂x The exactness criteria is satisfied. Now, since ∂u = sin2 (x + y) = ∂x

1 2

[1 − cos(2x + 2y)] ,

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

Therefore, f ′ (y) = − 12 , and u(x, y) = y − x +

1 2

sin(2x + 2y) = C.

14. After multiplying by the integrating factor, M (x, y) = α

y a+1 , (1 − y)a+1

and

N (x, y) = (x − y)

ya . (1 − y)a+2

Checking the exactness criteria, ya ∂N ∂M = = . ∂y (1 − y)a+2 ∂x The exactness criteria is satisfied. Now, since ∂u y a+1 =α , ∂x (1 − y)a+1 u(x, y) = αx

y a+1 + f (y) = C. (1 − y)a+1

To find f (y), we use ∂u ya ya + f ′ (y) = (x − y) . =x a+2 ∂y (1 − y) (1 − y)a+2 Therefore, f ′ (y) = −

y a+1 . (1 − y)a+2

Integrating, we find that f (y) = −

Z

y 0

ξ a+1 dξ. (1 − ξ)a+2

and the final answer is y a+1 u(x, y) = αx − (1 − y)a+1

Z

y 0

ξ a+1 dξ = C. (1 − ξ)a+2

Section 1.5 1. Since P (x) = 1, µ(x) = ex . Multiplying the differential equation by the integrating, we have that ex y ′ + ex y = e2x , or d (ex y) /dx = e2x or ex y = 1 2x + C, or y = 21 ex + Ce−x . This general solution applies to any x on the 2e interval (−∞, ∞).

13

Worked Solutions 2

2. Since P (x) = 2x, µ(x) = ex . Multiplying the differential by the  2equation  2 x2 ′ x2 x2 x integrating factor, we have that e y + 2xe y = xe , d e y /dx = xex , 2

2

or ex y = 12 ex + C, or y = x on the interval (−∞, ∞).

1 2

2

+ Ce−x . This general solution applies to any

3. Since the canonical form of the differential equation is y ′ + y/x = 1/x2 , P (x) = 1/x, and µ(x) = x. Multiplying the canonical differential equation by the integrating factor, we have that xy ′ + y = x−1 , or d (xy) /dx = x−1 , or xy = ln(x) + C, or y = ln(x)/x + Cx−1 . This general solution applies to any x as long as x 6= 0. 4. Since the canonical form of the differential equation is y ′ −2y/x = x, P (x) = −2/x, and µ(x) = x−2 . Multiplying the canonical differential equation by the integrating factor, we have that x−2 y ′ − 2x−3 y = x−1 , d (y/x) /dx = 1/x, or y/x2 = ln(x) + C, or y = 2x ln(x) + Cx2 . 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 (−∞, ∞). 6. Since P (x) = 2, µ(x) = e2x . Multiplying the differential equation by  the integrating, we have that e2x y ′ + 2e2x y = 2e2x sin(x), or d e2x y /dx = 2e2x sin(2x), or e2x y = 25 e2x [2 sin(x) − cos(x)]+C, or y = 54 sin(x)− 25 cos(x)+ Ce−2x . This general solution applies to any x on the interval (−∞, ∞). 7. Since the differential equation is already in canonical form, we immediately have P (x) = 2 cos(2x), and µ(x) = exp[sin(2x)]. Multiplying the differential equation by the integrating factor, we have that esin(2x) dy/dx +  sin(2x)  sin(2x) 2 cos(2x)e y = 0, d e y /dx = 0, or esin(2x) y = C. This general solution applies to any x on the interval nπ + ϕ < 2x < (n + 1)π + ϕ, where ϕ is any real and n is any integer. 8. Dividing through by x, we immediately have P (x) = 1/x, and µ(x) = x. Multiplying the differential equation by the integrating factor, we have that xdy/dx + y = ln(x), or d(xy)/dx = ln(x), or xy = C + x ln(x) − x, or y = C/x + ln(x) − 1. This general solution applies to any x on the interval (0, ∞). 9. Since the differential equation is already in canonical form, we immediately have P (x) = 3, and µ(x) = e3x . Multiplying the differential equation by the integrating factor, we have that e3x dy/dx + 3e3x y = 4e3x , or d e3x y /dx =

14

Advanced Engineering Mathematics with MATLAB

  4e3x , or e3x y(x) − y(0) = 34 e3x − 1 , or e3x y(x) − 5 = 43 e3x − 1 , or y(x) = 4 11 −3x . This particular solution applies to any x on the interval (−∞, ∞). 3+ 3 e 10. Since the differential equation is already in canonical form, we immediately have P (x) = −1, and µ(x) = e−x . Multiplying the differential equation by the integrating factor, we have that e−x dy/dx − e−x y = 1/x, or d (e−x y) /dx = 1/x, or e−x y(x) − e−e y(e) = ln(x) − ln(e), or y(x) = ex [ln(x) − 1]. 11. By inspection, we immediately have that d [sin(x)y] /dx = 1, or sin(x)y = x + C, or y(x) = (x + C)/ sin(x). 12. Since the canonical form of the differential equation is 2 sin(x) tan(x) dy + y= , dx 1 − cos(x) 1 − cos(x) P (x) = 2 sin(x)/[1 − cos(x)], and µ(x) = [1 − cos(x)]2 . Multiplying the canonical differential equation by the integrating factor, we have that [1 − cos(x)]2

dy + 2 sin(x)[1 − cos(x)]y = tan(x)[1 − cos(x)] dx d  [1 − cos(x)]2 y = tan(x) − sin(x) dx [1 − cos(x)]2 y = − ln | cos(x)| + cos(x) + C.

This general solution applies to any x on the interval nπ+ϕ < x < (n+1)π+ϕ, where ϕ is any real and n is any integer. 13. Since the differential equation is already in canonical form, P (x) = a tan(x) + b sec(x), and µ(x) =

[sec(x) + tan(x)]b . cosa (x)

Multiplying by the integrating factor, we have that   d [sec(x) + tan(x)]b sec(x)[sec(x) + tan(x)]b y(x) = c . dx cosa (x) cosa (x) Integrating both sides of this equation, [sec(x) + tan(x)]b y(x) − y(0) = c cosa (x)

Z

x 0

[sec(ξ) + tan(ξ)]b dξ cosa+1 (ξ)

or y(x) =

cosa (x) y(0) c cosa (x) + [sec(x) + tan(x)]b [sec(x) + tan(x)]b

Z

x 0

[sec(ξ) + tan(ξ)]b dξ. cosa+1 (ξ)

15

Worked Solutions 14. Writing the differential equation in canonical form, we have   1 dy 1 y= . + 1+ dx x x Therefore, µ(x) = exp

Z

x



1 1+ ξ





dξ = exp[x + ln(x)] = xex .

Multiplying the differential equation by the integrating factor, we find xex

dy + (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  x sin(2ωx) 2ax d  2ax e . e y(x) = e2ax − dx 2 4ω

Integrating both sides of this equation, Z x Z x 1 2aξ 2ax 1 ξe dξ − sin(2ωξ)e2aξ dξ e y(x) − y(0) = 2 4ω 0 0 or e

2ax

x x e2aξ e2aξ y(x) = (2aξ − 1) − [a sin(2ωξ) − ω cos(2ωξ)] . 2 2 2 8a 8ω(a + ω ) 0 0

Solving for y(x), y(x) =

ω 2 e−2ax a sin(2ωx) − ω cos(2ωx) 2ax − 1 + 2 2 − . 2 8a 8a (a + ω 2 ) 8ω(a2 + ω 2 )

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   i x + 1 −k/x2 d h −k/x2 e y(x) = ln e . dx x

16

Advanced Engineering Mathematics with MATLAB

Integrating both sides of this equation, e

−k/x2

y(x) − e

−k

y(1) =

Z

x 1



ξ+1 ln ξ



  k exp − 2 dξ. ξ

Because y(1) = 0, 

k y(x) = exp 2 x

Z

x 1



ξ+1 ln ξ





k exp − 2 ξ



dξ.

17. Substituting in the variable p(x) = y 2 (x), we have that 2 2 dp − p=− , dx kx k

p(1) = 0.

Then, multiplying through with the integrating factor, we find that x−2/k

dp 2 2 − x−2/k−1 p = − x−2/k dx k k 2 d h −2/k i x p = − x−2/k . dx k

If k 6= 2, an integration yields x−2/k p(x) = −

2/k x1−2/k + C, 1 − 2/k

or

y 2 (x) = −

2 x + Cx2/k . k−2

Applying the initial condition, the final answer is y 2 (x) =

 2  x − x2/k , 2−k

provided k 6= 2. If k = 2, then we have that p(x) = − ln(x) + C. x Applying the initial condition, C = 0 and the final answer is y 2 (x) = x ln(1/x).

18. We must solve dx − (1 − N )rx = S, dt

x(0) = 1.

17

Worked Solutions Multiplying both side of the equation by e−(1−N )rt , we have i d h −(1−N )rt e x(t) = Se−(1−N )rt . dt Integrating both sides of this equation from 0 to t, we obtain e−(1−N )rt x(t) − 1 =

h i S 1 − e−(1−N )rt . (1 − N )r

Solving x(t), we find that x(t) = e(1−N )rt +

h i S e(1−N )rt − 1 . (1 − N )r

19. From separation of variables, 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 ek2 t [B] − [B]0 =

i k1 [A]0 h (k2 −k1 )t e −1 . k2 − k1

Because [B]0 = 0, we find that [B] =

 k1 [A]0  −k1 t e − e−k2 t . k2 − k1

Finally, substituting for [B] into the [C] equation,

 k1 k2 [A]0  −k1 t d[C] e − e−k2 t . = dt k2 − k1

18

Advanced Engineering Mathematics with MATLAB

Integrating this equation, [C] − [C]0 = or

  k2 [A]0 k1 [A]0 1 − e−k1 t − 1 − e−k2 t k2 − k1 k2 − k1

  k1 e−k2 t − k2 e−k1 t . [C] = [A]0 1 + k2 − k1

since [C]0 = 0. 20. The differential equation is L

dI + RI = E0 cos2 (ωt), dt

I(0) = 0.

Multiplying the integrating factor, we can rewrite this differential equation i E d h Rt/L 0 Rt/L e I(t) = e cos2 (ωt). dt L Integrating both sides of the differential equation, e

Rt/L

E0 I(t) − I(0) = L

Z

t

eRτ /L cos2 (ωτ ) dτ. 0

Using the fact that I(0) = 0 and replacing cos2 (ωt) with have that e

Rt/L

E0 I(t) = 2L

Z th 0

1 2

[1 + cos(2ωt)], we

i eRτ /L + eRτ /L cos(2ωτ ) dτ,

or e

Rt/L

  E0 eRτ /L − 1 E0 eRτ /L [R cos(2ωτ ) + 2ωL sin(2ωτ )] − R I(t) = + . 2R 2R2 + 8ω 2 L2

Solving for I(t),     E0 R cos(2ωτ ) − e−Rt/L + 2ωL sin(2ωτ ) E0 1 − e−Rτ /L + . I(t) = 2R 2R2 + 8ω 2 L2 21. Because n = 2, z = y −1 and the linear ordinary differential equation is dz z − = 1, dx x

or

1 dz z d z 1 = . − 2 = x dx x dx x x

19

Worked Solutions Integrating this equation yields z(x) = Cx + x ln(x). Therefore, the solution to the nonlinear differential equation is y(x) =

1 . Cx + x ln(x)

22. Because n = 2, z = y −1 and the linear ordinary differential equation is z 1 dz + = − 2, dx x x

or

x

dz d 1 +z = (xz) = − . dx dx x

Integrating this equation yields z(x) = [C − ln(x)]/x. Therefore, the solution to the nonlinear differential equation is y(x) =

x . C − ln(x)

23. Because n = 21 , z = y 1/2 and the linear ordinary differential equation is dz 2z x − = , dx x 2

or

1 1 dz 2z d z  = − = . x2 dx x3 dx x2 2x

Integrating this equation yields z(x) = Cx2 + 21 x2 ln(x). Therefore, the solution to the nonlinear differential equation is 2  y(x) = Cx2 + 21 x2 ln(x) . 24. Because n = 2, z = y −1 and the linear ordinary differential equation is dz z − = x, dx x

or

1 dz z d z = 1. − 2 = x dx x dx x

Integrating this equation yields z(x) = Cx + x2 .

20

Advanced Engineering Mathematics with MATLAB

Therefore, the solution to the nonlinear differential equation is y(x) =

1 . Cx + x2

25. Because n = −1, z = y 2 and the linear ordinary differential equation is dz z − = −1, dx x

or

Integrating this equation yields

1 1 dz z d z =− . − 2 = x dx x dx x x

z(x) = Cx − x ln(x). Therefore, the solution to the nonlinear differential equation is y(x) = [Cx − x ln(x)]

1/2

.

26. Because n = 3, z = y −2 and the linear ordinary differential equation is 2z dz − = −1 dx x or

1 dz 1 2z d z  = − 2. − 3 = 2 x dx x dx x2 x Integrating this equation yields z(x) = Cx2 + x. Therefore, the solution to the nonlinear differential equation is  −1/2 y(x) = Cx2 + x . Section 1.6 5. The equilibrium points for this differential equation are x = 0, 21 , and 1. The right side is negative for 0 < x < 21 and positive for 12 < x < 1. Thus, the equilibrium point x = 21 is unstable while the equilibrium points at x = 0 and 1 are stable. 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.

21

Worked Solutions

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 1. Because the differential equation can be written x′ − x = t, we have that d −t  e x = −te−t . dt

Integration yields x(t) = Cet + t + 1. Applying the initial condition, we find that C = 1. Therefore, the final answer is x(t) = et + t + 1. 2

2. Because the differential equation can be written dx/x = t dt, x(t) = Cet /2 . Applying the initial condition, C = 1. Therefore, the final solution is x(t) = 2 et /2 . 3. Because the differential equation can be written dx/x2 = dt/(t + 1), integration 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 . 4. Because the differential equation can be written x′ − x = e−t , we have that d −t  e x = e−2t . dt

Integration yields x(t) = Cet − 12 e−t . Applying the initial condition,  we find that C = e−2 /2. Therefore, the final answer is x(t) = 21 et−2 − e−t . %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % 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

% take the first time step x(1) = 0; t(1) = 0; t(2) = deltat; x(2) = x(1) + deltat - b * deltat * sign(x(1)) * abs(x(1))^beta; sum = x(1) + x(2); % take the remaining time steps 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 % plot the results subplot(2,2,n), plot(t,x); xlabel(’time’,’Fontsize’,20); ylabel(’x(t)’,’Fontsize’,20); legend([’B = ’,num2str(b)]) 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) x

u′ (x) = Cx−2 .

Thus, u(x) = A/x, and the second solution is y2 (x) = A/x. 2. Since the second solution is y2 (x) = u(x)ex , 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)

u′ (x) = Ce−3x .

23

Worked Solutions Thus, u(x) = Ae−3x , and the second solution is y2 (x) = Ae−2x . 3. Since the second solution is y2 (x) = xu(x), 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) x

u′ (x) = Cx−6 .

Thus, u(x) = Ax−5 , and the second solution is y2 (x) = Ax−4 . 4. Since the second solution is y2 (x) = ex u(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, 1 u′′ (x) = − 1, ′ u (x) x

u′ (x) = −Axe−x .

Thus, u(x) = A(x + 1)e−x , and the second solution is y2 (x) = A(x + 1). 5. Since the second solution is y2 (x) = (x − 1)u(x), 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 u′ (x) = A

  1 x(x − 2) . = 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). 6. Since the second solution is y2 (x) = u(x) sin3 (x), y2′ (x) = 3 sin2 (x) cos(x)u(x) + sin3 (x)u′ (x),

24

Advanced Engineering Mathematics with MATLAB

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 sin(x) cos(x)u′′ + [6 cos2 (x) + sin2 (x)]u′ = 0. Therefore, u′′ (x) = −6 cot(x) − tan(x), u′ (x)

u′ (x) = −

A cos(x) . 5 sin6 (x)

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, cos(x) cos(x) sin(x) √ u(x) + √ u′ (x) y2′ (x) = − √ u(x) − x 2x x x and

cos(x) 3 cos(x) sin(x) √ u(x) + √ u(x) y2′′ (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, u′′ (x) 2 sin(x) = , u′ (x) cos(x)

u′ (x) = A sec2 (x).

√ Thus, u(x) = A tan(x), and the second solution is y2 (x) = A sin(x)/ x. 8. Since the second solution is y2 (x) = u(x)e−bx y2′ (x) = −bxe−bx

2

/2

2

/2

u(x) + e−bx

2

/2 ′

u (x),

and y2′′ (x) = (b2 x2 − b)e−bx

2

/2

u(x) − 2bxe−bx

2

/2 ′

u (x) + u′′ (x)e−bx

2

/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)

25

Worked Solutions Thus, u(x) =

Rx

ebξ

2

−aξ

dξ, and the second solution is Z x 2 2 y2 (x) = e−bx /2 ebξ −aξ dξ.

9. Letting v = y ′ , we can rewrite the differential equation y(dv/dy) = v 2 . Assuming v 6= 0, we can integrate this equation to give v = C1 y. Therefore, dy/dx = C1 y. Integrating this, we obtain the final answer y(x) = C2 eC1 x . 10. Letting v = y ′ , we can rewrite the differential equation dv/dy = 2y. Assuming v 6= 0, we can integrate this equation to give v = y 2 + C1 . Because v(1) = 1, C1 = 0 and dy/dx = y 2 . Integrating this equation, 1/y = C2 − x. Again, using the initial conditions, y(x) = 1/(1 − x). 11. Letting v = y ′ , we can rewrite the differential equation yv(dv/dy) = v + v 2 . Assuming v 6= 0, we can integrate this equation to give 1 + v = C1 y. Substituting for v, dy/dx = C1 y − 1. Integrating this equation, y =  1 + C2 eC1 x /C1 .

12. Letting v = y ′ , we can rewrite the differential equation 2yv(dv/dy) = 1 + v 2 . Assuming v 6= 0, we can √ integrate this equation to give 1 + v 2 = for C1 y. Substituting  v, dy/dx = C1 y − 1. Integrating this equation, y = 1 + (C1 x + C2 )2 /4 /C1 .

13. Letting v = y ′ , we can rewrite the differential equation v(dv/dy) = e2y with v(0) = 1. We can integrate this equation and find v = ey . Substituting for v, dy/dx = ey . Integrating this equation, e−y = C − x, or y = − ln |1 − x|.

14. We begin by integrating once and using the initial conditions, y ′′ = 32 y 2 . Letting v = y ′ , we can rewrite this differential equation v(dv/dy) = 32 y 2 . Integrating this equation, we have v = y 3/2 . Substituting for v, dy/dx = y 3/2 . Integrating this equation, y = 4/(2 − x)2 = 4/(x − 2)2 . 15. If we define z = 1/v, the Bernoulli equation becomes z ′ + z/x = − 21 . Its solution is z = −A2 /x−x/4. Therefore, y ′ = v = −4x/(x2 +4A2 ). Integration yields the final answer y(x) = B − 2 ln(x2 + 4A2 ). 16. First we compute  Z 1 ′ ′ y (x) = u (x) exp − 2 and

x

  Z a1 1 a1 (ξ) dξ − u(x) exp − a2 (ξ) 2a2 2

x

 a1 (ξ) dξ , a2 (ξ)

      Z Z 1 d a1 1 x a1 (ξ) 1 x a1 (ξ) dξ − u(x) exp − dξ y ′′ (x) = u′′ (x) exp − 2 a2 (ξ) 2 dx a2 2 a2 (ξ)     Z x Z x 2 1 a 1 a1 (ξ) a1 (ξ) a1 dξ + 12 u(x) exp − dξ . − u′ (x) exp − a2 2 a2 (ξ) 4a2 2 a2 (ξ)

26

Advanced Engineering Mathematics with MATLAB

Substituting y(x), y ′ (x), and y ′′ (x) into the original ordinary differential equation yields the final answer. Section 2.1 1. The characteristic equation is m2 +6m+5 = (m+1)(m+5) = 0. Therefore, the general solution is y(x) = C1 e−x + C2 e−5x . 2. The characteristic equation is m2 − 6m + 10 = (m − 3 + i)(m − 3 − i) = 0. Therefore, the general solution is y(x) = C1 e3x cos(x) + C2 e3x sin(x). 3. The characteristic equation is m2 − 2m + 1 = (m − 1)2 = 0. Therefore, the general solution is y(x) = C1 ex + C2 xex . 4. The characteristic equation is m2 −3m+2 = (m−1)(m−2) = 0. Therefore, the general solution is y(x) = C1 e2x + C2 ex . 5. The characteristic equation is m2 − 4m + 8 = (m − 2)2 + 4 = 0. Therefore, the general solution is y(x) = C1 e2x cos(2x) + C2 e2x sin(2x). 6. The characteristic equation is m2 + 6m + 9 = (m + 3)2 = 0. Therefore, the general solution is y(x) = C1 e−3x + C2 xe−3x . 7. The characteristic equation is m2 + 6m − 40 = (m + 10)(m − 4) = 0. Therefore, the general solution is y(x) = C1 e−10x + C2 e4x . 8. The characteristic equation is m2 + 4m + 5 = (m + 2)2 + 1 = 0. Therefore, the general solution is y(x) = C1 e−2x cos(x) + C2 e−2x sin(x). 9. The characteristic equation is m2 + 8m + 25 = (m + 4)2 + 9 = 0. Therefore, the general solution is y(x) = e−4x [C1 cos(3x) + C2 sin(3x)]. 10. The characteristic equation is 4m2 − 12m + 9 = (2m − 3)2 = 0. Therefore, the general solution is y(x) = e3x/2 (C1 + C2 x). 11. The characteristic equation is m2 + 8m + 16 = (m + 4)2 = 0. Therefore, the general solution is y(x) = C1 e−4x + C2 xe−4x . 12. The characteristic equation is m3 + 4m2 = m2 (m + 4) = 0. Therefore, the general solution is y(x) = C1 + C2 x + C3 e−4x . 13. The characteristic equation is m4 + 4m2 = m2 (m2 + 4) = 0. Therefore, the general solution is y(x) = C1 + C2 x + C3 cos(2x) + C4 sin(2x). 14. The characteristic equation is m4 + 2m3 + m2 = m2 (m + 1)2 = 0. Therefore, the general solution is y(x) = C1 + C2 x + C3 e−x + C4 xe−x .

27

Worked Solutions

√ √ 15. The characteristic equation is m3 +8 = (m−2)(m+1+ 3)(m+1− 3) = 0. Therefore, the general solution is √ √ y(x) = C1 e2x + C2 e−x cos( 3 x) + C3 e−x sin( 3 x). 16. The characteristic equation is m4 − 3m3 + 3m2 − m = m(m − 1)3 = 0. Therefore, the general solution is y(x) = C1 + (C2 + C3 x + C4 x2 )ex . 17. Taking the derivative of the integro-differential equation, d2 y A = 2 dt2 2τ or

Z

t −∞

e−(t−x)/τ y(x) dx −

A y(t), 2τ

1 dy A d2 y + + y(t) = 0. 2 dt τ dt 2τ

Try the solution y(t) = Ce−λt/2 . Then λ A 1 λ2 − + = 4 2τ 2τ 4

"

1 λ− τ

2

2A 1 + − 2 τ τ

#

= 0.

√ The roots to this equation are λ± = (1± 1 − 2Aτ )/τ . Therefore, the general solution is i h √ io n h√ y(t) = e−t/(2τ ) A exp t 1 − 2Aτ /(2τ ) + B exp −t 1 − 2Aτ /(2τ ) . Section 2.2 1. The homogeneous solution to the equation is x(t) = A cos(5t) + B sin(5t). Immediately, we have that x(0) = A = 10. Because x′ (0) = 5B = −10, then B = −2. Therefore, x(t) = 10 cos(5t) − 2 sin(5t). If we√write the solution √ √ x(t) = C sin(5t + ϕ), then C = 100 + 4 = 104 = 2 26. On the other hand, ϕ = tan−1 (10/ − 2) = tan−1 (−5) = 1.7682. Our choice of angle is dictated√by A = C sin(ϕ) and B = C cos(ϕ). Therefore the final answer is x(t) = 2 26 sin(5t + 1.7682). 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). 5. From the information provided by the original weight, we have that M g = kL. Therefore, the differential equation is m d2 x/dt2 = −M gx/L. Let ω 2 = M g/mL. Then the problem can be written x′′ + ω 2 x = 0, x(0) = s0 , x′ (0) = v0 . The general solution is x(t) = A cos(ωt) + B sin(ωt). From the x(0) initial condition, A = s0 . From the x′ (0) initial condition, ωB = v0 . Therefore, the final answer is x(t) = s0 cos(ωt) + v0 sin(ωt)/ω, and v(t) = v0 cos(ωt) − ωs0 sin(ωt). 6. If x(t) denotes the distance from the origin,√the differential √ equation is −t k/m t k/m ′′ + Be , where k mx − kx = 0. Its general solution is x(t) = Ae is the constant of proportionality. Because x(0) = a, we have that x(0) = a = A + B. Next, we compute x′ (t) or  √ √ √ √  x′ (t) = k A et k/m − B e−t k/m / m.

√ √ √ √ Therefore, x′ (0) = a k = k(A − B)/ m, or A − B = a m. Solving for A and B, the final solution is x(t) =

i √ √ √ √ ah (1 + m )et k/m + (1 − m )e−t k/m . 2

Section 2.3 1. The differential equation is 12 x′′ + 3x′ + 4x = 0, which has the characteristic polynomial m2 + 6m + 8 = (m + 4)(m + 2) = 0. The general solution is x(t) = Ae−2t +Be−4t . Because x(0) = A+B = 2, and x′ (0) = −2A−4B = 0, A = −2B or B = −2 and A = 4. Therefore, the final answer is x(t) = 4e−2t − 2e−4t . 2. The differential equation is x′′ + 10x′ + 125x = 0, which has the characteristic polynomial m2 + 10m + 125 = (m + 5)2 + 100 = 0. The general 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 character2 istic polynomial 4m2 + 20m + 169 = m + 21 + 36 = 0. The general solution

Worked Solutions

29

is x(t) = e−5t/2 [A cos(6t) + B sin(6t)]. Because x(0) = A = 4 and 6B = 16 +  10 = 26 or B = 13/3, the final answer is x(t) = e−5t/2 4 cos(6t) + 13 3 sin(6t) .

4. The amplitude of the oscillations√decays by 50% by the time t = ln(2)/λ. The period of one oscillation is 2π/ ω 2 − λ2 . Therefore, the minimum number of oscillations beforepthe amplitude decays 50% is the first integer equal to or greater than ln(2) 1 − (λ/ω)2 /(2πλ/ω).

5. The characteristic polynomial is m2 + cm + 4 = 0. The roots are equal when c = 4 when m = −2.

2 1 2 c = 0. 6. The characteristic polynomial is m2 + 14 cm+ 94 = m + 81 c + 49 − 64 Therefore, we are overdamped when c > 12, underdamped when c < 12, and critically damped when c = 12. √ 7. For an overdamped system, x(t) = C1 er1 t +C2 er2 t , r1,2 = (−c± c2 − 4km) /(2m) with c2 > 4km. Let us find the value of t at which x(t) = 0. This occurs when (r1 − r2 )t − ln(−C2 /C1 ). If C2 /C1 > 0, there is no solution. If C2 /C1 < 0, there is only one solution if r1 > r2 . If r1 < r2 , there is no crossing. 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 x −x yH (x) = Ae + Be . For the particular solution, we guess yp (x) = Cxex + 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 −x yH (x) = A+Be . For the particular solution, we guess yp (x) = Cx3 +Dx2 +

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 = 21 . The general solution is therefore y(x) = Ae2x +Bxe2x +  D 1 2 1 3 2x e . 2x + 6x

′′ ′ 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 and D = 19 . The general solution is 6D)ex + 9Dxex = xex , or C = − 27 2 1 −2x ex . therefore y(x) = (A + Bx)e + 9 x − 27

′′ 8. To find the homogeneous solution, we solve yH − 4yH = 0. Its solution 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 1 2 x sin(3x) + 36 x cos(3x). y(x) = A cos(3x) + B sin(3x) + 12

31

Worked Solutions

′′ 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 solution is therefore y(x) = A cos(x) + B sin(x) +  24D = 1. The general  1 x sin(x) − x cos(x) . 4

11. Using the method of undetermined coefficients, the homogeneous differ′′ ential equation is yH + 2ayH = 0. Its solution is yH (x) = A + Be−2ax . For the particular solution, we guess yp (x) = Cx + D sin(2ωx) + E cos(2ωx), yielding yp′ (x) = C + 2ωD cos(2ωx) − 2ωE sin(2ωx), and yp′′ (x) = −4ω 2 D sin(2ωx) − 4ω 2 E cos(2ωx). The trick here is to recognize that the differential equation can be rewritten as y ′′ + 2ay = 12 [1 − cos(2ωx)]. The form of the particular solution follows directly. Substitution into the differential   equation gives yp′′ + 2ayp′ = 2aC − 4 aωE + ω 2 D sin(2ωx) + 4 aωD − ω 2 E cos(2ωx). Matching up terms, we find that C=

1 , 4a

aE = −ωD,

D=−

a 8ω(ω 2 + a2 )

and

E=

1 . 8(ω 2 + a2 )

Therefore, the general solution is y(x) = A + Be−2ax +

ω cos(2ωx) − a sin(2ωx) x + . 4a 8ω(a2 + ω 2 )

To find A and B, we use the initial conditions: y(0) = A + B +

1 = 0, 8(a2 + ω 2 )

and

y ′ (0) = −2aB +

1 a − = 0. 4a 4(a2 + ω 2 )

Solving for A and B, A = −1/(8a2 ) and B = ω 2 /[8a2 (a2 + ω 2 )]. Therefore, the complete solution is y(x) =

ω 2 e−2ax a sin(2ωx) − ω cos(2ωx) 2ax − 1 + − . 8a2 8a2 (a2 + ω 2 ) 8ω(a2 + ω 2 )

Turning to the integration technique, we begin by noting that Z x Z x Z x ′ ′′ 1 y dξ = 2 [1 − cos(2ωξ)] dξ, y dξ + 2a 0

0

0

or y ′ (x) − y ′ (0) + 2a[y(x) − y(0)] =

x sin(2ax) − . 2 4a

32

Advanced Engineering Mathematics with MATLAB

Substituting the initial conditions yields y ′ + 2ay =

x sin(2ax) − . 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  x d  2ax sin(2ωx) 2ax e . e y(x) = e2ax − dx 2 4ω

Integrating both sides of this equation, e

2ax

y(x) − y(0) =

1 2

Z

x

ξe 0

2aξ

1 dξ − 4ω

Z

x

sin(2ωξ)e2aξ dξ 0

or e

2ax

x x e2aξ e2aξ y(x) = (2aξ − 1) − [a sin(2ωξ) − ω cos(2ωξ)] . 2 2 2 8a 8ω(a + ω ) 0 0

Solving for y(x), y(x) =

2ax − 1 ω 2 e−2ax a sin(2ωx) − ω cos(2ωx) + − . 8a2 8a2 (a2 + ω 2 ) 8ω(a2 + ω 2 )

Section 2.5 1. Because the characteristic polynomial is m2 + 6m + 18 = (m + 3)2 + 9 = 0, the homogeneous solution is yH (t) = e−3t [A cos(3t) + B sin(3t)]. Therefore, resonance will occur when γ = 3. 2. Because the characteristic polynomial is m2 + 2m + 2 = (m + 1)2 + 1 = 0, the homogeneous solution is xH (t) = e−t [A cos(t) + B sin(t)]. For the particular solution we guess xp (t) = C cos(2t) + D sin(2t) along with x′p (t) = −2C sin(2t) + 2D cos(2t), and x′′p (t) = −4C cos(2t) − 4D sin(2t). Substitution into the differential equation yields two linear equations for C and D: −2C + 4D = 0, −2D − 4C = 10, or C = −2 and D = −1. Therefore, the general solution is x(t) = e−t [A cos(t) + B sin(t)] − 2 cos(2t) − sin(2t) along with x′ (t) = −e−t [A cos(t) + B sin(t)]+e−t [−A sin(t) + B cos(t)]+4 sin(2t)− 2 cos(2t). Substituting the initial conditions, x′ (0) = −A + B − 2 = 0, x(0) = A − 2 = x0 . Solving these equations and substituting back into the general solution yields the final answer x(t) = e−t [(2 + x0 ) cos(t) + (4 + x0 ) sin(t)] − 2 cos(2t) − sin(2t).

33

Worked Solutions 3. If x is taken as positive in the downward directions, m or

d2 x X = forces = mg − kx, dt2

d2 x + 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. m

4. Starting with the differential equation Z dI 1 L I dt = E0 [1 − cos(ωt)], + dt C we take its derivative with respect to time and obtain L

I d2 I + = ωE0 sin(ωt). 2 dt C

The general solution is I(t) = A sin(ω1 t + θ) −

ωE0 sin(ω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 I(t) =

ω 1 ω 2 E0 ωE0 sin(ωt) sin(ω1 t) − . Lω 2 − 1/C Lω 2 − 1/C

5. Because the characteristic polynomial is mp2 +cp+k = 0 or [p+c/(2m)]2 + ω02 = 0, ω02 = k/m − c2 /(4m2 ), the homogeneous solution is xH (t) = e−ct/(2m) [A cos(ω0 t) + B sin(ω0 t)]. The particular solution is xp (t) = C sin(ωt − ϕ) = C cos(ϕ) sin(ωt) − C sin(ϕ) cos(ωt), along with x′p (t) = Cω cos(ϕ) cos(ωt) + Cω sin(ϕ) sin(ωt), and x′′p (t) = −Cω 2 cos(ϕ) sin(ωt) + Cω 2 sin(ϕ) cos(ωt). Substituting into the differential equation, we obtain the following system of linear equations: cωC sin(ϕ)+(k −mω 2 )C cos(ϕ) = F0 , and cωC cos(ϕ)−(k − mω 2 )C sin(ϕ) = 0. The second equation immediately yields the relationship tan(ϕ) = cω/(k − mω 2 ). Solving for C, we find that p C = F0 / c2 ω 2 + (k − mω 2 )2 .

34

Advanced Engineering Mathematics with MATLAB

Therefore, the general solution is x(t) = e−ct/(2m) [A cos(ω0 t) + B sin(ω0 t)] + p

F0 sin(ωt − ϕ)

c2 ω 2

+ (k − mω 2 )2

.

2

2 6. = [m + R/(2L)] +  The characteristic polynomial 2is m + Rm/L + 1/(LC) 2 2 1/(LC) − R /(4L ) = 0. If ω = 1/(LC) − R2 /(4L2 ) > 0, then Q(t) = e−Rt/(2L) [A cos(ωt) + B sin(ωt)]. As t → ∞, Q(t) → 0.

If ω 2 = 0, then Q(t) = e−Rt/(2L) (A + Bt). Again, as t → ∞, Q(t) → 0.

Finally, if ω 2 < 0, then Q(t) = Ae[Γ−R/(2L)]t + Be[−Γ−R/(2L)]t , where Γ2 = −ω 2 and Γ > 0. Because Γ < R/(2L), Q(t) → 0 as t → ∞. 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 equations 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 equations e2x u′1 (x) + e−x u′2 (x) = 0 and 2e2x u′1 (x) − e−x u′2 (x) = x. Solving 1 (2x + 1)e−2x , and for u′1 (x) and u′2 (x), u′1 (x) = 13 xe−2x or u1 (x) = − 12 1 1 ′ x 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 parameters, 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 equations e2x u′1 (x) + e−2x u′2 (x) = 0 and 2e2x u′1 (x) − 2e−2x u′2 (x) = xex . Solving for u′1 (x) and u′2 (x), u′1 (x) = 14 xe−x or u1 (x) = − 41 (x + 1)e−x , and 1 u′2 (x) = − 14 xe3x or u2 (x) = − 36 (3x − 1)e3x . The general solution is y(x) = 2x −2x 2x Ae + Be + u1 (x)e + u2 (x)e−2x = Ae2x + Be−2x − (3x + 2)ex /9. ′′ 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

35

Worked Solutions

of parameters, the particular solution is of the form yp (x) = u1 (x) cos(3x) + u2 (x) sin(3x). Substitution into the differential equation yields the following system of equations cos(3x)u′1 (x) + sin(3x)u′2 (x) = 0 and −3 sin(3x)u′1 (x) + 3 cos(3x)u′2 (x) = 2 sec(3x). Solving for u′1 (x) and u′2 (x), u′2 (x) = 32 or u2 (x) = sin(3x) 2x/3. Then u′1 (x) = − 32 cos(3x) or u1 (x) = 29 ln | cos(3x)|. The final answer is y(x) = A cos(3x) + B sin(3x) + 92 ln | cos(3x)| cos(3x) + 32 x sin(3x). ′′ 5. 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 variation of parameters, the particular solution is of the form yp (x) = u1 (x)e−2x + u2 (x)xe−2x . Substitution into the differential equation yields the following system of equations e−2x u′1 (x)+xe−2x u′2 (x) = 0 and −2e−2x u′1 (x)+ (1 − 2x)e−2x u′2 (x) = xe−2x . Solving for u′1 (x) and u′2 (x), u′1 (x) = −x2 , or u1 (x) = − 31 x3 , and u′2 (x) = x or u2 (x) = 12 x2 . The general solution is y(x) = (A + Bx)e−2x + u1 (x)e−2x + u2 (x)xe−2x = (A + Bx)e−2x + 16 x3 e−2x . ′′ 6. First we find the homogeneous solution to the differential equation yH + ′ ′ −2ax 2ayH = 0. Its solution is yH (x) = A + Bxe . According to variation of parameters, the particular solution is of the form yp (x) = u1 (x) + u2 (x)e−2ax . Substitution into the differential equation yields the following system of equations u′1 (x) + e−2ax u′2 (x) = 0, and −2ae−2ax u′2 = sin2 (ωx). Solving for u′1 (x) and u′2 (x), e2ax [1 − cos(2ωx)] , u′2 (x) = − 4a or e2ax e2ax [a cos(2ωx) + ω sin(2ωx)] . u2 (x) = − 2 + 8a 8a(a2 + ω 2 )

Then u′1 (x) =

1 − cos(2ωx) , 4a

or

u1 (x) =

x sin(2ωx) − . 4a 4aω

Therefore, x sin(2ωx) 1 a cos(2ωx) + ω sin(2ωx) − − 2+ 4a 8aω 8a 8a(a2 + ω 2 ) x a sin(2ωx) − ω cos(2ωx) = A + Bxe−2ax + − . 4a 8ω(a2 + ω 2 )

y(x) = A′ + Bxe−2ax +

′′ 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 variation 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 system 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) = 1 x 1 −x e [2 + sin(x) + 2 cos(x)], and u′2 (x) = − 21 ex sin2 (x), or u2 (x) = − 10 e − 10 x −x x [2 + sin(x) − 2 cos(x)]. The general solution is y(x) = Ae +Be +u (x)e + 1   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 equations 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 following 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

y(x) = A cos(x) + B sin(x) + u1 (x) cos(x) + u2 (x) sin(x) 1 + sin(x) cos(x) = A cos(x) + B sin(x) − ln cos(x) 1 − sin(x) cos(x). = A cos(x) + B sin(x) + ln cos(x)

Section 2.7

1. The auxiliary equation is m(m−1)+m−1 = (m−1)(m+1) = 0. Therefore, y(x) = C1 x + C2 x−1 . 2. The auxiliary equation is m(m − 1) + 2m − 2 = (m − 1)(m + 2) = 0. Therefore, y(x) = C1 x + C2 x−2 .

Worked Solutions

37

3. The auxiliary equation is m(m − 1) − 2 = (m − 2)(m + 1) = 0. Therefore, y(x) = C1 x2 + C2 x−1 . 4. The auxiliary equation is m(m − 1) − m + 1 = (m − 1)2 = 0. Therefore, y(x) = C1 x + C2 x ln(x). 5. The auxiliary equation is m(m − 1) + 3m + 1 = (m + 1)2 = 0. Therefore, y(x) = C1 x−1 + C2 x−1 ln(x). 6. The auxiliary equation is m(m − 1) − 3m + 4 = (m − 2)2 = 0. Therefore, y(x) = C1 x2 + C2 x2 ln(x). 7. The auxiliary equation is m(m − 1) − m + 5 = (m − 1)2 + 4 = 0 so that m = −1 ± 2i. Therefore, y(x) = C1 x cos[2 ln(x)] + C2 x sin[ln(x)]. 8. The auxiliary equation is 4m(m − 1) + 8m + 5 = (2m + 1)2 + 4 = 0 so that m = − 21 ± i. Therefore, y(x) = C1 x−1/2 cos[ln(x)] + C2 x−1/2 sin[ln(x)]. 9. The auxiliary equation is m(m − 1) + m + 1 = m2 + 1 = 0 so that m = ±i. Therefore, y(x) = C1 cos[ln(x)] + C2 sin[ln(x)]. 10. The auxiliary equation is m(m − 1) − 3m + 13 = (m − 2)2 + 9 = 0 so that m = 2 ± 3i. Therefore, y(x) = C1 x2 cos[3 ln(x)] + C2 x2 sin[3 ln(x)]. 11. The auxiliary equation is m(m − 1)(m − 2) − 2m(m − 1) − 2m + 8 = m3 − 5m2 + 2m + 8 = (m − 2)(m − 4)(m + 1) = 0. Therefore, y(x) = C1 x2 + C2 x4 + C3 x−1 . 12. Let t = ln(x) and y(x) = Y (t), then Y ′′ − 3Y ′ − 4Y = et . The homogeneous solution is YH (t) = Ae4t + Be−t . From the method of undetermined coefficients, Yp (t) = − 16 et . Transforming back, y(x) = Ax4 + B/x − x/6. Section 2.8 1. The solution to the differential equation is x(t) = C1 et + C2 e2t . Therefore, any point on the phase diagram except for x = v = 0 has a trajectory off to infinity. 2. Multiplying the differential equation by x′ and setting v = x′ on the left side, vv ′ = x3 x′ − xx′ . Integration yields 21 v 2 − 14 x4 + 21 x2 = C. If C = 0, x = v = 0 and we have a equilibrium point where the energy is at a minimum. If C = 41 , we have another equilibrium point corresponding to x = ±1 and v = 0. Note that C ≤ 14 . 3. The curves on the phase diagram are given by v = 2x + C. The equilibrium points are v = 0 for all x. Therefore the entire abscissa contain all of

38

Advanced Engineering Mathematics with MATLAB

the equilibra. Any displacement from this equilibrium moves off to infinity. Therefore, the equilibrium is unstable. 4. The curves on the phase diagram are given by v 2 + sgn(x)x2 = C. The equilibrium points are v = 0 and v ′ = −sgn(x)x = 0. Therefore, the point (0, 0) is the equibrium point. Any displacement from this equilibrium moves off to infinity. Therefore, the equilbrium 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 clear; b = 0.22; g = 9.8; k = 0.02; L = 1; omega 0 sq = g/L; omega sq = omega 0 sq - b*b/4; omega = sqrt(omega sq); delta t = 0.005; t = [0:delta t:50]; % set up the time theta(1) = 10*pi/180; thetap(1) = 0; % initial conditions % time step to find position and velocity % of the pendulum at later times 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

39

Worked Solutions % plot the results plot(theta,thetap,’k’); xlabel(’\theta’,’FontSize’,25); ylabel(’\theta^\prime’,’FontSize’,25)

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Section 3.1 1. A+B =

2.

=B+A



3 0



−3 0



     7 10 2 2 9 12 = − 3A − 2B = −1 2 4 4 3 6        6 8 1 1 5 7 15 3(2A − B) = 3 − =3 = 2 4 2 2 0 2 0

AT =



3 4

1 2



,

BT =



1 2 1 2



,

(B T )T =



T   4 5 4 3 (A + B) = = 3 4 5 4       3 1 1 2 4 3 AT + B T = + = 4 2 1 2 5 4 T

6.





4.

5.

4 5 3 4

    2 1 1 3 4 = − −1 2 2 1 2      1 1 3 4 −2 B−A= − = 2 2 1 2 1 A−B =

3.





  1 1 + 1 2    1 1 1 B − BT = − 2 2 1 B + BT =



1 2

   2 3 2 = 3 4 2    2 0 −1 = 2 1 0

1 2

21 6

1 2





40

Advanced Engineering Mathematics with MATLAB

7.

   11 1 1 3 4 = 5 2 2 1 2     3 1 1 1 5 AT B = = 4 2 2 2 8     4 3 4 1 1 = BA = 8 1 2 2 2     1 2 3 4 5 BT A = = 1 2 1 2 5

AB =

8.





3 A = 1  1 B2 = 2 2

9. T

BB = T

B B=





4 2

 1 2

3 1 

1 1 2 2 1 2 1 2

4 2 1 2





 11 5  5 8  6 12  8 8



 13 20 = 5 8    1 3 3 = 2 6 6 

1 1

2 2



1 2

1 2



9 3

12 6



= =





2 4 4 8 5 5 5 5





10. 

13 5

A + 2A =



2

A − 3A + I = 11. 3

20 8





59 23

92 36

420 164





+



6 2



8 4



1 0

0 1

=



65 25

+





=



100 40

5 8 2 3





12. 4

2

A − 4A + 2I =

13. yes



27 2

11 5





269 105





52 20

14. no

80 32



+



2 0 0 2



15. yes

=





219 85

11  8 5

340 134

 8 4 3



41

Worked Solutions 16. yes



10 3

24 7

54 16



17. no

18.   3 4 8 + 3 4 9



4 4A + 3A =  4 12 19.

1 1 1 2

3 1

T



 1 1 = 1 2 = A 3 1

    3 −1 1 1 4 (A + B) + C = + = 7 1 1 1 8      2 1 2 −1 4 A + (B + C) = + = 3 1 5 1 8

0 2 0 2





    2 2 1 1 6 −4 = 1 1 1 1 7 −6      2 2 −1 −1 2 1 = A(BC) = 1 1 4 4 3 1 





   2 −1 9 −1 = 5 1 11 −2       6 −4 3 3 9 −1 AB + AC = + = 7 −6 4 4 11 −2 A(B + C) =

24.





(AB)C =

23.

 1 2  = 7A. 1

     1 1 10 10 2 2 5(2A) = 5  2 4  =  10 20  = 10  1 2  = 10A. 3 1 30 10 6 2

(AT )T =

22.

  1 7 14  = 7  1 7 3



20.

21.

  3 7 6 =  7 21 3

2 3



1 1

    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.



26.

3 −5



0 1 1 0 0 0

27.



1 3

−2 1

2 5

1 3



=



1 0 0 1



   1 0 0 1 0 0 0 = 0 1 0 0 0 1 0 1

 0 0 01 0 1 

28.

−1 2



x1 x2



  5 = 1

    2 2 1 4 x1  4 2 5   x2  =  6  x3 2 6 −3 5 

29.



0 1 3 0  1 1 2 −3

    2 2 3 x1 −4 −4   x2   5     =  −3 x3 1 1 7 x4 1 −3

Section 3.2 1.

3 −2

2.

3.

4.

3 1 2 4 1 4

5 = −3 + 10 = 7 −1

5 −1 −8 4 = 20 − 8 = 12

2 0 −11 5 = 0 −4 5 1 4

4 3 5

−13 −11 −5 = −4 5

3 0 4 2 2 = 3 −2 −4 11

−13 = 55 − 54 = 1 −5

3 0 4 2 2 = −2 11 2 0

3 = 50 2

43

Worked Solutions 5.

1 4 2

6.

2 −1 1 3 5 1

7.

8.

3 2 −5 1 1 = 2 1 3 2

2 0 1 1

2 3 −1 −3

0 1 6 1

1 a 2 a 3 a

1 b b2 b3

2 2 −1 3 = 7 0 6 7 0

0 0 1 −2

1 2 0 2 2 −1 2 3

9. 1 c c2 c3

0 −7 −5 −7 = −24 0 −2 = − 2 −2 1 3

1 2 0 0 = 0 1 3 −5 1 = −5

2 7 9 = 7 8

9 7 9 = = −7 8 0 −1

0 0 1 0 1 1 0 0 = − 1 6 6 1 0 −5 1 1 −2 0 1 =3 −2

1 1 2 2 −1 −2 = 1 −3 1 −5 1 1 −1 0 = − −3 7 −5 11

0 1 −2

2 1 −1 −2 −2 −2 0 = − −3 1 −3 −3 0 −5 1 1 1 0 0 7 3 = 44 3 = 11 11 11

1 1 1 d 0 b−a = d2 0 b(b − a) 3 d 0 b2 (b − a)

1 1 c−a d−a c(c − a) d(d − a) 2 2 c (c − a) d (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

b+c a+c a+b

b + c 1 1 a b−a 1 = b − a a − b 0 = c −a 1 c − a a − c 0 b − a b − a =0 = − c − a c − a

a − b a − c

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. 12. We form AT from A by rewriting the rows of A as columns of AT . Then the cofactor expansion of |AT | by any row is identical with the cofactor expansion by |A| by the corresponding column. Section 3.3 1. 

1 2 3 1



x1 x2



=

1 3

  3 , 6

Therefore, x1 = 95 , x2 = 35 . 2. 

2 1

1 −1



Therefore,

x1 x2



=



−3 1



,

2 = −5, 1

2 1 1 −1 = −3,

x1 = − 23 , 3.

    1 2 4 x1 1 2 −2 2 1  2 1 1   x2  =  −2  , −1 1 2 x3 −1 1 −1 1 1 4 2 −2 4 −2 −2 1 1 = 0, 2 −2 1 = 0, 2 −1 −1 2 −1 2 1 −1

Therefore, x1 = 0, x2 = 0, x3 = −2. 4.

−3 1 1 −1 = 2,

x2 = − 53 .





2  −1 3

    −1 3 −1 x1 −2 1   x2  =  5  , −2 −1 0 x3

1 3 3 6 = −3

3 2 6 1 = −9,

2 1

−3 =5 1

−2 1 = −6 −1 2 4 1 −2 = 12 1 2

2 3 −1 −2 3 −1

−1 1 = 4 0

45

Worked Solutions 2 −1 3

−1 3 −1 5 −2 1 = 2, −2 −1 0

Therefore,

x1 = 21 ,

−1 −1 5 1 = 14, −2 0 x2 = 72 ,

x3 =

2 −1 3 25 2 .

3 −1 −2 5 = 50 −1 −2

Section 3.4 1. 

2 1 5 −2



x1 x2



=

  4 1



B=



Therefore, x2 = 2, x1 = 1.

  2 2 1 4 = 0 5 −2 1

 1 4 1 2

2. 

1 3

1 −4



x1 x2



  0 = 1



B=



Therefore, x2 = − 17 , 3.



−1  3 −1  −1 B= 3 −1

1 3

   1 0 1 1 0 = −4 1 0 −7 1

x1 = 71 .

    0 1 2 x1 4 1   x2  =  0  x3 0 1 2    −1 1 2 0 1 2 0 4 1 0  =  0 1 1 0  0 0 0 0 1 2 0

Therefore, x3 = α, x2 = −α, x1 = α. 4.

    2 x1 4 6 1  2 1 −4   x2  =  3  8 x3 3 −2 5     4 4 6 1 2 6 1 2   9 −4  =  0 1 −4 3 = 0 4 0 0 −7 22 7 −2 5 8 



4 B=2 3

Therefore,

x3 = 0,

x2 = −1,

x1 = 2.

 6 1 2 4 9 −4  0 1 0

46 5.

Advanced Engineering Mathematics with MATLAB 

    1 −2 −3 x1 −1 2   x2  =  −1  3 −6 4 x3     1 −1 2 −1 1 −1 2 −1 1 −2 −3  =  0 1 −2 0  B= 3 0 1 −2 0 −4 3 −6 4     1 0 0 −1 1 −1 2 −1 =  0 1 −2 0  =  0 1 −2 0  0 0 0 0 0 0 0 0 3  1 −4

Therefore, x3 = α, x2 = 2α, x1 = −1. 6.

Therefore,



    −3 7 x1 2 4 −3   x2  =  −1  7 2 x3 3     1 −3 7 2 1 −3 7 2 4 −3 −1  =  0 10 −17 −5  B= 2 −3 7 2 3 0 −2 23 9   1 −3 7 2 =  0 2 −23 −9  0 0 49 20 1  2 −3

x3 = 0.408163, 7.

 

1 2 4

1 B=2 4  1 =0 0

x2 = 0.193875,

x1 = −0.275516.

    5 −1 3 x1 −4 7   x2  =  7  −15 −9 2 x3    −1 3 5 1 −1 3 5 −4 7 7  =  0 1 2 7  −9 2 −15 0 −2 1 −3    −1 3 5 1 0 0 1 1 2 7  =  0 1 2 7  0 5 11 0 0 5 11

Therefore, x3 = 2.2, x2 = 2.6, x1 = 1. 8.



1  2  0 −1

1 −1 2 2

1 3 0 0

    −1 1 x1 0   x2   1     =  15 3 x3 −2 x4 1

47

Worked Solutions 

1 1 1  2 −1 3 B= 0 2 0 −1 2 0  1 1 1  0 −1 1 = 0 0 −2 0 0 2 Therefore, x4 = 10.2, 9.



1 0 3 1 1 1 5 0

  −1 1 1  0 = 15 0 −2 0   −1 1 18   0 = 51 0 0 0

x3 = 0,

x2 = −7.8,

1 1 0 1 1 1 2 0

 1 −1 −2 3   3 15 2 −3  1 −1 1 18   0 0 5 51

x1 = −3.4

     −1 6 1 1 −1 6 1 1 −3 5 1 0 = = 0 13 2 3 2 1 0 1 2 1 0 1    1 0 −1/13 −13 0 1 −5 = = 0 1 2/13 0 13 2 3

Therefore,

A−1 =

10.



3 −1 1 −5 2 0

0 1

Therefore,





−1/13 2/13

19 2 −9 1  −4 −1 2 0 −2 0 1 0 

5/13 3/13







2 5

1 3



5/13 3/13



.

  1 3 −1 1 0 = −2 −2 1 1 1   1 0 2 1 = 0 1 5 3 =

A−1 =

11.

1 −3 2 3 1 −1 0 0

 0 2 1 1 1 1

.

  0 0 −1 −3 1 0  =  0 −1 0 1 −2 0  −1 −3 =  0 −1 0 6  −1 0 =  0 −1 0 0  1 0 0 =  0 1 0 0 0 1

 1 1 5 0 0 0 1 −2  1 0 0 1  5 0 1 1 1 −2  0 0 −1 −2 −10 1  1 1 2 6 0 0 1 −2  −1 −2 −4 −11  1 2 5 0 −1 2  2 4 11

48

Advanced Engineering Mathematics with MATLAB

Therefore, A−1

12.



1 2  0 −1 2 4

5 1 2 0 11 0

Therefore,



1 2 =  0 −1 2 4

  1 0 0 1 0 =  0 0 0 1  1 =0 0  1 =0 0

A−1

 5 2 . 11 2 5 1 0 −1 2 0 1 0 1 −2 0 0 9 1 2 −1 2 0 1 0 1 −2 0 0 0 19 2 1 0 −4 −1 0 1 −2 0

 19 2 −9 =  −4 −1 2  . −2 0 1 

 0 0 1  0 0 1  −9 2  1

13. Yes, because A2 (A−1 )2 = A(AA−1 )A−1 = AA−1 = I. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % MATLAB Code for Finite Fourier Series % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% clear; M = 41; N = 20; % set up t and f (t) for m = 1:M t(m) = -pi + (2*m-1)*pi/M; if (t(m) 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 % Generate some points around a line format long intercept = -10; slope = 3; npts = 50; noise = 80; xs = 10 + rand(npts, 1) * 90;

60

Advanced Engineering Mathematics with MATLAB

ys = slope * xs + intercept + rand(npts, 1) * noise; % Fit these points to a line using singular value decompostion 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 the results 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, ′

x =

1 2

2 1



x,



1 2 2 1





where

x=



x1 x2



.

Assuming x = x0 eλt , −λ



1 0

0 1



x0 = 0.

Solving the eigenvalue problem, 1 − λ |A − λI| = 2

2 = (1 − λ)2 − 4 = 0. 1 − λ

Thus, the eigenvalues are λ1,2 = −1, 3. For λ1 = −1,

(1 − λ)x1 + 2x2 = 2x1 + 2x2 = 0 and 2x1 + (1 − λ)x2 = 2x1 + 2x2 = 0.

61

Worked Solutions Thus, the eigenvector is



 1 . For λ2 = 3, −1

(1 − λ)x1 + 2x2 = −2x1 + 2x2 = 0 and 2x1 + (1 − λ)x2 = 2x1 − 2x2 = 0.   1 Thus, the eigenvector is . Therefore, the general solution is 1     1 1 −t e3t . e + c2 x = c1 1 −1 2. In matrix notation,   1 −4 ′ x = x, 3 −6

where

x=



x1 x2



.

Assuming x = x0 eλt , 

1 3

−4 −6



−λ



1 0 0 1



x0 = 0.

Solving the eigenvalue problems, 1 − λ −4 = (λ + 3)(λ + 2) = 0. |A − λI| = 3 −6 − λ Thus, the eigenvalues are λ1,2 = −3, −2. For λ1 = −3,

(1 − λ)x1 − 4x2 = 4x1 − 4x2 = 0 and 3x1 − (6 + λ)x2 = 3x1 − 3x2 = 0.   1 . For λ2 = −2, Thus, the eigenvector is 1 (1 − λ)x1 − 4x2 = 3x1 − 4x2 = 0 and 3x1 − (6 + λ)x2 = 3x1 − 4x2 = 0.   4 Thus, the eigenvector is . Therefore, the general solution is 3     4 1 e−2t . e−3t + c2 x = c1 3 1

62

Advanced Engineering Mathematics with MATLAB

3. In matrix notation, ′

x =



1 4

1 1



x,



1 1 4 1



where

x=



x1 x2



.

Assuming x = x0 eλt , −λ



1 0

0 1



x0 = 0.

Solving the eigenvalue problem, 1 − λ |A − λI| = 4

1 = (λ − 3)(λ + 1) = 0. 1 − λ

Thus, the eigenvalues are λ1,2 = −1, 3. For λ1 = −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 x = c1

    1 1 e3t + c2 e−t . 2 −2

4. In matrix notation, ′

x =





x,

1 5 −2 −6



1 −2

5 −6

where

x=



Assuming x = x0 eλt , 

−λ



1 0

0 1



x0 = 0.

x1 x2



.

63

Worked Solutions Solving the eigenvalue problems, 1 − λ 5 = (λ + 4)(λ + 1) = 0. |A − λI| = −2 −6 − λ Thus, the eigenvalues are λ1,2 = −4, −1. For λ1 = −4,

(1 − λ)x1 + 5x2 = 5x1 + 5x2 = 0 and −2x1 − (6 + λ)x2 = −2x1 − 2x2 = 0.   1 Thus, the eigenvector is . For λ2 = −1, −1 (1 − λ)x1 + 5x2 = 2x1 + 5x2 = 0 and −2x1 − (6 + λ)x2 = −2x1 − 5x2 = 0.   5 Thus, the eigenvector is . Therefore, the general solution is −2 x = c1

5. In matrix notation,  −3/2 ′ x = 2 Assuming x = x0 eλt , 

−3/2 2



1 −1



e



x,

−2 5/2



−2 5/2

Solving the eigenvalue problem, −3/2 − λ |A − λI| = 2

−4t

+ c2



5 −2

where

−λ



1 0 0 1



e−t .

x=





x1 x2



.

x0 = 0.

−2 = (λ − 1/2)2 = 0. 5/2 − λ

Thus, the eigenvalues are λ1,2 = 1/2. For λ1 = 1/2,

(−3/2 − λ)x1 − 2x2 = −2x1 − 2x2 = 0 and 2x1 + (5/2 − λ)x2 = 2x1 + 2x2 = 0.

64

Advanced Engineering Mathematics with MATLAB

 1 . Because of the repeated eigenvalue and −1 the fact that we have only one eigenvector, we guess for the second solution:

Thus, the only eigenvector is

x=



a + bt c + dt





et/2

and

x′ =



a/2 + bt/2 + b c/2 + dt/2 + d



et/2 .

Substitution into the matrix equation yields a/2 + b = −3a/2 − 2c, c/2 + d = 2a + 5c/2

b/2 = −3b/2 − 2d, and

d/2 = 2b + 5d/2;

or 2a + 2c = −b and b = −d. If we choose b = 1 and a = 0, the general solution is     t 1 et/2 . et/2 + c2 x = c1 −1/2 − t −1 6. In matrix notation, ′

x =





x,

−3 −2 2 1



−3 2

−2 1

where

x=



x1 x2



.

Assuming x = x0 eλt , 

−λ



1 0

0 1



x0 = 0.

Solving the eigenvalue problems, −3 − λ −2 |A − λI| = = (λ + 1)2 = 0. 2 1 − λ

Thus, the eigenvalues are λ1,2 = −1. For λ1 = −1,

(−3 − λ)x1 − 2x2 = −2x1 − 2x2 = 0 and 2x1 + (1 − λ)x2 = 2x1 + 2x2 = 0.   1 . Because of the repeated eigenvalue and Thus, the only eigenvector is −1 the fact that we have only one eigenvector, we guess for the second solution x=



a + bt c + dt



e

−t

and



x =



−a − bt + b −c − dt + d



e−t .

65

Worked Solutions Substitution into the matrix equation yields −a + b = −3a − 2c, −c + d = 2a + c,

−b = −3b − 2d, and

− d = 2b + d;

or 2a + 2c = −b and b = −d. If we choose d = 2 and c = 0, the general solution is     1 − 2t 1 −t e−t . e + c2 x = c1 2t −1 7. In matrix notation, ′

x =





x,

−1 3



1 −1 1 3

where

x=



x1 x2



.

Assuming x = x0 eλt , 

1 1

−λ



1 0 0 1



x0 = 0.

Solving the eigenvalue problem, 1 − λ |A − λI| = 1

−1 = (λ − 2)2 = 0. 3 − λ

Thus, the eigenvalues are λ1,2 = 2. For λ1 = 2,

(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: x=



a + bt c + dt



e

2t

and



x =



2a + 2bt + b 2c + 2dt + d



Substitution into the matrix equation yields b + 2a = a − c, d + 2c = a + 3c

2b = b − d, and

2d = b + 3d;

e2t .

66

Advanced Engineering Mathematics with MATLAB

or a + c = d and b = −d. If we choose d = −1 and c = 0, the general solution is     −1 + t 1 e2t . e2t + c2 x = c1 −t −1 8. In matrix notation,  3 x′ = −2 Assuming x = x0 eλt , 



x,

3 2 −2 −1



2 −1

where

−λ



1 0

0 1

x=





x1 x2



.

x0 = 0.

Solving the eigenvalue problems, 3 − λ 2 = (λ − 1)2 = 0. |A − λI| = −2 −1 − λ Thus, the eigenvalues are λ1,2 = 1. For λ1 = 1,

(3 − λ)x1 + 2x2 = 2x1 + 2x2 = 0 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 + c a + ct t ′ et . e and x = x= b + dt + d b + dt Substitution into the matrix equation yields a + c = 3a + 2b, b + d = −2a − b

c = 3c + 2d, and

d = −2c − d;

or 2a + 2b = c and c = −d. If we choose c = 2 and b = 0, the general solution is     1 1 + 2t t x = c1 e + c2 et . −1 −2t 9. In matrix notation,   −2 −13 ′ x, x = 1 4

where

x=



x1 x2



.

67

Worked Solutions Assuming x = x0 eλt , 

−2 −13 1 4



Solving the eigenvalue problem, −2 − λ |A − λI| = 1

−λ



1 0

0 1



x0 = 0.

−13 = (λ − 1)2 + 4 = 0. 4 − λ

Thus, the eigenvalues are λ1,2 = 1 ± 2i. For λ1 = 1 + 2i,

(−2 − λ)x1 − 13x2 = (−3 − 2i)x1 − 13x2 = 0 and x1 + (4 − λ)x2 = x1 + (3 − 2i)x2 = 0.   3 − 2i Thus, the eigenvector is . For λ2 = 1 − 2i, −1 (−2 − λ)x1 − 13x2 = (−3 + 2i)x1 − 13x2 = 0 and x1 + (4 − λ)x2 = x1 + (3 + 2i)x2 = 0.   3 + 2i Thus, the eigenvector is . The general solution is −1     3 + 2i 3 − 2i t+2it et−2it e + c2 x = c1 −1 −1     3 cos(2t) + 2 sin(2t) 2 cos(2t) − 3 sin(2t) t = c3 e + c4 et , − cos(2t) sin(2t) where c3 = c1 + c2 and c4 = −ic1 + ic2 . 10. In matrix notation,   3 −2 ′ x = x, 5 −3

where

x=



x1 x2



Assuming x = x0 eλt , 

3 5

−2 −3



−λ

Solving the eigenvalue problems, 3 − λ |A − λI| = 5



1 0 0 1



x0 = 0.

−2 = λ2 + 1 = 0. −3 − λ

.

68

Advanced Engineering Mathematics with MATLAB

Thus, the eigenvalues are λ1,2 = ±i. For λ1 = i, (3 − λ)x1 − 2x2 = (3 − i)x1 − 2x2 = 0 and 5x1 − (3 + λ)x2 = 5x1 − (3 + i)x2 = 0.   3+i . For λ2 = −i, Thus, the eigenvector is 5 (3 − λ)x1 − 2x2 = (3 + i)x1 − 2x2 = 0 and 5x1 − (3 + λ)x2 = 5x1 − (3 − i)x2 = 0.   3−i Thus, the eigenvector is . The general solution is 5 



 3−i e−it 5     cos(t) + 3 sin(t) 3 cos(t) − sin(t) , + c4 = c3 5 sin(t) 5 cos(t)

x = c1

3+i 5



eit + c2

where c3 = c1 + c2 and c4 = ic1 − ic2 . 11. In matrix notation, ′

x =



4 25



x,

−2 −10



−2 −10

where

x=



x1 x2



.

Assuming x = x0 eλt , 

4 25

−λ



1 0

0 1



x0 = 0.

Solving the eigenvalue problem, 4 − λ −2 |A − λI| = = (λ + 3)2 + 1 = 0. 25 −10 − λ

Thus, the eigenvalues are λ1,2 = −3 ± i. For λ1 = −3 + i, (4 − λ)x1 − 2x2 = (7 − i)x1 − 2x2 = 0 and

25x1 − (10 + λ)x2 = 25x1 − (7 + i)x2 = 0.

69

Worked Solutions Thus, the eigenvector is



 2 . For λ2 = −3 − i, 7−i

(4 − λ)x1 − 2x2 = (7 + i)x1 − 2x2 = 0 and 25x1 − (10 + λ)x2 = 25x1 − (7 − i)x2 = 0.   2 . The general solution is Thus, the eigenvector is 7+i

  2 e−3t+it + c2 e−3t−it 7+i     2 cos(t) 2 sin(t) = c3 e−3t + c4 e−3t , 7 cos(t) + sin(t) 7 sin(t) − cos(t)

x = c1



2 7−i



where c3 = c1 + c2 and c4 = ic1 − ic2 . 12. In matrix notation,  −3 x′ = 2 Assuming x = x0 eλt , 



x,

−3 −4 2 1



−4 1

Solving the eigenvalue problems, −3 − λ |A − λI| = 2

where

−λ



1 0

0 1

x=





x1 x2



.

x0 = 0.

−4 = (λ + 1)2 + 4 = 0. 1 − λ

Thus, the eigenvalues are λ1,2 = −1 ± 2i. For λ1 = −1 + 2i, (−3 − λ)x1 − 4x2 = (−2 − 2i)x1 − 4x2 = 0 and 2x1 + (1 − λ)x2 = 2x1 + (2 − 2i)x2 = 0.   −1 + i Thus, the eigenvector is . For λ2 = −1 − 2i, 1 (−3 − λ)x1 − 4x2 = (−2 + 2i)x1 − 4x2 = 0 and 2x1 + (1 − λ)x2 = 2x1 + (2 + 2i)x2 = 0.

70

Advanced Engineering Mathematics with MATLAB

Thus, the eigenvector is



 −1 − i . The general solution is 1

  −1 − i e−t−2it e−t+2it + c2 1     cos(2t) − sin(2t) − cos(2t) − sin(2t) e−t , e−t + c4 = c3 sin(2t) cos(2t)

x = c1



−1 + i 1



where c3 = c1 + c2 and c4 = ic1 − ic2 . 13. In matrix notation,  3 x′ = −2 Assuming x = x0 eλt , 



x,

3 4 −2 −1



4 −1

Solving the eigenvalue problem, 3 − λ |A − λI| = −2

where

−λ



1 0

0 1

x=





x1 x2



.

x0 = 0.

4 = (λ − 1)2 + 4 = 0. −1 − λ

Thus, the eigenvalues are λ1,2 = 1 ± 2i. For λ1 = 1 + 2i,

(3 − λ)x1 + 4x2 = (2 − 2i)x1 + 4x2 = 0 and −2x1 − (1 + λ)x2 = −2x1 − 2(1 + i)x2 = 0.   −1 − i . For λ2 = 1 − 2i, Thus, the eigenvector is 1 (3 − λ)x1 + 4x2 = (2 + 2i)x1 + 4x2 = 0 and −2x1 − (1 + λ)x2 = −2x1 − 2(1 − i)x2 = 0.   −1 + i . The general solution is Thus, the eigenvector is 1

 −1 + i et−2it e + c2 x = c1 1     − cos(2t) − sin(2t) − cos(2t) + sin(2t) t et , e + c4 = c3 sin(2t) cos(2t) 

−1 − i 1



t+2it



71

Worked Solutions where c3 = c1 + c2 and c4 = ic1 − ic2 . 14. In matrix notation,    1 1 5 ′ x + 2 1 1



x = 0,





3 1

where

x=





.

x1 x2



x1 x2

Assuming x = x0 eλt , 

5 3 1 1



1 2

1 1



x0 = 0.

Solving the eigenvalue problems, 5 + λ 3 + λ 1 + 2λ 1 + λ = (2 + λ)(1 − λ) = 0. Thus, the eigenvalues are λ1,2 = −2, 1. For λ1 = −2,

(5 + λ)x1 + (3 + λ)x2 = 3x1 + x2 = 0 and (1 + 2λ)x1 + (1 + λ)x2 = −3x1 − x2 = 0.   1 . For λ2 = 1, Thus, the eigenvector is −3 (5 + λ)x1 + (3 + λ)x2 = 6x1 + 4x2 = 0 and (1 + 2λ)x1 + (1 + λ)x2 = 3x1 + 2x2 = 0.   2 Thus, the eigenvector is . The general solution is −3 x = c1

15. In matrix notation,    −1 1 1 ′ x + −5 1 2 Assuming x = x0 eλt , 



1 −3

e−2t + c2



x = 0,





−2 −7

−1 −2 −5 −7





1 1



2 −3



et .

where

1 2



x0 = 0.

x=



.

72

Advanced Engineering Mathematics with MATLAB

Solving the eigenvalue problem, −1 + λ −5 + λ

−2 + λ = (λ − 3)(λ + 1) = 0. −7 + 2λ

Thus, the eigenvalues are λ1,2 = −1, 3. For λ1 = −1,

(−1 + λ)x1 + (−2 + λ)x2 = −2x1 − 3x2 = 0 and (−5 + λ)x1 + (−7 + 2λ)x2 = −6x1 − 9x2 = 0.   −3 Thus, the eigenvector is . For λ2 = 3, 2 (−1 + λ)x1 + (−2 + λ)x2 = 2x1 + x2 = 0 and (−5 + λ)x1 + (−7 + 2λ)x2 = −2x1 − x2 = 0.   −1 Thus, the eigenvector is . The general solution is 2 x = c1



−1 2



3t

e + c2



−3 2



e−t .

16. In matrix notation, 

1 x′ =  0 −5

 −2 0 0 0  x, 0 7

where

 x1 x =  x2  . x3 

Assuming x = x0 eλt , 

  1 −2 0 1  0 0 0 − λ0 −5 0 7 0

 0 0 1 0  x0 = 0. 0 1

Solving the eigenvalue problems, 1 − λ |A − λI| = 0 −5

−2 0 1 − λ −λ 0 = −λ −5 0 7 − λ

= −λ(1 − λ)(7 − λ) = 0.

0 7 − λ

73

Worked Solutions Thus, the eigenvalues are λ1,2,3 = 0, 1, 7. For λ1 = 0, (1 − λ)x1 − 2x2 = x1 − 2x2 = 0, −λx2 = 0 · x2 = 0 and −5x1 + (7 − λ)x3 = −5x1 + 7x3 = 0.   14 Thus, the eigenvector is  7 . For λ2 = 1, 10 (1 − λ)x1 − 2x2 = −2x2 = 0, −λx2 = −x2 = 0 and −5x1 + (7 − λ)x3 = −5x1 + 6x3 = 0.   6 Thus, the eigenvector is  0 . For λ3 = 7, 5 (1 − λ)x1 − 2x2 = −6x1 − 2x2 = 0, −λ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 17. In matrix notation,   2 0 0 x′ =  1 0 2  x, 0 0 1 Assuming x = x0 eλt , 

where

  2 0 0 1  1 0 2  − λ  0 0 0 1 0

 x1 x =  x2  . x3 

 0 0 1 0  x0 = 0. 0 1

74

Advanced Engineering Mathematics with MATLAB

Solving the eigenvalue problem, 2 − λ 0 −λ |A − λI| = 1 0 0

0 −λ 2 = (2 − λ) 0 1 − λ

= (2 − λ)(−λ)(1 − λ) = 0.

2 1 − λ

Thus, the eigenvalues are λ1,2,3 = 0, 1, 2. For λ1 = 0, (2 − λ)x1 = 2x1 = 0, x1  − λx 2 + 2x3 = x1 + 2x3 = 0 and (1 − λ)x3 = x3 = 0. Thus, the eigenvector 0 is  1 . For λ2 = 1, (2 − λ)x1 = x1 = 0, x1 − λx2 + 2x3 = x1 − x2 + 2x3 = 0 0   0 and (1 − λ)x3 = 0 · x3 = 0. Thus, the eigenvector is  2 . For λ3 = 2, 1 (2 − λ)x1 = 0 · x1 = 0, x1 − λx2 +  2x3  = x1 − 2x2 + 2x3 = 0 and (1 − λ)x3 = 2 −x3 = 0. Thus, the eigenvector is  1 . The general solution is 0       0 0 2 x = c1  1  + c2  2  et + c3  1  e2t . 0 1 0 18. In matrix notation,   3 0 −2 x′ =  −1 2 1  x, 4 0 −3

where

Assuming x = x0 eλt , 

  3 0 −2 1  −1 2 1  − λ  0 4 0 −3 0

 x1 x =  x2  . x3 

 0 0 1 0  x0 = 0. 0 1

Solving the eigenvalue problems, 3 − λ 0 −2 3 − λ 2−λ 1 = (2 − λ) |A − λI| = −1 4 4 0 −3 − λ = (2 − λ)(λ − 1)(λ + 1) = 0.

Thus, the eigenvalues are λ1,2,3 = −1, 1, 2. For λ1 = −1, (3 − λ)x1 − 2x3 = 4x1 − 2x3 = 0,

−2 −3 − λ

75

Worked Solutions −x1 + (2 − λ)x2 + x3 = −x1 + 3x2 + x3 = 0 and 4x1 − (3 + λ)x3 = 4x1 − 2x3 = 0.   3 Thus, the eigenvector is  −1 . For λ2 = 1, 6 (3 − λ)x1 − 2x3 = 2x1 − 2x3 = 0, −x1 + (2 − λ)x2 + x3 = −x1 + x2 + x3 = 0 and 4x1 − (3 + λ)x3 = 4x1 − 4x3 = 0.   1 Thus, the eigenvector is  0 . For λ3 = 2, 1 (3 − λ)x1 − 2x3 = x1 − 2x3 = 0, −x1 + (2 − λ)x2 + x3 = −x1 + x3 = 0 and 4x1 − (3 + λ)x3 = 4x1 − 5x3 = 0.   0 Thus, the eigenvector is  1 . The general solution is 0

     0 1 3 x = c1  −1  e−t + c2  0  et + c3  1  e2t . 0 1 6 

19. In matrix notation, 

3 x′ =  −2 8

 0 −1 2 1  x, 0 −3

where

 x1 x =  x2  . x3 

Assuming x = x0 eλt ,   1 3 0 −1  −2 2 1  − λ  0 0 8 0 −3 

 0 0 1 0  x0 = 0. 0 1

76

Advanced Engineering Mathematics with MATLAB

Solving the eigenvalue problem, 3 − λ |A − λI| = −2 8

0 2−λ 0

−1 3 − λ 1 = (2 − λ) 8 −3 − λ

= (2 − λ)(λ − 1)(λ + 1) = 0.

Thus, the eigenvalues are λ1,2,3 = −1, 1, 2. For λ1 = −1, (3 − λ)x1 − x3 = 4x1 − x3 = 0, −2x1 + (2 − λ)x2 + x3 = −2x1 + 3x2 + x3 = 0 and 8x1 − (3 + λ)x3 = 8x1 − 2x3 = 0.   3 Thus, the eigenvector is  −2 . For λ2 = 1, 12 (3 − λ)x1 − x3 = 2x1 − x3 = 0, −2x1 + (2 − λ)x2 + x3 = −2x1 + x2 + x3 = 0 and 8x1 − (3 + λ)x3 = 8x1 − 4x3 = 0.   1 Thus, the eigenvector is  0 . For λ3 = 2, 2 (3 − λ)x1 − x3 = x1 − x3 = 0, −2x1 + (2 − λ)x2 + x3 = −2x1 + x3 = 0 and 8x1 − (3 + λ)x3 = 8x1 − 5x3 = 0.   0 Thus, the eigenvector is  1 . The general solution is 0

     0 1 3 x = c1  −2  e−t + c2  0  et + c3  1  e2t . 0 2 12 

−1 −3 − λ

77

Worked Solutions Section 3.7

1. Our first task is to compute the characteristic polynomial p(λ) = 0. This is simply 1 − λ 3 = (1 − λ)2 = 0. |λI − A| = 0 1 − λ

Consequently, λ = 1 twice and the fundamental solutions are S = {et , tet }. Therefore,  t  e et Bt = , tet et + tet and B0 =



1 0

1 1



,

B0−1 =



1 −1 0 1



.

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     e e − tet 1 −1 x1 (t) = = , tet 0 1 tet x2 (t) or x1 (t) = et − tet

and

x2 (t) = tet .

Note that x1 (0) = 1 while x2 (0) = 0. Finally, we have that     1 0 1 3 At e = x1 (t) + x2 (t) . 0 1 0 1 Substituting for x1 (t) and x2 (t) and simplifying, we finally obtain  t  e 3tet eAt = . 0 et 2. Our first task is to compute the characteristic polynomial p(λ) = 0. This is simply 3 − λ 5 = (3 − λ)2 = 0. |λI − A| = 0 3 − λ

Consequently, λ = 3 twice and the fundamental solutions are S = {e3t , te3t }. Therefore,  3t  e 3e3t Bt = , te3t e3t + 3te3t and B0 =



1 0

3 1



,

B0−1 =



1 −3 0 1



.

78

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 

x1 (t) x2 (t)



=



1 0

−3 1



e3t te3t



=



e3t − 3te3t te3t



,

or x1 (t) = e3t − 3te3t

x2 (t) = te3t .

and

Note that x1 (0) = 1 while x2 (0) = 0. Finally, we have that     3 5 1 0 At . + x2 (t) e = x1 (t) 0 3 0 1 Substituting for x1 (t) and x2 (t) and simplifying, we finally obtain eAt =



e3t 0

5te3t e3t



.

3. Our first task is to compute the characteristic polynomial p(λ) = 0. This is simply λ − 1 −1 0 λ−1 −1 = (λ − 1)3 = 0. |λI − A| = 0 0 0 λ − 1

Consequently, λ = 1 thrice and the fundamental solutions are S = {et , tet , t2 et }. Therefore,



et  tet Bt = t 2 et

and 

1 A2 =  0 0

et t e + tet 2tet + t2 et

 et , 2et + tet t t 2 t 2e + 4te + t e

    2 1 1 1 1 1 −1 1 2  , B0 =  0 1 2  , B0−1 =  0 1 0 1 0 0 2 0 0

 0.5 −1  . 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    e − tet + 12 t2 et e 1 −1 0.5 x1 (t)  x2 (t)  =  0 1 −1   tet  =  , tet − t2 et 1 2 t 2 t t e 0 0 0.5 x3 (t) t e 2 

79

Worked Solutions 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 1 1 0 1 0 0 eAt = x1 (t)  0 1 0  + x2 (t)  0 1 1  + x3 (t)  0 0 0 0 1 0 0 1

Substituting for x1 (t), x2 (t) and x3 (t) and  t e tet At  e = 0 et 0 0

 2 1 1 2. 0 1

simplifying, we finally obtain  1 2 t 2t e tet  . et

4. Our first task is to compute the characteristic polynomial p(λ) = 0. This is simply 2 − λ 3 4 2−λ 3 = (λ − 2)3 = 0. |λI − A| = 0 0 0 2 − λ Consequently, λ = 2 thrice and the fundamental solutions are S = {e2t , te2t , t2 e2t }. Therefore, 

and

e2t Bt =  te2t t2 e2t 

4 12 A2 =  0 4 0 0

2e2t 2t e + 2te2t 2te2t + 2t2 e2t

  1 2 25 12  , B0 =  0 1 0 0 4

 4e2t , 4e2t + 4te2t 2t 2e + 8te2t + 4t2 e2t    1 −2 2 4 4  , B0−1 =  0 1 −2  . 0 0 0.5 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   2t  e − 2te2t + 2t2 e2t x1 (t) 1 −2 2 e  x2 (t)  =  0 1 −2   te2t  =  , te2t − 2t2 e2t 1 2 2t 2 2t t e x3 (t) 0 0 0.5 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

Note that x1 (0) = 1 while x2 (0) = x3 (0) = 0. Finally, we have that eAt



1 0 = x1 (t)  0 1 0 0

  0 2 3 0  + x2 (t)  0 2 1 0 0

  4 4 12 3  + x3 (t)  0 4 2 0 0

 25 12  . 4

Substituting for x1 (t), x2 (t) and x3 (t) and simplifying, we finally obtain eAt



e2t  = 0 0

3te2t e2t 0

 4te2t + 29 t2 e2t . 3te2t 2t e

5. Our first task is to compute the characteristic polynomial p(λ) = 0. This is simply 1 − λ 2 0 1−λ 2 = (λ − 1)3 = 0. |λI − A| = 0 0 0 1 − λ Consequently, λ = 1 thrice and the fundamental solutions are S = {et , tet , t2 et }. Therefore,



et  tet Bt = t 2 et

and 

1 A2 =  0 0

et t e + tet 2tet + t2 et

 et , 2et + tet t t 2 t 2e + 4te + t e

    1 −1 1 1 1 4 4 1 4  , B0 =  0 1 2  , B0−1 =  0 1 0 0 0 0 2 0 1

 0.5 −1  . 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    e − tet + 21 t2 et e 1 −1 0.5 x1 (t)  x2 (t)  =  0 1 −1   tet  =  , tet − t2 et 1 2 t 2 t t e 0 0 0.5 x3 (t) 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.

81

Worked Solutions Finally, we have  1 eAt = x1 (t)  0 0

that   0 0 1 1 0  + x2 (t)  0 0 1 0

  2 0 1 1 2  + x3 (t)  0 0 1 0

 4 4 1 4. 0 1

Substituting for x1 (t), x2 (t) and x3 (t) and simplifying, we finally obtain   t e 2tet 2t2 et et 2tet  . eAt =  0 0 0 et 6. Our first task is to compute the characteristic polynomial p(λ) = 0. This is simply 3 − λ −2 = (3 − λ)(−1 − λ) + 8 = 0. |λI − A| = 4 −1 − λ Consequently, λ = 1 ± 2i and the fundamental solutions are S = {et cos(2t), et sin(2t)}. Therefore,  t  e cos(2t) et cos(2t) − 2et sin(2t) Bt = , et sin(2t) et sin(2t) + 2et cos(2t) and B0 =



1 1 0 2



,

B0−1

=



1 0

− 21 1 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     e cos(2t) − 12 et sin(2t) e cos(2t) 1 − 12 x1 (t) = , = 1 t 1 0 et sin(2t) x2 (t) 2 2 e sin(2t) or x1 (t) = et cos(2t) − 12 et sin(2t)

and

Note that x1 (0) = 1 while x2 (0) = 0. Finally, we have that    1 0 3 eAt = x1 (t) + x2 (t) 0 1 4

x2 (t) = 21 et sin(2t).

−2 −1



.

Substituting for x1 (t) and x2 (t) and simplifying, we finally obtain  t  e cos(2t) + et sin(2t) −et sin(2t) eAt = . 2et sin(2t) et cos(2t) − et sin(2t)

82

Advanced Engineering Mathematics with MATLAB

The homogeneous solution is therefore   x1H (t) = et cos(2t) + et sin(2t) x1 (0) − et sin(2t)x2 (0), and

  x2H (t) = 2et sin(2t)x1 (0) + et cos(2t) − et sin(2t) x2 (0).

The particular solution is given by Z

t

eAs b(t − s) ds 0   t−s  Z t s e e cos(2s) + es sin(2s) −es sin(2s) ds = s s s et−s 2e sin(2s) e cos(2s) − e sin(2s) 0  Z t cos(2s) t ds =e sin(2s) + cos(2s) 0     et 0 et − sin(2t) = − . 2 1 2 cos(2t) − sin(2t)

xp (t) =

Therefore, the particular solution is x1p (t) =

et sin(2t) 2

and

x2p (t) =

et [1 + sin(2t) − cos(2t)] . 2

7. Our first task is to compute the characteristic polynomial p(λ) = 0. This is simply 2 − λ −1 |λI − A| = = λ2 − 1 = 0. 3 −2 − λ

Consequently, λ = ±1 and the fundamental solutions are S = {et , e−t }. Therefore,  t  e e−t Bt = , et −e−t and B0 =



1 −1

1 1



B0−1

,

=

1

2 1 2

1 2 − 21



.

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    1  1 x1 (t) e cosh(t) 2 = = 12 , e−t − 12 x2 (t) sinh(t) 2 or x1 (t) = cosh(t)

and

Note that x1 (0) = 1 while x2 (0) = 0.

x2 (t) = sinh(t).

83

Worked Solutions Finally, we have that e

At

= x1 (t)



1 0

0 1



+ x2 (t)



2 3

−1 −2



.

Substituting for x1 (t) and x2 (t) and simplifying, we finally obtain   1 3et − e−t e−t − et At . e = 2 3et − 3e−t 3e−t − et The homogeneous solution is therefore  x1H (t) = 12 3et − e−t x1 (0) + and

x2H (t) =

1 2

 3et − 3e−t x1 (0) +

1 2

1 2

The particular solution is given by Z

 e−t − et x2 (0),

 3e−t − et x2 (0).

t

eAs b(t − s) ds   t−s  Z  1 t 3es − e−s e−s − es e = ds s −s −s s 3e − 3e 3e − e t −s 2 0   Z t t e 3 − e−2s  + (t − s) (e−s − es ) ds = et 3 − 3e−2s + (t − s) (3e−s − es ) 0   3tet − 3 sinh(t) + 2t . = 3tet + 2e−t − 5 sinh(t) + 4t − 2

xp (t) =

0

Therefore, the particular solution is x1p (t) = 3tet − 3 sinh(t) + 2t

and

x2p (t) = 3tet + 2e−t − 5 sinh(t) + 4t − 2.

8. Our first task is to compute the characteristic polynomial p(λ) = 0. This is simply 2 − λ 1 = (2 − λ)2 + 4 = 0. |λI − A| = −4 2 − λ

Consequently, λ = 2 ± 2i and the fundamental solutions are S = {e2t cos(2t), e2t sin(2t)}. Therefore,  2t  e cos(2t) 2e2t cos(2t) − 2e2t sin(2t) Bt = , e2t sin(2t) 2e2t sin(2t) + 2e2t cos(2t) and B0 =



1 0

2 2



,

B0−1 =



1 −1 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    e cos(2t) e cos(2t) − e2t sin(2t) x1 (t) 1 −1 , = = 1 2t e2t sin(2t) x2 (t) 0 12 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    1 0 2 At e = x1 (t) + x2 (t) 0 1 −4

1 2



.

Substituting for x1 (t) and x2 (t) and simplifying, we finally obtain   2t 1 2t e cos(2t) 2 e sin(2t) . eAt = −2e2t sin(2t) e2t cos(2t) The homogeneous solution is therefore x1H (t) = e2t cos(2t)x1 (0) + 12 e2t sin(2t)x2 (0), and x2H (t) = −2e2t sin(2t)x1 (0) + e2t cos(2t)x2 (0). The particular solution is given by Z t eAs b(t − s) ds xp (t) = 0   Z t  2s 1 2s (t − s)e2t−2s e cos(2s) e sin(2s) 2 ds = −e2t−2s −2e2s sin(2s) e2s cos(2s) 0  Z t (t − s) cos(2s) − 12 sin(2s) = e2t ds −2(t − s) sin(2s) − cos(2s)  0  0 = . −te2t Therefore, the particular solution is x1p (t) = 0

and

x2p (t) = −te2t .

9. Our first task is to compute the characteristic polynomial p(λ) = 0. This is simply 2 − λ −5 = (2 − λ)(−2 − λ) + 5 = 0. |λI − A| = 1 −2 − λ

85

Worked Solutions

Consequently, λ = ±i and the fundamental solutions are S = {cos(t), sin(t)}. Therefore,   cos(t) − sin(t) , Bt = sin(t) cos(t) and B0 =



1 0 0 1





B0−1 =

,

1 0

0 1



.

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) x2 (t)



=



1 0 0 1



cos(t) sin(t)



=



cos(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 eAt = x1 (t)



1 0

0 1



+ x2 (t)



2 1

−5 −2



.

Substituting for x1 (t) and x2 (t) and simplifying, we finally obtain eAt =



cos(t) + 2 sin(t) sin(t)

−5 sin(t) cos(t) − 2 sin(t)



.

The homogeneous solution is therefore x1H (t) = [cos(t) + 2 sin(t)]x1 (0) − 5 sin(t)x2 (0), and x2H (t) = sin(t)x1 (0) + [cos(t) − 2 sin(t)]x2 (0). The particular solution is given by Z t eAs b(t − s) ds xp (t) = 0   Z t − cos(t − s) cos(s) + 2 sin(s) −5 sin(s) ds = sin(t − s) sin(s) cos(s) − 2 sin(s) 0  Z t − cos(s) cos(t − s) − 2 sin(s) cos(t − s) − 5 sin(s) sin(t − s) ds = − sin(s) cos(t − s) + cos(s) sin(t − s) − 2 sin(s) sin(t − s) 0   2t cos(t) − t sin(t) − 3 sin(t) = . t cos(t) − sin(t)

86

Advanced Engineering Mathematics with MATLAB

Therefore, the particular solution is 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 = λ2 + 1 = 0. |λI − A| = 5 −2 − λ

Consequently, λ = ±i and the fundamental solutions are S = {cos(t), sin(t)}. Therefore,   cos(t) − sin(t) Bt = , sin(t) cos(t) and B0 =

B0−1

=





1 0 0 1

.

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) x2 (t)



=



1 0 0 1



cos(t) sin(t)



=



cos(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 e

At

= x1 (t)



1 0

0 1



+ x2 (t)



2 5

−1 −2



.

Substituting for x1 (t) and x2 (t) and simplifying, we finally obtain e

At

=



cos(t) + 2 sin(t) 5 sin(t)

− sin(t) cos(t) − 2 sin(t)



.

The homogeneous solution is therefore x1H (t) = [cos(t) + 2 sin(t)]x1 (0) − sin(t)x2 (0), and x2H (t) = 5 sin(t)x1 (0) + [cos(t) − 2 sin(t)]x2 (0).

87

Worked Solutions The particular solution is given by Z t eAs b(t − s) ds xp (t) = 0   Z t cos(t − s) cos(s) + 2 sin(s) − sin(s) ds = sin(t − s) 5 sin(s) cos(s) − 2 sin(s) 0  Z t cos(s) cos(t − s) + 2 sin(s) cos(t − s) − sin(s) sin(t − s) ds = 5 sin(s) cos(t − s) + cos(s) sin(t − s) − 2 sin(s) sin(t − s) 0   t cos(t) + t sin(t) = . t cos(t) + 3t sin(t) − sin(t) Therefore, the particular solution is 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 − λ

Consequently, λ = 1 twice and λ = 4, and the fundamental solutions are S = {et , tet , e4t }. Therefore, 

and

et Bt =  tet e4t 

1 B0 =  0 0

 1 1 1 2 , 4 16

et t e + tet 4e4t

B0−1

 et 2et + tet  , 16e4t



8/9 =  2/9 −1/9

−12/9 15/9 −3/9

 −1/9 −2/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  or

  x1 (t) 8/9  x2 (t)  =  2/9 x3 (t) −1/9

−12/9 15/9 −3/9

 t  −1/9 e −2/9   tet  , e4t 1/9

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      6 2 1 1 1 0 0 eAt = x1 (t)  0 1 0  + x2 (t)  1 2 1  + x3 (t)  5 5 1 1 2 0 0 1

 5 5 6 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 The homogeneous solution is therefore     x1H (t) = 31 e4t + 2et x1 (0) + 13 e4t − et x2 (0) + x2H (t) =

1 3

x3H (t) =

1 3

and



 e4t − et x1 (0) +



 e4t − et x1 (0) +

1 3

1 3



 e4t + 2et x2 (0) +



 e4t − et x2 (0) +

The particular solution is given by Z

1 3

1 3 1 3



 

 e4t − et x3 (0),  e4t − et x3 (0),

 e4t + 2et x3 (0).

t

eAs b(t − s) ds 0    4s Z 0 e + 2es e4s − es e4s − es 1 t  4s = e − es e4s + 2es e4s − es   (t − s)et−s  ds 3 0 et−s e4s − es e4s − es e4s + 2es    Z (t − s) e3s − 1 + e3s − 1 et t  = (t − s) e3s + 2 + e3s − 1  ds 3 0 (t − s) e3s − 1 + e3s + 2  2 t  −t e /6 − 4tet /9 + 4e4t /27 − 4et /27 =  t2 et /3 − 4tet /9 + 4e4t /27 − 4et /27  . −t2 et /6 + 5tet /9 + 4e4t /27 − 4et /27

xp (t) =

Therefore, the particular solution is x1p (t) = − x2p (t) =

4 4 t2 t 4t t e − e + e4t − et , 6 9 27 27

t2 t 4t t 4 4 e − e + e4t − et , 3 9 27 27

89

Worked Solutions and x3p (t) = −

4 4 t2 t 5t 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 − λ

Consequently, λ = 1, λ = 2, and λ = 3, and the fundamental solutions are S = {et , e2t , e3t }. Therefore,   t e et et Bt =  e2t 2e2t 4e2t  , e3t 3e3t 9e3t and



1 B0 =  1 1

 1 1 2 4, 3 9

B0−1



3 =  −5/2 1/2

−3 4 −1

 1 −3/2  . 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  , e3t x3 (t) 1/2 −1 1/2

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 1 1 1 1 0 0 eAt = x1 (t)  0 1 0  + x2 (t)  0 2 1  + x3 (t)  0 0 0 0 3 0 0 1

 3 5 4 5. 0 9

Substituting for x1 (t), x2 (t), and x3 (t) and simplifying, we finally obtain   t e e2t − et e3t − e2t e2t e3t − e2t  . eAt =  0 0 0 e3t

90

Advanced Engineering Mathematics with MATLAB

The homogeneous solution is therefore     x1H (t) = et x1 (0) + e2t − et x2 (0) + e3t − e2t x3 (0),   x2H (t) = e2t x2 (0) + e3t − e2t x3 (0),

and

x3H (t) = e3t x3 (0).

The particular solution is given by Z

t

eAs b(t − s) ds    Z t es e2s − es e3s − e2s 2(t − s) 0 e2s e3s − e2s   t − s + 2  ds = 0 0 0 e3s 3(t − s)   s 2s Z t 2(t − s)e + (t − s + 2)(e − es ) + 3(t − s)(e3s − e2s )   ds = (t − s + 2)e2s + 3(t − s)(e3s − e2s ) 0 3(t − s)e3s   3t e /3 + e2t /2 − et − t + 1/6 . e3t /3 + e2t /2 − 5/6 = e3t /3 − t − 1/3

xp (t) =

0

Therefore, the particular solution is

x1p (t) = 31 e3t + 12 e2t − et − t + 61 , x2p (t) = 13 e3t + 12 e2t − 65 , and x3p (t) = 13 e3t − t − 31 . 13. Our first task is to compute the characteristic polynomial p(λ) = 0. This is simply 1 − λ 0 1 1 − λ 1 −2 − λ 0 = (−2 − λ) |λI − A| = 0 4 1 − λ 4 0 1 − λ = (−2 − λ)(λ2 − 2λ − 3) = (−2 − λ)(λ − 3)(λ + 1) = 0.

Consequently, λ = −2, λ = −1, and λ = 3, and the fundamental solutions are S = {e3t , e−t , e−2t }. Therefore,   3t e 3e3t 9e3t −e−t e−t  , Bt =  e−t −2t −2t e −2e 4e−2t

91

Worked Solutions and



1 3 B0 =  1 −1 1 −2

 9 1, 4

B0−1



1/10 =  3/20 1/20

3/2 1/4 −1/4

 −3/5 −2/5  . 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 e + 23 e−t − 53 e−2t , x1 (t) = 10 x2 (t) =

3 3t 20 e

+ 41 e−t − 52 e−2t ,

x3 (t) =

1 3t 20 e

− 41 e−t + 51 e−2t .

and

Note that x1 (0) = 1 while x2 (0) = x3 (0) = 0. Finally, we have that    1 0 0 1 0 eAt = x1 (t)  0 1 0  + x2 (t)  0 −2 0 0 1 4 0

  1 5 0 0  + x3 (t)  0 4 1 0 0

 2 0. 5

Substituting for x1 (t), x2 (t), and x3 (t) and simplifying, we finally obtain  1 3t 1 −t  1 3t 1 −t 0 2e + 2e 4e − 4e . eAt =  0 e−2t 0 1 3t 1 −t 3t −t e −e 0 2e + 2e The homogeneous solution is therefore  x1H (t) = 12 e3t + 12 e−t x1 (0) +

1 3t 4e

x2H (t) = e−2t x2 (0),

and

 x3H (t) = e3t − e−t x1 (0) +

1 3t 2e

 − 41 e−t x3 (0),

 + 12 e−t x3 (0).

The particular solution is given by Z t eAs b(t − s) ds xp (t) = 0    1 3s 1 −s Z t 1 e3s + 1 e−s 0 −3et−s 2 2 4e − 4e    6et−s  ds 0 e−2s 0 = 1 3s 1 −s 3s −s 0 e −e 0 −4et−s e + 2e  5 2s 1 −2s  2 Z t − e − e 2 2   ds = et 6e−3s 2s −2s 0 −5e + e  1 −t  5 t 3t + 4 (e  − et ) 4 e −e . 2 et − e−2t = 5 1 t −t t 3t + 2 (e − e ) 2 e −e

92

Advanced Engineering Mathematics with MATLAB

Therefore, the particular solution is x1p (t) =

5 4

 et − e3t +

 e−t − et ,

1 4

 x2p (t) = 2 et − e−2t ,

and

x3p (t) =

5 2

 et − e3t +

 et − e−t .

1 2

14. Our first task is to compute the characteristic polynomial p(λ) = 0. This is simply 1 − λ 0 2 1 − λ 1 − λ 0 = (1 − λ) |λI − A| = 0 1 1 0 −λ

2 −λ

= (1 − λ)(λ2 − λ − 2) = (1 − λ)(λ − 2)(λ + 1) = 0.

Consequently, λ = −1, λ = 1, and λ = 2, and the fundamental solutions are S = {e−t , et , e2t }. Therefore, 

e−t B t =  et e2t and



1 B0 =  1 1

 −1 1 1 1, 2 4

 e−t et  , 4e2t

−e−t et 2e2t

B0−1



1/3 =  −1/2 1/6

1 1/2 −1/2

 −1/3 0 . 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  or

  x1 (t) 1/3  x2 (t)  =  −1/2 x3 (t) 1/6

1 1/2 −1/2

  −t  −1/3 e 0   et  , e2t 1/3

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.

93

Worked Solutions Finally, we have that

eAt

  1 1 0 0 = x1 (t)  0 1 0  + x2 (t)  0 1 0 0 1 

  3 0 2 1 0  + x3 (t)  0 1 0 0

 0 2 1 0. 0 2

Substituting for x1 (t), x2 (t), and x3 (t) and simplifying, we finally obtain

eAt

2

+ 13 e−t  = 0 1 −t 1 2t e − 3 3e 3e

2t

0 et 0

 − 23 e−t . 0 1 2t 2 −t 3e + 3e 2 2t 3e

The homogeneous solution is therefore x1H (t) =

2 2t 3e

 + 13 e−t x1 (0) +

2 2t 3e

x2H (t) = et x2 (0),

and x3H (t) =

1 2t 3e

 − 13 e−t x1 (0) +

The particular solution is given by Z

1 2t 3e

 − 32 e−t x3 (0),

 + 32 e−t x3 (0).

t

eAs b(t − s) ds 0    t−s  Z t 2 e2s + 1 e−s 0 2 e2s − 2 e−s e 3 3 3 3    et−s  ds 0 es 0 = 1 2s 1 −s 0 et−s 0 31 e2s + 23 e−s 3e − 3e   Z t 4 es − 1 e−2s 3 3 t   ds =e 1 2 s 1 −2s 0 e + e  4 2t 3 1 −t 3 3 t  − 2e 3e + 6e . tet = 2 2t 1 −t 1 t − 2e 3e − 6e

xp (t) =

Therefore, the particular solution is x1p (t) = 34 e2t + 16 e−t − 23 et , x2p (t) = tet , 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 3−λ 4 = (2 − λ) |λI − A| = −1 −1 3 − λ 0 0 2 − λ = (2 − λ)(λ2 − 4λ + 4) = (2 − λ)(λ − 2)2 = 0.

Consequently, λ = 2 thrice and the fundamental solutions are S = {e2t , te2t , t2 e2t }. Therefore, 

e2t Bt =  te2t t2 e2t and



2e2t 2t e + 2te2t 2te2t + 2t2 e2t

1 2 B0 =  0 1 0 0

 4 4, 2

 4e2t , 4e2t + 4te2t 2t 2e + 8te2t + 4t2 e2t

B0−1



1 = 0 0

 −2 2 1 −2  . 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   1 x1 (t)  x2 (t)  =  0 0 x3 (t)  or

  2t  e −2 2 1 −2   te2t  , t2 e2t 0 1/2

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 eAt



1 0 = x1 (t)  0 1 0 0

  0 1 1 0  + x2 (t)  −1 3 1 0 0

   2 0 4 10 4  + x3 (t)  −4 8 18  . 2 0 0 4

Substituting for x1 (t), x2 (t), and x3 (t) and simplifying, we finally obtain eAt



1−t = e2t  −t 0

t 1+t 0

 2t + t2 4t + t2  . 1

95

Worked Solutions The homogeneous solution is therefore x1H (t) = (1 − t)e2t x1 (0) + te2t x2 (0) + (2t + t2 )e2t x3 (0), x2H (t) = −te2t x1 (0) + (1 + t)e2t x2 (0) + (4t + t2 )e2t x3 (0), and x3H (t) = e2t x3 (0). The particular solution is given by Z

t

eAs b(t − s) ds    Z t t−s 1−s s 2s + s2 e2s  −s 1 + s 4s + s2   1  ds = 0 et−s 0 0 1   Z t (t − ts + s2 )e2s + (2s + s2 )et+s  (s − t)se2s + (1 + s)e2s + (4s + s2 )et+s  ds = 0 et+s   (t2 + t/4 + 1/4)e2t − 3t/4 − 1/4 =  (t2 + 9t/4 − 3/2)e2t + 2et − t/4 − 1/2  . e2t − et

xp (t) =

0

Therefore, the particular solution is  x1p (t) = t2 + t/4 + 1/4 e2t − 3t/4 − 1/4,

 x2p (t) = t2 + 9t/4 − 3/2 e2t + 2et − t/4 − 1/2,

and

x3p (t) = e2t − et . Section 4.1 1.

i j a × b = 4 −2 3 1

k 5 = −3i + 19j + 10k −1

a · (a × b) = −12 − 38 + 50 = 0, 2.

i j a × b = 1 −3 2 0

b · (a × b) = −9 + 19 − 10 = 0

k 1 = −12i − 2j + 6k 4

96

Advanced Engineering Mathematics with MATLAB a · (a × b) = −12 + 6 + 6 = 0

b · (a × b) = −24 + 0 + 24 = 0 3.

i j a × b = 1 1 −5 2

a · (a × b) = 1 − 8 + 7 = 0, 4.

i j a × b = 8 1 1 −2

k 1 = i − 8j + 7k 3

b · (a × b) = −5 − 16 + 21 = 0

k −6 = −2i − 86j − 17k 10

a · (a × b) = −16 − 86 + 102 = 0

b · (a × b) = −2 + 172 − 170 = 0

5.

i j a × b = 2 7 1 1

k −4 = −3i − 2j − 5k −1

a · (a × b) = −6 − 14 + 20 = 0, 6.

i b × c = b1 c1

b · (a × b) = −3 − 2 + 5 = 0

k b3 = (b2 c3 − c2 b3 )i − (b1 c3 − c1 b3 )j + (b1 c2 − c1 b2 )k 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 j b2 c2

= [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)

97

Worked Solutions 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 a × (b × c) + b × (c × a) + c × (a × b) = (a · c)b − (a · b)c + (b · a)c − (b · c)a + (c · b)a − (c · a)b =0

8. ∇f =

9.

∂ ∂x



xy 2 z3



i+

∂ ∂y



xy 2 z3



j+

∂ ∂z



xy 2 z3



k=

y2 2xy 3xy 2 i+ 3 j− 4 k 3 z z z

      ∂ ∂ ∂ ∇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.

    ∂ ∂ 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 i+ 2 j+ 2 k 2 2 2 2 x +y +z x +y +z x + y2 + z2

∇f =

11.

    ∂ ∂ x2 y 2 (2z + 1)2 i + x2 y 2 (2z + 1)2 j ∂x ∂y   ∂ + x2 y 2 (2z + 1)2 k ∂z

∇f =

= 2xy 2 (2z + 1)2 i + 2x2 y(2z + 1)2 j + 4x2 y 2 (2z + 1)k

12.

    ∂ ∂ 2x − y 2 + z 2 i + 2x − y 2 + z 2 j ∂x ∂y   ∂ + 2x − y 2 + z 2 k = 2i − 2yj + 2zk ∂z

∇f =

98

Advanced Engineering Mathematics with MATLAB

13. Plane parallel to the xy plane at height of z = 3. Let f (x, y, z) = z = 3. Then N = 3k and n = k. 14. Cylinder of radius 2. Let f (x, y, z) = x2 + y 2 = 4. Then N = 2xi + 2yj, and 2x 2y x y x y n= p i+ p j= p i+ p j = i + j. 2 2 2 2 2 2 2 2 2 2 4x + 4y 4x + 4y x +y x +y 15. Paraboloid. Let f (x, y, z) = z − x2 − y 2 = 0. Then N = −2xi − 2yj + k, and n = −p

2x 1+

4x2

+

4y 2

16. pCone. Let f (x, y, z) = yj/ x2 + y 2 − k, and n= p

i− p

2y 1+

4x2

+

4y 2

j+ p

1 1 + 4x2 + 4y 2

k.

p p x2 + y 2 − z = 0. Then N = xi/ x2 + y 2 + x

2(x2 + y 2 )

i+ p

y 2(x2 + y 2 )

k j− √ . 2

√ √ 17. A plane. Let f (x, y, z) = y−z = 0. Then N = j−k, and n = j/ 2−k/ 2. 18. A plane. Let f (x, y, z) = x + y + z = 1. Then N = i + j + k, and 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 2 Then N = −2xi + k, and n = −2xi/ 1 + 4x + k/ 1 + 4x .

20.

dx dy dz = = ⇒ x = y + c1 , 1 1 1

and

y = z + c2 .

Upon substituting for the point, x = y − 1 and y = z. 21.

dy dz x 1 dx =− 2 = ⇒ = + c1 , 2 y z 2 y

and



1 = ln(z) + c2 . y

Upon substituting for the point, y = 2/(x + 1), and z = exp [(y − 1)/y] .

99

Worked Solutions 22.

dy dz 1 1 dx =− 2 = 2 ⇒− = + c1 , 3x2 y z 3x y

and

1 1 = − + c2 . y z

Upon substituting for the point, x = 2y/(7y − 6), and z = 3y/(4y − 3). 23.

dx dy dz 1 1 = 2 = − 3 ⇒ = + c1 , x2 y z x y

and



1 1 = 2 + c2 . y 2z

Upon substituting for the point, y = x, and z 2 = y/(3y − 2). 24. x dx = e−y dy = −dz ⇒ 21 x2 = −e−y + c1 ,

and z = − 21 x2 + c2 .  Upon substituting for the point, y = − ln 3 − 12 x2 , and z = 6 − 21 x2 .

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 (λ).

If Ω2 ≪ g/L, the approximate solution is

z(t) = A0 eΩ sin(λ)ti sin

p

 g/L t .

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 ∂ ∂ ∂ 2 2 ∇ × F = ∂x ∂y ∂z = (2xy − 2yz)i + (x − y )j x2 z yz 2 xy 2       ∂ ∂ ∂ 2xy − 2yz + x2 − y 2 + 0 =0 ∇·∇×F= ∂x ∂y ∂z       ∂ ∂ ∂ 2 2 2 2xz + z i + 2xz + z j + 2xz + z k ∇(∇ · F) = ∂x ∂y ∂z = 2zi + (2x + 2z)k

2.       ∂ ∂ ∂ 4x2 y 2 + 2x + 2yz + 3z + y 2 = 8xy 2 + 2z + 3 ∂x ∂y ∂z i j k ∂ ∂ ∂ = (2 − 8x2 y)k ∇ × F = ∂x ∂y ∂z 4x2 y 2 2x + 2yz 3z + y 2       ∂ ∂ ∂ ∇·∇×F= 0 + 0 + 2 − 8x2 y = 0 ∂x ∂y ∂z     ∂ ∂ 2 2 8xy + 2z + 3 i + 8xy + 2z + 3 j ∇(∇ · F) = = ∂x ∂y   ∂ + 8xy 2 + 2z + 3 k = 8y 2 i + 16xyj + 2k ∂z

∇·F=

3.       ∂ ∂ ∂ (x − y)2 + e−xy + xze2y = 2(x − y) − xe−xy + xe2y ∂x ∂y ∂z i j k   ∂ ∂ ∂ 2y 2y −xy ∇ × F = ∂x k ∂y ∂z = 2xze i − ze j + 2(x − y) − ye (x − y)2 e−xy xze2y       ∂ ∂ ∂ 2xze2y + −ze2y + 2(x − y) − ye−xy = 0 ∇·∇×F= ∂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

∇·F =

Worked Solutions 4.

      ∂ ∂ ∂ 2 ∇·F= 3xy + 2xz + y 3 = 3y ∂x ∂y ∂z i j k ∂ ∂ ∂ 2 2 ∇ × F = ∂x ∂y ∂z = (3y − 4xz)i + (2z − 3x)k 2 3 3xy 2xz y     ∂ ∂ 2 2 3y − 4xz + 2z − 3x = 0 ∇·∇×F= ∂x ∂z       ∂ ∂ ∂ 3y i + 3y j + 3y k = 3j ∇(∇ · F) = ∂x ∂y ∂z

5.

      ∂ ∂ ∂ 2 3 ∇·F= 5yz + x z + 3x = 0 ∂x ∂y ∂z i j k ∂ ∂ ∂ 2 2 ∇ × F = ∂x ∂y ∂z = −x i + (5y − 9x )j + (2xz − 5z)k 5yz x2 z 3x3       ∂ ∂ ∂ 2 2 ∇·∇×F= −x + 5y − 9x + 2xz − 5z = 0 ∂x ∂y ∂z       ∂ ∂ ∂ ∇(∇ · F) = 0 i+ 0 j+ 0 k=0 ∂x ∂y ∂z

6.

      ∂ ∂ ∂ y3 + x3 y 2 − xy + xz − x3 yz = x3 y ∂x ∂y ∂z i j k ∂ ∂ ∂ ∇ × F = ∂x ∂y ∂z y 3 x3 y 2 − xy xz − x3 yz

101

∇·F=

= −x3 zi + (3x2 yz − z)j + (3x2 y 2 − y − 3y 2 )k       ∂ ∂ ∂ 3 2 2 2 2 −x z + 3x yz − z + 3x y − y − 3y = 0 ∇·∇×F= ∂x ∂y ∂z       ∂ ∂ ∂ 3 3 3 ∇(∇ · F) = x y i+ x y j+ x y k = 3x2 yi + x3 j ∂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 ∂ ∇ × F = ∂x xe−y

j ∂ ∂y 2

k ∂ −y k ∂z = −2yzi + xe −z 3e

yz     ∂ ∂ −2yz + xe−y = 0 ∇·∇×F= ∂x ∂z     ∂ ∂ −y 2 −z −y 2 −z ∇(∇ · F) = i+ j e + z − 3e e + z − 3e ∂x ∂y   ∂ + e−y + z 2 − 3e−z k = −e−y j + (2z + 3e−z )k ∂z 8.       ∂ ∂ ∂ 3 ∇·F= = y/x − 3z + 3xyz 2 y ln(x) + 2 − 3yz + xyz ∂x ∂y ∂z i ∂ ∇ × F = ∂x y ln(x)

j ∂ ∂y

k ∂ 3 3 ∂z = (xz + 3y)i + (−yz )j − ln(x)k 3 xyz

2 − 3yz       ∂ ∂ ∂ xz 3 + 3y + −yz 3 + − ln(x) = 0 ∇·∇×F= ∂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 ∂ ∇ × F = ∂x xyz z

j ∂ ∂y

x3 yzez

k ∂ ∂z xyez

= (xe − x3 yez − x3 yzez )i + (xy − yez )j + (3x2 yzez − xz)k     ∂ ∂ 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 =

11.

      ∂ ∂ ∂ 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 xy 3 − z 4 4x4 y 2 z −y 4 z 5

= (−4y 3 z 5 − 4x4 y 2 )i − 4z 3 j + (16x3 y 2 z − 3xy 2 )k     ∂ ∂ −4y 3 z 5 − 4x4 y 2 + −4z 3 ∇·∇×F= ∂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

      ∂ ∂ ∂ 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 xy 2 xyz 2 xy cos(z)

= [x cos(z) − 2xyz]i − y cos(z)j + (yz 2 − 2xy)k      ∂ ∂ ∂ 2 x cos(z) − 2xyz + −y cos(z) + yz − 2xy = 0 ∇·∇×F= ∂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 xy + xyz + xy sin(z) = y 2 + xz 2 + xy cos(z) ∇·F= ∂x ∂y ∂z i j k ∂ ∂ ∂ ∇ × F = ∂x ∂y ∂z xy 2 xyz 2 xy sin(z)

= [x sin(z) − 2xyz]i − y sin(z)j + (yz 2 − 2xy)k       ∂ ∂ ∂ 2 x sin(z) − 2xyz + −y sin(z) + yz − 2xy = 0 ∇·∇×F= ∂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 xy + xyz + xy cos(z) = y 2 + xz − xy sin(z) ∇·F= ∂x ∂y ∂z i j k ∂ ∂ ∂ ∇ × F = ∂x ∂y ∂z xy 2 xyz xy cos(z)

= [x cos(z) − xy]i − y cos(z)j + (yz − 2xy)k      ∂ ∂ ∂ x cos(z) − xy + −y cos(z) + yz − 2xy = 0 ∇·∇×F= ∂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 

14.(a) If F = P (x, y, z)i + Q(x, y, z)j + R(x, y, 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

105

Worked Solutions i ∂ ∇ × ∇ × F = ∂x R y − Qz

j ∂ ∂y

Pz − R x

∂ ∂z Q x − Py k

= [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. ∇×∇×E = − ∇×∇×B =

1 ∂ (∇ × B) , c ∂t

1 ∂ (∇ × E) , c ∂t

1 ∂2E , c2 ∂t2

∇2 E =

1 ∂2E c2 ∂t2

1 ∂2B , c2 ∂t2

∇2 B =

1 ∂2B c2 ∂t2

∇ (∇ · E)−∇2 E = − ∇ (∇ · B)−∇2 B = −

16. From Equation 4.2.19, ∇ × (f ∇g) = f ∇ × ∇g + ∇f × ∇g. But, ∇ × ∇g = 0 from Equation 4.2.17. Therefore, ∇ × (f ∇g) = ∇f × ∇g. Finally, ∇ · (∇f × ∇g) = ∇ · ∇ × (f ∇g) = 0 from Equation 4.2.18. 17. Taking the curl of both sides of the equilibrium condition: ∇ × ∇p = ∇ × (ρF) = 0. Then ∇×(ρF) = ∇ρ×F+ρ∇×F = 0. Dotting the equation with F, we have that F·(∇ρ×F)+ρF·(∇×F) = 0. But F·(∇ρ×F) = ∇ρ·(F×F) = 0. Therefore, F · ∇ × F = 0 after dividing by ρ. Section 4.3 1.

Z

C

F · dr = =

Z

y sin(πz) dx + x2 ey dy + 3xz dz

C Z 1 0

=−

2

t2 sin(πt3 ) dt + t2 et (2t dt) + 9t6 dt

1 1  1 2 2 1 16 9 cos(πt3 ) + et t2 − 1 + t7 = + 3π 7 7 3π 0 0 0

106

Advanced Engineering Mathematics with MATLAB

2.

Z

C

F · dr =

Z

y dx + z dy + x dz = C

Z

C1

F · dr +

Z

C2

F · dr

Along C1 , z = dz = 0 and x = 2t, y = 3t, 0 ≤ t ≤ 1, so that Z

C1

F · dr = =

Z

y dx + z dy + x dz =

C1 Z 1 0

Z

3. Z

C

4. Z

C

C2

F · dr =

F · dr =

Z

Z

1

(3t)(2 dt) + (0)(3 dt) + (2t)(0) 0

y dx + z dy + x dz = C2

Z

C

Z

4

3 · 0 + z · 0 + 2 dz = 8

0

F · dr = 3 + 8 = 11

ex dx + xexy dy + xyexyz dz =

Z

2

3

F · dr =

0

C

Z

yz dx + xz dy + xy dz =

C Z 2 1

Z

C

6

et dt + 2t2 et dt + 3t5 et dt

2 2 2 1 t6 2 t3 t = e + e + e = e2 + 23 e8 + 21 e64 − 3 2 0 0 0

=

5.

1 6t dt = 3t2 0 = 3

Z

2 6t5 dt = t6 1 = 63

F · dr =

Z

C

Z

13 6

2 1

t2 · t · 3t2 dt + t3 · t · 2t dt + t5 dt

y dx − x dy + 3xy dz =

Z

C1

F · dr +

Z

C2

F · dr

Along C1 , z = dz = 0 and x = 2 cos(t), y = 2 sin(t), 0 ≤ t ≤ π, so that Z Z F · dr = y dx − x dy + 3xy dz C1 C1 Z π [2 sin(t)][−2 sin(t) dt] − [2 cos(t)][2 cos(t) dt] = 0

=

Z

π 0

+ 3[2 cos(t)][2 sin(t)] · 0

−4 sin2 (t) dt − 4 cos2 (t) dt = −4π

107

Worked Solutions Z

C2

6. Z

C

F · dr =

F · dr =

Z

C

Z

C2

y dx − x dy + 3xy dz = Z

C

Z

2 −2

0 · dx − x · 0 + 3x · 0 · 0 = 0

F · dr = −4π + 0 = −4π

(x + 2y) dx + (6y − 2x) dy =

Z

F · dr +

C1

Z

C2

F · dr +

Z

C3

F · dr

Along C1 , x = y = z = t and dx = dy = dz = dt so that Z

C1

F · dr =

Z

C1

(x + 2y) dx + (6y − 2x) dy =

1 7 2 7 = t = . 2 0 2

Z

1 0

(t + 2t) dt + (6t − 2t) dt

Along C2 , x = y = 1 and dx = dy = 0 so that Z

C2

F · dr =

Z

C2

(x + 2y) dx + (6y − 2x) dy =

Z

0 1

(3 · 0 + 4 · 0 + 0 dz) = 0.

Along C3 , x = y = t and z = 0 so that Z

C3

F · dr =

Z

C3

(x + 2y) dx + (6y − 2x) dy = Z

C

F · dr =

7 2

+0−

Z 7 2

0

3t dt + 4t dt = 1

1 7 7 2 t =− . 2 0 2

=0

7. Let x = 2 cos(t) and y = 3 sin(t). Then, Z

C

F · dr = =

Z

2xz dx + 4y 2 dy + x2 dz

C Z 2π 0

2[2 cos(t)] · 1 · [−2 sin(t) dt]

+ 4[9 sin2 (t)][3 cos(t) dt] + 4 cos2 (t) · 0 2π 2π 3 =0 = 4 cos2 (t) + 108 sin (t) 3 0

0

108

Advanced Engineering Mathematics with MATLAB

8.

Z

C

F · dr = =

Z

2x dx + y dy + z dz

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 + 21 sin2 (t) + 12 [cos(t) + sin(t)]2 = 4π 2

9. Z

F · dr =

C

= =

Z

Z

Z

0

0

0

(2y 2 + z) dx + 4xy dy + x dz C 2π

[2 sin2 (t) + t][− sin(t) dt] + 4 cos(t) sin(t)[cos(t) dt] + cos(t) dt

0 2π 0

[−2 sin(t) + 6 cos2 (t) sin(t) − t sin(t) + cos(t)] dt

2π = [2 cos(t) − 2 cos (t) + t cos(t)] = 2π 3

0

10.

Z

C

F · dr = = + +

Z

Z

Z

Z

Z

Z

x2 dx + y 2 dy + (z 2 + 2xy) dz C

x2 dx + y 2 dy + (z 2 + 2xy) dz C1

x2 dx + y 2 dy + (z 2 + 2xy) dz C2

x2 dx + y 2 dy + (z 2 + 2xy) dz C3

C1 2

2

2

x dx + y dy + (z + 2xy) dz = C2

Z

Z

x2 dx + y 2 dy + (z 2 + 2xy) dz =

x2 dx + y 2 dy + (z 2 + 2xy) dz = C3

Z

Z

1 0

x2 dx + x2 dx + (02 + 2x2 ) · 0 =

0

x2 dx + 12 · 0 + (02 + 2x · 1) · 0 = − 13

1

Z

0 1

02 · 0 + y 2 dy + (02 + 2y · 0) · 0 = − 13

x2 dx + y 2 dy + (z 2 + 2xy) dz = 0 C

2 3

Worked Solutions

109

Section 4.4 1. Because ∇ × F = 0, we have a conservative field. To find the potential, we must integrate ϕx = 2xy, ϕy = x2 + 2yz and ϕz = y 2 + 4. Integrating first with respect to x, ϕ(x, y, z) = x2 y + f (y, z) and ϕy = x2 + fy = x2 + 2yz. Therefore, f (y, z) = y 2 z + h(z) and ϕ(x, y, z) = x2 y + y 2 z + h(z). Then ϕz = y 2 + h′ (z) = y 2 + 4 and h(z) = 4z + constant. The final answer is ϕ(x, y, z) = x2 y + y 2 z + 4z + constant. 2. Because ∇ × F = 0, we have a conservative field. To find the potential, we must integrate ϕx = 2x + 2ze2x , ϕy = 2y − 1 and ϕz = e2x . Integrating first with respect to x, ϕ(x, y, z) = x2 + ze2x + f (y, z) and ϕy = fy = 2y − 1. Therefore, f (y, z) = y 2 − y + h(z) and ϕ(x, y, z) = x2 + ze2x + y 2 − y + h(z). Then ϕz = e2x + h′ (z) = e2x and h(z) = constant. The final answer is ϕ(x, y, z) = x2 + ze2x + y 2 − y + constant. 3. Because ∇ × F = 0, we have a conservative field. To find the potential, we must integrate ϕx = yz, ϕy = xz and ϕz = xy. Integrating first with respect to x, ϕ(x, y, z) = xyz + f (y, z) and ϕy = xz + fy = xz. Therefore, f (y, z) = h(z) and ϕ(x, y, z) = xyz + h(z). Then ϕz = xy + h′ (z) = xy and h(z) = constant. The final answer is ϕ(x, y, z) = xyz + constant. 4. Because ∇ × F = 0, we have a conservative field. To find the potential, we must integrate ϕx = 2x, ϕy = 3y 2 and ϕz = 4z 3 . Integrating first with respect to x, ϕ(x, y, z) = x2 + f (y, z) and ϕy = fy = 3y 2 . Therefore, f (y, z) = y 3 + h(z) and ϕ(x, y, z) = x2 + y 3 + h(z). Then ϕz = h′ (z) = 4z 3 and h(z) = z 4 + constant. The final answer is ϕ(x, y, z) = x2 + y 3 + z 4 + constant. 5. Because ∇ × F = 0, we have a conservative field. To find the potential, we must integrate ϕx = 2x sin(y) + e3z , ϕy = x2 cos(y) and ϕz = 3xe3z + 4. Integrating first with respect to x, ϕ(x, y, z) = x2 sin(y) + xe3z + f (y, z) and ϕy = x2 cos(y) + fy = x2 cos(y). Therefore, f (y, z) = h(z) and ϕ(x, y, z) = x2 sin(y) + xe3z + h(z). Then ϕz = 3xe3z + h′ (z) = 3xe3z + 4 and h(z) = 4z + constant. The final answer is ϕ(x, y, z) = x2 sin(y) + xe3z + 4z + constant. 6. Because ∇ × F = 0, we have a conservative field. To find the potential, we must integrate ϕx = 2x + 5, ϕy = 3y 2 and ϕz = 1/z. Integrating first with respect to x, ϕ(x, y, z) = x2 + 5x + f (y, z) and ϕy = fy = 3y 2 . Therefore, f (y, z) = y 3 +h(z) and ϕ(x, y, z) = x2 +5x+y 3 +h(z). Then ϕz = h′ (z) = 1/z and h(z) = ln(z) + constant. The final answer is ϕ(x, y, z) = x2 + 5x + y 3 + ln(z) + constant. 7. Because ∇ × F = 0, we have a conservative field. To find the potential, we must integrate ϕx = e2z , ϕy = 3y 2 and ϕz = 2xe2z . Integrating first with respect to x, ϕ(x, y, z) = xe2z + f (y, z) and ϕy = fy = 3y 2 . Therefore,

110

Advanced Engineering Mathematics with MATLAB

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. 8. Because ∇ × F = 0, we have a conservative field. To find the potential, we must integrate ϕx = y, ϕy = x + z and ϕz = y. Integrating first with respect to x, ϕ(x, y, z) = xy + f (y, z) and ϕy = x + fy = x + z. Therefore, f (y, z) = yz + h(z) and ϕ(x, y, z) = xy + yz + h(z). Then ϕz = y + h′ (z) = y and h(z) = constant. The final answer is ϕ(x, y, z) = xy + yz + constant. 9. Because ∇ × F = 0, we have a conservative field. To find the potential, we must integrate ϕx = y + z, ϕy = x and ϕz = x. Integrating first with respect to x, ϕ(x, y, z) = xy + xz + f (y, z) and ϕy = x + fy = x. Therefore, f (y, z) = h(z) and ϕ(x, y, z) = xy + xz + h(z). Then ϕz = x + h′ (z) = x and h(z) = constant. The final answer is ϕ(x, y, z) = xy + xz + constant. Section 4.5 1. ZZ

S

F · n dσ =

Z

1 0

Z

1

(xi − j + yk) · k dx dy =

0

Z

1 0

Z

1

y dx dy = 0

1 2

2. ZZ

S

F · n dσ = =

ZZ Z

0

(xi + yj + xzk) · k dσ

S 3 Z 2π 0

[r cos(θ)] · 1 · r dθ dr =

2π 3 r3 =0 sin(θ) 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

For the top, ZZ ZZ F · n dσ = (xyi + 2j + 2xk) · k dσ S1

=

Z

S1 2π

0

Z

2

0

[r2 cos(θ) sin(θ)i + 2j + 2r cos(θ)k] · k r dr dθ

2π 2 2r3 = sin(θ) = 0. 3 0 0

111

Worked Solutions For the bottom, ZZ

S2

F · n dσ =

ZZ

S2

xyi · k dσ =

Therefore,

ZZ

S

Z

2π 0

Z

2 0

r2 cos(θ) sin(θ)i · k r dr dθ = 0.

F · n dσ = 0.

4. The equation for the surface is f (x, y, z) = x2 + y 2 = 4 and the outward pointing unit normal is n=

x ∇f 2xi + 2yj y = i + j. =p 2 2 |∇f | 2 2 4x + 4y

Because x = 2 cos(θ) and y = 2 sin(θ). Then, ZZ ZZ x y  i + j dσ F · n dσ = (xi + zj + yk) · 2 2 S S Z 3 Z 2π [2 cos(θ)i + zj + 2 sin(θ)k] · [cos(θ)i + sin(θ)j] 2 dθ dz = −3

=2 =2

Z

0

3

−3 Z 3

−3

Z 



[2 cos2 (θ) + z sin(θ)] dθ dz 0

θ+

1 2

Z  2π sin(2θ) − z cos(θ) dz = 4π 0

3

dz = 24π. −3

5. The equation for the surface is f (x, y, z) = y 2 + z 2 = 9 and the outward pointing unit normal is n=

∇f 2yj + 2zk z y =p = j + k. 2 2 |∇f | 3 3 4y + 4z

Let y = 3 cos(θ) and z = 3 sin(θ). Then, ZZ ZZ y z  j + k dσ F · n dσ = (xyi + z 2 j + yk) · 3 3 S S Z π/2 Z 1 = 31 [27 sin2 (θ) cos(θ) + 9 cos(θ) sin(θ)] 3 dx dθ =

Z

0 π/2

0

[27 sin2 (θ) cos(θ) + 9 cos(θ) sin(θ)] dθ

0

π/2 = 9 sin3 (θ) + 0

9 2

π/2 sin2 (θ) = 0

27 2 .

112

Advanced Engineering Mathematics with MATLAB

6. The equation for the surface is f (x, y, z) = y 2 + z 2 = 4 and the outward pointing unit normal is ∇f 2yj + 2zk z y =p = j + k. 2 2 |∇f | 2 2 4y + 4z

n=

Let y = 2 cos(θ) and z = 2 sin(θ). Then, ZZ

S

ZZ

F · n dσ =

1 2 Z

=

S

Z

(yj + z 2 k) · π

0 π

Z

1

z  1 j + k dσ = 2 2 2

y

ZZ

(y 2 + z 3 ) dσ S

[4 cos2 (θ) + 8 sin3 (θ)] 2 dx dθ

0

2[1 + cos(2θ)] + 8[sin(θ) − cos2 (θ) sin(θ)] dθ 0    π  π = 2 θ + 21 sin(2θ) 0 + 8 13 cos3 (θ) − cos(θ) 0 = 2π +

=

32 3 .

7. The equation for the surface is f (x, y, z) = x2 + y 2 = 4 and the outward pointing unit normal is 2xi + 2yj y x ∇f =p = i + j. 2 2 |∇f | 2 2 4x + 4y

n= ZZ

S

F · n dσ = = ZZ

S

ZZ

Z

1

(zi + xj + yk) ·

S 2 Z π/2 0

x

y  i + j dσ 2 2

[zi + 2 cos(θ)j + 2 sin(θ)k] · [cos(θ)i + sin(θ)j] 2 dθ dz

F · n dσ =

Z

=2 =2

2 1

Z

π/2

[z cos(θ) + 2 cos(θ) sin(θ)] 2 dθ dz 0

Z 2

Z

1

2

1

π/2 π/2  2 z sin(θ) + sin (θ) dz 0

0

 2 (z + 1) dz = z 2 + 2z 1 = 5

8. The equation for the surface is f (x, y, z) = x2 + y 2 + z 2 = 16 and the outward pointing unit normal is n=

x 2xi + 2yj + 2zk y z ∇f = i + j + k. =p 2 2 2 |∇f | 4 4 4 4x + 4y + 4z

113

Worked Solutions ZZ

S

F · n dσ = =

ZZ Z

(x2 i − z 2 j + yzk) ·

S 2π

0

Z

0

π/3 

x

y z dσ i+ j+ 4 4 4

16 cos2 (θ) sin2 (ϕ)i − 16 cos2 (ϕ)j  + 16 sin(θ) sin(ϕ) cos(ϕ)k

· [cos(θ) sin(ϕ)i + sin(θ) sin(ϕ)j + cos(ϕ)k] · 16 sin(θ) dθ dϕ π/3 Z 2π sin3 (ϕ) cos4 (θ) = −64 dϕ = 60

Z

0 2π

0

[sin(ϕ) − cos2 (ϕ) sin(ϕ)] dϕ

0



= 60 − cos(ϕ) +

1 3

 2π cos (ϕ) = 0 3

0

9. Setting r = xi + yj + (x + 1)k, rx i rx × ry = 1 0 Then,

ZZ

S

F · n dσ = =

Z

1

−1 Z 1 −1

Z

1

−1 Z 1

= i + k, ry = j, and j k 0 1 = −i + k. 1 0

[yi + xj + yk] · [−i + k] dx dy (−y + y) dx dy = 0.

−1

10. Setting r = xi + yj + (2a − x − y)k, rx = i − k, ry = j − k, and i j k rx × ry = 1 0 −1 = i + j + k. 0 1 −1

Then, ZZ

S

F · n dσ =

Z

Z

a

0 a

Z

Z

a

[(2a − x − y)i + xj − 3(2a − x − y)k]

0

· [i + j + k] dx dy

a

(3x + 2y − 4a) dx dy Z a Z a  a  3 2 dy = = x + 2xy − 4ax − 52 a2 + 2ay dy 2 0 0 0 a  = − 52 a2 y + ay 2 = − 25 a3 + a3 = − 32 a3 .

=

0

0

0

114

Advanced Engineering Mathematics with MATLAB

11. Setting r = xi + yj + (1 − x2 )k, rx = i − 2xk, ry = j, and i j k rx × ry = 1 0 −2x = 2xi + k. 0 1 0 Then,

ZZ

S

F · n dσ =

Z

=

Z

−2

−2

Z

=2

1

−1 1

−1 Z 1

2

{[y 2 + (1 − x2 )2 ]i + [x2 + (1 − x2 )2 ]j

+ (x2 + y 2 )k} · [2xi + k] dx dy

Z

2

−2 Z 2

=

Z

2

−1

−2

{2x[y 2 + (1 − x2 )2 ] + x2 + y 2 } dx dy (2xy 2 + 2x − 4x3 + 2x5 + x2 + y 2 ) dx dy

1 3 3x

 1 + xy 0 dy = 2

 2 = 2 23 y + 23 y 3 = 0

40 3 .

Z

2 −2

2 3

 + 2y 2 dy

12. Setting r = r cos(θ)i + r sin(θ)j + rk, rr = cos(θ)i + sin(θ)j + k, rθ = −r sin(θ)i + r cos(θ)j, and i j k sin(θ) 1 = −r cos(θ)i − r sin(θ)j + rk. rr × rθ = cos(θ) −r sin(θ) r cos(θ) 0

Then, ZZ

S

F · n dσ =

Z

Z

1

0

1

Z

Z



0



[r2 sin2 (θ)i + r2 cos(θ)j − k] · [r cos(θ)i + r sin(θ)j − rk] dθ dr

[r3 sin2 (θ) cos(θ) + r3 sin(θ) cos(θ) + r] dθ dr  Z 1 2π 1 3 2 2π 3 1 3 + r sin (θ) + rθ 2π dr = r sin (θ) 3 2 0 0 0 =

0

0

0



Z

1

0

1 2r dr = πr2 0 = π.

13. Setting r = xi + yj + (y + 1)k, rx = i, ry = j + k, and i j k rx × ry = 1 0 0 = −j + k. 0 1 1

115

Worked Solutions Then, ZZ

S

F · n dσ = = =

Z

Z

Z

1

Z

1

−1 −1 1Z 1

[y 2 i + x2 j + 5(y + 1)k] · (−j + k) dx dy 2

(−x + 5y + 5) dx dy =

−1 −1 1 28 3 −1

Z

1 −1



 1 − 31 x3 + 5x(y + 1) −1 dy

 1 2 + 10y dy = 28 y + 5y 3 = 

−1

86 3 .

14. We set r = r cos(θ)i + r sin(θ)j + r2 k, rr = cos(θ)i + sin(θ)j + 2rk, rθ = −r sin(θ)i + r cos(θ)j, and i rr × rθ = cos(θ) −r sin(θ)

j sin(θ) r cos(θ)

k 2r = −2r2 cos(θ)i − 2r2 sin(θ)j + rk. 0

We need exterior normal so we must take the opposite of rr × rθ . Then, ZZ

S

F · n dσ =

Z

=

Z

2π 0

0

Z

1Z

1

[−r sin(θ)i + r cos(θ)j + r2 k] 0

· [2r2 cos(θ)i + 2r2 sin(θ)j − rk] dr dθ 1 2π r4 π 3 −r dθ dr = −2π = − . 4 2 0 0

15. For the paraboloid z = 4−x2 −y 2 , we set r = r cos(θ)i+r sin(θ)j+(4−r2 )k, rr = cos(θ)i + sin(θ)j − 2rk, rθ = −r sin(θ)i + r cos(θ)j, and i rr × rθ = cos(θ) −r sin(θ)

j sin(θ) r cos(θ)

Then,

ZZ

S

F · n dσ =

=

Z Z

√ 0 √ 0

2

Z

k −2r = 2r2 cos(θ)i + 2r2 sin(θ)j + rk. 0

2π 0

[−r sin(θ)i + r cos(θ)j + 6(4 − r2 )2 k]

· [2r2 cos(θ)i + 2r2 sin(θ)j + rk] dθ dr Z √2 2 Z 2π 2π 2 2 6(4 − r2 )2 r θ 0 dr 6(4 − r ) r dθ dr = 0

= −2π(4 −

√ 2 r 2 )3 0

0

= 112π.

116

Advanced Engineering Mathematics with MATLAB

For the paraboloid z = x2 + y 2 , we set r = r cos(θ)i + r sin(θ)j + r2 k, rr = cos(θ)i + sin(θ)j + 2rk, rθ = −r sin(θ)i + r cos(θ)j, and i j k rr × rθ = cos(θ) sin(θ) 2r = −2r2 cos(θ)i − 2r2 sin(θ)j + rk. −r sin(θ) r cos(θ 0 Then,

ZZ

S

F · n dσ =

Z



0

=− =

2

Z

Z





[−r sin(θ)i + r cos(θ)j + 6r4 k] 0

2Z

0 √ 6 2 −2πr 0 0

· [2r2 cos(θ)i + 2r2 sin(θ)j − rk] dθ dr Z √2 2π 2π 5 6r dθ dr = − 6r5 θ 0 dr 0

= −16π.

Thus, the total flux is 96π. Section 4.6 1.

I

2

C

(x + 4y) dx + (y − x) dy = + + +

Z

Z

Z

Z

C1

(x2 + 4y) dx + (y − x) dy

C2

(x2 + 4y) dx + (y − x) dy

C3

(x2 + 4y) dx + (y − x) dy

C4

(x2 + 4y) dx + (y − x) dy

Along C1 , x = dx = 0 and Z Z Z 0 (02 + 4y) · 0 + (y − 0) dy = (x2 + 4y) dx + (y − x) dy = 1

C1

0 1

y dy = − 12 .

Along C2 , y = dy = 0 and Z Z 1 (x2 + 0) dx + (0 − x) · 0 = 13 . (x2 + 4y) dx + (y − x) dy = 0

C2

Along C3 , x = 1 and dx = 0 and Z Z 1 (1 + 4y) · 0 + (y − 1) dy (x2 + 4y) dx + (y − x) dy = 0

C3

=

1 2 2y

 1 − y = − 12 . 0

117

Worked Solutions Along C4 , y = 1 and dy = 0 and Z

C2

Z

(x2 + 4y) dx + (y − x) dy =

I

C

1

(x2 + 4) dx + (1 − x) · 0

1 3 3x

= Thus,

0

0 + 4x = − 31 − 4. 1

(x2 + 4y) dx + (y − x) dy = −5.

By Green’s lemma, I

2

C

(x + 4y) dx + (y − x) dy = =

 ∂ 2 ∂ (y − x) − (x + 4y) dx dy ∂x ∂y

ZZ  Z

0

R 1Z 1 0

(−1 − 4) dx dy = −5.

2. I

C

(x − y) dx + xy dy = +

Z

Z

C1

(x − y) dx + xy dy +

(x − y) dx + xy dy +

C3

Z

Z

C2

C4

(x − y) dx + xy dy

(x − y) dx + xy dy

Along C1 , y = dy = 0 and Z

C1

(x − y) dx + xy dy =

Z

1 0

(x − 0) dx + x · 0 · 0 =

Z

1 0

x dx = 12 .

Along C2 , x = 1, dx = 0 and Z

C2

(x − y) dx + xy dy =

Z

1 0

(1 − y) · 0 + 1 · y dy = 12 .

Along C3 , y = 1, dy = 0 and Z

C3

(x − y) dx + xy dy =

Z

0 1

(x − 1) dx + x · 1 · 0 =

Along C4 , x = dx = 0 and Z

C4

(x − y) dx + xy dy =

Z

1 2 2x

 0 − x = 21 .

0 1

(0 − y) · 0 + 0 · y dy = 0.

1

118

Advanced Engineering Mathematics with MATLAB

Thus,

I

C

(x − y) dx + xy dy = 32 .

By Green’s lemma, I

C

(x − y) dx + xy dy = =

3.

I

C

−y 2 dx + x2 dy = +

Z

Z C1 C3

ZZ  Z

0

 ∂ ∂ (xy) − (x − y) dx dy ∂x ∂y

R 1Z 1 0

(y + 1) dx dy = 23 .

−y 2 dx + x2 dy + 2

Z

C2

−y 2 dx + x2 dy

2

−y dx + x dy

Along C1 , y = dy = 0 and Z

C1

−y 2 dx + x2 dy =

Z

1

−02 dx + x2 · 0 = 0.

0

Along C2 , x = 1 and dx = 0 and Z

2

C2

2

−y dx + x dy =

Z

1 0

−y 2 · 0 + 12 dy = 1.

Along C3 , y = x and dy = dx and Z

2

C3

2

−y dx + x dy =

Thus,

I

C

Z

0 1

−x2 dx + x2 dx = 0.

−y 2 dx + x2 dy = 1.

By Green’s lemma, I

C

ZZ 

 ∂ 2 ∂ (x ) − (−y 2 ) dx dy ∂y R ∂x Z 1 Z 1Z x x (2xy + y 2 ) 0 dx (2x + 2y) dy dx = =

−y 2 dx + x2 dy =

=

Z

0

0

1

0

1 2 3 3x dx = x = 1. 0

0

119

Worked Solutions 4.

I

C

(xy − x2 ) dx + x2 y dy =

Z

(xy − x2 ) dx + x2 y dy

Z C1 (xy − x2 ) dx + x2 y dy + Z C2 + (xy − x2 ) dx + x2 y dy C3

Along C1 , y = dy = 0 and Z

C1

(xy − x2 ) dx + x2 y dy =

Z

1 0

0

Along C2 , x = 1 and dx = 0 and Z

2

C2

1 (x · 0 − x2 ) dx + x2 0 · 0 = − 13 x3 = − 13 . Z

2

(xy − x ) dx + x y dy =

1 0

Along C3 , y = x and dy = dx and Z

C3

(xy − x2 ) dx + x2 y dy =

Thus,

I

C

Z

0 1

1 y 2 = 21 . (y − 1 ) · 0 + y dy = 2 0 2

0 (x2 − x2 ) dx + x3 dx = 41 x4 = − 41 . 1

1 (xy − x2 ) dx + x2 y dy = − 12 .

By Green’s lemma, I

 ∂ ∂ 2 2 (x y) − (xy − x ) dx dy (xy − x ) dx + x y dy = ∂y C R ∂x Z 1 Z 1Z x x (xy 2 − xy) 0 dx (2xy − x) dy dx = = 2

ZZ 

2

=

5.

I

Z

1

0

0

0

0

1 1 . (x3 − x2 ) dx = 14 x4 − 31 x3 = − 12 0

sin(y) dx + x cos(y) dy = C

+ +

Z

Z

Z

sin(y) dx + x cos(y) dy C1

sin(y) dx + x cos(y) dy C2

sin(y) dx + x cos(y) dy C3

120

Advanced Engineering Mathematics with MATLAB

Along C1 , y = dy = 0 and Z

sin(y) dx + x cos(y) dy = C1

Z

1 −1

0 dx + x · 1 · 0 = 0.

Along C2 , y = 1 − x and dy = −dx and Z

Z

sin(y) dx + x cos(y) dy = C2

Z

=

0

sin(1 − x) dx + x cos(1 − x) (−dx)

1 1

sin(x − 1) dx +

0

Z

1 0

x cos(x − 1) dx

1 1 = (x − 1) sin(x − 1) + sin(x − 1) = 0. 0

0

Along C3 , y = x + 1 and dy = dx and Z

sin(y) dx + x cos(y) dy = C3

Z

−1

[sin(x + 1) + x cos(x + 1)] dx

0

−1 −1 = (x + 1) sin(x + 1) − sin(x + 1) = 0. 0

0

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. ∂y C R ∂x 6.

I

y 2 dx + x2 dy = C

+

Z

Z

y 2 dx + x2 dy + C1

Z

y 2 dx + x2 dy C2

y 2 dx + x2 dy C3

Along C1 , y = dy = 0 and Z

y 2 dx + x2 dy = C1

Z

1 0

0 dx + x2 · 0 = 0.

Along C2 , x = 1 and dx = 0 and Z

2

2

y dx + x dy = C2

Z

1 0

y 2 · 0 + 12 dy = 1.

121

Worked Solutions Along C3 , y = x and dy = dx and 0 Z Z 0 2 2 2 2 2 3 x dx + x dx = 3 x = − 32 . y dx + x dy = 1

C3

Thus,

I

C

1

y 2 dx + x2 dy = 13 .

By Green’s lemma,  I ZZ  ∂ 2 ∂ 2 (x ) − (y ) dx dy y 2 dx + x2 dy = ∂y C R ∂x x Z 1 Z 1Z x 2 (2xy − y ) dx (2x − 2y) dy dx = = Z

=

7.

I

C

−y 2 dx + x2 dy =

Z

=8 =8

0

0

0

0

1

x2 dx = 13 .

0



[−4 sin2 (θ)][−2 sin(θ) dθ]

0

Z

Z

+ [4 cos2 (θ)][2 cos(θ) dθ] 2π

[cos3 (θ) + sin3 (θ)] dθ

0 2π 0

{cos(θ)[1 − sin2 (θ)] + sin(θ)[1 − cos2 (θ)]}dθ

 = 8 sin(θ) −

1 3

3

sin (θ) − cos(θ) +

1 3

 2π cos (θ) = 0 3

0

By Green’s lemma,  I ZZ  ∂ ∂ 2 (x ) − (−y 2 ) dx dy −y 2 dx + x2 dy = ∂y C R ∂x Z 2 Z 2π [2r cos(θ) + 2r sin(θ)] r dθ dr = 0

8.

I

2

C

2

−x dx + xy dy =

Z

0

2π 2 2r3 [sin(θ) − cos(θ)] = 0. = 3 0 0 2π

[−a2 cos2 (θ)][−a sin(θ) dθ] 0

+ [a3 cos(θ) sin2 (θ)][a cos(θ) dθ] 2π  2π a3 a4  a4 π = − cos3 (θ) + θ − 41 sin(4θ) = . 3 8 4 0 0

122

Advanced Engineering Mathematics with MATLAB

By Green’s lemma,  I ZZ  ∂ ∂ 2 2 2 2 −x dx + xy dy = (xy ) − (−x ) dx dy ∂y C R ∂x Z a Z 2π [r2 sin2 (θ)] r dθ dr = =

0 0 4 a  r 1 θ 4 0 2



1 2

 2π a4 π sin(2θ) = . 4 0

9. Let x = 1 + 2 cos(θ) and y = 2 + 2 sin(θ) . Then, I Z 2π [12 + 12 sin(θ) + 1 + 2 cos(θ)] (6y + x) dx + (y + 2x) dy = 0

C

× [−2 sin(θ) dθ] + [2 + 2 sin(θ) + 2 + 4 cos(θ)]

=

Z

2π 0

× [2 cos(θ) dθ] [−26 sin(θ) − 24 sin2 (θ)

+ 8 cos(θ) + 8 cos2 (θ)] dθ 2π 2π = 26 cos(θ) 0 − 12[θ − 12 sin(2θ)] 0 2π 2π + 8 sin(θ) 0 + 4[θ + 21 sin(2θ)] 0 = −16π.

By Green’s lemma,  I ZZ  ∂ ∂ (6y + x) dx + (y + 2x) dy = (y + 2x) − (6y + x) dx dy ∂y C R ∂x Z 2 Z 2π r dθ dr = (−4)(2π)(2) = −16π. = −4 0

0

10.

I

C

(x + y) dx + (2x2 − y 2 ) dy = +

For C1 , y = x2 and Z Z (x + y) dx + (2x2 − y 2 ) dy = C1



Z

Z

C1

C2

(x + y) dx + (2x2 − y 2 ) dy

(x + y) dx + (2x2 − y 2 ) dy

2 −2

(x + x2 ) dx + (2x2 − x4 )(2x dx)

 2 x2 x3 x6 4 = = + +x − 2 3 3 −2

16 3 .

123

Worked Solutions For C2 , y = 4 and Z Z (x + y) dx + (2x2 − y 2 ) dy = C2



Therefore,

I

−2 2

(x + 4) dx + (2x2 − 16) · 0

 −2 x2 = + 4x = −16. 2 2

C

(x + y) dx + (2x2 − y 2 ) dy = −

32 . 3

By Green’s lemma,  I ZZ  ∂ ∂ (x + y) dx + (2x2 − y 2 ) dy = (2x2 − y 2 ) − (x + y) dx dy ∂y C R ∂x Z 2Z 4 (2x − 1) dy dx = =

Z

x2

−2 2

−2

(−4 + 8x + x2 − 2x3 ) dx

 2  = −4x + 4x2 + 31 x3 − 12 x4 = − 32 3 . −2

11.

I

Z

3y dx + 2x dy = C

For C1 , y = 0 and Z

3y dx + 2x dy + C1

3y dx + 2x dy =

C1

For C2 , y = sin(x) and Z Z 3y dx + 2x dy = C2

Z

Z

3y dx + 2x dy C2

π 0

3 · 0 · dx + 2x · 0 = 0.

0

3 sin(x) dx + 2x cos(x) dx π

0 0 = −3 cos(x) π + 2[x sin(x) + cos(x)] π = −2.

Therefore,

I

C

3y dx + 2x dy = −2.

By Green’s lemma,  ZZ  I Z π Z sin(x) ∂ ∂ 3y dx + 2x dy = dy dx (2x) − (3y) dx dy = − ∂x ∂y C 0 0 Z πR π sin(x) dx = cos(x) 0 = −2. = 0

124

Advanced Engineering Mathematics with MATLAB

12.

I

C

−16y dx + (4ey + 3x2 ) dy = + +

Z

Z

Z

C1

−16y dx + (4ey + 3x2 ) dy

C2

−16y dx + (4ey + 3x2 ) dy

C3

−16y dx + (4ey + 3x2 ) dy

For C1 , y = x and Z

y

C1

2

−16y dx + (4e + 3x ) dy =

Z



2

−16x dx + (4ex + 3x2 ) dx

0

√ √ √  2 = −8x + 4e + x = 4e 2 + 2 2 − 20. 2

x

3

0

For C2 , x = 2 cos(θ), y = 2 sin(θ) and Z

C2

−16y dx + (4ey + 3x2 ) dy =

Z

3π/4

−16[2 sin(θ)][−2 sin(θ) dθ]

π/4

+ [4e2 sin(θ) + 12 cos2 (θ)][2 cos(θ) dθ]  = 32[θ − 21 sin(2θ)] + 4e2 sin(θ)

 + 24 sin(θ) −

1 3

sin3 (θ)

π/4

For C3 , y = −x and Z

C3

−16y dx + (4ey + 3x2 ) dy =

Z

0 √

16xdx + (4e−x + 3x2 ) (−dx)

− 2 2

= 8x + 4e = −4e Therefore,

I

C

  3π/4 = 32 + 16π.



2

−x

 0 − x √ 3

− 2

√ − 2 2 − 12.

−16y dx + (4ey + 3x2 ) dy = 16π.

By Green’s lemma, I

y

C

2

−16y dx + (4e + 3x ) dy =

ZZ  R

 ∂ ∂ y 2 (4e + 3x ) − (−16y) dx dy ∂x ∂y

125

Worked Solutions I

C

Z

−16y dx + (4ey + 3x2 ) dy =

Z

=

Z

=

3π/4 π/4 2 0

Z

2

[6r cos(θ) + 16] r dr dθ 0

3π/4 [6r sin(θ) + 16θ] r dr π/4

2 0

2 8πr dr = 4πr2 = 16π. 0

Section 4.7 1. I

C

F · dr = +

Z

Z

C1

5y dx − 5x dy + 3z dz +

C3

5y dx − 5x dy + 3z dz +

Z

Z

C2

5y dx − 5x dy + 3z dz

C4

5y dx − 5x dy + 3z dz

Along C1 , y = 0, z = 1, dy = dz = 0, and Z

C1

Z

5y dx − 5x dy + 3z dz =

1

0 dx − 5x · 0 + 3 · 0 = 0.

0

Along C2 , x = z = 1, dx = dz = 0, and Z

C2

5y dx − 5x dy + 3z dz =

Z

1

5y · 0 − 5 dy + 3 · 0 = −5.

0

Along C3 , y = z = 1, dy = dz = 0, and Z

C3

5y dx − 5x dy + 3z dz =

Z

0

5 dx − 5x · 0 + 3 · 0 = −5.

1

Along C4 , x = 0, z = 1, dx = dz = 0, and Z Thus,

Now,

C4

5y dx − 5x dy + 3z dz = I

C

Z

0 1

5y · 0 − 0 dy + 3 · 0 = 0.

F · dr = −10.

i ∂ ∇ × F = ∂x 5y

j ∂ ∂y

−5x

k ∂ ∂z = −10k 5z

126

Advanced Engineering Mathematics with MATLAB ZZ

S

∇ × F · n dσ =

Z

1 0

Z

1

−10k · k dx dy = −10.

0

2. I

C

F · dr = +

Z

Z

x2 dx + y 2 dy + z 2 dz + C1

x2 dx + y 2 dy + z 2 dz + C3

Z

Z

Along C1 , y = 0, z = 2, dy = dz = 0, and Z Z x2 dx + y 2 dy + z 2 dz = C1

Thus,

I

Now,

ZZ 3.

I

C

C

F · dr = +

∇ × F · n dσ = Z

Z C1 C3

0

y 2 dy = 13 .

x2 dx = − 83 .

2

0 1

y 2 dy = − 31 .

F · dr = 0.

i ∂ ∇ × F = ∂x x2

S

1

0

Along C4 , x = 0, z = 2, dx = dz = 0, and Z Z 2 2 2 x dx + y dy + z dz = C4

x2 dx = 83 .

0

C2

C3

x2 dx + y 2 dy + z 2 dz C4

2

Along C2 , x = z = 2, dx = dz = 0, and Z Z x2 dx + y 2 dy + z 2 dz = Along C3 , y = 1, z = 2, dy = dz = 0, and Z Z x2 dx + y 2 dy + z 2 dz =

x2 dx + y 2 dy + z 2 dz C2

j ∂ ∂y 2

y Z

2 0

Z

1 0

k ∂ ∂z = 0. z2

0 · k dy dx = 0.

z dx + x dy + y dz + z dx + x dy + y dz

Z

z dx + x dy + y dz C2

127

Worked Solutions Along C1 , y = 0 and z = 1, so that Z

z dx + x dy + y dz = C1

Z

2

dx = 2. 0

Along C2 , y = 2 − x and z = 1, so that Z

z dx + x dy + y dz = C2

Z

0

dx + x(−dx) = 2



x−

1 2 2x

Along C3 , x = 0 and z = 1, so that Z

z dx + x dy + y dz = C3

Thus,

Now,

I

C

Z

2

0

0 dy = 0. 2

F · dr = 2.

i j k ∂ ∂ ∂ ∇ × F = ∂x ∂y ∂z = i + j + k. z x y ZZ Z 2 Z 2−x [i + j + k] · k dy dx ∇ × F · n dσ = S

=

Z

0

0

2

0

(2 − x) dx = 2x −

4. Because x = 2 cos(θ), y = 2 sin(θ), and z = 5, I Z F · dr = 2z dx − 3x dy + 4y dz C

= = Now,

 0 = 0.

Z

1 2 2x

 2 = 2. 0

C 2π 0

10[−2 sin(θ) dθ] − 3[2 cos(θ)][2 cos(θ) dθ] + 8 sin(θ) · 0

  20 cos(θ) − 6 θ +

1 2

sin(2θ)

  2π = −12π 0

i j k ∂ ∂ ∂ ∇ × F = ∂x ∂y ∂z = 4i + 2j − 3k. 2z −3x 4y 2 2π ZZ Z 2π Z 2 r2 [4i + 2j − 3k] · k r dr dθ = −3 θ = −12π. ∇ × F · n dσ = 2 0 0 0 0 S

128

Advanced Engineering Mathematics with MATLAB

5.

I

C

F · dr = +

Z

Z

z dx + x dy + y dz + C1

Z

z dx + x dy + y dz C2

z dx + x dy + y dz C3

Along C1 , y = 0 and z = 3, so that Z Z z dx + x dy + y dz = C1

2

3 dx = 6. 0

Along C2 , x = 2 cos(θ), y = 2 sin(θ), and z = 3 so that Z Z π/2 3[−2 sin(θ) dθ] + [2 cos(θ)][2 cos(θ) dθ] z dx + x dy + y dz = 0

C2

  = 6 cos(θ) + 2 θ +

Along C3 , x = 0 and z = 3, so that Z Z z dx + x dy + y dz = C3

Thus,

Now,

6.

I

C

1 2

sin(2θ)

  π/2 = π − 6. 0

0

0 dy = 0. 2

F · dr = π.

i j k ∂ ∂ ∂ ∇ × F = ∂x ∂y ∂z = i + j + k. z x y 2 π/2 ZZ Z π/2 Z 2 r2 = π. θ [i + j + k] · k r dr dθ = ∇ × F · n dσ = 2 0 0 0 0 S I

C

F · dr = + +

Z

Z

Z

C1

(2z + x) dx + (y − z) dy + (x + y) dz

C2

(2z + x) dx + (y − z) dy + (x + y) dz

C3

(2z + x) dx + (y − z) dy + (x + y) dz

Along C1 , z = 0 and x + y = 1, so that Z Z (2z + x) dx + (y − z) dy + (x + y) dz = C1

0 1

x dx + (1 − x) (−dx) + 0

0 = [x2 − x] 1 = 0.

129

Worked Solutions Along C2 , x = 0 and y + z = 1, so that Z

C2

(2z + x) dx + (y − z) dy + (x + y) dz =

C3

(2z + x) dx + (y − z) dy + (x + y) dz =

Thus,

I

Now,

1

(1 − 2z) (−dz) + (1 − z) dz

0

1 = 21 z 2 0 = 12 .

Along C3 , y = 0 and x + z = 1, so that Z

Z

Z

1

[x + 2(1 − x)] dx + x (−dx)

0

1 = (2x − x2 ) 0 = 1.

F · dr = 23 .

C

i ∂ ∇ × F = ∂x 2z + x

j

∂ ∂z = 2i + j. x+y k

∂ ∂y

y−z

Because r = xi + yj + (1 − x − y)k, rx = i − k and ry = j − k, ZZ

rx × ry = i + j + k. S

∇ × F · n dσ =

Z

=3

7.

I

C

F · dr = +

Z

Z

1 0

Z

Z

1−x 0

[(2i + j) · (i + j + k)] dy dx

1

(1 − x) dx = 3 x −

0

z dx + x dy + y dz + C1

Z

1 2 2x

 1 = 3. 2 0

z dx + x dy + y dz C2

z dx + x dy + y dz C3

Along C1 , z = 0 and 2x + y = 6, so that Z

z dx + x dy + y dz = C1

Z

0 3

0 dx + x(−2 dx) + (6 − 2x) · 0 = 9.

Along C2 , x = 0 and y + 2z = 6, so that Z

z dx + x dy + y dz = C2

Z

3 0

 3 z · 0 + 0 (−2 dz) + (6 − 2z) dz = 6z − z 2 0 = 9.

130

Advanced Engineering Mathematics with MATLAB

Along C3 , y = 0 and x + z = 3, so that Z

z dx + x dy + y dz = C3

Z

3 0

Thus,

 3 (3 − x) dx + x · 0 + 0(−dx) = 3x − 21 x2 = 92 . 0

I

Now,

C

F · dr =

i ∂ ∇ × F = ∂x z

45 2 .

k ∂ ∂z = i + j + k. y

j ∂ ∂y

x

Because r = xi + yj + (3 − x − y/2)k, rx = i − k, and ry = j − 12 k,

ZZ

i j rx × ry = 1 0 0 1

S

∇ × F · n dσ =

=

Z 5 2

3

6−2x

0 3

0

Z

Z

0

k −1 = i + 21 j + k. − 21

[(i + j + k) · (i + 12 j + k)] dy dx

(6 − 2x) dx =

45 2 .

8. Because x = 2 cos(θ), y = 2 sin(θ), and z = 5, I

C

F · dr = =

Z

Z

x dx + zx dy + y dz C 2π

[2 cos(θ)][−2 sin(θ) dθ] + 5[2 cos(θ)][2 cos(θ) dθ] 0



2

= 2 cos (θ) + 10[θ + Now,

i ∂ ∇ × F = ∂x x

j ∂ ∂y

zx

1 2

2π sin(2θ)] = 20π. 0

k ∂ ∂z = (1 − x)i + zk. y

Because r = r cos(θ)i + r sin(θ)j + (9 − r2 )k, rr = cos(θ)i + sin(θ)j − 2rk, and rθ = −r sin(θ)i + r cos(θ)j, rr × rθ = 2r2 cos(θ)i + 2r2 sin(θ)j + rk.

131

Worked Solutions ZZ

S

∇ × F · n dσ =

Z

=

Z

2π 0

0

Z

2

{[1 − r cos(θ)]i + (9 − r2 )k}

0

2π Z

· [2r2 cos(θ)i + 2r2 sin(θ)j + rk] dr dθ 2

[2r2 cos(θ) − 2r3 cos2 (θ) + 9r − r3 ] dr dθ

0

Z 2  2r2 sin(θ) − r3 θ + =

 2π sin(2θ) + (9r − r )θ dr 0 0  2  Z 2 (9r − 2r3 ) dr = 2π 29 r2 − 12 r4 = 20π. = 2π 0

Section 4.8 1.

1 2



3

0

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

Along the surface S1 , z = 1 and n = k, ZZ

S1

Z

F · n dσ =

Z

1 0

1

[x2 i + y 2 j + k] · k dx dy = 1.

0

Along the surface S2 , z = 0 and n = −k, ZZ

S2

F · n dσ =

Z

1 0

Z

1

[x2 i + y 2 j + 0k] · [−k] dx dy = 0.

0

Along the surface S3 , x = 1 and n = i, ZZ

S3

F · n dσ =

Z

1 0

Z

1 0

[i + y 2 j + z 2 k] · i dy dz = 1.

Along the surface S4 , x = 0 and n = −i, ZZ

S4

F · n dσ =

Z

1 0

Z

1 0

[0i + y 2 j + z 2 k] · [−i] dy dz = 0.

Along the surface S5 , y = 1 and n = j, ZZ

S5

F · n dσ =

Z

1 0

Z

1 0

[x2 i + j + z 2 k] · j dx dz = 1.

132

Advanced Engineering Mathematics with MATLAB

Along the surface S6 , y = 0 and n = −j, ZZ

S6

Z

F · n dσ =

Z

1 0

Thus,

1

[x2 i + 0j + z 2 k] · [−j] dx dz = 0.

0

ZZ ⊂⊃ F · n dσ = 3. S

Because ∇ · F = 2x + 2y + 2z, ZZZ Z 1Z 1Z 1 (2x + 2y + 2z) dx dy dz ∇ · F dV = V

Z

= +

0

0

1

0 Z 1

0 Z 1

0

0

2.

Z

1

Z

0

1

2x dx dy dz +

0 Z 1

Z

1

0

Z

1

0

Z

1

2y dx dy dz 0

2z dx dy dz = 3

0

ZZ ZZ ZZ ZZ F · n dσ F · n dσ + F · n dσ + ⊂⊃ F · n dσ = S3 S2 S1 S ZZ ZZ ZZ + F · n dσ + F · n dσ + F · n dσ S4

S5

S6

Along the surface S1 , z = 1 and n = k, ZZ

S1

F · n dσ =

Z

1 0

Z

1

[xyi + yj + xk] · k dx dy =

0

Z

1 0

Z

1 0

x dx dy = 12 .

Along the surface S2 , z = 0 and n = −k, ZZ

S2

F · n dσ =

Z

1 0

Z

1 0

[xyi + 0j + 0k] · [−k] dx dy = 0.

Along the surface S3 , x = 1 and n = i, ZZ

S3

F · n dσ =

Z

1 0

Z

1 0

[yi + yzj + zk] · i dy dz =

Z

1 0

Z

1 0

y dy dz = 12 .

Along the surface S4 , x = 0 and n = −i, ZZ

S4

F · n dσ =

Z

1 0

Z

1 0

[0i + yzj + 0k] · [−i] dy dz = 0.

133

Worked Solutions Along the surface S5 , y = 1 and n = j, Z ZZ Z 1Z 1 [xi + zj + xzk] · j dx dz = F · n dσ = 0

0

S5

1 0

Z

1 0

z dx dz = 12 .

Along the surface S6 , y = 0 and n = −j, ZZ Z 1Z 1 [0i + 0j + xzk] · [−j] dx dz = 0. F · n dσ = 0

0

S6

Thus,

ZZ ⊂⊃ F · n dσ = 32 . S

Because ZZZ

V

∇ · F dV = = +

Z

1

0

Z

1

0 Z 1 0

3.

∇ · F = x + y + z, Z 1Z 1 (x + y + z) dx dy dz

Z

0

1

0 Z 1 0

Z

0

1

0 Z 1 0

x dx dy dz +

Z

1

0

Z

1

0

Z

1

y dx dy dz 0

z dx dy dz = 32 .

ZZ ZZ ZZ ZZ ⊂⊃ F · n dσ = F · n dσ + F · n dσ + F · n dσ S ZZ S3 ZZ S2 ZZ S1 F · n dσ F · n dσ + F · n dσ + + S6

S5

S4

Along the surface S1 , z = 1 and n = k, Z 1Z 1 ZZ [(y − x)i + (1 − y)j + (y − x)k] · k dx dy F · n dσ = S1

=

Z

−1 1

−1

= −2

Z

Z

−1 1

−1 1

(y − x) dx dy =

Z

1

−1



1 2 2y

x dx = 0.

 1 − yx dx −1

−1

Along the surface S2 , z = −1 and n = −k, ZZ Z 1Z 1 [(y − x)i + (−1 − y)j + (y − x)k] · [−k] dx dy F · n dσ = −1

S2

=− =2

Z

Z

1

−1

−1 1

Z

1

−1

(y − x) dx dy = −

x dx = 0. −1

Z

1

−1



1 2 2y

 1 − yx dx −1

134

Advanced Engineering Mathematics with MATLAB

Along the surface S3 , x = 1 and n = i, Z 1Z 1 ZZ [(y − 1)i + (z − y)j + (y − 1)k] · i dy dz F · n dσ = S3

Z

=

−1 1

Z

−1

= −2

Z

−1 1

−1 1

(y − 1) dy dz =

Z

1

−1



1 2 2y

dz = −4.

−1

 1 − y dz −1

Along the surface S4 , x = −1 and n = −i, ZZ Z 1Z 1 [(y + 1)i + (z − y)j + (y + 1)k] · [−i] dy dz F · n dσ = −1

S4

=−

Z

= −2

1

−1

Z

1

−1 −1 1

Z

(y + 1) dy dz = −

Z

1

−1



1 2 2y

dz = −4.

−1

 1 + y dz −1

Along the surface S5 , y = 1 and n = j, ZZ Z 1Z 1 [(1 − x)i + (z − 1)j + (1 − x)k] · j dx dz F · n dσ = S5

=

Z

−1 1

−1

= −2

Z

Z

−1 1

−1 1

−1

(z − 1) dz dx =

Z

1

−1



1 2 2z

dx = −4.

 1 − z dx −1

Along the surface S6 , y = −1 and n = −j, ZZ Z 1Z 1 [(−1 − x)i + (z + 1)j + (−1 − x)k] · [−j] dx dz F · n dσ = −1

S6

=−

Z

= −2

1

−1

Z

1

−1 −1 Z 1 −1

Thus,

(z + 1) dz dx = −

Z

1

−1

dx = −4.



1 2 2z

 1 + z dx −1

ZZ ⊂⊃ F · n dσ = −16. S

Because ∇ · F = −2

ZZZ

V

∇ · F dV =

Z

1 −1

Z

1 −1

Z

1 −1

−2 dx dy dz = −16.

135

Worked Solutions 4.

ZZ ZZ ⊂⊃ F · n dσ = S

F · n dσ +

S1

ZZ

S2

F · n dσ +

ZZ

S3

F · n dσ

Along the surface S1 , z = 1 and n = k, ZZ Z 2π Z 1 [r2 cos2 (θ)i + r sin(θ)j + k] · k r dr dθ = π. F · n dσ = 0

0

S1

Along the surface S2 , z = 0 and n = −k, ZZ Z 2π Z 1 [r2 cos2 (θ)i + r sin(θ)j] · [−k] r dr dθ = 0. F · n dσ = 0

0

S2

Along the surface S3 , n = xi + yj, x = cos(θ) and y = sin(θ), Z 2π Z 1 ZZ [cos2 (θ)i + sin(θ)j + zk] · [cos(θ)i + sin(θ)j] dz dθ F · n dσ = S3

=

Z



0



0

Z

0

1

[cos3 (θ) + sin2 (θ)] dz dθ

0

= sin(θ) −

3

1 3

Thus,

sin (θ) +

1 2 [θ



1 2

ZZ ⊂⊃ F · n dσ = 2π.

 2π sin(2θ)] = π. 0

S

Because ZZZ

V

∇ · F dV = 2 =2

5.

Z

Z

1 0 1 0

Z

Z

1 0

0

ZZ ZZ ⊂⊃ F · n dσ = S

Z

1

S1

∇ · F = 2x + 2,



[r cos(θ) + 1] dθ r dr dz 0

 2π r sin(θ) + θ 0 r dr dz = 4π

F · n dσ +

ZZ

S2

F · n dσ +

Z

ZZ

0

S3

1

1 r2 dz = 2π. 2 0

F · n dσ

Along the surface S1 , z = 1 and n = k, ZZ Z 2π Z 2 [r2 cos2 (θ)i + r2 sin2 (θ)j + k] · k r dr dθ = 4π. F · n dσ = S1

0

0

Along the surface S2 , z = 0 and n = −k, ZZ Z 2π Z 2 [r2 cos2 (θ)i + r2 sin2 (θ)j] · [−k] r dr dθ = 0. F · n dσ = S2

0

0

136

Advanced Engineering Mathematics with MATLAB

Along the surface S3 , n = xi/2 + yj/2, x = 2 cos(θ) and y = 2 sin(θ), Z 2π Z 1 ZZ [4 cos2 (θ)i + 4 sin2 (θ)j + z 2 k] F · n dσ = 0

S3

=8

0

Z

Z

2π 0

1

· [cos(θ)i + sin(θ)j] 2 dz dθ

[cos3 (θ) + sin3 (θ)] dz dθ

0

 = 8 sin(θ) − Thus,

1 3

sin3 (θ) − cos(θ) +

1 3

ZZ ⊂⊃ F · n dσ = 4π.

 2π cos3 (θ) = 0. 0

S

Because ZZZ

V

∇ · F = 2x + 2y + 2z, 1 Z 2 Z 2π [r cos(θ) + r sin(θ) + z] dθ r dr dz ∇ · F dV = 2 Z

=2

Z

= 4π 6.

ZZ ZZ ⊂⊃ F · n dσ = S

0

Z

1

0

Z

S1

0

0

0

1 0

1

 2π r sin(θ) − r cos(θ) + zθ 0 r dr dz

2 1 r2 z dz = 4π z 2 0 = 4π. 2 0

F · n dσ +

ZZ

S2

F · n dσ +

ZZ

S3

F · n dσ

Along the surface S1 , z = 5 and n = k, Z 2π Z 2 ZZ [r2 sin2 (θ)i + 125r cos(θ)j + 16k] · k r dr dθ = 64π. F · n dσ = 0

S1

0

Along the surface S2 , z = 1 and n = −k, ZZ Z 2π Z 2 [r2 sin2 (θ)i + r cos(θ)j] · [−k] r dr dθ = 0. F · n dσ = 0

0

S2

Along the surface S3 , n = xi/2 + yj/2, x = 2 cos(θ) and y = 2 sin(θ), ZZ Z 5 Z 2π [4 sin2 (θ)i + 2z 3 cos(θ)j + (z − 1)2 k] F · n dσ = 0

1

S3

=2 =2

Z

Z

5 1 5 1

Z



· [cos(θ)i + sin(θ)j] 2 dθ dz

[4 sin2 (θ) cos(θ) + 2z 3 cos(θ) sin(θ)] dθ dz

0

 2π dz = 0. 3 sin (θ) + z sin (θ)

4

3

3

2

0

137

Worked Solutions Thus,

ZZ ⊂⊃ F · n dσ = 64π. S

Because ZZZ

V

∇ · F dV = 2

7. ZZ ZZ ⊂⊃ F · n dσ = S

Z

Z

5 1

S1

2 0

Z

∇ · F = 2(z − 1),

2π 0

(z − 1) dθ r dr dz =

F · n dσ +

ZZ

S2

ZZ

F · n dσ +

5 2 2π r2 2 (z − 1) θ = 64π. 2 0 0 1

S3

F · n dσ +

ZZ

S4

F · n dσ

Along the surface S1 , z = 0 and n = −k, ZZ Z 1 Z 1−x   6xyi + xe−y k · [−k] dy dx F · n dσ = S1

= =

Z

Z

0

1

0 1

Z

0

1−x

−xe−y dy dx =

0

xe

x−1

0





Z

1

0

1−x xe−y 0 dx

− x dx = (x − 1)e

x−1



1 2 2x

 1 = e−1 − 1 . 2 0

Along the surface S2 , x = 0 and n = −i, Z 1 Z 1−z ZZ 4yzj · [−i] dy dz = 0. F · n dσ = 0

S2

0

Along the surface S3 , y = 0 and n = −j, ZZ Z 1 Z 1−x xk · [−j] dz dx = 0. F · n dσ = 0

S3

0

Along the slanted roof, r = xi + yj + (1 − x − y)k, rx = i − k, ry = j − k, and rx × ry = i + j + k, so that ZZ Z 1 Z 1−x   6xyi + 4y(1 − x − y)j + xe−y k · [i + j + k] dy dx F · n dσ = S4

= = = =

Z

Z

Z



0

1

0 1 0 1 0

Z





0

1−x

0 2

2

xy + 2y −

4 3 3y

− xe

−y

 1−x dx 0

 3(1 − x)2 − 37 (1 − x)3 − xex−1 + x dx

7 12 (1

=1−

 2xy + 4y − 4y 2 + xe−y dy dx

 1 − x)4 − (1 − x)3 − (x − 1)ex−1 + 12 x2

7 12

0

− e−1 + 12 .

138

Advanced Engineering Mathematics with MATLAB

Thus,

ZZ ⊂⊃ F · n dσ = S

Because ZZZ

V

Z

∇ · F dV =

Z

=

Z

=

Z

=

1

0 1 0 1 0

5 3

= 8.

0

1Z

Z

Z Z

5 12 .

∇ · F = 6y + 4z, 1−x Z 1−x−y (6y + 4z) dz dy dx 0

0

1−x

0 1−x

1−x−y dy dx (6yz + 2z 2 ) 0

[2(1 − x)2 + 2(1 − x)y − 4y 2 ] dy dx

0

1−x [2(1 − x)2 y + (1 − x)y 2 − 34 y 3 ] 0 dx 1

0

1 5 (1 − x)3 dx = − 12 (1 − x)4 0 =

ZZ ZZ ⊂⊃ F · n dσ = S

S1

F · n dσ +

ZZ

S2

5 12 .

F · n dσ

Along the surface S1 , z = 1 and n = k, ZZ

S1

F · n dσ =

Z

2π 0

Z

1 0

[r sin(θ)i + r2 sin(θ) cos(θ)j − k] · k r dr dθ = −π.

Along the surface S2 , r = r cos(θ)i+r sin(θ)j+r2 k, rr = cos(θ)i+sin(θ)j+2rk, rθ = −r sin(θ)i + r cos(θ)j, and rr × rθ = −2r2 cos(θ)i − 2r2 sin(θ)j + rk, so that ZZ Z 1 Z 2π [r sin(θ)i + r2 sin(θ) cos(θ)j − r2 k] F · n dσ = 0

0

S2

= =

Z

Z

1 0 1



[2r3 sin(θ) cos(θ) + 2r4 sin2 (θ) cos(θ) + r3 ] dθ dr

0 3

2

[r sin (θ) + 0

= 2π Thus,

Z

· [2r2 cos(θ)i + 2r2 sin(θ)j − rk] dθ dr

Z

1 0

2 4 3r

2π sin (θ) + r θ] dr 3

π 1 π r3 dr = r4 = . 2 0 2

ZZ π ⊂⊃ F · n dσ = − . 2 S

3

0

139

Worked Solutions Because ZZZ

V

∇ · F dV = =

Z

Z

0

0

1Z

1Z

1Z

r2 1 r2

= −2π



1 a0 = π

Z

1 an = π bn =

1 π

Z

Z



[r cos(θ) − 1] dθ dz r dr

0

2π [r sin(θ) − θ] 0 dz r dr = −2π

 1 r4 r2 π − =− 2 4 0 2

Section 5.1 1.

∇ · F = x − 1,

0

1 1 dt + π −π

0

1 1 cos(nt) dt + π −π

0

1 sin(nt) dt + −π

1 π

f (t) =

2. a0 =

an =

1 π

1 π

Z

Z

Z

π 0

π 0

π 0

t dt +

0

(1 − r2 ) r dr

0 t 0 dt = = 1 π −π

0 sin(nt) 0 cos(nt) dt = =0 nπ −π

0 sin(nt) dt = −

1 π

Z

π

0 dt = 0

0

t cos(nt) dt + −π

1

0 (−1)n − 1 cos(nt) = nπ −π nπ

∞ 1 2 X sin[(2m − 1)t] − 2 π m=1 2m − 1

0 −π

Z

Z

Z

1 π

Z

π

0 π t2 =− 2π −π 2

0 cos(nt) dt 0

  0 n t 1 cos(nt) = 1 − (−1) + sin(nt) = π n2 n n2 π −π

1 bn = π =

f (t) = −

Z

0

1 t sin(nt) dt + π −π

Z

π

0 sin(nt) dt

0

  0 n 1 sin(nt) t = − (−1) − cos(nt) 2 π n n n −π

∞ ∞ 2 X cos[(2m − 1)t] X (−1)n π − + sin(nt) 4 π m=1 (2m − 1)2 n n=1

140

Advanced Engineering Mathematics with MATLAB

3. a0 =

an =

1 π

Z

1 π Z

0 −π

−π dt +

1 π

Z

π 0

0 −π

−π cos(nt) dt +

0 π 1 2 π t 0 =− t dt = −t −π + 2π 2

1 π

Z

π

t cos(nt) dt 0

0   π n sin(nt) 1 cos(nt) t = (−1) − 1 =− + + sin(nt) n −π π n2 n n2 π 0 Z 1 π −π sin(nt) dt + t sin(nt) dt π 0 −π 0   π n 1 sin(nt) cos(nt) t = 1 − 2(−1) + = − cos(nt) 2 n π n n n −π 0

1 bn = π

Z

0

f (t) = −



1 − 2(−1)n π X (−1)n − 1 + cos(nt) + sin(nt) 4 n=1 n2 π n

4. Because f (t) is an even function, bn = 0. Then   Z  1 1 1 1 + t dt + − t dt 2 1 0 2 −1  Z 1  1 1 − t dt = t − t2 0 = 0 =2 2 0

1 a0 = 1

Z

0



  Z  1 1 1 1 + t cos(nπt) dt + − t cos(nπt) dt 2 1 0 2 −1   Z 1 1 =2 − t cos(nπt) dt 2 0 1  1  2[1 − (−1)n ] sin(nπt) cos(nπt) t sin(nπt) = − 2 = + 2 2 nπ n π nπ n2 π 2

1 an = 1

Z

0



0

0

f (t) =

∞ ∞ 4 X cos[(2m − 1)πt] 2 X [1 − (−1)n ] cos(nπt) = π 2 n=1 n2 π 2 m=1 (2m − 1)2

5. a0 =

1 π

Z

π/2

t dt + 0

1 π

Z

π π/2

(π − t) dt =

π/2 π π t2 π t2 + t = − 2π 0 2π 4 π/2 π/2

141

Worked Solutions an =

1 π

Z

π/2

t cos(nt) dt + 0

1 π

Z

π π/2

(π − t) cos(nt) dt

π  π/2 cos(nt) t sin(nt) + sin(nt) + n2 n n π/2 0   π 1 cos(nt) t 4 cos(nπ/2) sin2 (nπ/4) − + sin(nt) , = π n2 n n2 π π/2 =

1 π



where we have used the identities 1+cos(nπ) = 2 cos2 (nπ/2) and 1−cos(nπ/2) = 2 sin2 (nπ/4). bn =

1 π

Z

π/2

t sin(nt) dt + 0

1 π

Z

π π/2

(π − t) sin(nt) dt

π  π/2 cos(nt) sin(nt) t − − cos(nt) n2 n n π/2 0   π 2 sin(nπ/2) 1 sin(nt) t = − − cos(nt) 2 π n n πn2 π/2 =

f (t) =

1 π



∞ π 2 X 2 cos(nπ/2) sin2 (nπ/4) sin(nπ/2) + cos(nt) + sin(nt) 8 π n=1 n2 n2

6. Because f (t) is an odd function, a0 = an = 0. If n 6= 2, bn = =

1 π 1 π

Z

π/2

sin(2t) sin(nt) dt = −π/2



2 π

Z

π/2

sin(2t) sin(nt) dt 0

 π/2 sin[(n − 2)t] sin[(n + 2)t] 4 sin(nπ/2) =− − n−2 n+2 π(n2 − 4) 0

Z 1 π/2 sin (2t) dt = [1 − cos(4t)] dt π 0 0 π/2 π/2 1 1 1 − = = t sin(4t) π 0 4π 2 0

2 b2 = π

f (t) =

Z

π/2

2

∞ 4 X 1 (−1)m sin(2t) + sin[(2m − 1)t] 2 π m=1 [(2m − 1)2 − 4]

7. 1 a0 = L

Z

L 2 1 at = e dt = e sinh(aL) aL aL −L −L L

at

142

Advanced Engineering Mathematics with MATLAB 

 nπt e cos dt L −L   L    1 nπ eat nπt nπt = + a cos sin L a2 + n2 π 2 /L2 L L L −L Z

1 an = L

L

at

2aL(−1)n sinh(aL) a2 L2 + n2 π 2   Z nπt 1 L at dt e sin bn = L −L L   L    1 nπ eat nπt nπt = − a sin cos L a2 + n2 π 2 /L2 L L L −L =

=−

f (t) =

8.

  ∞ X sinh(aL) (−1)n nπt cos + 2aL sinh(aL) aL a2 L2 + n2 π 2 L n=1   ∞ X n(−1)n nπt − 2π sinh(aL) sin a2 L2 + n2 π 2 L n=1

L 2L2 2t3 = 3L 0 3 −L 0     Z L Z L 2 nπt nπt 1 (t + t2 ) cos t2 cos dt = dt an = L −L L L 0 L   L 2 n 2 2t cos(nπt/L) n2 π 2 t2 /L2 − 2 = 4L (−1) = − sin(nπt/L) L n2 π 2 /L2 n3 π 3 /L3 n2 π 2 0     Z L Z L 2 nπt nπt 1 dt = dt (t + t2 ) sin t sin bn = L −L L L 0 L  2   L   2 Lt L 2L nπt nπt n = − sin cos = − nπ (−1) L n2 π 2 L nπ L 0     ∞ ∞ L2 2L X (−1)n 4L2 X (−1)n nπt nπt f (t) = − + 2 cos sin 3 π n=1 n2 L π n=1 n L a0 =

9.

2nπ(−1)n sinh(aL) + n2 π 2

a 2 L2

1 L

Z

L

(t + t2 ) dt =

2 L

Z

L

t2 dt =

Z π 2 1 1 π sin(t) dt = − cos(t) 0 = π 0 π π Z π 1 π 1 a1 = sin2 (t) 0 = 0 sin(t) cos(t) dt = π 0 2π a0 =

143

Worked Solutions 1 b1 = π

Z

π 0

1 sin (t) dt = 2π 2

Z

π 0

[1 − cos(2t)] dt =

1 [t − 2π

1 2

For n > 1, an =

Z

1 π

π

sin(t) cos(nt) dt = 0

1 + (−1)n =− π(n2 − 1) 1 bn = π

Z

π 0

1 sin(t) sin(nt) dt = π f (t) =

1 π





π sin(2t)] 0 =

 π cos[(n − 1)t] cos[(n + 1)t] − 2(n − 1) 2(n + 1) 0

 π sin[(n − 1)t] sin[(n + 1)t] − =0 2(n − 1) 2(n + 1) 0

∞ 1 1 2 X cos(2mt) + sin(t) − π 2 π m=1 4m2 − 1

10. a0 =

1 1

Z

1/2

t dt + −1/2

1 1

Z

3/2 1/2

(1 − t) dt =

1/2 3/2 2 3/2 t2 − t + t =0 2 −1/2 2 1/2 1/2

Z Z 1 3/2 1 1/2 t cos(nπt) dt + (1 − t) cos(nπt) dt an = 1 −1/2 1 1/2 3/2   1/2 1 t sin(nπt) = cos(nπt) + sin(nπt) + n2 π 2 nπ nπ 1/2 −1/2  3/2  t 1 cos(nπt) + sin(nπt) =0 − 2 2 n π nπ 1/2

bn =

1 1 

Z

1/2

t sin(nπt) dt +

−1/2

1 1

Z

3/2

1/2

(1 − t) sin(nπt) dt

3/2  1/2 cos(nπt) 1 t − = sin(nπt) − cos(nπt) n2 π 2 nπ nπ 1/2 −1/2   3/2 1 t 4 sin3 (nπ/2) − sin(nπt) − cos(nπt) = 2 2 n π nπ n2 π 2 1/2 f (t) = −

∞ 4 X (−1)m sin[(2m − 1)πt] π 2 m=1 (2m − 1)2

11. a0 =

1 a

Z

a

2t dt = 0

1 2

a t2 =a a 0

144

Advanced Engineering Mathematics with MATLAB

 nπt dt a 0  2   a   2a 2 at a nπt nπt n = + cos sin = n2 π 2 [(−1) − 1] a n2 π 2 a nπ a 0   Z nπt 1 a dt 2t sin bn = a 0 a  2   a   2 at a 2a nπt nπt n = − sin cos = − nπ (−1) a n2 π 2 a nπ a 0     ∞ ∞ a 4a X 2a X (−1)n (2m − 1)πt nπt 1 f (t) = − 2 − cos sin 2 π m=1 (2m − 1)2 a π n=1 n a Z

1 a

an =

a

2t cos



12. a0 = an =

1 π

Z

bn =

1 π

=

1 π

Z

π

t2 dt = 0



π t3 π2 = 3π 0 3

 π n 2t cos(nt) n2 t2 − 2 = 2(−1) − sin(nt) 2 3 2 n n n 0   Z π π 1 2t sin(nt) n2 t2 − 2 t2 sin(nt) dt = − cos(nt) π n2 n3 0 0   2 − n2 π 2 2 (−1)n − 3 n3 n

t2 cos(nt) dt =

0

f (t) =

13.

π

1 π 1 π

∞ ∞ X (−1)n 1 X (2 − n2 π 2 )(−1)n − 2 π2 +2 cos(nt) + sin(nt) 6 n2 π n=1 n3 n=1

 2  Z 1 2 π−t πt t2 a0 = =π−1 dt = − 1 0 2 2 4 0 Z 1 2 π−t cos(nπt) dt an = 1 0 2 2   2 sin(nπt) t 1 cos(nπt) =0 = + sin(nπt) − 2 2 2n 2 n π nπ 0 0 Z 2 π−t 1 sin(nπt) dt bn = 1 0 2 2   2 1 sin(nπt) 1 cos(nπt) t − =− − cos(nπt) = 2n 0 2 n2 π 2 nπ nπ 0 f (t) =

∞ π−1 1 X sin(nπt) + 2 π n=1 n

145

Worked Solutions 14. Because f (t) is odd, a0 = an = 0. Then, if n 6= 1, 

   πt nπt sin dt L L 0      Z 1 L (n + 1)πt (n − 1)πt = t sin + sin dt L 0 L L    L   Lt L2 (n + 1)πt (n + 1)πt 1 + sin cos = L (n + 1)2 π 2 L (n + 1)π L 0      L 1 Lt L2 (n − 1)πt (n − 1)πt + + sin cos L (n − 1)2 π 2 L (n − 1)π L 0 n 2nL(−1) =− π(n2 − 1)

bn =

2 L

Z

L

t cos

For n = 1,   Z 1 L 2πt dt t sin L 0 L 0    L   1 L2 Lt L 2πt 2πt = + = sin cos 2 L 4π L 2π L 2π 0

b1 =

2 L

Z

L

t cos



πt L





πt L

L f (t) = sin 2π

sin





πt L



dt =

  ∞ 2L X (−1)n n nπt − sin π n=2 n2 − 1 L

15. Because f (t) is an even function, bn = 0. Therefore,

and

Z h π i h π i π 2 π 2 sinh a a0 = − t dt = − cosh a −t π 0 2 aπ 2 0  aπ   aπ i 2 h cosh − cosh =0 = aπ 2 2 Z h π i 2 π sinh a − t cos(nt) dt π 0 2 Z Z π 1 1 aπ/2 π −at e cos(nt) dt − e−aπ/2 eat cos(nt) dt = e π π 0 0 π e−at 1 [−a cos(nt) + n sin(nt)] = eaπ/2 2 2 π a +n 0 π 1 −aπ/2 eat [a cos(nt) + n sin(nt)] − e π a2 + n2

an =

0

2a cosh(aπ/2) = [1 − (−1)n ] . π(a2 + n2 )

146

Advanced Engineering Mathematics with MATLAB

Thus, f (t) =

∞ 4a cosh(aπ/2) X cos[(2m − 1)t] . π a2 + (2m − 1)2 m=1

16. The answer is ∞ 32L2 X sin[(2m − 1)πx/(2L)] π 3 m=1 (2m − 1)3

f (x) = because

Z 2L Z 4L   1 1 2 1 1 2 dt a0 = 2 x(2L − x) dt + 2L 2 x − 3Lx + 4L 2L 0 2L   2L   4L 1 x3 1 Lx2 x3 3Lx2 2 = 0, + = − − + 4L x L 2 6 0 L 6 2 2L an =

Z

2L

x cos

 nπx 

1 2L

Z

2L

x2 cos

 nπx 

dx 2L 2L 0 Z 4L Z 4L  nπx   nπx  1 2 + x cos x cos dx − 3 dx 2L 2L 2L 2L 2L Z 4L  nπx  dx cos + 4L 2L 2L   nπx  2Lx  nπx  2L 4L2 + cos sin an = n2 π 2 2L nπ 2L 0  2     2L  nπx  2Lx2 16L3 nπx  1 8L x + cos − 3 3 sin − 2L n2 π 2 2L nπ n π 2L 0   2   4L     2 3 1 8L x 2Lx 16L nπx nπx + + sin cos − 2L n2 π 2 2L nπ n3 π 3 2L 2L   4L     2 4L 2Lx nπx nπx −3 + cos sin n2 π 2 2L nπ 2L 2L 4L   2 8L nπx − sin =0 nπ 2L 0

dx −

2L

and

Z 2L  nπx  1 dx − dx x2 sin x sin bn = 2L 2L 0 2L 0 Z Z 4L 4L  nπx   nπx  1 x sin dx − 3 dx x2 sin + 2L 2L 2L 2L 2L Z 4L  nπx  sin + 4L dx 2L 2L Z

2L

 nπx 

147

Worked Solutions 

 nπx  2Lx  nπx  2L 4L2 bn = − sin cos n2 π 2 2L nπ 2L 0  2    nπx  2L   2 1 8L x nπx 16L3 2Lx − cos sin − − 2L n2 π 2 2L nπ n3 π 3 2L 0    nπx  4L  nπx   2Lx2 1 8L2 x 16L3 + − sin − 3 3 cos 2L n2 π 2 2L nπ n π 2L 2L    nπx  2Lx  nπx  4L 4L2 − sin cos −3 n2 π 2 2L nπ 2L 2L 4L   2 2 16L nπx 8L = 3 3 [1 − (−1)n ] cos − nπ 2L 2L n π

Section 5.2 1.

Z

x 0

∞ Z x X π 2 − 2πτ cos[(2n + 1)τ ] dτ dτ = 8 (2n + 1)2 n=0 0 x x ∞ X π 2 τ − πτ 2 sin[(2n + 1)τ ] = 8 (2n + 1)3 0 0 n=0 ∞ X sin[(2n + 1)x] π 2 x − πx2 = 8 (2n + 1)3 n=0

2.

Z

x 0

Z ∞ X π 2 − 3τ 2 (−1)n+1 x cos(nτ ) dτ dτ = 12 n2 0 n=1 x X x ∞ (−1)n+1 π 2 τ − τ 3 sin(nτ ) = 3 12 n 0 0 n=1 ∞ X π 2 x − x3 (−1)n+1 sin(nx) = 12 n3 n=1

3. Because f (t) is an odd function, a0 = an = 0. On the other hand,   Z nπt 2 2 2 dt (2t − t ) sin bn = 2 0 2    2   2t 4 nπt nπt = 2 2 2 sin − cos n π 2 nπ 2 0    2  2 2 2    8t 8 n π t nπt nπt − 2 2 sin − 3 3 − 2 cos n π 2 n π 4 2 0 n 16[1 − (−1) ] = . n3 π 3

148

Advanced Engineering Mathematics with MATLAB

Then, f (t) =

  ∞ 32 X (2m − 1)πt 1 . sin π 3 m=1 (2m − 1)3 2

From Parseval’s equality, 2 2

Z

2

∞ ∞ X (32)2 X π6 16 1 1 = or = . (2t − t ) dt = 15 π 6 n=1 (2n − 1)6 960 n=1 (2n − 1)6 2 2

0

Section 5.3 1. a0 =

2 an = π

Z

π 0

Z

π 0

2 a0 = π Z

x dx = 0

π x2 =π π 0

 π 2 sin(nx) x cos(nx) 2(−1)n x sin(nx) dx = − = − π n2 n n 0

2.

2 π

π

∞ 4 X cos[(2m − 1)x] π − 2 π m=1 (2m − 1)2

f (x) =

an =

Z

 π 2 cos(nx) x sin(nx) 2[(−1)n − 1] x cos(nx) dx = = + π n2 n n2 π 0 f (x) =

2 bn = π

2 π

Z

∞ 2 X (−1)n+1 sin(nx) π n=1 n

π 0

π

(π − x) dx =

π 2x|0

π x2 =π − π 0

(π − x) cos(nx) dx π  π 2 cos(nx) x sin(nx) sin(nx) 2[(−1)n − 1] − =2 =− + 2 n π n n n2 π 0 0 0

f (x) =

∞ 4 X cos[(2m − 1)x] π + 2 π m=1 (2m − 1)2

149

Worked Solutions Z

2 bn = π

π

(π − x) sin(nx) dx π  π 2 sin(nx) x cos(nx) 2 2 cos(nx) − = =− −π 2 n n n n 0 0 0

f (x) = 2

3. 2 a

a0 = 2 an = a

Z

Z

a 0

x(a − x) dx =

a

Z 0a

∞ X sin(nx) n n=1

x(a − x) cos

2 a

 nπx  a



 a ax2 x3 a2 − = 2 3 0 3

dx Z a

 nπx   nπx  2 x cos x2 cos =2 dx − dx a a 0 a 0  2  nπx  ax  nπx a a = 2 2 2 cos + sin n π a nπ a 0     nπx a 2 2 2 2 n π ax − 2a3 nπx 2 2xa − cos sin − a n2 π 2 a n3 π 3 a 0 =−

2a2 [1 + (−1)n ] n2 π 2 f (x) =

bn =

2 a

Z

  ∞ a3 a2 X 1 2mπx − 2 cos 6 π m=1 m2 a

a 0 a

x(a − x) sin

 nπx  a

dx Z a

Z  nπx   nπx  2 dx − dx x2 sin x sin =2 a a 0 a  0 2  nπx  ax  nπx  a a cos = 2 2 2 sin − n π a nπ a 0    nπx a  2 2 2 2 3 2 2xa nπx n π ax − 2a − sin cos − a n2 π 2 a n3 π 3 a 0 =

4a2 [1 − (−1)n ] n3 π 3

  ∞ (2m − 1)πx 1 8a2 X sin f (x) = 3 π m=1 (2m − 1)3 a

150

Advanced Engineering Mathematics with MATLAB

4. a0 =

2 a

Z

a

 2 kx a 2 eak − 1 e 0= ak ak

ekx dx = 0

Z  nπx  2 a kx dx an = e cos 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 f (x) =

∞  nπx  X (−1)n eka − 1 eak − 1 + 2ka cos ak k 2 a2 + n2 π 2 a n=1

Z  nπx  2 a kx e sin dx a 0 a    nπx  nπ  nπx  a ekx 2 − k sin cos = a k 2 + (nπ/a)2 a a a 0   2nπ n ka (−1) e − 1 =− 2 2 k a + n2 π 2

bn =

f (x) = −2π

∞  nπx  X n[(−1)n eka − 1] sin 2 2 2 2 k a +n π a n=1

5. a0 = 2

an = 2 =2 −2

Z Z





1/2

x dx + 2 0

Z

1

1/2 1 1 (1 − x) dx = x2 0 + (2x − x2 ) 1/2 = 2 1/2

1/2

x cos(nπx) dx + 2 0

Z

cos(nπx) x sin(nπx) + n2 π 2 nπ cos(nπx) x sin(nπx) + n2 π 2 nπ

f (x) =

1 1/2

(1 − x) cos(nπx) dx

1/2

+

0

1

1/2

=

1 2 sin(nπx) nπ 1/2

4 cos(nπ/2) 2[1 + (−1)n ] − n2 π 2 n2 π 2

∞ 1 2 X cos[2(2m − 1)πx] − 2 4 π m=1 (2m − 1)2

151

Worked Solutions

bn = 2 =2

Z 

1/2

x sin(nπx) dx + 2 0

Z

sin(nπx) x cos(nπx) − n2 π 2 nπ



sin(nπx) x cos(nπx) − −2 n2 π 2 nπ

a0 =

an =

2 2 

Z

2 2

Z

1

x dx + 0

1

x cos 0

1/2

(1 − x) sin(nπx) dx

1/2 0

1

− =

1/2

1 2 cos(nπx) nπ 1/2

4 sin(nπ/2) n2 π 2

∞ 4 X (−1)m+1 sin[(2m − 1)πx] π 2 m=1 (2m − 1)2

f (x) =

6.

1

 nπx  2

2 2

Z

2

1 dx = 1

dx +

2 2

Z

2

1 3 x2 2 + x|1 = 2 0 2

1 cos 1

 nπx  2

dx

 nπx  2x  nπx 1  nπx  2 4 2 + + cos sin sin n2 π 2 2 nπ 2 nπ 2 1 0  nπ   nπ i 8 4 h = 2 2 cos2 = 2 2 1 + cos n π 2 n π 4

=

∞  nπx   nπ  8 X 1 3 cos + 2 cos2 2 4 π n=1 n 4 2

f (x) =

bn =

2 2 

Z

1

x sin 0

 nπx  2

dx +

2 2

Z

2

1 sin 1

 nπx  2

dx

 nπx  2x  nπx 1  nπx  2 4 2 = − sin cos − cos n2 π 2 2 nπ 2 nπ 2 1 0  nπ  4 2 = 2 2 sin (−1)n − n π 2 nπ f (x) =

  ∞ ∞  nπx  2 X (−1)n (2m − 1)πx 4 X (−1)m+1 − sin sin π 2 m=1 (2m − 1)2 2 π n=1 n 2

7. a0 =

2 π

Z

π 0

π

(π 2 − x2 ) dx = 2πx|0 −

π 2x3 4π 2 = 3π 0 3

152

Advanced Engineering Mathematics with MATLAB

Z 2 π 2 (π − x2 ) cos(nx) dx π 0  π  π 2π sin(nx) 2 2x cos(nx) n2 x2 − 2 4(−1)n = + sin(nx) − =− 2 3 n π n n n2 0 0

an =

f (x) =

Z

2 π

∞ X (−1)n 2π 2 cos(nx) −4 3 n2 n=1

π

(π 2 − x2 ) sin(nx) dx 0  π  π 2π cos(nx) 2 2x sin(nx) n2 x2 − 2 =− − − cos(nx) n π n2 n3 0 0 2π 4(−1)n 4 = − + 3 n n3 π n π

bn =

f (x) = 2π

∞ ∞ X 8 X sin[(2m − 1)x] sin(nx) + n π m=1 (2m − 1)3 n=1

8. a0 =

2 an = a

Z

a

cos a/2

 nπx  a

2 a

dx =

Z

a

dx = 1 a/2

 nπx  a  nπ  2 2 sin sin =− nπ a nπ 2 a/2

  ∞ 1 2 X (−1)m (2m − 1)πx f (x) = + sin 2 π m=1 2m − 1 a

Z  nπx   nπx  a 2 a 2 sin cos dx = − a a/2 a nπ a a/2 i  nπ  2 h cos − (−1)n = nπ 2

bn =

f (x) =

  ∞ ∞  nπx  1 X (−1)m 2 X (−1)n 2mπx − sin sin π m=1 m a π n=1 n a

153

Worked Solutions 9.

Z 2 a a dx + x− dx a 2a/3 3 a/3 a  2a/3 ax 2x a 2 x2 − + = = a 2 3 a/3 3 2a/3 3

2 a0 = a

2a/3

a 3



Z  nπx  2 a a dx + dx cos cos x− a a 2a/3 3 a a/3   nπx  ax  nπx 2a/3  nπx  2a/3 2 a2 2a = + cos sin sin − a n2 π 2 a nπ a 3nπ a a/3 a/3  nπx  a 2a sin + 3nπ a 2a/3     nπ   nπ   nπ  4a 2nπ 2a − cos sin = − 2 2 sin = 2 2 cos n π 3 3 n π 2 6

2 an = a

Z

Z

2a/3

a 3

 nπx 



  ∞ a 4a X (−1)m sin[(2m − 1)π/6] (2m − 1)πx f (x) = + 2 cos 6 π m=1 (2m − 1)2 a

bn = = − = =

Z

 nπx 

Z

 nπx  a sin dx a a a/3 2a/3 3   nπx  ax  nπx 2a/3  nπx  2a/3 2 a2 2a − sin cos cos + a n2 π 2 a nπ a 3nπ a a/3 a/3  nπx  a 2a cos 3nπ a 2a/3     nπ  2a 2nπ 2a sin − sin − cos(nπ) n2 π 2 3 3 3nπ  nπ  2a(−1)n  nπ  4a sin − cos n2 π 2 2 6 3nπ 2 a

2a/3

x−

f (x) = −

a 3



sin

dx +

2 a

a

  ∞ 2mπx a X (−1)m sin(mπ/3) sin π 2 m=1 m2 a

∞  nπx  2a X (−1)n sin 3π n=1 n a

154

Advanced Engineering Mathematics with MATLAB

10. 2 a0 = a Z

Z

3a/4 a/4

 nπx  3a/4 2 sin a nπ a a/4 a/4        nπ   2 4 3nπ nπ nπ  = sin − sin sin = cos nπ 4 4 nπ 2 4

an =

2 a

3a/4

cos

 nπx 

3a/4 2x 1 dx = =1 a a/4

dx =

  ∞  mπ  1 2mπx 2 X (−1)m cos f (x) = + sin 2 π m=1 m 2 a Z

 nπx 

 nπx  3a/4 2 cos a nπ a a/4 a/4        nπ   4 3nπ nπ 2 nπ  cos − cos sin = sin =− nπ 4 4 nπ 2 4

bn =

2 a

3a/4

sin

dx = −

    ∞ (2m − 1)πx (2m − 1)π 4 X (−1)m+1 sin sin f (x) = π m=1 2m − 1 4 a 11. a0 =

2 a

an =

Z

2 a

a/2 1 2

0

Z

dx +

a/2 1 2

0

cos

2 a

Z

a

1 dx = a/2

 nπx  a

dx +

2 a

a 3 x a/2 2x = + a 0 a a/2 2 Z

a

cos

a/2

 nπx  a

dx

 nπx  a/2  nπx  a 1 2 sin sin + nπ a nπ a 0 a/2      nπ  1 2 1 nπ nπ = − =− sin sin sin nπ 2 nπ 2 nπ 2   ∞ 1 X (−1)m (2m − 1)πx 3 cos f (x) = + 4 π m=1 2m − 1 a

=

bn =

2 a

Z

a/2 1 2

sin

 nπx 

2 a

Z

a

sin

 nπx 

dx a a a/2  nπx  a/2  nπx  a 1 2 =− cos cos − nπ a nπ a 0 a/2  nπ   nπ  1 2 2 1 n + cos − (−1) + cos =− nπ 2 nπ nπ nπ 2 1 + cos(nπ/2) − 2 cos(nπ) = nπ 0

dx +

155

Worked Solutions

f (x) =

12.

∞  nπx  1 X 1 + cos(nπ/2) − 2(−1)n sin π n=1 n a

Z 2x 2 a 3a − 2x dx + dx a a a/2 2a 0 a a/2 a 2x2 x2 3x 5 = 2 − 2 + = a 0 a a/2 a a/2 4

2 a0 = a

a/2

Z  nπx   nπx  2x 2 a 3a − 2x cos cos dx + dx a a a a/2 2a a 0  2  nπx  ax  nπx a/2  nπx  a 4 a 3 = 2 2 2 cos + + sin sin a n π a nπ a nπ a a/2 0  2  nπx  ax  nπx a a 2 + sin − 2 2 2 cos a n π a nπ a a/2  i h  h  nπ i 4 2 nπ = 2 2 cos − 1 − 2 2 cos(nπ) − cos n π 2 n π 2  nπ  4 2 6 n − 2 2 − 2 2 (−1) = 2 2 cos n π 2 n π n π

2 an = a

Z

Z

a/2

f (x) =

Z  nπx   nπx  2x 2 a 3a − 2x sin sin dx + dx a a a a/2 2a a 0  2  nπx  ax  nπx a/2  nπx  a a 3 4 − cos cos − = 2 2 2 sin a n π a nπ a nπ a a/2 0  2 a     ax a nπx nπx 2 − cos − 2 2 2 sin a n π a nπ a a/2   i 4 nπ 2 h  nπ  3 = 2 2 sin cos(nπ) + 2 2 sin − + nπ cos(nπ) n π 2 nπ n π 2  nπ  (−1)n 6 − = 2 2 sin n π 2 nπ

bn =

2 a

Z

∞  nπx  5 2 X 3 cos(nπ/2) − 2 − (−1)n cos + 2 8 π n=1 n2 a

a/2

∞   nπx   nπ  (−1)n  X 6 sin sin f (x) = − n2 π 2 2 nπ a n=1

156

Advanced Engineering Mathematics with MATLAB

13. a0 =

Z

2 a

Z

a/2

x dx + 0

Z

a a/2

a/2 3a a x2 a + x|a/2 = dx = 2 a 0 4 Z

 nπx  a dx cos a a 0 a/2 2   nπx  ax  nπx a/2  nπx  a 2 a2 a = + cos sin sin + a n2 π 2 a nπ a nπ a a/2 0  i h  2a nπ = 2 2 cos −1 n π 2

2 an = a

a/2

x cos

f (x) =

Z

 nπx 

2 a

2 dx + a

a

∞  nπx  3a 2a X cos(nπ/2) − 1 + 2 cos 8 π n=1 n2 a

2 a

a/2

x sin

f (x) =

 nπx 

Z

 nπx  a dx sin a a 0 a/2 2   nπx  ax  nπx a/2  nπx  a 2 a2 a = sin cos − cos − a n2 π 2 a nπ a nπ a a/2 0  nπ  a 2a (−1)n − = 2 2 sin n π 2 nπ

bn =

dx +

2 a

a

∞   nπx   nπ  (−1)n  aX 2 − sin sin 2 π n=1 n π 2 n a

14. a0 =

2 a

Z

a 0

 a a−x x2 2 dx = 2 ax − =1 a a 2 0

Z  nπx  2 a a−x cos dx a 0 a a Z a Z a  nπx   nπx  2 2 x cos dx − 2 dx cos = a 0 a a 0 a   nπx  a  nπx  ax  nπx a a2 2 2 + sin sin = − 2 2 2 cos nπ a a n π a nπ a 0 0 2 = 2 2 [1 − (−1)n ] n π

an =

157

Worked Solutions   ∞ 4 X (2m − 1)πx 1 1 cos f (x) = + 2 2 π m=1 (2m − 1)2 a

Z  nπx  2 a a−x dx sin a 0 a a Z a Z a  nπx   nπx  2 2 = sin x sin dx − 2 dx a 0 a a 0 a   nπx  ax  nπx  a  nπx a a2 2 2 2 − = cos cos =− − 2 2 2 sin nπ a a n π a nπ a nπ 0 0

bn =

f (x) =

∞  nπx  2X1 sin π n=1 n a

15. For 0 < x < 1, half-range cosine series is √



a0 X 1 = an cos(nπx), + 2 2 1−x n=1

where a0 = 2

Z

and an = 2

1 0

Z

dx √ =2 1 − x2 1

0

Z

π/2

du = π, 0

cos(nπx) √ dx = πJ0 (nπ). 1 − x2

Substitution of a0 and an into the top line gives the final result. On the other hand, ∞ p X an cos[(2n − 1)πx/2], 0 < x < 1. 1 − x2 = n=1

Here, an = 2

Z

1 0

p 1 − x2 cos[(2n − 1)πx/2] dx =

2 J1 [(2n − 1)π/2], 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(a + 1) π 2 π sin(nx) dx − x sin(nx) dx π 0 π2 0 Z π Z 2(a + 1) π 3 2(a − 1) 2 x sin(nx) dx + x sin(nx) dx + π3 π4 0 0 Z π 2a x4 sin(nx) dx − 5 π 0  π  2 2(a + 1) sin(nx) x cos(nx) π =− cos(nx)|0 − − nπ π2 n2 n 0   π 2(a − 1) 2x n2 x2 − 2 + sin(nx) − cos(nx) π3 n2 n3 0   π n2 x3 − 6x 2(a + 1) 3n2 x2 − 6 sin(nx) − cos(nx) + 4 4 3 π n n 0  2 3  π n4 x4 − 12n2 x2 + 24 2a 4n x − 24x sin(nx) − cos(nx) − 5 4 5 π n n 0 4(a − 1) 48a 8(a − 1)(−1)n 2 n − − 5 5 [1 − (−1) ] − = nπ n3 π 3 n3 π 3 n π

bn =

f (x) =

 ∞  X 4(a − 1) 48a 2 8(a − 1)(−1)n n − − [1 − (−1) ] sin(nx) − nπ n3 π 3 n3 π 3 n5 π 5 n=1

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 1. In both cases, the amplitude is given by An = Bn =

p

a2n + b2n =

2 . π(2n − 1)

For the sine series, ϕn = tan−1 (0/bn ) = 0 so that

f (t) =

∞ 1 2 X sin[(2n − 1)t] + . 2 π n=1 2n − 1

For the cosine series, ϕn = tan−1 (−bn /0) = −

∞ 1 2 X cos[(2n − 1)t − π/2] π and f (t) = + . 2 2 π n=1 2n − 1

159

Worked Solutions 2. In both cases, the amplitude is given by An = Bn =

p

a2n + b2n =

2 . π(2n − 1)

For the cosine series, ϕn = tan−1 (0/an ) = 0. If n is even, ϕn = 0; if n is odd, ϕn = π. Therefore f (t) =

  ∞ 3 2X 1 π (2n − 1)πt . + cos + [1 − (−1)n ] 2 π n=1 2n − 1 2 2

For the sine series, ϕn = tan−1 (an /0) = (−1)n and f (t) =

π 2

  ∞ 3 2X 1 π (2n − 1)πt . + sin + (−1)n 2 π n=1 2n − 1 2 2

3. In both cases, the amplitude is given by An = Bn =

p

a2n + b2n =

2 . n

For the cosine series, ϕn = tan−1 (−bn /0) = (−1)n π/2 so that f (t) = 2

∞ h X πi 1 cos nt + (−1)n . n 2 n=1

For the sine series, ϕn = tan−1 (0/bn ) = 0. Then ϕn = 0, if n is odd, and ϕn = π, if n is even. Then f (t) = 2

∞ n X 1 πo sin nt + [1 + (−1)n ] . n 2 n=1

4. In both cases, the amplitude is given by An = Bn =

p

a2n + b2n =

4 . π(2n − 1)2

For the cosine series, ϕn = tan−1 (0) = 0 or

π.

160

Advanced Engineering Mathematics with MATLAB

For the coefficients to be correct, ϕn = π and f (t) =

∞ π 4 X cos[(2n − 1)t + π] + . 2 π n=1 (2n − 1)2

For the sine series, ϕn = tan−1 (−an /0) = − and f (t) =

π 2

∞ 4 X sin[(2n − 1)t − π/2] π + . 2 π n=1 (2n − 1)2

Section 5.5 1. For n 6= 0, cn =

1 2π

Z

0

(−t)e−int dt + −π

1 2π

Z

π

te−int dt 0

0 π n 1 e−int 1 e−int = − [1 − (−1) ] . (−int − 1) (−int − 1) = − 2π n2 2π n2 πn2 −π 0

For n = 0,

1 c0 = 2π

Z

0

1 (−t) dt + 2π −π

0

" 0 π # t2 1 π t2 − + = . t dt = 2π 2 −π 2 0 2

Z 1 2 (1−inπ)t ee dt = e dt 2 0 0 2 e2 − 1 1 = e(1−inπt) = 2(1 − inπ) 2(1 − inπ) 0

1 cn = 2

Z

π

∞ 2 X ei(2m−1)t π − 2 π m=−∞ (2m − 1)2

f (t) =

2.

Z

2

t −inπt

∞ e2 − 1 X 1 + inπ inπt f (t) = e 2 n=−∞ 1 + n2 π 2

3. If n 6= 0, 1 cn = 2

Z

2

te 0

−nπit

2 i e−nπit dt = − 2 2 (−nπit − 1) = . 2n π nπ 0

161

Worked Solutions 1 2

c0 =

Z

2

2 t dt = 14 t2 0 = 1,

0

4. If n 6= 0, 1 cn = 2π

Z

π 2 −nit

t e −π

so that

f (t) = 1 +

∞ i X enπit . π n=−∞ n n6=0

 2 −int  π n t e 1 2e−int = 2(−1) − dt = − (−int − 1) 2π in in3 n2 −π c0 =

1 2π

f (t) =

Z

π

t2 dt =

−π

π π2 t3 = 3π 0 3

∞ X (−1)n int π2 +2 e 3 n2 n=−∞ n6=0

5. If n 6= 0, Z

1 cn = π c0 =

1 π

Z

π/2

e

−2nit

0

π/2

dt = 0

1 , 2

6. If n 6= 0, 1 cn = 2

Z

1

te −1

−nπit

π/2 [(−1)n − 1] 1 −2nit =− e . dt = − 2nπi 2nπi 0 so that

f (t) =

∞ 1 i X e2(2m−1)it − . 2 π m=−∞ 2m − 1

1 e−inπt (−1)n i dt = − 2 2 (−inπt − 1) = 2n π nπ −1 c0 =

f (t) =

1 2

Z

1

t dt = 0

−1

∞ i X (−1)n inπt e π n=−∞ n n6=0

Section 5.6 1. The Fourier series for f (t) is f (t) =

∞ 2 X sin[(2n − 1)t] 1 + . 2 π n=1 2n − 1

162

Advanced Engineering Mathematics with MATLAB

The complementary solution is yH (t) = A cosh(t) + B sinh(t). Now, from the method of undetermined coefficients we take the particular solution to be yp (t) = A0 +

∞ X

n=1

and yp′′ (t)

=−

∞ X

n=1

Bn sin[(2n − 1)t]

(2n − 1)2 Bn sin[(2n − 1)t].

Substituting into the differential equation, we have that −A0 +

∞ X

n=1

[−1 − (2n − 1)2 ]Bn sin[(2n − 1)t] =

∞ 1 2 X sin[(2n − 1)t] + . 2 π n=1 2n − 1

Therefore, A0 = − or

1 2

and

Bn = −

2 π(2n − 1)[1 + (2n − 1)2 ]

∞ 2X sin[(2n − 1)t] 1 . 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 complementary solution is yH (t) = A cos(t) + B sin(t). For the particular solution, we guess yp (t) = A0 + A1 t cos(t) + B1 t sin(t) +

∞ X

n=2

and

Bn sin[(2n − 1)t]

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

We have written the n = 1 term in this manner because there is resonance between the homogeneous solution and the n = 1 term in the forcing. Therefore, A0 − 2A1 sin(t) + 2B1 cos(t) +

∞ X

n=2

[1 − (2n − 1)2 ]Bn sin[(2n − 1)t]

∞ 1 2 2 X sin[(2n − 1)t] = + sin(t) + 2 π π n=2 2n − 1

163

Worked Solutions so that A0 =

1 , 2

Bn =

2 . π(2n − 1)[1 − (2n − 1)2 ]

and

1 A1 = − , π

B1 = 0,

Therefore, ∞ 1 t 2X sin[(2n − 1)t] − cos(t) − . 2 π π n=2 (2n − 1)3 − (2n − 1)

yp (t) =

3. In problem 1, we already found the Fourier series for f (t). The complementary solution is yH (t) = Ae2t + Bet . For the particular solution we have ∞ X An cos[(2n − 1)t] + Bn sin[(2n − 1)t], yp (t) = A0 + n=1

yp′ (t) =

∞ X

n=1

(2n − 1){Bn cos[(2n − 1)t] − An sin[(2n − 1)t]}

and yp′′ (t) = −

∞ X

n=1

(2n − 1)2 {An cos[(2n − 1)t] + Bn sin[(2n − 1)t]}.

Substituting into the ordinary differential equation, 2A0 + +

∞ X

n=1 ∞ X

n=1

=

{−(2n − 1)2 An − 3(2n − 1)Bn + 2An } cos[(2n − 1)t] {−(2n − 1)2 Bn + 3(2n − 1)An + 2Bn } sin[(2n − 1)t]

∞ 1 2 X sin[(2n − 1)t] + . 2 π n=2 2n − 1

Setting all of the terms of the same harmonic equal to each other, we find that A0 = 1/4 and −(2n − 1)2 An − 3(2n − 1)Bn + 2An = 0 and −(2n − 1)2 Bn + 3(2n − 1)An + 2Bn =

2 π(2n − 1)

164

Advanced Engineering Mathematics with MATLAB

or An = and

6 π{[2 − (2n −

1)2 ]2

+ 9(2n − 1)2 }

2[2 − (2n − 1)2 ] . (2n − 1)π{[2 − (2n − 1)2 ]2 + 9(2n − 1)2 }

Bn =

The particular solution is then ∞ 6X cos[(2n − 1)t] 1 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 }

4. First we compute complex Fourier series for f (t). cn =

with

1 2π

Z

0

(−t)e−int dt + −π

1 2π

Z

π

te−int dt 0

0 π n 1 e−int 1 e−int = − [1 − (−1) ] (−int − 1) (−int − 1) = − 2π n2 2π n2 n2 π −π 0 1 c0 = π

Therefore, f (t) =

Z

π

t dt = 0

π . 2

∞ 2 X ei(2n−1)t π . − 2 π n=−∞ (2n − 1)2

From the method of undetermined coefficients, yp (t) = c0 +

∞ X

cn ei(2n−1)t

n=−∞

and yp′′ (t) = −

∞ X

n=−∞

(2n − 1)2 cn ei(2n−1)t .

Then −c0 −

∞ X

n=−∞

[1 + (2n − 1)2 ]cn ei(2n−1)t =

∞ π 2 X ei(2n−1)t − . 2 π n=−∞ (2n − 1)2

165

Worked Solutions Setting each harmonic equal to each other, we have that π c0 = − , 2 and

cn =

π(2n −

2 + (2n − 1)2 ]

1)2 [1

∞ 2 X ei(2n−1)t π . yp (t) = − + 2 π n=−∞ π(2n − 1)2 [1 + (2n − 1)2 ]

5. First we compute complex Fourier series for f (t). Z 0 Z π 1 1 −int cn = (−t)e dt + te−int dt 2π −π 2π 0 0 π −int 1 e−int − 1 e = (−int − 1) (−int − 1) 2 2 2π n 2π n −π 0 Z [1 − (−1)n ] π 1 π =− t dt = . with c0 = n2 π π 0 2 Therefore, f (t) =

∞ π 2 X ei(2n−1)t − . 2 π n=−∞ (2n − 1)2

From the method of undetermined coefficients, yp (t) = c0 +

∞ X

n=−∞

cn ei(2n−1)t and yp′′ (t) = −

∞ X

n=−∞

(2n − 1)2 cn ei(2n−1)t .

Then, 4c0 +

∞ X

n=−∞

2

[4 − (2n − 1) ]cn e

i(2n−1)t

∞ π 2 X ei(2n−1)t = − . 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

yp (t) =

∞ ei(2n−1)t 2 X π − . 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 yp (t) = C0 +

∞ X

n=1

Cn cos(nωt) + Dn sin(nωt).

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 y(t) = Ee−at +



A0 X aAn − nωBn nωAn + aBn cos(nωt) + 2 sin(nωt). + 2 2 2 a a +n ω a + n2 ω 2 n=1

Applying the initial condition yields: T0 = E +



A0 X aAn − nωBn . + a a2 + n2 ω 2 n=1

Eliminating E from the solution yields:  A0 1 − e−at a ∞ X  nωAn + aBn aAn − nωBn  + sin(nωt) cos(nωt) − e−at + 2 2 2 2 a +n ω a + n2 ω 2 n=1

y(t) = T0 e−at +

 A0 1 − e−at a ∞ X a cos(nωt) + nω sin(nωt) − a exp(−at) An + a2 + n2 ω 2 n=1 = T0 e−at +

+

∞ X a sin(nωt) + nω cos(nωt) + nω exp(−at) Bn . a2 + n2 ω 2 n=1

7. Assuming that q(t) =

∞ X

cn einω0 t ,

n=−∞

we substitute this solution into the ordinary differential equation and find that ∞ ∞ X X ω 2 ϕn einω0 t . [(inω0 )2 + 2iαnω0 + ω 2 ]cn einω0 t = n=−∞

n=−∞

167

Worked Solutions Therefore, [(inω0 )2 + 2iαnω0 + ω 2 ]cn = ω 2 ϕn or cn = and q(t) =

(inω0

)2

ω 2 ϕn + 2iαnω0 + ω 2

∞ X

ω 2 ϕn einω0 t . 2 + 2iαnω + ω 2 (inω ) 0 0 n=−∞

8. We must first re-express the right side of the differential equation as a Fourier series. If we extent it into the region (−λ/2, 0) as an even function, Bn = 0. The coefficients for the Fourier cosine series is 2 A0 = λ/2

Z

λ/4 0

2 1 dx + λ/2

Z

λ/2 λ/4

  4 λ λ λ (−1) dx = = 0, − + λ 4 2 4

and Z λ/4 Z λ/2 2 2 cos(nqx) dx − cos(nqx) dx λ/2 0 λ/2 λ/4 i  nπ  4 4h λ/2 λ/4 sin(nqx)|0 − sin(nqx)|λ/4 = , sin = λ nπ 2

An =

where q = 2π/λ. Therefore, the solution y(x) has the form y(x) =

∞ X

Cn cos(nqx).

n=1

Direct substitution into the ordinary differential equations yields 2

2 2

2



4 nπ

4 nπ



(k − n q )Cn = −k VL Solving for Cn , VL Cn = 2 2 2 n q /k − 1 Consequently, the final solution is y(x) =





sin

sin

 nπ  2

 nπ  2

.

.

∞ 4VL X sin(nπ/2) cos(nqx). π n=1 n [n2 q 2 /k 2 − 1]

168

Advanced Engineering Mathematics with MATLAB

Section 5.7 1. 1 2

A0 = A1 =

1 2

[f (0) cos(0) + f (1) cos(π/2) + f (2) cos(π) + f (3) cos(3π/2)] = −1 1 2

A2 = B1 =

[f (0) + f (1) + f (2) + f (3)] = 3

1 2

[f (0) cos(0) + f (1) cos(π) + f (2) cos(2π) + f (3) cos(3π)] = −1

[f (0) sin(0) + f (1) sin(π/2) + f (2) sin(π) + f (3) sin(3π/2)] = −1

Thus, the final answer is f (t) =

3 2

− cos(πx/2) − sin(πx/2) −

1 2

cos(πx).

2. A0 = A1 =

1 2

A2 = B1 =

1 2

1 2

[f (0) + f (1) + f (2) + f (3)] = 0

[f (0) cos(0) + f (1) cos(π/2) + f (2) cos(π) + f (3) cos(3π/2)] = 1 1 2

[f (0) cos(0) + f (1) cos(π) + f (2) cos(2π) + f (3) cos(3π)] = 0

[f (0) sin(0) + f (1) sin(π/2) + f (2) sin(π) + f (3) sin(3π/2)] = 1

Thus, the final answer is f (t) = cos(πx/2) + sin(πx/2).

Section 6.1 1. If λ = −m2 , then y(x) = A cosh(mx)+B sinh(mx), y ′ (x) = Am sinh(mx)+ Bm cosh(mx). Substituting in the boundary conditions, y ′ (0) = Bm = 0 ⇒ B = 0, y(L) = A cosh(mL) = 0 ⇒ A = 0.

If λ = 0, then y(x) = C + Dx, y ′ (x) = D, y ′ (0) = D = 0 and y(L) = C = 0.

If λ = k 2 , y(x) = E cos(kx) + F sin(kx), y ′ (x) = −Ek sin(kx) + F k cos(kx). Substituting in the boundary conditions, y ′ (0) = F k = 0 ⇒ F = 0. y(L) = E cos(kL) = 0 ⇒ cos(kL) = 0 ⇒ kn L = (2n − 1)π/2, where n = 1, 2, 3, . . . Therefore, in summary, λn = kn2 = (2n−1)2 π 2 /(4L2 ) with yn (x) = cos[(2n−1) πx/(2L)].

2. If λ = −m2 , then y(x) = A cosh(mx)+B sinh(mx), y ′ (x) = Am sinh(mx)+ Bm cosh(mx) so that y ′ (0) = Bm = 0 or B = 0. At the other end, y ′ (π) = Am sinh(mπ) = 0 or A = 0. If λ = 0, then y(x) = C + Dx and y ′ (x) = D so that y ′ (0) = y ′ (π) = D = 0. Therefore, we have that λ = 0 and y0 (x) = 1.

Worked Solutions

169

If λ = k 2 , then y(x) = E cos(kx) + F sin(kx) and y ′ (x) = −Ek sin(kx) + F k cos(kx) so that y ′ (0) = F k = 0 and F = 0. At the other end, y ′ (π) = −Ek sin(kπ) = 0 or sin(kπ) = 0 and kn = n, where n = 1, 2, 3, . . . Therefore, in summary, λ = 0, y0 (x) = 1; λn = kn2 = n2 , yn (x) = cos(nx).

3. If λ = −m2 , then y(x) = A cosh(mx)+B sinh(mx), y ′ (x) = Am sinh(mx)+ Bm cosh(mx). Substituting into the boundary conditions: y(0) + y ′ (0) = A + Bm = 0, y(π) + y ′ (π) = A cosh(mπ) + B sinh(mπ) + Am sinh(mπ) + Bm cosh(mπ) = 0. Solving for nontrivial solutions yields (1−m2 ) sinh(mπ) = 0. Hence, m = 1, λ0 = −1 and y0 (x) = e−x .

If λ = 0, then y(x) = C + Dx, y ′ (x) = D. Substituting into the boundary conditions: y(0) + y ′ (0) = C + D = 0, y(π) + y ′ (π) = C + Dπ + D = 0. This system gives C = D = 0.

If λ = k 2 , y(x) = E cos(kx) + F sin(kx), y ′ (x) = −Ek sin(kx) + F k cos(kx). Substituting into the boundary conditions: y(0) + y ′ (0) = E + kF = 0, y(π) + y ′ (π) = E cos(kπ) + F sin(kπ) − Ek sin(kπ) + F k cos(kπ) = 0. For a nontrivial solution: (1 + k 2 ) sin(kπ) = 0. This occurs if kn = n and yn (x) = sin(nx) − n cos(nx), where n = 1, 2, 3, . . . Therefore, in summary, λ0 = −1, y0 (x) = e−x and λn = n2 , yn (x) = sin(nx)− n cos(nx).

4. If λ = −m2 , then y(x) = A cosh(mx)+B sinh(mx), y ′ (x) = Am sinh(mx)+ Bm cosh(mx). Substituting into the x = 0 boundary conditions: y ′ (0) = Bm = 0 or B = 0. Then y(π)−y ′ (π) = A cosh(mπ)−Am sinh(mπ) = 0. Solving for nontrivial solutions yields coth(m0 π) = m0 and y0 (x) = cosh(m0 x). If λ = 0, then y(x) = C + Dx, y ′ (x) = D. Substituting into the x = 0 boundary condition: y ′ (0) = D = 0. Then y(π) − y ′ (π) = C = 0 and we have only trivial solutions. If λ = k 2 , y(x) = E cos(kx) + F sin(kx), y ′ (x) = −Ek sin(kx) + F k cos(kx). Substituting into the x = 0 boundary condition: y ′ (0) = kF = 0 or F = 0. Then y(π)−y ′ (π) = E cos(kπ)+Ek sin(kπ) = 0. For a nontrivial solution: k = − cot(kπ). Thus, the eigenfunctions are yn (x) = cos(kn x), kn = − cot(kn ), where n = 1, 2, 3, . . . Therefore, in summary, λ0 = −m20 , y0 = cosh(m0 x) with coth(m0 π) = m0 and λn = kn2 , yn (x) = cos(kn x) with kn = − cot(kn ). 5. If λ = −m4 , y(x) = A cosh(mx) + B sinh(mx) + C cos(mx) + D sin(mx), and y ′′ (x) = Am2 sinh(mx) + Bm2 cosh(mx) − Cm2 cos(mx) − Dm2 sin(mx). Substituting into the boundary conditions: y(0) = A + C = 0, y ′′ (0) = m2 A−m2 C = 0. Therefore, A = C = 0. y(L) = B sinh(mL)+D sin(mL) = 0, y ′′ (L) = Bm2 sinh(mL) − m2 D sin(mL) = 0. Solving for nontrivial solutions yields B = 0 and mn = nπ/L.

170

Advanced Engineering Mathematics with MATLAB

If λ = 0, then y(x) = A+Bx+Cx2 +Dx3 , y ′′ (x) = 2C+6Dx. Substituting into the boundary conditions: y(0) = A = 0, y ′′ (0) = 2C = 0, y(L) = BL+DL3 = 0 and y ′′ (L) = 6DL = 0. This system gives A = B = C = D = 0. If λ = k 4 , then √ √ y(x) = A exp[(1 + i)kx/ 2 ] + B exp[(−1 + i)kx/ 2 ] √ √ + C exp[(−1 − i)kx/ 2 ] + D exp[(1 − i)kx/ 2 ], √ √ y ′′ (x) = 2iA exp[(1 + i)kx/ 2 ] − 2iB exp[(−1 + i)kx/ 2 ] √ √ + 2iC exp[(−1 − i)kx/ 2 ] − 2iD exp[(1 − i)kx/ 2 ]. Substituting into the boundary conditions: y(0) = A + B + C + D = 0, y ′′ (0) = A − B + C − D = 0, √ √ y(L) = A exp[(1 + i)kL/ 2] + B exp[(−1 + i)kL/ 2] √ √ + C exp[(−1 − i)kL/ 2] + D exp[(1 − i)kL/ 2] = 0 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. The solution to this system is A = B = C = D = 0. Therefore, in summary, λn = −n4 π 4 /L4 , yn (x) = sin (nπx/L) . 6. If λ = −m2 , y(x) = A cosh(mx) + B sinh(mx), and y ′ (x) = Am sinh(mx) + Bm cosh(mx). Substituting into the boundary conditions: y(0) + y ′ (0) = A + Bm = 0 and y(1) = A cosh(m) + B sinh(m) = 0. Solving for nontrivial solutions yields m = tanh(m). This is impossible. So there is only a trivial solution here. If λ = 0, then y(x) = C + Dx and y ′ (x) = D. Substituting into the boundary conditions: y(0) + y ′ (0) = C + D = 0 and y(1) = C + D = 0. This system gives the nontrivial solution y0 (x) = 1 − x.

If λ = k 2 , then y(x) = E cos(kx) + F sin(kx) and y ′ (x) = −Ek sin(kx) + F k cos(kx). Substituting into the boundary conditions: y(0) + y ′ (0) = E + kF = 0 and y(1) = E cos(k) + F sin(k) = 0. For a nontrivial solution: tan(k) = k. Thus, the eigenfunction is yn (x) = sin(kn x) − kn cos(kn x) with kn = tan(kn ), where n = 1, 2, 3, . . .

Therefore, in summary, λ0 = 0, y0 (x) = 1−x and λn = kn2 , yn (x) = sin(kn x)− kn cos(kn x). 7. If λ = −m2 , then y(x) = A cosh(mx)+B sinh(mx), y ′ (x) = Am sinh(mx)+ Bm cosh(mx). Substituting into the boundary conditions: y(0) = A = 0 ⇒

Worked Solutions

171

A = 0, y(π) + y ′ (π) = B sinh(mπ) + Bm cosh(mπ) = 0. Solving for nontrivial solutions yields tanh(mπ) = −m, which is impossible. If λ = 0, then y(x) = C + Dx, y ′ (x) = D. Substituting into the boundary conditions: y(0) = C = 0, y(π) + y ′ (π) = Dπ + D = 0. This system gives C = D = 0. If λ = k 2 , then y(x) = E cos(kx) + F sin(kx), and y ′ (x) = −Ek sin(kx) + F k cos(kx). Substituting into the boundary conditions: y(0) = E = 0 ⇒ E = 0, y(π) + y ′ (π) = F sin(kπ) + F k cos(kπ) = 0. For a nontrivial solution: k = − tan(kπ). Thus, the eigenfunctions are yn (x) = sin(kn x) with kn = − tan(kn ), where n = 1, 2, 3, . . . Therefore, in summary, λn = kn2 , yn (x) = sin(kn x) with kn = − tan(kn ). 8. If λ = −m2 , then y(x) = A cosh(mx)+B sinh(mx), y ′ (x) = Am sinh(mx)+ Bm cosh(mx). Substituting into the x = 0 boundary condition: y ′ (0) = mB = 0 or B = 0. At the other end, y(1)−y ′ (1) = A cosh(m)−Am sinh(m) = 0. Solving for nontrivial solutions yields coth(m) = m. Therefore, λ0 = −m20 , y0 (x) = cosh(m0 x) with coth(m0 ) = m0 . If λ = 0, then y(x) = C + Dx, y ′ (x) = D. Substituting into the x = 0 boundary condition: y ′ (0) = D = 0. At the other end, y(1) + y ′ (1) = C = 0 and we only have trivial solutions. If λ = k 2 , y(x) = E cos(kx)+F sin(kx) and y ′ (x) = −Ek sin(kx)+F k cos(kx). Substituting into the x = 0 boundary condition: y ′ (0) = kF = 0 and F = 0. At the other end, y(1) + y ′ (1) = E cos(k) + Ek sin(k) = 0. For a nontrivial solution: k = − cot(kπ). Thus, the eigenfunctions are yn (x) = cos(kn x) with kn = − cot(kn ), where n = 1, 2, 3, . . . Therefore, in summary, λ0 = −m20 , y0 (x) = cosh(m0 x) with coth(m0 ) = m0 and λn = kn2 , yn (x) = cos(kn x) with kn = − cot(kn ). 9. If λ = −m2 , then y(x) = A cosh(mx)+B sinh(mx), y ′ (x) = Am sinh(mx)+ Bm cosh(mx). Substituting into the boundary conditions: y(0) + y ′ (0) = A + Bm = 0, y ′ (π) = Am sinh(mπ) + Bm cosh(mπ) = 0. Solving for nontrivial solutions yields m = coth(mπ). Hence, y0 (x) = sinh(m0 x) − m0 cosh(m0 x) with coth(m0 π) = m0 . If λ = 0, then y(x) = C + Dx, y ′ (x) = D. Substituting into the boundary conditions: y(0) + y ′ (0) = C + D = 0, y ′ (π) = D = 0. This is a trivial solution because C = D = 0. If λ = k 2 , y(x) = E cos(kx)+F sin(kx) and y ′ (x) = −Ek sin(kx)+F k cos(kx). Substituting into the boundary conditions: y(0)+y ′ (0) = E +kF = 0, y ′ (π) = −Ek sin(kπ)+F k cos(kπ) = 0. For a nontrivial solution: cot(kπ) = −k. Thus, the eigenfunction is yn (x) = sin(kn x) − kn cos(kn x) with kn = − cot(kn π), where n = 1, 2, 3, . . .

172

Advanced Engineering Mathematics with MATLAB

Therefore, in summary, λ0 = −m20 , y0 (x) = sinh(m0 x) − m0 cosh(m0 x) with coth(m0 π) = m0 and λn = kn2 , yn (x) = sin(kn x) − kn cos(kn x) with kn = − cot(kn π). 10. If λ = −m2 , y(x) = A cosh(mx) + B sinh(mx), y ′ (x) = Am sinh(mx) + Bm cosh(mx). Substituting into the boundary conditions: y(0) + y ′ (0) = A + Bm = 0 and y(π) − y ′ (π) = A cosh(mπ) + B sinh(mπ) − Am sinh(mπ) − Bm cosh(m) = 0. Solving for nontrivial solutions yields tanh(mπ) = 2m/(1 + m2 ). Hence, y0 (x) = sinh(m0 x) − m0 cosh(m0 x) with tanh(m0 π) = 2m0 /(1 + m20 ). If λ = 0, then y(x) = C + Dx, y ′ (x) = D. Substituting into the boundary conditions: y(0) + y ′ (0) = C + D = 0, y(π) − y ′ (π) = C + Dπ − D = 0. This yields a trivial solution because C = D = 0. If λ = k 2 , y(x) = E cos(kx) + F sin(kx), y ′ (x) = −Ek sin(kx) + F k cos(kx). Substituting into the boundary conditions: y(0) + y ′ (0) = E + kF = 0, y(π) − y ′ (π) = E cos(kπ) + F sin(kπ) + Ek sin(kπ) − F k cos(kπ) = 0. For a nontrivial solution: tan(kπ) = 2k/(1 − k 2 ). Thus, the eigenfunction is yn (x) = sin(kn x) − kn cos(kn x) with tan(kn π) = 2kn /(1 − kn2 ), where n = 1, 2, 3, . . .

Therefore, in summary, λ0 = −m20 , y0 (x) = sinh(m0 x) − m0 cosh(m0 x) with tanh(m0 π) = 2m0 /(1 + m20 ) and λn = kn2 , yn (x) = sin(kn x) − kn cos(kn x) with tan(kn π) = 2kn /(1 − kn2 ). 11. Using the transformation η = ln(x), we can transform the differential equation into d2 y + λy = 0, 0 ≤ η ≤ 1. dη 2 Consider now the different boundary conditions (a) The boundary condition here is y(0) = y(1) = 0. If λ = −m2 , then y(η) = A cosh(mη) + B sinh(mη). Substituting into the boundary conditions: y(0) = 0 ⇒ A = 0, y(1) = B sinh(m) = 0 ⇒ B = 0. We only have trivial solutions. If λ = 0, then y(η) = C + Dη. Substituting into the boundary conditions: y(0) = C = 0 and y(1) = D = 0. We only have trivial solutions. If λ = k 2 , then y(η) = E cos(kη) + F sin(kη). Substituting into the boundary conditions: y(0) = E = 0, y(1) = F sin(k) = 0 ⇒ kn = nπ. We have a nontrivial solution yn (η) = sin(nπη). In summary, λn = n2 π 2 , yn (x) = sin[nπ ln(x)]. (b) The boundary condition here is y(0) = y ′ (1) = 0. If λ = −m2 , then y(η) = A cosh(mη) + B sinh(mη), y ′ (η) = Am sinh(mη) + Bm cosh(mη). Substituting into the boundary conditions: y(0) = 0 ⇒ A = 0, y ′ (1) = Bm cosh(m) = 0 ⇒ B = 0. We only have trivial solutions.

173

Worked Solutions

If λ = 0, then y(η) = C + Dη, y ′ (η) = D. Substituting into the boundary conditions: y(0) = C = 0 and y ′ (1) = D = 0. We only have trivial solutions. If λ = k 2 , y(η) = E cos(kη) + F sin(kη), y ′ (η) = −Ek sin(kη) + F k cos(kη). Substituting into the boundary conditions: y(0) = E = 0, y ′ (1) = F k cos(k) = 0 ⇒ kn = (2n−1)π/2. We have a nontrivial solution yn (η) = sin[(2n−1)πη/2]. In summary, λn = (2n − 1)2 π 2 /4 and yn (x) = sin[(2n − 1)π ln(x)/2].

(c) The boundary condition here is y ′ (0) = y ′ (1) = 0. If λ = −m2 , then y(η) = A cosh(mη) + B sinh(mη), y ′ (η) = Am sinh(mη) + Bm cosh(mη). Substituting into the boundary conditions: y ′ (0) = Bm = 0 ⇒ B = 0, y ′ (1) = Am sinh(m) = 0 ⇒ A = 0. We only have trivial solutions.

If λ = 0, then y(η) = C + Dη and y ′ (η) = D. Substituting into the boundary conditions: y ′ (0) = D = 0 and y ′ (1) = D = 0. We have the nontrivial solution: y0 (η) = 1 with λ0 = 0.

If λ = k 2 , y(η) = E cos(kη) + F sin(kη), y ′ (η) = −Ek sin(kη) + F k cos(kη). Substituting into the boundary conditions: y(0) = kF = 0 ⇒ F = 0, y ′ (1) = −kE sin(k) = 0 ⇒ kn = nπ. We have a nontrivial solution yn (η) = cos(nπη). In summary, λ0 = 0, y0 (x) = 1 and λn = n2 π 2 , yn (x) = cos[nπ ln(x)]. 12. We can rewrite the differential equation: x(xy ′′ + y ′ ) + xy ′ + λy = 0,

or

x

d dx

  dy dy x +x + λy = 0. dx dx

Using the transformation η = ln(x), we can transform the differential equation into d2 y dy + + λy = 0, 0 ≤ η ≤ 1. dη 2 dη The boundary conditions are now y(0) = y(1) = 0. If λ = −m2 , then   q  q −η/2 −η/2 1 2 sinh η m2 + y(η) = Ae cosh η m + 4 + Be

1 4



.

Substituting into the boundary conditions: y(0) = 0 ⇒ A = 0,

y(1) = e−1/2 B sinh

q  m2 + 14 = 0 ⇒ B = 0.

We only have trivial solutions. If λ = 0, then y(η) = C + De−η . Substituting into the boundary conditions: y(0) = C + D = 0, y(1) = C + D/e = 0 ⇒ C = D = 0. We only have trivial solutions.

174

Advanced Engineering Mathematics with MATLAB

If λ = k 2 , then  q y(η) = Ee−η/2 cos η k 2 −

1 4



 q + F e−η/2 sin η k 2 −

Substituting into the boundary conditions: q −1/2 y(0) = E = 0, y(1) = F e sin k2 −

1 4



= 0 ⇒ kn2 −



1 4

1 4

.

= n2 π 2 .

We have a nontrivial solution yn (η) = e−η/2 sin(nπη). In summary, λn = n2 π 2 + 14 with yn (x) = e− ln(x)/2 sin[nπ ln(x)] or yn (x) = x−1/2 sin[nπ ln(x)]. 13. We can rewrite the differential equation: x(xy ′′ + y ′ ) + 2xy ′ + λy = 0

or

x

d dx

  dy dy x + 2x + λy = 0. dx dx

Using the transformation η = ln(x), we can transform the differential equation into dy d2 y +2 + λy = 0, 0 ≤ η ≤ π. dη 2 dη The boundary conditions are now y(0) = y(π) = 0. √ √   If λ = −m2 , then y(η) = Ae−η cosh η m2 + 1 + Be−η sinh η m2 + 1 . Substituting √ into the boundary conditions: y(0) = 0 ⇒ A = 0, y(π) = e−π B sinh π m2 + 1 = 0 ⇒ B = 0. We only have trivial solutions. If λ = 0, then y(η) = C + De−2η . Substituting into the boundary conditions: y(0) = C + D = 0 and y(π) = C + De−2π = 0. We only have trivial solutions. If λ = k 2 , then   p   p y(η) = Ee−η cos η k 2 − 1 + F e−η sin η k 2 − 1 .

Substituting into the boundary conditions: y(0) = E = 0,  p  y(π) = F e−π sin π k 2 − 1 = 0 ⇒ kn2 − 1 = n2 . We have a nontrivial solution yn (η) = e−η sin(nη).

In summary, λn = n2 + 1, yn (x) = e− ln(x) sin[n ln(x)] = sin[n ln(x)]/x. 14. We can rewrite the differential equation: ′′





x(xy + y ) − 2xy + λy = 0

or

d x dx

  dy dy x − 2x + λy = 0. dx dx

175

Worked Solutions

Using the transformation η = ln(x), we can transform the differential equation into dy d2 y −2 + λy = 0, 0 ≤ η ≤ 1. dη 2 dη The boundary conditions are now y(0) = y(1) = 0. If λ = −m2 , then   p   p y(η) = Aeη cosh η m2 + 1 + Beη sinh η m2 + 1 . Substituting into the boundary conditions: y(0) = 0 ⇒ A = 0,

y(1) = eB sinh

We only have trivial solutions.

p  m2 + 1 = 0 ⇒ B = 0.

If λ = 0, then y(η) = C + De2η . Substituting into the boundary conditions: y(0) = C + D = 0, y(π) = C + De2 = 0 ⇒ C = D = 0. We only have trivial solutions. If λ = k 2 , then   p  p  y(η) = Eeη cos η k 2 − 1 + F eη sin η k 2 − 1 .

Substituting into the boundary conditions: p  k 2 − 1 = 0 ⇒ kn2 − 1 = n2 π 2 . y(0) = E = 0, y(1) = F eπ sin

We have a nontrivial solution yn (η) = eη sin(nπη). In summary, λn = n2 π 2 + 1, with yn (x) = eln(x) sin[nπ ln(x)] or yn (x) = x sin[nπ ln(x)].

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

λ2 A − λ2 C = 0. Therefore, B = D and A = C. The other two boundary conditions yields A sinh(λ) + B cosh(λ) = 0, C sin(λ) = D cos(λ). These equations are satisfied by a set of λ’s which satisfy the equation tanh(λ) = − tan(λ). The corresponding eigenfunction is yn (x) = cosh(λn x) + cos(λn x) − tanh(λn )[sinh(λn x) + sin(λn x)]. In summary, the eigenfunctions are y0 (x) = 1 for λ = 0 and yn (x) = cosh(λn x) + cos(λn x) − tanh(λn )[sinh(λn x) + sin(λn x)], where n = 1, 2, 3, . . . , and λn is the nth root of tanh(λ) = − tan(λ). Section 6.2 1. If n 6= m, then Z L  nπx   mπx  sin dx sin L L 0   L sin[(n − m)πx/L] sin[(n + m)πx/L] = − =0 2(n − m)π/L 2(n + m)π/L 0

2.

Z

L 0

1 · cos

 nπx  L

 nπx  L L =0 dx = sin nπ L 0

If n 6= m, then Z L  nπx   mπx  cos cos dx L L 0  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  (2m − 1)πx (2n − 1)πx sin dx sin 2L 2L 0   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 (2m − 1)πx (2n − 1)πx cos dx cos 2L 2L 0   L sin[(n − m)πx/L] sin[(n + m − 1)πx/L] = + =0 2(n − m)π/L 2(n + m − 1)π/L 0

177

Worked Solutions Section 6.3 1. If f (x) =

∞ X

cn sin

n=1

 nπx  L

,

then RL

x sin(nπx/L) dx cn = R0L sin2 (nπx/L) dx 0  2    nπx  L n+1 L 2 nπx  nπx = 2(−1) − sin = cos . 2 2 L n π L L L nπ 0

The final answer is

f (x) =

∞  nπx  2 X (−1)n+1 . sin π n=1 n L

2. If f (x) = c0 +

∞ X

cn cos

n=1

then

 nπx  L

,

RL

x · 1 dx L c0 = R0 L = 2 2 1 dx 0

and RL

x cos(nπx/L) dx cn = R0L cos2 (nπx/L) dx 0  2   nπx  nπx  nπx  L n L 2 = 2L[(−1) − 1] . + cos = sin L n2 π 2 L L L n2 π 2 0

The final answer is

f (x) =

3. If

∞ L 4L X cos[(2m − 1)πx/L] − 2 . 2 π m=1 (2m − 1)2

 (2n − 1)πx , cn sin f (x) = 2L n=1 ∞ X



178

Advanced Engineering Mathematics with MATLAB

then RL

x sin[(2n − 1)πx/2L] dx cn = R0L sin2 [(2n − 1)πx/2L] dx 0    L    (2n − 1)πx 4L2 2 (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

The final answer is   ∞ 8L X (−1)n+1 (2n − 1)πx f (x) = 2 . sin π n=1 (2n − 1)2 2L 4. If f (x) =

∞ X

n=1

then

cn cos



 (2n − 1)πx , 2L

RL x cos[(2n − 1)πx/2L] dx cn = R0L cos2 [(2n − 1)πx/2L] dx 0    L    (2n − 1)πx 4L2 2 (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 The final answer is f (x) =

   ∞  2 (2n − 1)πx 4L X (−1)n+1 π . cos − π 2 n=1 2n − 1 (2n − 1)2 2L

5. This is a regular Sturm-Liouville problem because it conforms to Equation 6.1.1 and Equation 6.1.2 with a = 0, b = 1, p(x) = 1, q(x) = −a2 , r(x) = 1, α = a, β = 1, γ = a, δ = 1. We begin our search for eigenvalues and eigenfunctions assuming that λ < 0 and letting m2 = a2 − λ. Then the general solution is y(x) = A cosh(mx) + B sinh(mx), and y ′ (x) = Am sinh(mx) + Bm cosh(mx). The boundary conditions yields Bm = −aA and mA sinh(m) + mB cosh(m) + aA cosh(m) + aB sinh(m) = 0. Eliminating A between the equations, we find that (a2 − m2 )B sinh(m) = 0. Therefore, A = B = 0.

179

Worked Solutions

For λ = 0, y(x) = Ce−ax + Deax , and y ′ (x) = −aCe−ax + aDeax . The boundary condition at x = 0, leads to D = 0. The solution y(x) = Ce−ax satisfies the boundary condition at x = 1 identically. Therefore, we have an eigenvalue λ = 0 and the eigenfunction y0 (x) = e−ax . If λ > 0, we let k 2 = λ − a2 > 0. Here y(x) = E cos(kx) + F sin(kx), and ′ y (x) = −kE sin(kx) + kF cos(kx). From the boundary condition at x = 0, aE = −kF . From the boundary condition at x = 1, −kE sin(k) + kF cos(k) + aE cos(k) + aF sin(k) = 0. Eliminating E between the two equations, we find that (a2 +k 2 )F sin(k) = 0. Therefore, kn = nπ and λn = a2 +n2 π 2 associated with the eigenfunction yn (x) = a sin(nπx) − nπ cos(nπx). From Equation 6.3.1 and Equation 6.3.4 with r(x) = 1, f (x) = C0 e−ax +

∞ X

n=1

with C0 = and

0

f (x)e−ax dx

R1 0

e−2ax dx

=

2a

R1

f (x)e−ax dx , 1 − e−2a

0

R1

f (x)[a sin(nπx) − nπ cos(nπx)] dx R1 [a sin(nπx) − nπ cos(nπx)]2 dx 0 R1 2 0 f (x)[a sin(nπx) − nπ cos(nπx)] dx = a2 + n2 π 2

Cn =

with n = 1, 2, 3, . . ..

R1

Cn [a sin(nπx) − nπ cos(nπx)] ,

0

6. The general solution to y ′′′′ + k 2 y ′′ = 0, where λ = k 2 , is y(x) = A + Bx + C cos(kx) + D sin(kx). The boundary conditions yield y(0) = 0 ⇒ A + C = 0, y ′ (0) = 0 ⇒ B + kD = 0, y(1) = 0 ⇒ A + B + C cos(k) + D sin(k) = 0, and y ′ (1) = 0 ⇒ B − kC sin(k) + kD cos(k) = 0. Eliminating A and B gives [cos(k) − 1]C + [sin(k) − k]D = 0, and − sin(k)C + [cos(k) − 1]D = 0. For this system to have a nontrivial solution, the determinant must equal zero or 2−2 cos(k)−k sin(k) = 0. We then use double-angle formulas to replace sin(k) and cos(k) with sin(k/2) and cos(k/2) and thereby obtain the final formula in Step 1. To find the eigenvalues/eigenfunctions, we note that y(x) = C[cos(kx) − 1] + D[sin(kx) − kx] with D = [cos(k) − 1]C/[k − sin(k)]. Let us take C = −1 for the arbitrary constant. From Step 1, we have that sin(k/2) = 0 or kn = 2nπ with n = 1, 2, 3, . . .. Substituting into the equation for y(x), we find that kn = 2nπ, yn (x) = 1 − cos(2nπx). On the other hand, solving sin(k/2)/ cos(k/2) = k/2 leads to the roots κn , n = 1, 2, 3, . . .. Again, using double-angle formulas leads to sin(κn ) = 2[1 − cos(κn )]/κn , or sin(κn ) = κn [1 + cos(κn )]/2. Therefore, yn (x) = 1 − cos(κn x) −

cos(κn ) − 1 [sin(κn x) − κn x]. κn − sin(κn )

180

Advanced Engineering Mathematics with MATLAB

Because κn − sin(κn ) = κn [1 − cos(κn )]/2, we obtain yn (x) = 1 − cos(κn x) +

2 [sin(κn x) − κn x]. κn

′′ ′′′′ = 0. Multiplying + λm ym Next, we have that yn′′′′ + λn yn′′ = 0, and ym the first equation by ym (x) and second equation by yn (x) and subtracting, we obtain ′′′′ ′′ ym (x)yn′′′′ (x) − yn (x)ym (x) + λn ym (x)yn′′ (x) − λm yn (x)ym (x) = 0.

This can be rewritten as d d ′ ′′ d d ′ ′′ ′′′ [ym yn′′′ ] − [ym yn ] − [yn ym ]+ [y y ] dx dx dx dx n m d d ′ ′ [ym yn′ ] − λm [yn ym ] − (λn − λm )yn′ ym = 0. + λn dx dx Integrating this equation from 0 to 1 and applying the boundary conditions leads to the orthogonality condition provided n 6= m. Finally, assuming that f (x) =

∞ X

Cn yn (x),

0 < x < 1,

n=1

we formally compute its derivative by term-by-term differentiation or f ′ (x) =

∞ X

Cn yn′ (x).

n=1 ′ Next, we multiply each side of this equation by ym (x) and integrating from 0 to 1. We obtain Z 1 Z 1 ∞ X ′ ′ Cn f ′ (x)ym (x) dx = 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. f (x) =

∞ X

n=0

An Pn (x)

where

An =

2n + 1 2

Z

1

xPn (x) dx. 0

181

Worked Solutions Therefore, A0 =

1 2

Z

1

x dx = 0

and 5 A2 = 4

Z

1 , 4

Z

3 2

A1 =

1

x2 dx = 0

1 0

x(3x2 − 1) dx =

1 2

5 . 16

The final answer is f (x) = 14 P0 (x) + 12 P1 (x) + 2. f (x) =

∞ X

An Pn (x),

where

5 16 P2 (x)

2n + 1 2

An =

n=0

+ ···

Z

ǫ −ǫ

1 Pn (x) dx. 2ǫ

Because f (x) is an even function, we need only even Legendre polynomials: 1 A0 = 4ǫ and A4 =

Z

ǫ

1 dx = , 2 −ǫ

9 32ǫ

Z

5 A2 = 8ǫ

Z

ǫ −ǫ

(3x2 − 1) dx =

ǫ −ǫ

(35x4 − 30x2 + 3) dx =

5(ǫ2 − 1) 4

9(7ǫ4 − 10ǫ2 + 3) . 16

The final answer is f (x) =

5(ǫ2 − 1) 9(7ǫ4 − 10ǫ2 + 3) 1 P0 (x) + P2 (x) + P4 (x) + · · · 2 4 16

3. f (x) =

∞ X

An Pn (x)

where

An =

n=0

2n + 1 2

Z

1 −1

|x|Pn (x) dx.

Because f (x) is an even function, we need only even Legendre polynomials: A0 =

1 2 2

Z

1

x dx = 0

and 9 A4 = 2 2

Z

1 0

1 , 2

A2 =

5 2 2

Z

1 0

3x2 − 1 5 x dx = 2 8

35x4 − 30x2 + 3 3 x dx = − . 8 16

The final answer is f (x) = 21 P0 (x) + 58 P2 (x) −

3 16 P4 (x)

+ ···

182

Advanced Engineering Mathematics with MATLAB

4. Because x3 is an odd function, we need only A1 and A3 . Therefore, x3 = A1 P1 (x)+A3 P3 (x). Substituting for the Legendre polynomials and solving for A1 and A3 , A1 = 35 and A3 = 52 . The final answer is f (x) = 53 P1 (x) + 25 P3 (x). 5.

∞ X

f (x) =

An Pn (x)

where

2n + 1 2

An =

n=0

Z

1

f (x)Pn (x) dx. −1

Because f (x) is an odd function, we need only odd Legendre polynomials: A1 =

3 2 2

Z

1

3 , 2

x dx = 0

and A5 =

11 2 2

The final answer is

Z

1

A3 =

7 2 2

Z

f (x) =

∞ X

0

An Pn (x),

where

A0 =

1 2

A1 = and

5 A2 = − 2

Z

0 −1

3 2

Z

0 −1

Z

−1 dx +

0 −1

−x dx +

1 2

Z

3 2

5 3x2 − 1 dx + 2 2

1

Z

+ ··· 1

f (x)Pn (x) dx. −1

1 x dx = − , 4

0

Z

Z

11 16 P5 (x)

2n + 1 2

An =

n=0

Therefore,

0

5x3 − 3x 7 dx = − 2 8

63x5 − 70x3 + 15x 11 dx = . 8 16

f (x) = 23 P1 (x) − 78 P3 (x) + 6.

1

1

x2 dx = 0

1

x 0

5 4

5 3x2 − 1 dx = . 2 16

The final answer is f (x) = − 14 P0 (x) + 54 P1 (x) +

5 16 P2 (x)

+ ···

7.   1 d4 1 d4  2 4 (x − 1) = x8 − 4x6 + 6x4 − 4x2 + 1 4 4 4 4 2 4! dx 2 4! dx  1 4 = 8 · 7 · 6 · 5x − 4 · 6 · 5 · 4 · 3x2 + 6 · 4 · 3 · 2 · 1 (16)(24)  = 81 35x4 − 30x2 + 3

P4 (x) =

183

Worked Solutions

8. From Equation 6.4.24 with n = 5, 6P6 (x)−11xP5 (x)+5P4 (x) = 0. Solving for P6 (x), 6P6 (x) = 11x P6 (x) =

 63 8

x5 −

1 6 16 (231x



70 3 15 8 x + 8 x − 4 2

5

 35 8

− 315x + 105x − 5).

x4 −

30 2 8 x

+

3 8



9. (a) From (n + 1)Pn+1 (x) − (2n + 1)xPn (x) + nPn−1 (x) = 0, (n + 1)Pn+1 (1) − (2n + 1)Pn (1) + nPn−1 (1) = 0 at x = 1. Now, Pn (1) = k, a constant, is the solution to this difference equation for any n. However, because P0 (1) = 1, Pn (1) = 1. (b) From (n + 1)Pn+1 (x) − (2n + 1)xPn (x) + nPn−1 (x) = 0, (n + 1)Pn+1 (−1) + (2n + 1)Pn (−1) + nPn−1 (−1) = 0 at x = −1. Now, Pn (−1) = (−1)n k, where k is a constant, is the solution to this difference equation. However, because P0 (−1) = 1, Pn (−1) = (−1)n . (c) For 2n + 1, Equation 6.4.14 becomes P2n+1 (x) =

n X

k=0

(−1)k (4n + 2 − 2k)! x2n+1−2k . 22n+1 k!(2n + 1 − k)!(2n + 1 − 2k)!

All of the terms vary with some positive power of x. Therefore, P2n+1 (0) = 0. (d) For 2n, Equation 6.4.14 becomes P2n (x) =

n X

k=0

(−1)k (4n − 2k)! x2n−2k . 22n k!(2n − k)!(2n − 2k)!

All of the terms vanish if x = 0 except for k = n. Therefore, (−1)n (2n)! (−1)n (2n)! = . 22n n!n!0! 22n (n!)2

P2n (0) =

10. From Equation 6.4.30, Z

1 x

′ Pn+1 (τ ) dτ



Z

1 x

′ Pn−1 (τ ) dτ

= (2n + 1)

Z

1

Pn (τ ) dτ, x

184

Advanced Engineering Mathematics with MATLAB 1 Pn+1 (τ )|x



1 Pn−1 (τ )|x

= (2n + 1)

and

Z

1

Pn (τ ) dτ x

Pn+1 (1) − Pn+1 (x) − Pn−1 (1) + Pn−1 (x) = (2n + 1) Because Pn+1 (1) = Pn−1 (1), Z 1 Pn (τ ) dτ = x

Z

1

Pn (τ ) dτ. x

1 [Pn−1 (x) − Pn+1 (x)] . 2n + 1

11. If the eigenfunction expansion reads p

then cn = =

Z

Z

2 cos(x) − 2 cos(θ)

=

∞ X

cn cos

n=0



n+

1 2

  x ,

   Z π    H(θ − x) cos n + 12 x p cos2 n + 21 x dx dx 2 cos(x) − 2 cos(θ) 0     1 cos n + 2 x π p = Pn [cos(θ)]. dx 2 2 cos(x) − 2 cos(θ)

π 0 θ 0

Therefore, p

H(θ − x)

H(θ − t)

2 cos(t) − 2 cos(θ)

=

∞ X

Pn [cos(θ)] cos

n=0



n+

1 2

  t ,

0 ≤ t < θ ≤ π.

If the eigenfunction expansion reads p

then cn = = Therefore, p

Z

Z

π 0 π θ

H(x − θ)

2 cos(θ) − 2 cos(x)

=

∞ X

cn sin

n=0



n+

1 2

  x ,

   Z π    H(x − θ) sin n + 21 x p sin2 n + 21 x dx dx 2 cos(θ) − 2 cos(x) 0     1 sin n + 2 x π p = Pn [cos(θ)]. dx 2 2 cos(θ) − 2 cos(x)

H(t − θ)

2 cos(θ) − 2 cos(t)

=

∞ X

n=0

Pn [cos(θ)] sin



n+

1 2

  t ,

0 ≤ θ < t ≤ π.

185

Worked Solutions 12. If p

H(θ − t)

=

2 cos(t) − 2 cos(θ)

∞ X

cos

n=0



1 2

n+

∞ X   t Pn [cos(θ)] = An Pn [cos(θ)], n=0

then



An = cos Therefore,

Z

π t

If p

1 2

n+

  t =

2 2n + 1

Z

π 0

H(θ − t)Pn [cos(θ)] sin(θ) p dθ. 2 cos(t) − 2 cos(θ)

   cos n + 21 t Pn [cos(θ)] sin(θ) p dθ = . n + 21 2 cos(t) − 2 cos(θ)

H(t − θ)

2 cos(θ) − 2 cos(t)

=

∞ X

sin

n=0



1 2

n+

∞ X   t Pn [cos(θ)] = An Pn [cos(θ)], n=0

then

An = sin Therefore,

 Z

n+

t 0

1 2

  t =

2 2n + 1

Z

π 0

H(t − θ)Pn [cos(θ)] sin(θ) p dθ. 2 cos(θ) − 2 cos(t)

   sin n + 21 t Pn [cos(θ)] sin(θ) p dθ = . n + 21 2 cos(θ) − 2 cos(t)

13. Setting h = 1/t, we have that

1 h 1 √ =√ =p 2 2 1 − 2tx + t 1 − 2xh + h2 1 − 2x/h + 1/h ∞ ∞ X X t−n−1 Pn (x). hn Pn (x) = =h n=0

n=0

Turning to the expansion, f (x) =

∞ X

An Pn (x),

n=0

where Z Pn (x) 2n + 1 1 p √ dx dx = √ −|µ| 2 cosh(µ) − x e − 2x + e|µ| −1 −1 Z 1 Pn (x) 2n + 1 √ = √ e|µ|/2 dx. |µ| + e2|µ| 2 1 − 2xe −1

2n + 1 An = 2

Z

1

Pn (x)

186

Advanced Engineering Mathematics with MATLAB

Using the results from part(a) with t = e|µ| and the orthogonality property of Legendre polynomials, Z ∞ √ 1 2n + 1 −|µ|/2 X −m|µ| 1 An = √ e Pm (x)Pn (x) dx = 2e−(n+ 2 )|µ| . e 2 −1 m=0

Substituting An into the first equation, we obtain the final answer.

14. The first formula follows by simply letting h = 1. For the second formula, we integrate the generating function from 0 to h or Z h ∞ Z h X dτ √ τ n Pn (x) dτ = 1 − xτ + τ 2 0 n=0 0 ∞  p  h X Pn (x) = ln 2 1 − 2xτ + τ 2 + 2τ − 2x hn+1 n + 1 0 n=0 ! √ 1 − 2xh + h2 + h − x . = ln 1−x The final result is obtained by settingp h = 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 J0 (kx) = J0′ (kx) = k

∞ X (−1)m (kx/2)2m , m!m! m=0

∞ ∞ X X (−1)m (kx/2)2m−1 (−1)i (kx/2)2i+1 = −k = −kJ1 (kx). (m − 1)!m! i!(i + 1)! m=1 i=0

2. Because J0′ (x) = −J1 (x), J0′′ (x) = −J1′ (x) = 12 [J2 (x) − J0 (x)] from Equation 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. 4. Taking the derivative of problem 2: 2J0′′′ (x) = J2′ (x) − J0′ (x)

= J1 (x) − 2J2 (x)/x − J0′ (x) from Equation 6.5.27 = J1 (x) − J0′ (x) − 2[2J1 (x)/x − J0 (x)]/x from Equation 6.5.29 = −2J0′ (x) + 4J0′ (x)/x2 + 2J0 (x)/x

because J1 (x) = −J0′ (x).

187

Worked Solutions Dividing by 2, J0′′′ (x) =



 1 2 − 1 J0′ (x) + J0 (x). x2 x

5. From problem 3, J2 (x) J ′ (x) J ′′ (x) 1 J ′′ (x) . =− 0 + 0 = − 0′ J1 (x) xJ1 (x) J1 (x) x J0 (x) Using Equation 6.5.29, J0 (x) + J2 (x) = 2J1 (x)/x, 2 J0 (x) 2 J0 (x) J2 (x) . = − = + ′ J1 (x) x J1 (x) x J0 (x)

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:

n−1 4n(n − 1) Jn (x) − [Jn (x) + Jn+2 (x)] − 3Jn (x) + Jn+2 (x) = 4Jn′′ (x). 2 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.

10. At the maximum or minimum, Jn′ (x) = 0. From Equation 6.5.30, Jn−1 (x) = Jn+1 (x). From Equation 6.5.27, x = nJn (x)/Jn−1 (x). From Equation 6.5.28, x = nJn (x) /Jn+1 (x).

188

Advanced Engineering Mathematics with MATLAB

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.

13.

14. Z

 d  xJ0 (x2 ) = J0 (x2 ) + 2x2 J0′ (x2 ) = J0 (x2 ) − 2x2 J1 (x2 ). dx Z

x−2 J3 (2x) dx = 2

15.

Z

16.

17. Z

x3 J2 (3x) dx =

0

1 81

Z

Z

η −2 J3 (η) dη = −2η −2 J2 (η) + C = − 21 x−2 J2 (2x) + C

η 3 J2 (η) dη =

1 3 1 η J3 (η) + C = x3 J3 (3x) + C 81 3

Z

ln(x)[xJ0 (x) dx] = x ln(x)J1 (x) −

1 k2

Z

x(1 − x2 )J0 (kx) dx =

Z

x ln(x)J0 (x) dx =

= x ln(x)J1 (x) + J0 (x) + C

Z

a

xJ0 (kx) dx = 0

1

= = = = =

ka

ηJ0 (η) dη = 0

1 0

xJ0 (kx) dx −

J1 (x) dx

1 a2 ka ηJ1 (η)|0 = J1 (ka) 2 k ka

Z

1

x3 J0 (kx) dx 0

Z k 1 ηJ0 (η) dη − 4 η 3 J0 (η) dη k 0 0 # " Z k k 1 1 k 2 3 η J1 (η) dη ηJ1 (η)|0 − 4 η J1 (η) 0 − 2 k2 k 0 k i 1 h J1 (k) − 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 1 k2

Z

Z

k

189

Worked Solutions 18.

Z

1

x3 J0 (kx) dx = 0

1 k4

1 = 4 k

Z

k

η 3 J0 (η) dη

"0

k η J1 (η) 0 − 2 3

Z

k 2

η J1 (η) dη 0

#

k i 1 h 3 k J1 (k) − 2 η 2 J2 (η) 0 4 k    1 3 2 2 = 4 k J1 (k) − 2k J1 (k) − J0 (k) k k 2 k2 − 4 J1 (k) + 2 J0 (k) = k3 k

=

19. Because f (x) =

∞ X

Ak J0 (µk x),

k=1

R1 0

Ak =

Rµ 2 0 k ηJ0 (η) dη xJ0 (µk x) dx 2µk J1 (µk ) 2 = = 2 2 = . 1 2 2 2 µk J1 (µk ) µk J1 (µk ) µk J1 (µk ) 2 J1 (µk )

Therefore, f (x) = 2

∞ X J0 (µk x) . µk J1 (µk )

k=1

20. Because f (x) =

∞ X

Ak J0 (µk x),

k=1

Ak = =

1 8

R1 0

x(1 − x2 )J0 (µk x) dx = 1 2 2 J1 (µk )

µk J1 (µk ) −

1 [µ3k J1 (µk ) µ2k 4µ2k J12 (µk )

R µk 0

− 2µ2k J2 (µk )]

Therefore f (x) =

R µk 1 µ2k 0 4µ2k J12 (µk )

ηJ0 (η) dη −

=

∞ X J0 (µk x) . µ3k J1 (µk )

k=1

21. Because f (x) =

∞ X

k=1

Ak J1 (µk x),

η 3 J0 (η) dη

4J1 (µk )/µk 1 = 3 . 2 2 4µk J1 (µk ) µk J1 (µk )

190

Advanced Engineering Mathematics with MATLAB

Ak = = = =

R2

x(4x − x3 )J1 (µk x) dx 2J22 (2µk ) R 2µ R 2µk 2 4 0 η J1 (η) dη − µ12 0 k η 4 J1 (η) dη 0

k

2µ3k J22 (2µk )

16µ2k J2 (2µk ) −

1 [16µ4k J2 (2µk ) µ2k 2µ3k J22 (2µk )

− 16µ3k J3 (2µk )]

16 16 16J3 (2µk ) = 3 =− 3 . 2µ2k J22 (2µk ) µk J2 (2µk ) µk J0 (2µk )

Therefore, f (x) = −16 22. Because f (x) =

∞ X J1 (µk x) . µ3k J0 (2µk )

k=1

∞ X

Ak J1 (µk x),

k=1

Ak = =

R1 0

Rµ x4 J1 (µk x) dx 2 0 k η 4 J1 (η) dη 2[µ4k J2 (µk ) − 2µ2k J3 (µk )] = = 1 2 5 2 µk J2 (µk ) µ5k J22 (µk ) 2 J2 (µk )

2[µk J2 (µk ) − 8J2 (µk )/µk ] 2(µ2k − 8) = . µ2k J22 (µk ) µ3k J2 (µk )

Therefore, f (x) = 2

∞ X (µ2k − 8)J1 (µk x) . µ3k J2 (µk )

k=1

23. Because f (x) =

∞ 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, f (x) = 2

∞ X µk J2 (µk )J1 (µk x)

k=1

24. Because f (x) =

(µ2k − 1)J12 (µk )

∞ X

k=1

Ak J0 (µk x),

.

191

Worked Solutions Ak = = = = = = =

R1

 Z µk  (1 − x4 )xJ0 (µk x) dx u4 2 1 − 4 J0 (u) u du = 2 2 1 2 µk J1 (µk ) 0 µk 2 J1 (µk )    Z µ k µ k u4 2 4 4 1 − u J (u) du u J (u) + 1 1 µ2k J12 (µk ) µ4k µ4k 0 0 Z µk 8 u2 · u2 J1 (u) du µ6k J12 (µk ) 0   Z µk µk 8 3 4 u J (u) du u J (u) − 2 2 2 0 µ6k J12 (µk ) 0 h µk i 8 4 3 µ J (µ ) − 2u J (u) 2 k 3 0 µ6k J12 (µk ) k 8 [µk J2 (µk ) − 2J3 (µk )] 3 2 µk J1 (µk )   32 2J2 (µk ) 32(µ2k − 4) J (µ ) − = . 1 k µ3k J12 (µk ) µk µ5k J1 (µk ) 0

Therefore, f (x) = 32

∞ X (µ2k − 4)J0 (µk x) . µ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 1=

∞ X

Ak J0 (λk x),

0 < x < L,

k=1

with Ak =

1 Ck

Z

L

xJ0 (λk x) dx

Ck = (λ2k L2 + α2 L2 )J02 (λk L)/(2λ2k ),

and

0

if λk is the kth root of λJ1 (λL) = αJ0 (λL). Therefore, Ak =

2λ2k 2 2 (λk + α )L2 J02 (λk L)

Z

L

x J0 (λk x) dx = 0

The final result follows by letting µk = λk L. 26. Because f (x) =

∞ X

k=1

Ak J0 (µk x),

2α . (λ2k + α2 )LJ0 (λk L)

192

Advanced Engineering Mathematics with MATLAB Ra

x[J0 (bx) − J0 (ba)]J0 (µk x) dx 1 2 2 2 a J0 (ab)J1 (µk a) 2 2[abJ0 (µk a)J1 (ba) − aµk J0 (ba)J1 (µk a)] − = 2 2 2 2 a (b − µk )J0 (ba)J1 (µk a) aµk J1 (µk a)

Ak =

=

0

aµk (µ2k

2b2 . − b2 )J1 (µk a)

Therefore, f (x) =

∞ 2b2 X J0 (µk x) . 2 a µk (µk − b2 )J1 (µk a) k=1

27. Because f (x) =

∞ X

Ak J0 (µk x),

k=1

Ak =

Rt 0

p √ R1 J0 (µk x) x dx/ t2 − x2 2t 0 J0 (bη) η dη/ 1 − η 2 2 sin(µk t) = . = 1 2 2 (µ ) J µk J12 (µk ) J (µ ) k k 1 2 1

Therefore, f (x) = 2

∞ X sin(µk t)J0 (µk x)

k=1

28. Because f (x) =

∞ X

µk J12 (µk )

.

Ak J0 (µk x/b),

k=1

√ J0 (µk x/b) x dx/ a2 − x2 Ak = 1 2 2 2 b J0 (µk ) p R1 2a 0 J0 (µk aη/b) η dη/ 1 − η 2 2 sin(µk a/b) = = 2 2 b J0 (µk ) bµk J02 (µk ) Ra 0

from Equation 6.5.31, Equation 6.5.35, and Equation 6.5.44. Therefore, f (x) =



2 X sin(µk a/b)J0 (µk x/b) . b µk J02 (µk ) k=1

29. Because

√ ∞ X cosh(b t2 − x2 ) √ Ak J0 (µk x), H(t − x) = t2 − x 2 k=1

193

Worked Solutions √  cosh b t2 − x2 √ J0 (µk x) x dx t2 − x 2 0 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)

2 Ak = 2 2 a J1 (µk a)

Z

t

where η 2 = t2 − x2 . The final result is obtained by substituting Ak into the first equation. 30. If we expand the function as a Fourier half-range sine expansion, ∞  nπx  X x √ . Bn sin H(t − x) = L t t2 − x 2 n=1

Then, the coefficient Bn is given by 2 Bn = L

Z

t 0

x sin(nπx/L) 2 √ dx = 2 2 L t t −x

Z

1 0

  nπt η sin(nπtη/L) π p . dη = J1 L L 1 − η2

Substitution of Bn into the first equation completes the problem. 31. Because f (x) =

∞ X

Ak J0 (µk x/a),

k=1

Ak =

Ra 0

δ(x − b)J0 (µk x/a) x dx 2bJ1 (µk b/a) = . 1 2 2 a2 J12 (µk ) 2 a J1 (µk )

Therefore, f (x) =

∞ 2b X J1 (µk b/a) J1 (µk x/a). a2 J12 (µk ) k=1

32. Because f (x) =

∞ X

Ak J0 (µk x/a),

k=1

Ak = Therefore

Ra 0

[δ(x)/(2πx)]J0 (µk x/a) x dx 1 . = 1 2 2 2 2 πa J 1 (µk ) 2 a J1 (µk ) ∞ 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 % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %

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. 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. 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. real F(NU). ASSEMBLE stores into F the right hand side of the linear equations. SOLVE replaces those values of F by the solution of the linear equations. real H(N), the length of the subintervals. integer 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. 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,

195

196 % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %

Advanced Engineering Mathematics with MATLAB

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, depending on whether there was an unknown at node 0. 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. integer NODE(NL,N). For each subinterval I: NODE(1,I) is the number of the left node, and NODE(2,I) is the number of the right node. integer NQUAD. The number of quadrature points used in a subinterval. This code uses NQUAD = 1. integer NSUB, the number of subintervals into which the interval [XL,XR] is broken. integer NU, the number of unknowns in the linear system. Depending on the value of IBC, there will be N-1, N, or N+1 unknown values, which are the coefficients of basis functions. real UL. If IBC is 1 or to have at X = If IBC is 2 or to have at X =

3, UL is the value that U is required XL. 4, UL is the value that U’ is required XL.

real UR. If IBC is 2 or to have at X = If IBC is 1 or to have at X =

3, UR is the value that U is required XR. 4, UR is the value that U’ is required XR.

real XL, the left endpoint of the interval over which the differential equation is being solved. real XN(1:N+1). XN(I) is the location of the I-th node. and XN(N+1) is XR.

XN(1) is XL,

Worked Solutions

197

% % 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 ); % **** Initialize variables that define the problem. [ ibc, nquad, ul, ur, xl, xr ] = init ( ); % Compute the quantities that describe the geometry % of the problem. [h, indx, node, nu, xn, xquad] = geometry( ibc, nl, n, xl, xr ); % **** Assemble the matrix. [ adiag, aleft, arite, f ] = assemble ( h, indx, nl, node, ... nu, nquad, n, ul, ur, xn, xquad ); % **** Print out the linear system. system print ( adiag, aleft, arite, f, nu );

198

Advanced Engineering Mathematics with MATLAB

% **** Solve the linear system. u = solve ( adiag, aleft, arite, f, nu ); % **** Print the current solution. output ( u, ibc, indx, n, nu, ul, ur, xn ); fprintf ( 1, ’\n’ ); fprintf ( 1, ’FEM1D:\n’ ); fprintf ( 1, ’ Normal end of execution.\n’ ); fprintf ( 1, ’\n’ ); timestamp ( ); return end %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function [adiag, aleft, arite, f] = assemble ( h, indx, nl, ... node, nu, nquad, n, ul, ur, xn, xquad ) %*************************************************************** % % ASSEMBLE assembles the matrix and right hand side % of the linear system. % % % Licensing: % This code is distributed under the GNU LGPL license. % % Author: MATLAB version by John Burkardt % % Parameters: % % Input, real H(N), the length of the subintervals. % % 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

Worked Solutions % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %

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, depending on whether there was an unknown at node 0. 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 NODE(NL,N). For each subinterval I: NODE(1,I) is the number of the left node, and NODE(2,I) is the number of the right node. Input, integer NU. NU is the number of unknowns in the linear system. Depending on the value of IBC, there will be N-1, N, or N+1 unknown values, which are the coefficients of basis functions. Input, integer NQUAD, the number of quadrature points in a subinterval. This code uses NQUAD = 1. Input, integer N, the number of subintervals into which the interval [XL,XR] is broken. Input, 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. Input, 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. Input, real XN(1:N+1), the location of the I-th node. XN(1) is XL, and XN(N+1) is XR. Input, real XQUAD(N), the location of the single quadrature point in interval I.

199

200 % % % % % % % % % % % % % % % % % % % % % %

Advanced Engineering Mathematics with MATLAB

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.

f(1:nu) = 0.0; adiag(1:nu) = 0.0; aleft(1:nu) = 0.0; arite(1:nu) = 0.0; % **** For element IE... for ie = 1 :

n

he = h(ie); xleft = xn(node(1,ie)+1); xrite = xn(node(2,ie)+1); % **** For quadrature point IQ... for iq = 1 :

nquad

xqe = xquad(ie); % **** For basis function IL... for il = 1 :

nl

ig = node(il,ie);

201

Worked Solutions iu = indx(ig+1); if ( 0 < iu ) [ phii, phiix ] = phi ( il, xqe, xleft, xrite ); f(iu) = f(iu) + he * ff ( xqe ) * phii; % **** Handle boundary conditions. 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 basis function JL... for jl = 1 :

nl

jg = node(jl,ie); ju = indx(jg+1); [ phij, phijx ] = phi ( jl, xqe, xleft, xrite ); aij = he * ( pp ( xqe ) * phiix * phijx ... + qq ( xqe ) * phii * phij ); if ( ju 0,

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 v(x, t) =

∞ X

Bn sin(nx)e−a

2

n2 t

.

n=1

Using the initial condition, v(x, 0) =

∞ X

n=1

Bn sin(nx) = T0 − T0 x/π.

This is a half-range Fourier sine expansion and Z 2 π (T0 − T0 x/π) sin(nx) dx Bn = π 0 π  π  2T0 2T0 sin(nx) x cos(nx) cos(nx) − 2 − =− nπ π n2 n 0 0 2T0 [1 − (−1)n ] 2T0 n + (−1) . = nπ nπ Thus, the final solution is u(x, t) =

∞ 2 2 T0 x 2T0 X 1 + sin(nx)e−a n t . π π n=1 n

243

Worked Solutions

18. We first find the steady-state solution. We find it by solving w′′ = 0 with w′ (0) = −H/κ and w(L) = T0 . The steady-state solution is w(x) = T0 + HL (1 − x/L) /κ. To find the transient solution, u(x, t) = w(x) + v(x, t). Then we must solve ∂2v ∂v = a2 2 , ∂t ∂x

0 < x < L, t < 0,

with the boundary conditions vx (0, t) = v(L, t) = 0, t < 0 and the initial condition v(x, 0) = H(x − L)/κ for 0 < x < L. We can now use separation of variables and find that   2   ∞ X a (2n − 1)2 π 2 t (2n − 1)πx exp − . Bn cos v(x, t) = 2L 4L2 n=1 Using the initial condition, 

 (2n − 1)πx H(x − L) Bn cos v(x, 0) = = . 2L κ n=1 ∞ X

This is a generalized Fourier expansion with RL [H(x − L)/κ] cos[(2n − 1)πx/(2L)] dx An = 0 RL cos2 [(2n − 1)πx/(2L)] dx 0   L  L   2H 4L2 2xL (2n − 1)πx (2n − 1)πx = cos sin + Lκ (2n − 1)2 π 2 2L (2n − 1)π 2L 0 0    L (2n − 1)πx 2L2 sin − (2n − 1)π 2L 0 8HL =− . κ(2n − 1)2 π 2 Thus, the final solution is  x HL 1− u(x, t) = T0 + κ L   2   ∞ a (2n − 1)2 π 2 t (2n − 1)πx 8 X 1 exp − . cos − 2 π n=1 (2n − 1)2 2L 4L2 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 0 < x < L, t > 0, = a2 2 , ∂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  2 2 2  ∞  nπx  X a n π t Bn sin v(x, t) = exp − . L L2 n=1 Using the initial condition, v(x, 0) =

∞ X

Bn sin

n=1

 nπx  L

=−

(h2 − h1 )x . L

This is a half-range sine expansion Z  nπx  2(h2 − h1 ) L Bn = − x sin dx L2 L 0   nπx  Lx  nπx  L 2(h2 − h1 ) L2 = 2(h2 − h1 ) (−1)n . =− − sin cos L2 n2 π 2 L nπ L nπ 0

Thus, the final solution is

(h2 − h1 )x L  2 2 2  ∞  nπx  a n π t 2(h2 − h1 ) X (−1)n exp − . sin + π n L L2 n=1

u(x, t) = h1 +

20. Separating the variables yields X ′′ /X = T ′ /(a2 T ) = −λ. This leads to the Sturm-Liouville problem X ′′ + λX = 0 with X(0) = X(L) = 0 because u(0, t) = X(0)T (t) = 0 or X(0) = 0 and u(L, t) = X(L)T (t) = 0 or X(L) = 0. The solution of the Sturm-Liouville problem is Xn (x) = sin(nπx/L). The 2 2 2 2 time equation is Tn′ + n2 π 2 a2 Tn /L2 = 0 or Tn (t) = Bn e−a n π t/L . Thus, the general solution is  2 2 2  ∞  nπx  X n π a exp − t . Bn sin u(x, t) = L L2 n=1 At t = 0,

u(x, 0) =

∞ X

n=1

Bn sin

 nπx  L

=

 8H L3 x − 3L2 x2 + 4Lx3 − 2x4 . L4

This is a half-range Fourier sine expansion and Z   nπx  16H L 3 Bn = 5 L x − 3L2 x2 + 4Lx3 − 2x4 sin dx L L 0   96H 768H = − 5 5 [1 − (−1)n ], 3 3 n π n π

245

Worked Solutions because

  nπx  Lx  nπx  L 16H L2 − sin cos L2 n2 π 2 L nπ L 0    nπx  L  nπx   Lx2 48H 2xL2 2L3 − 3 − cos sin − L n2 π 2 L nπ n3 π 3 L 0  2 2     nπx   nπx  L 64H 3L x Lx3 6L4 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 − 4 4 sin L n2 π 2 n π L  4   nπx  L 2 3 Lx 12x L 24L5 . − − 3 3 + 5 5 cos nπ n π n π L 0

Bn =

Thus, the final solution is u(x, t) =

  ∞ 192H X [(2m − 1)2 π 2 − 8] (2m − 1)πx sin π 5 m=1 (2m − 1)5 L   (2m − 1)2 π 2 a2 × exp − t . L2

21. We begin by letting u(x, t) = h0 + v(x, t). Then we must solve ∂2v ∂v = a2 2 , ∂t ∂x

0 < x < L, t > 0,

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    2  ∞ X (2n − 1)πx a (2n − 1)2 π 2 t Bn sin v(x, t) = exp − . 2L 4L2 n=1 Using the initial condition, v(x, 0) =

∞ X

n=1

Bn sin



 (2n − 1)πx = −h0 . 2L

This is a generalized Fourier series and RL −h0 sin [(2n − 1)πx/(2L)] dx Bn = 0R L sin2 [(2n − 1)πx/(2L)] dx 0  L  4h0 (2n − 1)πx 4h0 = cos = − (2n − 1)π . (2n − 1)π 2L 0

246

Advanced Engineering Mathematics with MATLAB

Thus, the final solution is u(x, t) = h0 −

  2   ∞ a (2n − 1)2 π 2 t (2n − 1)πx 4h0 X 1 exp − . sin π n=1 2n − 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 , ∂t ∂x

0 < x < π, t < 0,

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 v(x, t) =

∞ X

Bn sin

n=1



 (2n − 1)x −a2 (2n−1)2 t/4 e . 2

Using the initial condition,  e−x + e−π x − 1 (2n − 1)x = f (x) − . Bn sin v(x, 0) = 2 a2 n=1 ∞ X



This is a generalized Fourier expansion and Rπ

[f (x) − (e−x + e−π x − 1)/a2 ] sin[(2n − 1)x/2] dx Rπ 2 sin [(2n − 1)x/2] dx 0 Z π 2 [f (x) − (e−x + e−π x − 1)/a2 ] sin[(2n − 1)x/2] dx. = π 0

Bn =

0

Thus, the final solution is   ∞ (2n − 1)x −a2 (2n−1)2 t/4 1 − e−x − e−π x X e . Bn sin + u(x, t) = a2 2 n=1 23. Let us define u(x, t) = −t + v(x, t). Then the problem to be solved becomes ∂2v ∂v = a2 2 , 0 < x < 1, t > 0, ∂t ∂x

247

Worked Solutions

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 v(x, t) =



2 2 2 A0 X An cos(nπx)e−a n π t . + 2 n=1

Using the initial condition, v(x, 0) =



A0 X An cos(nπx) = 21 (1 − x2 ). + 2 n=1

This is a half-range cosine Fourier expansion and Z 1 2 11 1 A0 = (1 − x2 ) dx = x|0 − 13 x3 0 = 1 0 2

2 3

and

2 An = 1 =

Z

1 0

1 2 (1

− x2 ) cos(nπx) dx

1   1 n sin(nπx) 2x n2 π 2 x2 − 2 = −2(−1) . − cos(nπx) + sin(nπx) 2 2 3 3 2 2 nπ n π n π n π 0 0

Thus, the final solution is u(x, t) =

∞ 2 2 2 2 X (−1)n 1 −t− 2 cos(nπx)e−a n π t . 3 π n=1 n2

24. Let us define u(x, t) = A sin(ωt)/ω + v(x, t). Then the problem to be solved becomes ∂v ∂2v = a2 2 , ∂t ∂x

0 < x < π, 0 < t,

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 v(x, t) =



2 2 A0 X An cos(nx)e−a n t . + 2 n=1

Using the initial condition, v(x, 0) =



A0 X An cos(nx) = f (x). + 2 n=1

248

Advanced Engineering Mathematics with MATLAB

This is a half-range cosine Fourier expansion and 2 A0 = π

Z

π

f (x) dx

and

0

2 An = π

Z

π

f (x) cos(nx) dx. 0

Thus, the final solution is u(x, t) =



2 2 A A0 X An cos(nx)e−a n t . sin(ωt) + + ω 2 n=1

25. We can expand the right side of the partial differential equation in a half-range sine expansion: f (x) =

∞ X

bn sin(nx),

0 < x < π,

n=1

where bn =

Thus,

2 π

Z

π/2

x sin(nx) dx + 0

2 π

Z

π π/2

(π − x) sin(nx) dx

π π/2 2 2 cos(nx) = 2 [sin(nx) − nx cos(nx)] − n π n π/2 0 π  nπ  4 2 = 2 sin . − 2 [sin(nx) − nx cos(nx)] n π n π 2 π/2 f (x) =

∞ 4 X (−1)n+1 sin[(2n − 1)x]. π n=1 (2n − 1)2

To find the steady-state solution we solve the differential equation −w′′ =

∞ 4 X (−1)n+1 sin[(2n − 1)x] π n=1 (2n − 1)2

with w(0) = w(π) = 0. Integrating twice and applying the boundary conditions, ∞ 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 ∂2v ∂v = , ∂t ∂x2

0 < x < π, t > 0,

249

Worked Solutions

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 v(x, t) =

∞ X

Bn sin(nx)e−a

2

n2 t

.

n=1

Using the initial condition, v(x, 0) =

∞ X

Bn sin (nx) e−a

2

n2 t

n=1

= −w(x).

Because we already have w(x) expressed as a half-range sine expansion Bn = −4 sin(nπ/2)/(n4 π). Thus, the final solution is u(x, t) =

∞ i h 4 X (−1)n+1 −(2n−1)2 t . sin[(2n − 1)x] 1 − e π n=1 (2n − 1)4

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 0 < x < L, 0 < t, = a2 2 , ∂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 v(x, t) =

∞ X

Bn sin

n=1

 nπx  L

e−a

2

n2 π 2 t/L2

.

Using the initial condition, v(x, 0) =

∞ X

n=1

Bn sin

 nπx  L

= −w(x).

This is a half-range sine expansion and Z  nπx  2 L P (x2 − Lx) dx sin Bn = L 0 2a2 L    nπx  L  nπx   Lx2 P 2xL2 2L3 = 2 − sin − 3 3 cos a L n2 π 2 L nπ n π L 0  L  2     2 P L Lx nπx nπx 2P L [(−1)n − 1] − 2 2 2 sin − cos . = a n π L nπ L a2 n3 π 3 0

250

Advanced Engineering Mathematics with MATLAB

Thus, the final solution is u(x, t) =

∞ P (Lx − x2 ) 4P L2 X sin[(2m − 1)πx/L] −a2 (2m−1)2 π2 t/L2 − e . 2a2 a2 π 3 m=1 (2m − 1)3

27. Assuming that u(x, t) = w(x) + v(x, t), the steady-state solution is governed 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 ∂2v ∂v 0 < x < L, t > 0, = a2 2 , ∂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    2 2  ∞ X βn x a β t An cos v(x, t) = exp − 2n , L L n=1

where βn tan(βn ) = hL/κ. Using the initial condition,   ∞ X βn x An cos = −w(x). v(x, 0) = L n=1

This is a generalized Fourier series and RL −w(x) cos(βn x/L) dx An = 0 R L cos2 (βn x/L) dx 0 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 βn x 2κL cos dx (L2 − x2 ) + h L 0  L  L   L3 βn x βn x 2κL2 = sin sin + βn L 0 hβn L 0    L     βn2 x2 βn x βn x L3 2βn x + − 2 sin cos − 3 βn L L L2 L 0 =

2L3 2κL2 2L3 sin(βn ) [sin(β ) − β cos(β )] + sin(β ) = . n n n n βn3 hβn βn3

251

Worked Solutions Thus, the final answer is A0 (L2 − x2 ) A0 L + 2κ h   2 2   ∞ 2L2 A0 X a β t sin(βn ) βn x − exp − 2n . cos 2 3 κ n=1 βn [1 + κ sin (βn )/hL] L L

u(x, t) =

28. We first find the steady-state solution. We find it by solving w′′ − w = 0 with w(0) = 1 and w(L) = 0. The steady-state solution is w(x) =

sinh(L − x) exp(L − x) − exp(x − L) = . sinh(L) exp(L) − exp(−L)

To find the transient solution, u(x, t) = w(x) + v(x, t). Then we must solve ∂2v ∂v = − v, ∂t ∂x2

0 < x < L, t < 0,

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 v(x, t) =

∞ X

Bn sin

n=1

 nπx  L

  2 2   n π exp − + 1 t . L2

Using the initial condition, v(x, 0) =

∞ X

Bn sin

n=1

 nπx  L

= −w(x).

This is a half-range sine expansion and 2 exp(L) Bn = L[exp(L) − exp(−L)] −

2 exp(−L) L[exp(L) − exp(−L)]

Z

Z

L

e−x sin 0 L

ex sin 0

 nπx 

L  nπx  L

dx

dx

L e−x [− sin(nπx/L) − nπ cos(nπx/L)/L] 2 exp(L) L[exp(L) − exp(−L)] 1 + n2 π 2 /L2 0 L 2 exp(−L) ex [sin(nπx/L) − nπ cos(nπx/L)/L] − L[exp(L) − exp(−L)] 1 + n2 π 2 /L2 0 2nπ . = 2 L + n2 π 2 =

252

Advanced Engineering Mathematics with MATLAB

Thus, the final solution is sinh(L − x) sinh(L)   2 2   ∞  nπx  X n π n exp − sin + 1 t + 2π L2 + n2 π 2 L L2 n=1   2 2    ∞  nπx   X n n π exp − = 2π sin +1 t −1 . L2 + n2 π 2 L L2 n=1

u(x, t) =

29. Assuming that u(x, t) = X(x)T (t), we find that   X ′′ 1 T′ = + k = −k 2 , 1 2 a T X or X ′′ + k 2 X = 0,

X ′ (0) = 0,

a2 X ′ (L) = −k2 X(L).

The solution X(x) = cos(kx) satisfies the differential equation and the boundary condition X ′ (0) = 0. Substituting into the other boundary condition, k tan(kL) = k2 /a2 . If kn denotes the nth root of k tan(kL) = k2 /a2 , then the T (t) equation is   Tn′ + (k1 + a2 kn2 )Tn = 0, or Tn (t) = An exp −(k1 + a2 kn2 )t . Therefore, the general solution is u(x, t) =

∞ X

n=1

  An cos(kn x) exp −(k1 + a2 kn2 )t .

Our final task is to compute An . Applying the initial condition, u0 = u(x, 0) =

∞ X

An cos(kn x).

n=1

The coefficient for this generalized Fourier series is RL L u0 cos(kn x) dx u0 sin(kn x)/kn |0 = RL An = R0 L 1 cos2 (kn x) dx 2 0 [1 + cos(2kn x)] dx 0 =

2u0 sin(kn L) 4u0 sin(kn L) = kn [L + sin(2kn L)/(2kn )] 2kn L + sin(2kn L)

Therefore, the final solution is u(x, t) = 4u0

∞ X   sin(kn L) cos(kn x) cos(kn x) exp −(k1 + a2 kn2 )t . 2kn L + sin(2kn L) n=1

253

Worked Solutions 30. Assuming that v(x, t) = X(x)T (t), we find that 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 Tn′ + a2 kn2 Tn = 0,

Tn (t) = Cn e−a

or

2 2 kn t

.

Therefore, the general solution is ∞ X

v(x, t) =

n=1

  2 2 Cn sin(kn x) + 2a2 kn cos(kn x) e−a kn t .

Our final task is to compute Cn . Applying the initial condition, e−x/(2a

2

)

= v(x, 0) =

∞ X

n=1

  Cn sin(kn x) + 2a2 kn cos(kn x) .

The coefficient for this generalized Fourier series is Cn = Now

and

Z Z

R1

1

e−x/(2a 0 1

0



0

2

)

 2  e−x/(2a ) sin(kn x) + 2a2 kn cos(kn x) dx . R1 2 k cos(k x)]2 dx [sin(k x) + 2a n n n 0 

 sin(kn x) + 2a2 kn cos(kn x) dx =

sin(kn x) + 2a2 kn cos(kn x)

2

8a4 kn , 1 + 4a4 kn2

dx = 12 (1 + 4a2 + 4a4 kn2 ).

To obtain these expression, we have used the relationship 4a2 kn cos(kn ) = (4a4 kn2 − 1) sin(kn ). Squaring this relationship and using cos2 (kn ) = 1 − sin2 (kn ), we also have that (1 + 4a4 kn2 )2 sin2 (kn ) = 16a4 kn2 . Therefore, the final solution is   ∞ X kn sin(kn x) + 2a2 kn cos(kn x) −a2 k2 t 4 n . e v(x, t) = 16a 4 k 2 )(1 + 4a2 + 4a4 k 2 ) (1 + 4a n n n=1 u(x, t) equals v(x, t) multiplied by exp[(2x − t)/(4a2 )].

254

Advanced Engineering Mathematics with MATLAB

31. We begin by introducing the new variable v(r, t) = r u(r, t) and find that ∂v ∂2v = 2, ∂t ∂r

0 ≤ r < 1, 0 < t,

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 Bn sin(nπr)e−a n π t . v(r, t) = n=1

Using the initial condition,

v(r, 0) =

∞ X

Bn sin(nπr) = r.

n=1

This is a half-range sine expansion and Bn =

2 1

Z

1

r sin(nπr) dr = 2 0

Thus, the final solution is u(r, t) =



 1 2(−1)n sin(nπr) r cos(nπr) =− − . 2 2 n π nπ nπ 0

∞ 2 2 2 2 X (−1)n+1 sin(nπr)e−a n π t . πr n=1 n

32. Let us introduce a new dependent variables v(r, t) = ru(r, t) so that the problem now becomes ∂2v ∂v = a2 2 , ∂t ∂r

α < r < β, 0 < t,

with the boundary conditions v(α, t) = 0,

and

β

∂v(β, t) = v(β, t), ∂r

0 < t,

and the initial condition v(r, 0) = ru0 , α < r < β. We now assume that v(r, t) = R(r)T (t) which yields T′ R′′ = 2 = −k 2 , R a T or R′′ + k 2 R = 0,

R(α) = 0,

βR′ (β) = R(β).

255

Worked Solutions

The solution R(r) = sin[k(r − α)] satisfies the differential equation and the boundary condition R(α) = 0. Substituting into the other boundary condition, tan[k(β − α)] = βk. If kn denotes the nth root of tan[k(β − α)] = βk, then the T (t) equation is Tn′ + a2 kn2 Tn = 0,

Tn (t) = An e−a

or

2 2 kn t

.

Therefore, the general solution is v(r, t) =

∞ X

n=1

An sin[kn (r − α)]e−a

2 2 kn t

.

Our final task is to compute An . Applying the initial condition, u0 r = v(x, 0) =

∞ X

n=1

An sin[kn (r − α)].

The coefficient for this generalized Fourier series is Rβ u0 α r sin[kn (r − α)] dr An = R β . sin2 [kn (r − α)] dr α

Now Z β α

r sin[kn (r − α)] dr =

Z

β−α

u sin(kn u) du + α 0

Z

β−α

sin(kn u) du 0

β−α β−α β−α u cos(kn u) α cos(kn u) sin(kn u) − − kn2 kn kn 0 0 0 sin[kn (β − α)] (β − α) cos[kn (β − α)] = − kn2 kn α α{cos[kn (β − α)] − 1} = , − kn kn =

and

Z

β α

2

sin [kn (r − α)] dr =

1 2

Z

β

{1 − cos[2kn (r − α)]} dr α  sin[2kn (β − α)] 1 = 2 β−α− 2kn  2 1 = 2 β − α − β cos [kn (β − α)]  = 21 β sin2 [kn (β − α)] − α .

Substituting these integrals into An , we obtain the final answer u(r, t) =

∞ αu0 X sin[kn (r − α)] −a2 kn2 t e , r n=1 kn c n

256

Advanced Engineering Mathematics with MATLAB

where 2cn = β sin2 [kn (β − α)] − α. 33. Introducing the new variable v(r, t) = r u(r, t), the problem becomes ∂2v ∂v = a2 2 , ∂t ∂r

0 ≤ r < b,

0 < t,

with the boundary conditions lim

r→0



∂v v − ∂r r



→ 0,

∂v(b, t) 1−A = v(b, t), ∂r b

and the initial condition v(r, 0) = ru0 , 0 ≤ r < b. We now use separation of variables with v(r, t) = R(r)T (t). The equations governing R(r) are ′′



 R(r) → 0, lim R (r) − r→0 r

2

R + k R = 0,



R′ (b) =

1−A R(b). b

The general solution is R(r) = A cos(kr/b) + B sin(kr/b). The boundary condition at r = 0 forces A = 0. The boundary condition at r = b yields kn cot(kn ) = 1 − A,

nπ < kn < (n + 1)π.

Therefore, the eigenfunction solution is Rn (r) = sin(kn r/b). The temporal part is governed by kn2 Tn′ = − . a2 Tn b2 The general solution to this equation is Tn (t) = Cn e−a general production solution is v(r, t) =

∞ X

Cn sin(kn r/b)e−a

2 2 kn t/b2

2 2 kn t/b2

n=1

Using the initial condition, v(r, 0) = u0 r =

∞ X

n=1

Cn sin(kn r/b).

.

. Therefore, the

257

Worked Solutions The Fourier coefficients for this generalized Fourier series is Cn = However,

Z

b 0

and



kn r u0 r sin b Z

b

sin 0

2



Rb

u0 r sin(kn r/b) dr . Rb 2 sin (k r/b) dr n 0

0



kn r b

dr =



b2 [sin(kn ) − kn cos(kn )] . kn2

dr =

b [2kn − sin(2kn )] . 4kn

Therefore, Cn = and u(r, t) =

4bu0 sin(kn ) − kn cos(kn ) , kn 2kn − sin(2kn )

  ∞ 2 2 2 4bu0 X sin(kn ) − kn cos(kn ) kn r e−a kn t/b . sin r n=1 kn [2kn − sin(2kn )] b

34. We first find the steady-state solution by solving   dw d r = 0, lim |w(r)| < ∞, w(b) = u0 . r→0 dr dr The steady-state solution is w(r) = u0 . To find the transient solution, u(r, t) = w(r) + v(r, t). Then we must solve   ∂v ∂v a2 ∂ r , 0 ≤ r < b, t < 0, = ∂t r ∂r ∂r 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   2 2   ∞ X a k t kn r exp − 2n , An J0 v(r, t) = b b n=1 where J0 (kn ) = 0. Using the initial condition, v(r, 0) =

∞ X

An J0

n=1

where An = −

2u0 b2 J12 (kn )

Z

b

r J0 0





kn r b

kn r b





= −u0 ,

dr = −

2u0 . kn J1 (kn )

258

Advanced Engineering Mathematics with MATLAB

The final solution is u(r, t) = u0

"

 2 2 # ∞ X J0 (kn r/b) a k t 1−2 . exp − 2n k J (k ) b n=1 n 1 n

35. We first find the steady-state solution. We find it by solving   dw d r = 0, dr dr

lim |w(r)| < ∞,

r→0

w(b) = θ.

The steady-state solution is w(r) = θ. To find the transient solution, u(r, t) = w(r) + v(r, t). Then we must solve ∂v a2 ∂ = ∂t r ∂r



∂v r ∂r



,

0 ≤ r < b, t < 0,

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 v(r, t) =

∞ X

An J0

n=1



kn r b



 2 2  a k exp − 2 n t , b

where J0 (kn ) = 0. Using the initial condition, v(r, 0) =

∞ X

An J0

n=1

where An =

2(1 − θ) J12 (kn )b2

Z

b

rJ0 0





kn r b

kn r b





= 1 − θ,

dr =

2(1 − θ) . kn J1 (kn )

The final solution is u(r, t) = θ + 2(1 − θ)

 2 2  ∞ X J0 (kn r/b) a k exp − 2 n t . k J (k ) b n 1 n n=1

36. Separation of variables yields u(r, t) =

∞ X

n=1

An J0 (kn r)e−a

2 2 kn t

,

259

Worked Solutions where kn is the nth root of J0 (k) = 0. Using the initial condition, u(r, 0) =

∞ X

An J0 (kn r) =

n=1



A, B,

0 ≤ r < b, b < r < 1,

where An =

2 2 J1 (kn )

Z

b

Ar J0 (kn r) dr + 0

2 2 J1 (kn )

Z

1

Br J0 (kn r) dr b

Z kn b Z 1 2B 2A u J0 (u) du + 2 2 u J0 (u) du = 2 2 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(A − B)J1 (kn b) 2B . + = kn J1 (kn ) kn J12 (kn ) Therefore, the final solution is u(r, t) = 2

∞ X 2 2 BJ1 (kn ) + b(A − B)J1 (kn b) J0 (kn r)e−a kn t . 2 kn J1 (kn ) n=1

37. We first find the steady-state solution. We find it by solving   2 G d w 1 dw =− , ν + lim |w(r)| < ∞, w(b) = 0. 2 r→0 dr r dr ρ The steady-state solution is w(r) = G(b2 − r2 )/(4ρν). To find the transient solution, u(r, t) = w(r) + v(r, t). Then we must solve ∂v =ν ∂t



∂ 2 v 1 ∂v + ∂r2 r ∂r



,

0 ≤ r < b, t > 0,

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 v(r, t) =

∞ X

An J0

n=1



kn r b



  νk 2 exp − 2n t , b

where kn is the nth root of J0 (k) = 0. Using the initial condition, v(r, t) =

∞ X

n=1

An J0



kn r b



=

G 2 (r − b2 ), 4ρν

260

Advanced Engineering Mathematics with MATLAB

where   G kn r dr r(r2 − b2 )J0 b 0 4ρν   Z 1 Z 1 G 3 4 4 xJ0 (kn x) dx x J0 (kn x) dx − b b = 2ρνJ12 (kn )b2 0 0   2   kn − 4 2b4 G 4 4 J1 (kn ) b J1 (kn ) + 2 J0 (kn ) − b = 2ρνJ12 (kn )b2 kn3 kn kn 2 2Gb =− . ρνJ1 (kn )kn3

An =

2 J12 (kn )b2

Z

b

The final solution is u(r, t) =

  ∞ νkn2 2Gb2 X J0 (kn r/b) G 2 exp − (b − r2 ) − t . 4ρν ρν n=1 kn3 J1 (kn ) b2

38. From separation of variables, we have that u(r, t) =

∞ X

An J0

n=1



kn r b



 2 2  a k exp − 2 n t , b

where bJ0 (kn ) − hkn J1 (kn ) = 0. Using the initial condition, u(r, 0) =

∞ X

n=1

An J0



kn r b



= b2 − r 2 ,

where Rb

r(b2 − r2 )J0 (kn r/b) dr + b2 /h2 )J02 (kn )   Z 1 Z 1 2 3 4 4 x J (k x) dx xJ (k x) dx − b b = 2 2 0 n 0 n b [J0 (kn ) + J12 (kn )] 0 0     2b2 J1 (kn ) 2 kn2 − 4 = 2 J (k ) + − J (k ) 1 n 0 n J0 (kn ) + J12 (kn ) kn kn3 kn2 4b2 [2J1 (kn ) + kn J0 (kn )] = kn3 [J02 (kn ) + J12 (kn )]

An =

2kn2

0 b2 (kn2

from Equation 6.5.31, Equation 6.5.35 and Equation 6.5.45. The final solution is    2 2  ∞ X kn r a k 2J1 (kn ) + kn J0 (kn ) exp − 2n t . J u(r, t) = 4b2 0 2 2 3 k [J (kn ) + J1 (kn )] b b n=1 n 0

261

Worked Solutions 39. From separation of variables, we have that 1 a2



T′ +κ T



=

R′′ R′ + = −k 2 . R rR

Therefore, a superposition of the product solutions yields u(r, t) = e−κt

∞ X

An J0 (kn r)e−a

2 2 kn t

,

n=1

where kn J1 (kn L) = hJ0 (kn L). Using the initial condition, ∞ X

u(r, 0) =

An J0 (kn r) =

n=1



0, T0 ,

0 ≤ r < b, b < r ≤ L.

where (kn2 L2

2

+h L

2

)J02 (kn L)An

=

2kn2 T0

kn2 L2 [J02 (kn L) + J12 (kn L)]An = 2T0

Z

Z

L

rJ0 (kn r) dr

b kn L

ηJ0 (η) dη kn b

= 2T0 kn [LJ1 (kn L) − bJ1 (kn b)] from Equation 6.5.31, Equation 6.5.35 and Equation 6.5.45. Therefore, An =

2T0 [LJ1 (kn L) − bJ1 (kn b)] . L2 kn [J02 (kn L) + J12 (kn L)]

The final solution is u(r, t) =

∞ 2T0 −κt X [LJ1 (kn L) − bJ1 (kn b)]J0 (kn r) −a2 kn2 t e e . L2 kn [J02 (kn L) + J12 (kn L)] n=1

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, w(x) =



Jx(L − x)/2a2 + Ax, Jx(L − x)/2a2 + B(L − x),

0 < x < b, b < x < L.

262

Advanced Engineering Mathematics with MATLAB

If the temperature is continuous, w(b+ ) = w(b− ) and Jb(L − b)/2a2 + Ab = Jb(L − b)/2a2 + B(L − b)

or

Ab = B(L − b).

Integrating the ordinary differential equation, −a2 or

Z

b+ǫ

w′′ dx = J b−ǫ

Z

b+ǫ b−ǫ

dx − P

Z

b+ǫ b−ǫ

δ(x − b) dx

b+ǫ − a2 w′ b−ǫ = 2ǫJ − P.

b+ǫ In the limit of ǫ → 0, limǫ→0 a2 w′ b−ǫ = P. Substituting w(x) into this equation, J(L − 2b)/2 + a2 A − J(L − 2b)/2 + a2 B = −P

or

A + B = −P/a2 .

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 w(x) =



Jx(L − x)/2a2 − P x(L − b)/a2 L, Jx(L − x)/2a2 − P b(L − x)/a2 L,

0 < x < b, b < x < L.

For later calculations, we need to re-express w(x) as a half-range Fourier sine series, ∞  nπx  X , Bn sin w(x) = L n=1 where Z  nπx   nπx  Jx(L − x) 2 b Ax sin dx + dx sin 2 2a L L 0 L 0 Z  nπx  2JL2 [1 − (−1)n ] 2LP sin(nπb/L) 2 L dx = − 2 2 , B(L − x) sin + L b L a2 π 3 n3 a π n2

Bn =

2 L

Z

L

or w(x) =

∞ ∞ 4JL2 X sin[(2m − 1)πx/L] 2LP X sin(nπb/L) sin(nπx/L) − . 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 ∂2v ∂v = a2 2 , ∂t ∂x

0 < x < L, 0 < t,

263

Worked Solutions

while the boundary conditions are v(0, t) = v(L, t) = 0 with the initial condition v(x, 0) = −w(x). Separation of variables yields v(x, t) =

∞ X

n=1

−Bn sin

 nπx  L



a2 n2 π 2 t exp − L2



.

The initial condition gives −w(x) = v(x, 0) =

∞ X

n=1

−Bn sin

 nπx  L

,

where we have already found Bn . Combining w(x) and v(x, t) gives u(x, t) or u(x, t) = −

41. Because

∞ i 4JL2 X sin[(2m − 1)πx/L] h −a2 (2m−1)2 π 2 t/L2 1 − e a2 π 3 m=1 (2m − 1)3

∞ i 2LP X sin(nπb/L) sin(nπx/L) h −a2 n2 π 2 t/L2 1 − e . a2 π 2 n=1 n2

∂v ∂u = e−ax − ae−ax v, ∂x ∂x 2 ∂2u ∂v −ax ∂ v = e − 2ae−ax + a2 e−ax v, 2 2 ∂x ∂x ∂x

and

∂v ∂u = e−ax , ∂t ∂t

∂v ∂v ∂2v ∂v ∂u = e−ax = e−ax 2 − 2ae−ax + a2 e−ax v + 2ae−ax − 2a2 e−ax v ∂t ∂t ∂x ∂x ∂x  2  ∂ v 2 − a v = e−ax ∂x2

or

∂2v ∂v = − a2 v. ∂t ∂x2

Similarly, ∂v(0, t) ∂u(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 T (t) [X ′ (0) + aX(0)] = 0

or

X ′ (0) + aX(0) = 0,

T (t) [X ′ (1) + aX(1)] = 0

or

X ′ (1) + aX(1) = 0.

and 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, v(x, t) = A0 e−ax +

∞ X

n=1

An [a sin(nπx) − nπ cos(nπx)] e−(a

2

+n2 π 2 )t

.

To evaluate A0 and An , we use the initial condition or eax = A0 e−ax +

∞ X

n=1

Therefore,

An [a sin(nπx) − nπ cos(nπx)] .

R1

and R1

eax e−ax dx 2a A0 = 0R 1 = , −2ax 1 − e−2a e dx 0

eax [a sin(nπx) − nπ cos(nπx)] dx 4anπ [1 − (−1)n ea ] . An = 0R 1 = (a2 + n2 π 2 )2 [a sin(nπx) − nπ cos(nπx)]2 dx 0

Therefore,

2ae−ax 1 − e−2a ∞ X 2 2 2 n [1 − (−1)n ea ] [a sin(nπx) − nπ cos(nπx)] e−(a +n π )t . + 4aπ 2 2 2 2 (a + n π ) n=1

v(x, t) =

265

Worked Solutions To obtain u(x, t), just multiply v(x, t) by e−ax . 42. Let u(x, t) = X(x)T (t). Then separation of variables leads to T′ X ′′′′ = = −k 2 , ′′ X T along with X(0)T (t) = X ′ (0)T (t) = X(1)T (t) = X ′ (1)T (t) = 0. This gives the ordinary differential equations X ′′′′ + k 2 X ′′ = 0,

T ′ + k 2 T = 0,

and

subject to the boundary conditions X(0) = X ′ (0) = X(1) = X ′ (1) = 0. The solution for X(x) is given in Problem 5 in Section 6.3. For Tn (t), we have that 2 2 Tn (t) = An e−kn t when Xn (x) = 1 − cos(2nπx) and Tn (t) = Bn e−kn t when Xn (x) = 1 − cos(κn x) − 2[sin(κn x) − κn x]/κn . Therefore, linear superposition yields u(x, t) =

∞ X

n=1

+

2

An [1 − cos(2nπx)]e−4n

π2 t

  2 2 Bn 1 − cos(κn x) − [sin(κn x) − κn x] e−κn t , κn n=1 ∞ X

where An =

R1

with Xn (x) = 1 − cos(2nπx) and Bn =

f ′ (x)Xn′ (x) dx R1 [Xn′ (x)]2 dx 0

0

R1

f ′ (x)Xn′ (x) dx R1 [Xn′ (x)]2 dx 0

0

with Xn (x) = 1 − cos(κn x) − 2[sin(κn x) − κn x]/κn . In both cases, f (x) = 21 A + 3(1 − A)x(x − 1). Turning to the evaluation of An and Bn , we have Z

1 0

[Xn′ (x)]2 dx = 4n2 π 2

Z

1 0

  1 sin(4nπx) 2 2 sin2 (2nπx) dx = 2n2 π 2 x − = 2n π 4nπ 0

266

Advanced Engineering Mathematics with MATLAB

for Xn (x) = 1 − cos(2nπx). On the other hand, for Xn (x) = 1 − cos(κn x) − 2[sin(κn x) − κn x]/κn , Z

1 0

[Xn′ (x)]2 dx =

Z

1

2

[κn sin(κn x) + 2 cos(κn x) − 2] dx 0  Z 1 dx κ2n sin2 (κn x) + 4κn sin(κn ) cos(κn x) = 0

 + 4 cos (κn x) − 4κn sin(κn x) − 8 cos(κn x) + 4 2



 1 1 x sin(2κn x) 1 − + 2 sin2 (κn x) 0 + 4x|0 2 4κn 0 1  1  8 x sin(2κn x) 1 + +4 + 4 cos(κn x)|0 − κn sin(κn x) . 2 4κn 0 0 = κ2n

Substituting in the limits,   Z 1 sin(2κn ) ′ 2 2 1 [Xn (x)] dx = κn + 2 sin2 (κn ) − 2 4κ n 0   8 1 sin(2κn ) +4 + 4 cos(κn ) − + sin(κn ) 2 4κn κn κn sin(κn ) cos(κn ) κ2 + 2 sin2 (κn ) + 2 = n− 2 2 8 κ2 2 sin(κn ) cos(κn ) + 4 cos(κn ) − sin(κn ) = n . + κn κn 2 Because Z 1 0

and Z

 κn sin(κn x)+2 cos(κn x) − 2 dx

 1  sin(κn x) − 2x = 0, = − cos(κn x) + 2 κn 0

1 0

x(x − 1) [κn sin(κn x) + 2 cos(κn x) − 2] dx

 1 κ2n x2 − κ2n x − 2 2x − 1 sin(κ x) − cos(κ x) n n 2 3 κn κn 0  1  κ2n x2 − κ2n x − 2 2x − 1 cos(κn x) + sin(κn x) +2 κ2n κ3n 0  3  1 2 cos(κn ) − 2 1 + cos(κn ) 1 x x2 1 = −2 − + + = , 3 2 0 κ2n 2 3 3 = κn



267

Worked Solutions Bn =

3(1 − A) 13 2(1 − A) = . 1 2 κ2n κ 2 n

On the other hand, An = 0 because Z 1 1  2 A + 3(1 − A)x(x − 1) sin(2nπx) dx 0

43. Because

1 A = cos(2nπx) 4nπ 0  1  4n2 π 2 x2 − 1 2x sin(2nπx) − cos(2nπx) + 3(1 − A) 2 2 3 3 4n π 8n π 0   1 sin(2nπx) x cos(2nπx) − 3(1 − A) − = 0. 4n2 π 2 2nπ 0

∂v ∂2u ∂2v ∂u = , = 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 1 ∂v v ∂v 2 =a + − 2 . ∂t ∂r2 r ∂r r Now, lim |u(r, t)| = lim |v(r, t)| < ∞,

r→0

r→0

u(1, t) = K = K + v(1, t),

or

v(1, t) = 0,

and u(r, 0) = g(r) = Kr + v(r, 0),

or

v(r, 0) = g(r) − Kr.

Let u(r, t) = R(r)T (t). Then separation of variables leads to T′ R′′ R′ 1 = + − 2 = −k 2 , T R rR r along with lim |R(r)| < ∞,

r→0

R(1) = 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 u(r, t) =

∞ X

n=1

An J1 (kn )e−a

2 2 kn t

,

268

Advanced Engineering Mathematics with MATLAB

where An =

2 J22 (kn )

2 = 2 J0 (kn )

Z

1

Z 

[g(r) − Kr] J1 (kn r) r dr

0

1 0

g(r)J1 (kn r) r dr − K

Z

1 2

r J1 (kn r) dr

0

 Z 1 2 K J2 (kn ) = 2 g(r)J1 (kn r) r dr + J0 (kn ) kn 0   Z 1 K J2 (kn ) 2 − g(r)J1 (kn r) r dr = 2 + J0 (kn ) kn 0   Z 1 2 kn = g(r)J1 (kn r) r dr , K+ 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 u(r, t) = Kr + 2

  Z 1 ∞ X 2 2 J1 (kn r) kn g(r)J1 (kn r) r dr e−a kn t . K+ k J (k ) J0 (kn ) 0 n=1 n 0 n

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % MATLAB Code for Crank-Nicholson Scheme % for the Heat Equation Project % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% clear; ncount = 1; dx = 0.05; dt = 0.005; coeff = dt / (dx*dx); % coeff = a2 ∆t/∆x2 coeff = dt / (dx*dx); coeff2 = 0.5*coeff; center1 = 1 + coeff; center2 = 1 - coeff; N = 21; x = 0:dx:1; M = 1/dx + 1; MM = M-2; % M = number of spatial grid points % introduce the initial conditions uold(1:M) = zeros(M,1); u(1:M) = zeros(M,1); for m = 1:M if x(m) > 0.5; uold(m) = 1; end; end % create coefficients of the tridiagonal matrix a(1:MM) = coeff2; b(1:MM) = -center1;

Worked Solutions

269

c(1:MM) = coeff2; r(1:MM) = zeros(MM,1); % integrate forward in time for n = 1:N tplot(n) = dt * (n-1); % set up right column vector r(1) = - coeff2 * uold(3) - center2 * uold(2); for m=2:MM-1 jj = m+1; r(m) = - coeff2 * (uold(jj-1) + uold(jj+1)) - center2 * uold(jj); end r(MM) = - coeff2 * uold(M-2) - center2 * uold(M-1); % solve the tridiagonal matrix for new temperatures bet = b(1); uu(1) = r(1) / bet; for j = 2:MM gamma(j) = c(j-1) / bet; bet = b(j) - a(j) * gamma(j); uu(j) = (r(j) - a(j) * uu(j-1)) / bet; end for j = MM-1:-1:1 uu(j) = uu(j) - gamma(j+1) * uu(j+1); end u(1:M) = zeros(M,1); u(2:M-1) = uu(1:MM); for m=1:M; solution(m,n) = uold(m); end uold(1:M) = u(1:M); end % plot the results X = x’ * ones(1,length(tplot)); T = ones(M,1) * tplot; surf(X,T,solution), axis([0 1 0 0.1]) xlabel(’DISTANCE’,’Fontsize’,20); ylabel(’TIME’,’Fontsize’,20) zlabel(’TEMPERATURE’,’Fontsize’,20) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

270

Advanced Engineering Mathematics with MATLAB

Section 9.3 1. Let u(x, y) = X(x)Y (y). Then −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π(a − x) nπ(a − x) Xn (x) = An cosh + Bn sinh . b b Because X(a) = 0, An = 0. Therefore, u(x, y) =

∞ X

Bn sinh

n=1



  nπy  nπ(a − x) sin . b b

From the boundary condition, u(0, y) = 1 =

∞ X

Bn sinh

Z

1 sin

n=1

Then, sinh

 nπa  b

2 Bn = b

Thus, the final answer is u(x, y) =

b 0

 nπa  b

 nπy  b

sin

 nπy 

dy =

b

.

2[1 − (−1)n ] . nπ

∞ 4 X sinh[(2m − 1)π(a − x)/b] sin[(2m − 1)πy/b] . π m=1 (2m − 1) sinh[(2m − 1)πa/b]

2. Let u(x, y) = X(x)Y (y). Then X ′′ /X = −Y ′′ /Y = −λ with X(0) = X(a) = Y (0) = 0. The solution to the Sturm-Liouville problem X ′′ + λX = 0 with X(0) = X(a) = 0 is Xn (x) = sin(nπx/a). The most convenient solution for Yn (y) is  nπy   nπy  + Bn sinh . Yn (y) = An cosh a a Because Y (0) = 0, An = 0. Therefore, u(x, y) =

∞ X

Bn sinh

n=1

 nπy  a

sin

 nπx  a

.

From the boundary condition, u(x, b) = x =

∞ X

n=1

Bn sinh



nπb a



sin

 nπx  a

.

271

Worked Solutions Then, 

nπb sinh a



Z  nπx  2 a Bn = dx x sin 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 u(x, y) =

∞ sinh(nπy/a) sin(nπx/a) 2a X . (−1)n+1 π n=1 n sinh(nπb/a)

3. Let u(x, y) = X(x)Y (y). Then X ′′ /X = −Y ′′ /Y = −λ with X(0) = X(a) = Y (0) = 0. The solution to the Sturm-Liouville problem X ′′ + λX = 0 with X(0) = X(a) = 0 is Xn (x) = sin(nπx/a) . The most convenient solution for Yn (y) is  nπy   nπy  Yn (y) = An cosh + Bn sinh . a a Because Y (0) = 0, An = 0. Therefore, u(x, y) =

∞ X

Bn sinh

n=1

 nπy  a

sin

 nπx  a

.

From the boundary condition, ∞ X



nπb Bn sinh u(x, b) = x − a = a n=1



sin

 nπx  a

.

Then,   Z  nπx  nπb 2 a sinh Bn = dx (x − a) sin a a 0 a  2  nπx  ax  nπx  a 2a  nπx  a 2 a = − sin cos + nπ cos a a n2 π 2 a nπ a 0 0 2a(−1)n 2a[(−1)n − 1] 2a =− + =− . nπ nπ nπ Thus, the final answer is u(x, y) = −

∞ 2a X sinh(nπy/a) sin(nπx/a) . π n=1 n sinh(nπb/a)

272

Advanced Engineering Mathematics with MATLAB

4. Let u(x, y) = X(x)Y (y). Then X ′′ /X = −Y ′′ /Y = −λ with X(0) = X(a) = Y (0) = 0. The solution to the Sturm-Liouville problem X ′′ + λX = 0 with X(0) = X(a) = 0 is Xn (x) = sin(nπx/a). The most convenient solution for Yn (y) is  nπy   nπy  + Bn sinh . Yn (y) = An cosh a a Because Y (0) = 0, An = 0. Therefore, u(x, y) =

∞ X

Bn sinh

n=1

 nπy  a

sin

 nπx  a

.

From the boundary condition, u(x, b) = f (x) =

∞ X

Bn sinh

n=1



nπb a



sin

 nπx  a

.

Then,   Z Z  nπx   nπx  2 a/2 2x 2 a 2(a − x) nπb Bn = sin sin dx + dx sinh a a 0 a a a a/2 a a  nπ  8 . = 2 2 sin n π 2

Thus, the final answer is u(x, y) =

∞ 8 X sinh[(2m − 1)πy/a] sin[(2m − 1)πx/a] . (−1)m+1 2 π m=1 (2m − 1)2 sinh[(2m − 1)πb/a]

5. Let u(x, y) = X(x)Y (y). Then X ′′ /X = −Y ′′ /Y = −λ with X ′ (0) = X(a) = Y (0) = 0. The solution to the Sturm-Liouville problem X ′′ + λX = 0 with X ′ (0) = X(a) = 0 is Xn (x) = cos[(2n−1)πx/(2a)]. The most convenient solution for Yn (y) is     (2n − 1)πy (2n − 1)πy + Bn sinh . Yn (y) = An cosh 2a 2a Because Y (0) = 0, An = 0. Therefore, u(x, y) =

∞ X

Bn sinh

n=1



   (2n − 1)πy (2n − 1)πx cos . 2a 2a

From the boundary condition, u(x, b) = 1 =

∞ X

n=1

Bn sinh



   (2n − 1)πb (2n − 1)πx cos . 2a 2a

273

Worked Solutions Then,

Ra  cos[(2n − 1)πx/2a] dx (2n − 1)πb R Bn = a0 sinh 2 [(2n − 1)πx/2a] dx 2a cos 0   (2n − 1)π 4 . sin = (2n − 1)π 2 

Thus, the final answer is u(x, y) =

∞ 4X sinh[(2n − 1)πy/2a] cos[(2n − 1)πx/2a] . (−1)n+1 π n=1 (2n − 1) sinh[(2n − 1)πb/2a]

6. Let u(x, y) = X(x)Y (y). Then −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) = cos[(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 Because X(a) = 0, An = 0. Therefore, u(x, y) =

∞ X

Bn sinh

n=1



   (2n − 1)πy (2n − 1)π(x − a) cos . 2b 2b

From the boundary condition, u(0, y) = 1 =

∞ X

n=1

−Bn sinh



   (2n − 1)πa (2n − 1)πy cos . 2b 2b

Then, sinh



Rb  cos[(2n − 1)πy/2b] dy 4(−1)n (2n − 1)πa Bn = − R b0 . = 2b (2n − 1)π cos2 [(2n − 1)πy/2b] dy 0

Thus, the final answer is u(x, y) =

∞ 4X sinh[(2n − 1)π(x − a)/2b] cos[(2n − 1)πy/2b] . (−1)n π n=1 (2n − 1) sinh[(2n − 1)πa/2b]

7. Let u(x, y) = X(x)Y (y). Then −X ′′ /X = Y ′′ /Y = −λ with Y ′ (0) = Y ′ (b) = 0. The solution to the Sturm-Liouville problem Y ′′ + λY = 0 with

274

Advanced Engineering Mathematics with MATLAB

Y ′ (0) = Y ′ (b) = 0 is Y0 (y) = 1 and Yn (y) = cos(nπy/b). The most convenient solution for Xn (x) is  nπx   nπx  X0 (x) = 21 A0 + 21 B0 x, + Bn sinh . Xn (x) = An cosh b b

Therefore, u(x, y) =

1 2 A0

+

1 2 B0 x

+

∞  X

An cosh

n=1

 nπx  b

+ Bn sinh

 nπx  b

cos

 nπy  b

.

From the boundary condition at x = 0, u(0, y) = 21 A0 +

∞ X

An cos

n=1

 nπy 

= 1.

b

Consequently, 2 A0 = b

Z

b

1 dy = 2 and 0

2 An = b

Z

b

cos 0

 nπy  b

dy = 0.

Therefore, u(x, y) = 1 + 21 B0 x +

∞ X

Bn sinh

n=1

 nπx  b

cos

 nπy  b

.

From the boundary condition at x = a, u(a, y) = 1 + 21 B0 a +

∞ X

n=1

Bn sinh

 nπa  b

cos

 nπy  b

=1

so that B0 = Bn = 0. The final answer is u(x, y) = 1. 8. Let u(x, y) = v(x, y) + w(x, y). Then, we must solve vxx + vyy = 0,

v(0, y) = vx (a, y) = vy (x, b) = 0, v(x, 0) = 1

and wxx + wyy = 0,

w(x, 0) = wy (x, b) = wx (a, y) = 0, w(0, y) = 1.

Solving for v(x, y) first, v(x, y) = X(x)Y (y) and X ′′ /X = −Y ′′ /Y = −λ with X(0) = X ′ (a) = Y ′ (b) = 0. The solution to the Sturm-Liouville problem X ′′ + λX = 0 with X(0) = X ′ (a) = 0 is Xn (x) = sin[(2n − 1)πx/(2a)]. The most convenient solution for Yn (y) is     (2n − 1)π(y − b) (2n − 1)π(y − b) + Bn sinh . Yn (y) = An cosh 2a 2a

275

Worked Solutions Because Y ′ (b) = 0, Bn = 0. Therefore, 

   (2n − 1)π(y − b) (2n − 1)πx An cosh sin . v(x, y) = 2a 2a n=1 ∞ X

From the boundary condition, ∞ X

v(x, 0) = 1 =

An cosh

n=1



   (2n − 1)πb (2n − 1)πx sin . 2a 2a

Then, Ra  sin[(2n − 1)πx/2a] dx (2n − 1)πb 4 An = R a0 2 . cosh = 2a (2n − 1)π sin [(2n − 1)πx/2a] dx 0 

Thus, the v(x, y) component is v(x, y) =

∞ 4 X cosh[(2n − 1)π(y − b)/2a] sin[(2n − 1)πx/2a] . π n=1 (2n − 1) cosh[(2n − 1)πb/2a]

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 SturmLiouville 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 Xn (x) = An cosh



   (2n − 1)π(x − a) (2n − 1)π(x − a) + Bn sinh . 2b 2b

Because X ′ (a) = 0, Bn = 0. Therefore,    (2n − 1)πy (2n − 1)π(x − a) sin . An cosh w(x, y) = 2b 2b n=1 

∞ X

From the boundary condition, w(0, y) = 1 =

∞ X

n=1

An cosh



   (2n − 1)πy (2n − 1)πa sin . 2b 2b

Then, Rb  sin[(2n − 1)πy/2b] dy (2n − 1)πa 4 cosh An = R b0 . = 2 2b (2n − 1)π sin [(2n − 1)πy/2a] dy 0 

276

Advanced Engineering Mathematics with MATLAB

Thus, the w component is w(x, y) =

∞ 4 X cosh[(2n − 1)π(x − a)/2b] sin[(2n − 1)πy/2b] . π n=1 (2n − 1) cosh[(2n − 1)πa/2b]

Thus, the final solution is ∞ 4 X cosh[(2n − 1)π(y − b)/2a] sin[(2n − 1)πx/2a] u(x, y) = π n=1 (2n − 1) cosh[(2n − 1)πb/2a]

+

∞ 4 X cosh[(2n − 1)π(x − a)/2b] sin[(2n − 1)πy/2b] . π n=1 (2n − 1) cosh[(2n − 1)πa/2b]

9. Let u(x, y) = 1 + v(x, y). Then we have to solve the problem: vxx + vyy = 0,

v(0, y) = v(a, y) = vy (x, 0) = 0,

v(x, b) = −1.

To find v(x, y), v(x, y) = X(x)Y (y). Then X ′′ /X = −Y ′′ /Y = −λ with X(0) = X(a) = Y ′ (0) = 0. The solution to the Sturm-Liouville problem X ′′ + λX = 0 with X(0) = X(a) = 0 is Xn (x) = sin(nπx/a). The most convenient solution for Yn (y) is Yn (y) = An cosh

 nπy  a

+ Bn sinh

Because Y ′ (0) = 0, Bn = 0. Therefore, v(x, y) =

∞ X

An cosh

n=1

 nπy  a

sin

 nπy  a

 nπx  a

.

.

From the boundary condition u(x, b) = 0, v(x, b) = −1 =

∞ X

An cosh

n=1



nπb a



sin

 nπx  a

.

Then, cosh



nπb a



An = −

2 a

Z

a

sin 0

 nπx  a

dx =

2 [(−1)n − 1]. nπ

Thus, the final answer is u(x, y) = 1 −

∞ 4 X cosh[(2m − 1)πy/a] sin[(2m − 1)πx/a] . π m=1 (2m − 1) cosh[(2m − 1)πb/a]

277

Worked Solutions 10. Let u(x, y) = v(x, y) + w(x, y). Then, we must solve vxx + vyy = 0,

v(0, y) = v(a, y) = v(x, b) = 0, v(x, 0) = 1

and wxx + wyy = 0,

w(x, 0) = w(x, b) = w(a, y) = 0, w(0, y) = 1.

Solving for v(x, y) first, v(x, y) = X(x)Y (y) and X ′′ /X = −Y ′′ /Y = −λ with X(0) = X(a) = Y (b) = 0. The solution to the Sturm-Liouville problem X ′′ + λX = 0 with X(0) = X(a) = 0 is Xn (x) = sin(nπx/a). The most convenient solution for Yn (y) is Yn (y) = An cosh



   nπ(y − b) nπ(y − b) + Bn sinh . a a

Because Y (b) = 0, An = 0. Therefore, v(x, y) =

∞ X

Bn sinh

n=1



  nπ(y − b) nπx  sin . a a

From the boundary condition, 

∞ X

nπb −Bn sinh v(x, 0) = 1 = a n=1



sin

 nπx  a

.

Then, 

nπb − sinh a



2 Bn = a

Z

a

sin 0

 nπx  a

dx =

2[1 − (−1)n ] . nπ

Thus, the v component is v(x, y) = −

∞ 4 X sinh[(2m − 1)π(y − b)/a] sin[(2m − 1)πx/a] . π m=1 (2m − 1) sinh[(2m − 1)πb/a]

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 SturmLiouville 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 Xn (x) = An cosh



   nπ(x − a) nπ(x − a) + Bn sinh . b b

278

Advanced Engineering Mathematics with MATLAB

Because X(a) = 0, An = 0. Therefore,   nπy  nπ(x − a) sin . Bn sinh w(x, y) = b b n=1 

∞ X

From the boundary condition, w(0, y) = 1 =

∞ X

n=1

Then, − sinh

 nπa  b

2 Bn = b

Thus, the w component is w(x, y) = −

−An sinh

Z

b

sin 0

 nπa  b

 nπy  b

sin

dy =

 nπy  b

.

2[1 − (−1)n ] . nπ

∞ 4 X sinh[(2m − 1)π(x − a)/b] sin[(2m − 1)πy/b] . π m=1 (2m − 1) sinh[(2m − 1)πa/b]

The final solution is u(x, y) = − −

∞ 4 X sinh[(2m − 1)π(y − b)/a] sin[(2m − 1)πx/a] π m=1 (2m − 1) sinh[(2m − 1)πb/a]

∞ 4 X sinh[(2m − 1)π(x − a)/b] sin[(2m − 1)πy/b] . π 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: vxx + vyy = 0,

vx (0, y) = v(a, y) = v(x, 0) = v(x, b) = 0.

Thus, v(x, y) = 0 and the final solution is u(x, y) = 1. 12. Let u(x, y) = u1 + v(x, y). Then we have to solve the problem: vxx + vyy = 0, v(x, 0) =

vx (0, y) = vx (a, y) = v(x, b) = 0, 

f (x) − u1 , −u1 ,

0 < x < α, α < x < a.

To find v(x, y), v(x, y) = X(x)Y (y). Then X ′′ /X = −Y ′′ /Y = −λ with X ′ (0) = X ′ (a) = Y (b) = 0. The solution to the Sturm-Liouville problem X ′′ + λX = 0 with X ′ (0) = X ′ (a) = 0 is X0 (x) = 1 and Xn (x) = cos(nπx/a). The most convenient solution for Yn (y) is Y0 (y) = 21 A0 + 21 B0 (y − b) and     nπ(y − b) nπ(y − b) + Bn sinh . Yn (y) = An cosh a a

279

Worked Solutions Because Y (b) = 0, A0 = An = 0. Therefore,   ∞  nπx  X nπ(y − b) Bn sinh v(x, y) = 12 B0 (y − b) + cos . a a n=1 Then, at y = 0, v(x, 0) =

− 21 B0 b

Therefore, −bB0 =

2 a

or

Z



∞ X

nπb Bn sinh − a n=1 α

[f (x) − u1 ] dx −

0

B0 =

2 2u1 − b ab

and 

nπb − sinh a



2 Bn = a

or Bn = −

Z

α

f (x) cos 0

Z

 nπx  a

.

a

u1 dx α

f (x) dx; 0

a

Z

Z

2 a

cos

α

 nπx 

2 a sinh(nπb/a)



2 dx − a

α

f (x) cos 0

Z

a

u1 cos 0

 nπx 

 nπx  a

dx,

dx.

a

13. Assume a solution of the form u(x, y) = T0 + ∆T cos(2πx/λ)e−by , because the solution must die away as we go down into the solid earth. Substituting into the steady-state heat equation uxx + uyy = 0, we find that the final solution is u(x, y) = T0 + ∆T cos(2πx/λ)e−2πy/λ . 14. Let u(x, y) = X(x)Y (y). Then X ′′ /X = −Y ′′ /Y = −λ with X ′ (0) = X ′ (L) = 0. The solution to the Sturm-Liouville problem X ′′ + λX = 0 with X ′ (0) = X ′ (L) = 0 is X0 (x) = 1 and Xn (x) = cos(nπx/L). The most convenient solution for Yn (y) is  nπy   nπy  + Bn sinh . Yn (y) = An cosh Y0 (y) = 21 A0 + 21 B0 y, L L

From the boundary condition Y ′ (0) = 0, B0 = Bn = 0. Therefore, u(x, y) = 21 A0 +

∞ X

An cosh

n=1

 nπy  L

cos

 nπx  L

.

From the boundary condition at y = z0 , u(x, z0 ) = 21 A0 +

∞ X

n=1

An cosh

 nπz  0

L

cos

 nπx  L

.

280

Advanced Engineering Mathematics with MATLAB

Consequently, 2 A0 = L

Z

L 0

  2g a a 1 2 g[z0 + cx + a sin(bx)] dx = Lz0 + 2 cL + − cos(bL) , L b b

and cosh cosh

 nπz  0

L

 nπz  0

L

2 An = L

Z

L

g[z0 + cx + a sin(bx)] cos 0

 nπx  L

dx

 nπx  L 2gz0 sin 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

An =

15. Using the new dependent variable, the problem becomes ∂2v ∂2v + = 0, ∂x2 ∂y 2

0 < x < 1,

0 < y < L,

subject to the boundary conditions v(x, 0) = v(x, L) = 0,

0 < x < 1,

and vx (0, y) = 0,

vx (1, y) = −1,

0 < y < L.

Separation of variables leads to v(x, y) =

∞ X

n=1

An

 nπy  cosh(nπx/L) sin . sinh(nπ/L) L

Using the boundary condition vx (1, y) = −1, we obtain −1 =

∞  nπy  X nπ , An sin L L n=1

0 < y < L.

281

Worked Solutions Therefore, nπ 2 An = L L

Z

L

(−1) sin 0

 nπy  L

and An =

 nπy  L 2 2 cos [(−1)n − 1] , = nπ L nπ 0

dy =

2L [(−1)n − 1] . n2 π 2

The final solution is u(x, y) = L − y −

∞  nπy  cosh[(2m − 1)πx/L) 4γL X . sin 2 2 π m=1 (2m − 1) sinh[(2m − 1)π/L] L

16. Let u(r, z) = R(r)Z(z). Then 1 R



1 R + R′ r ′′



=−

Z ′′ k2 =− 2 Z a

with R(a) = 0. The solution to this singular Sturm-Liouville problem is Rn (r) = J0 (kn r/a) with J0 (kn ) = 0. The most convenient solution for Zn (z) is     kn z kn z + Bn cosh . Zn (z) = An sinh a a Because Zn′ (z) must be an even function, Bn = 0. Therefore, u(r, z) =

∞ X

n=1

An sinh



kn z a



J0



kn r a



.

Applying the boundary conditions uz (r, −L) = uz (r, L) = 1,     ∞ X kn kn r kn L uz (r, −L) = uz (r, L) = 1 = J0 . An cosh a a a n=1 From Equation 6.5.31, Equation 6.5.35 and Equation 6.5.43,     Z a kn An kn r 2 2 kn L rJ0 = 2 2 dr = cosh . a a a J1 (kn ) 0 a kn J1 (kn ) Thus, the final answer is u(r, z) = 2a

∞ X sinh(kn z/a) J0 (kn r/a) . k 2 cosh(kn L/a)J1 (kn ) n=1 n

282

Advanced Engineering Mathematics with MATLAB

17. Let u(r, z) = R(r)Z(z). Then   1 1 Z ′′ R′′ + R′ = − = −k 2 R r Z with R′ (b) = 0. For the separation constant k = 0, R0 (r) = 1 and Z0 (z) = A0 z. For k > 0, the solution in the radial direction is Rn (r) = J0 (kn r), where kn is nth positive zero of J0′ (kb) = −J1 (kb) = 0. The corresponding solution for Zn (z) is Zn (z) = An sinh(kn z) + Bn cosh(kn z). Because Zn′ (z) must be an even function, Bn = 0. Therefore, u(r, z) = A0 z +

∞ X

An sinh(kn z)J0 (kn r).

n=1

To find A0 and An , we take the z partial derivative of the solution or uz (r, L) = uz (r, −L) = A0 +

∞ X

An kn cosh(kn L)J0 (kn r).

n=1

and apply the boundary conditions ∂u(r, −L) ∂u(r, L) = = ∂z ∂z



A, 0,

0 ≤ r < a, a < r < b.

From Equation 6.5.35, Equation 6.5.44, Equation 6.5.46, and Equation 6.5.47, Z Aa2 2 a A r dr = 2 , A0 = 2 b 0 b and kn cosh(kn L)An =

2A b2 J02 (kn b)

Z

a

rJ0 (kn r) dr 0

Z kn a 2A ηJ0 (kn η) dη = 2 2 2 kn b J0 (kn b) 0 2AaJ1 (kn a) . = 2 2 2 kn b J0 (kn b) Thus, the final answer is u(r, z) =

∞ Aa2 z 2Aa X sinh(kn z) J1 (kn a) J0 (kn r) + . b2 b2 n=1 kn2 cosh(kn L)J02 (kn b)

18. Let u(r, z) = R(r)Z(z). Then   1 ′ Z ′′ 1 ′′ R + R =− = −k 2 , R r Z

283

Worked Solutions

with R′ (b) = 0. The solution to this singular Sturm-Liouville problem is R0 (r) = 1 and Rn (r) = J0 (kn r) with J0′ (kn b) = −J1 (kn b) = 0 or J1 (kn b) = 0. The most convenient solution for Zn (z) that satisfies the boundary conditions Z0 (L) = A and Zn (L) = 0 is Z0 (z) = A, and Zn (z) = An sinh[kn (L − z)]. Therefore, ∞ X An sinh[kn (L − z)]J0 (kn r). u(r, z) = A + n=1

From the boundary condition at z = 0, uz (r, 0) = −

∞ X

kn An cosh(kn L)J0 (kn r) =

n=1



B, 0,

0 ≤ r < a, a < r < b.

From Equation 6.5.46, Equation 6.5.47, Equation 6.5.35 and Equation 6.5.44, kn An cosh(kn L) = −

2B 2 b J02 (kn b)

Z

a

J0 (kn r) r dr 0

Z kn a 2B J0 (ξ) ξ dξ kn2 b2 J02 (kn b) 0 2aBJ1 (kn a) =− . kn b2 J02 (kn b)

=−

or An = −

kn2 b2

2aBJ1 (kn a) . cosh(kn L)J02 (kn b)

Thus, the final answer is u(r, z) = A −

∞ 2aB X J1 (kn a)J0 (kn r) sinh[kn (L − z)] . b2 n=1 kn2 J02 (kn b) cosh(kn L)

19. Let u(r, z) = R(r)Z(z). Then 1 R



1 R′′ + R′ r



=−

Z ′′ k2 =− 2 Z a

with R′ (a) = 0. The solution to this singular Sturm-Liouville problem is R0 (r) = 1 and Rn (r) = J0 (kn r/a) with J0′ (kn ) = −J1 (kn ) = 0 or J1 (kn ) = 0. The most convenient solution for Zn (z) that satisfies the boundary condition Zn (h) = 0 is Z0 (z) = A0 (z −h), and Zn (z) = An sinh[kn (z −h)/a]. Therefore,    kn r kn (z − h) J0 . An sinh u(r, z) = A0 (z − h) + a a n=1 ∞ X



284

Advanced Engineering Mathematics with MATLAB

From the boundary condition at z = 0,     ∞ X kn An kn r kn h uz (r, 0) = A0 + J0 . cosh a a a n=1 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 r 2 2r0 J1 (kn r0 /a) kn h kn An rJ0 = 2 2 dr = , cosh a a a J0 (kn ) 0 a akn J02 (kn ) or An =

kn2

2r0 J1 (kn r0 /a) . cosh(kn h/a)J02 (kn )

Thus, the final answer is u(r, z) =

∞ X sinh[kn (z − h)/a]J1 (kn r0 /a)J0 (kn r/a) (z − h)r02 . + 2r 0 a2 kn2 cosh(kn h/a)J02 (kn ) n=1

20. Let u(r, z) = R(r)Z(z). Then   1 1 Z ′′ R′′ + R′ = − = −k 2 R r Z with R′ (1) = 0. The solution to this singular Sturm-Liouville problem is R0 (r) = 1 and Rn (r) = J0 (kn r) with J0′ (kn ) = −J1 (kn ) = 0 or J1 (kn ) = 0. The most convenient solution for Zn (z) that satisfies the boundary condition Zn′ (0) = 0 is Z0 (z) = A0 and Zn (z) = An cosh(kn z). Therefore, u(r, z) = A0 +

∞ X

An cosh(kn z)J0 (kn r).

n=1

From the boundary condition at z = d, u(r, d) = A0 +

∞ X

An cosh(kn d)J0 (kn r).

n=1

From Equation 6.5.46, Equation 6.5.47, Equation 6.5.35 and Equation 6.5.44, A0 = 2

Z

b a

r dr − 2 2 b − a2

Z

1

r dr = 0, 0

285

Worked Solutions and Z b Z 1 J0 (kn r) 2 2 r dr − J0 (kn r) r dr J02 (kn ) a b2 − a2 J02 (kn ) 0 2J1 (kn ) 2[bJ1 (kn b) − aJ1 (kn a)] − = (b2 − a2 )kn J02 (kn ) kn J02 (kn ) 2[bJ1 (kn b) − aJ1 (kn a)] = , (b2 − a2 )kn J02 (kn )

An cosh(kn d) =

because J1 (kn ) = 0. Thus, the final answer is u(r, z) =

∞ X 2 [bJ1 (kn b) − aJ1 (kn a)]J0 (kn r) cosh(kn z) . b2 − a2 n=1 kn cosh(kn d)J02 (kn )

21. For case (a), we assume u(r, z) = R(r)Z(z). Then,   1 ′ R Z ′′ 1 ′′ R + R − 2 =− = k2 . R r r Z We have Z ′ (0) = Z(1) = 0. The corresponding Sturm-Liouville problem yields Zn (z) = sin[(2n − 1)π(z − 1)/2]

and

Rn (r) = I1 [(2n − 1)πr/2],

where n = 0, 1, 2, . . .. Therefore, u(r, z) =

∞ X

n=1

An

I1 [(2n − 1)πr/2] sin[(2n − 1)π(z − 1)/2]. I1 [(2n − 1)π/2]

Using the boundary condition u(1, z) = −1, then −1 =

∞ X

n=1

An sin[(2n − 1)π(z − 1)/2],

From this generalized Fourier series, Z Z 1 sin[(2n − 1)π(z − 1)/2] dz An = −

0

0

=

1

0 < z < 1.

sin2 [(2n − 1)π(z − 1)/2] dz

4 . (2n − 1)π

Therefore, the final answer for case (a) is u(r, z) =

∞ 4 X I1 [(2n − 1)πr/2] sin[(2n − 1)π(z − 1)/2] . π n=1 I1 [(2n − 1)π/2] 2n − 1

286

Advanced Engineering Mathematics with MATLAB

Turning to case (b), we again assume u(r, z) = R(r)Z(z). However, now 1 R



1 R R + R′ − 2 r r ′′



=−

Z ′′ = −k 2 . Z

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, u(r, z) =

∞ X

n=1

An

cosh(kn z) J1 (kn r). cosh(kn )

Using the boundary condition u(r, 1) = r, then r=

∞ X

An J1 (kn r),

0 < r < 1.

n=1

For this Fourier-Bessel series, 2 An = 2 J0 (kn )

Z

1

2 r J1 (kn r) dr = 3 2 kn J0 (kn ) 2

0

Z

kn 0

τ 2 J1 (τ ) dτ = −

2 . kn J0 (kn )

Therefore, the final answer for case (b) is u(r, z) = −2

∞ X cosh(kn z) J1 (kn r) . cosh(kn ) kn J0 (kn ) n=1

22. Let u(r, z) = R(r)Z(z). Then 1 R



1 R R′′ + R′ − 2 r r



=−

Z ′′ k2 =− 2 Z a

with R(a) = 0. The solution to this singular Sturm-Liouville problem is Rn (r) = J1 (kn r/a) with J1 (kn ) = 0. The most convenient solution for Zn (z) that satisfies the boundary condition Zn (0) = 0 is Zn (z) = An sinh(kn z/a). Therefore,     ∞ X kn z kn r An sinh u(r, z) = J1 . a a n=1

From the boundary condition at z = h, uz (r, h) =

    ∞ X kn r kn An kn h J1 . cosh a a a n=1

287

Worked Solutions From Equation 6.5.31, Equation 6.5.35 and Equation 6.5.43,     Z a 2 2aA kn r kn h kn An 2 = 2 2 dr = cosh Ar J1 , a a a J2 (kn ) 0 a kn J2 (kn ) or An =

2a2 A . kn2 cosh(kn h/a)J2 (kn )

Thus, the final answer is u(r, z) = −2a2 A

∞ X sinh(kn z/a)J1 (kn r/a) k 2 cosh(kn h/a)J0 (kn ) n=1 n

because J2 (kn ) = −J0 (kn ) since J1 (kn ) = 0 in Equation 6.5.29. 23. Let u(r, z) = R(r)Z(z). Then   1 1 ′ R Z ′′ ′′ R + R − 2 =− = k2 R r r Z with Z(0) = Z(1) = 0. The solution to this Sturm-Liouville problem is Zn (z) = sin(nπz). The solution for Rn (r) is Rn (r) = An I1 (nπr). Therefore, u(r, z) =

∞ X

An I1 (nπr) sin(nπz).

n=1

From the boundary condition at r = a, u(a, z) = z =

∞ X

An I1 (nπa) sin(nπz),

0 < z < 1.

n=1

For this half-range Fourier sine series, An I1 (nπa) = 2

Z

1 0

 1  2(−1)n sin(nπz) z cos(nπz) =− − . z sin(nπz) dz = 2 2 2 n π nπ nπ 0

Thus, the final answer is

u(r, z) = −

∞ 2 X (−1)n I1 (nπr) sin(nπz) . π n=1 n I1 (nπa)

24. Let u(r, z) = R(r)Z(z). Then   1 Z ′′ R k2 1 R′′ + R′ − 2 = − =− 2 R r r Z a

288

Advanced Engineering Mathematics with MATLAB

with R′ (a) = 0. The solution to this singular Sturm-Liouville problem is Rn (r) = J1 (kn r/a) with J1′ (kn ) = 0. The most convenient solution for Zn (z) that satisfies the boundary condition Zn (0) = 0 is Zn (z) = An sinh(kn z/a). Therefore,     ∞ X kn r kn z J1 . An sinh u(r, z) = a a n=1 From the boundary condition at z = h,     ∞ X kn An kn r kn h uz (r, h) = r = J1 . cosh a a a n=1 From Equation 6.5.31, Equation 6.5.35 and Equation 6.5.44,     Z a kn An kn r 2kn2 2akn J2 (kn ) kn h 2 r J1 = 2 2 dr = 2 , cosh a a a (kn − 1)J12 (kn ) 0 a (kn − 1)J12 (kn ) or An =

kn (kn2

2a2 − 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 25. Let u(r, z) = R(r)Z(z). Then 1 R



1 R R + R′ − 2 r r ′′



=−

Z ′′ = −k 2 , Z

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 u(r, z) =

∞ X

An sinh(kn z)J1 (kn r).

n=1

From the boundary condition at z = a, u(r, a) = r =

∞ X

n=1

An kn cosh(kn a)J1 (kn r).

289

Worked Solutions From Equation 6.5.31, Equation 6.5.35 and Equation 6.5.43, kn cosh(kn a)J12 (kn )An

=2

Z

1

r2 J1 (kn r) dr 0

or kn4

cosh(kn a)J12 (kn )An

=2

Z

kn

η 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 equations, we find that Zn (z) is governed by the ordinary differential equation Zn′′ (z) − (1 + kn2 )Zn (z) = 0,

Z(0) = 1,

Z(L) = 0.

The solution to this ordinary differential equation is i.  p  h p sinh L 1 + kn2 . Zn (z) = sinh (L − z) 1 + kn2

From the boundary condition u(r, 0) = u0 , u0 =

∞ X

An J0 (kn r),

0 < r < 1.

n=1

From the theory of Fourier-Bessel series, we have Z 1 Z kn 2kn2 u0 2u0 An = 2 rJ0 (kn r) dr = 2 τ J0 (τ ) dτ (kn + h2 )J02 (kn ) 0 (kn + h2 )J02 (kn ) 0 2kn u0 J1 (kn ) 2u0 kn J1 (kn ) = 2 . = 2 kn + h2 J02 (kn ) kn + h2 J02 (kn ) Therefore, i h p 2 1 + k sinh (L − z) n kn J1 (kn )  p  J0 (kn r), u(r, z) = 2u0 2 + h2 )J 2 (k ) (k 2 n n 0 sinh L 1 + kn n=1 ∞ X

290 or

Advanced Engineering Mathematics with MATLAB i h p sinh (L − z) 1 + kn2 J0 (kn r)  ,  u(r, z) = 2u0 h (kn2 + h2 )J0 (kn ) sinh Lp1 + k 2 n=1 ∞ X

n

where we used kn J1 (kn ) = hJ0 (kn ).

27. Assuming that u(r, z) = R(r)Z(z), we have that   dR Z ′′ 1 d r =− = −k 2 , R dr dr Z with the boundary conditions lim |R(r)| < ∞,

r→0

−DR′ (a) = KR(a),

Z ′ (L) = 0.

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 u(r, z) =

∞ X

An J0 (µn r/a)

n=1

cosh[µn (L − z)/a] . cosh(µn L/a)

Finally, using the boundary condition at z = 0, we have that u0 =

∞ X

An J0 (µn r/a).

n=1

Therefore, from Equation 6.5.50, An = = = =

Z a 2u0 µ2n J0 (µn r/a) r dr (a2 µ2n + a2 β 2 )J02 (µn ) 0 Z a 2u0 µ2n J0 (µn r/a) r dr a2 [µ2n J02 (µn ) + β 2 J02 (µ)] 0 Z 1 2u0 J0 (µn ξ) ξ dξ [J02 (µn ) + J12 (µn )] 0 2u0 J1 (µn ) , 2 µn [J0 (µn ) + J12 (µn )]

291

Worked Solutions because β 2 J02 (µn ) = µ2n J12 (µn ). Consequently, the final solution is u(r, z) = 2u0

∞ X

J1 (µn )J0 (µn r/a) cosh[µn (L − z)/a] , µ [J 2 (µn ) + J12 (µn )] cosh(µn L/a) n=1 n 0

where µn J1 (µn ) = βJ0 (µn ). 28. If u1 (r, z) = R1 (r)Z1 (z), then   1 d dR1 Z” − r − a2 = 1 = −k 2 , r dr dr Z1 with the boundary conditions lim |R1 (r)| < ∞,

Z1 (0) = Z1 (1) = 0.

r→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 u1 (r, z) =

∞ X

An

n=1

I0 (γn r) sin(nπz). I0 (γn )

Using the boundary condition at r = 1, we have that 1=

∞ X

An sin(nπz),

n=1

a Fourier sine series. The Fourier coefficient An is given by An = 2

Z

1 0

1 2 2 cos(nπz) = [1 − (−1)n ] . (1) sin(nπx) dx = − nπ nπ 0

Consequently, the solution for the first part is u1 (r, z) =

∞ 4 X sin[(2m + 1)πz] I0 (γm r) , π m=0 2m + 1 I0 (γm )

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

with the boundary conditions lim |R2 (r)| < ∞,

R2 (1) = Z2 (1) = 0.

r→0

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 Z2n (z) = An

sinh[γn (1 − z)] , sinh(γn )

where γn2 = a2 + kn2 now. Therefore, the general solution is u2 (r, z) =

∞ X

An

n=1

sinh[γn (1 − z)] J0 (kn r). sinh(γn )

Using the boundary condition at z = 0, we have that 1 = u2 (r, 0) =

∞ X

An J0 (kn r).

n=1

a Fourier-Bessel series. The Fourier coefficient An is given by An =

2 J12 (kn )

Z

1

(1)rJ0 (kn r) dr = 0

2 2kn J1 (kn ) = . kn2 J12 (kn ) kn J1 (kn )

Consequently, the solution for the second part is u2 (r, z) = 2

∞ X J0 (kn r) sinh[γn (1 − z)] , k J (k ) sinh(γn ) m=0 n 1 n

where kn is the nth root of J0 (k) = 0. For the third part, if u3 (r, z) = R3 (r)Z3 (z), then   dR3 Z” 1 d r = − 3 + a2 = −k 2 , r dr dr Z3 with the boundary conditions lim |R3 (r)| < ∞,

r→0

R3 (1) = Z3 (0) = 0.

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 Z3n (z) = An

sinh(γn z) , sinh(γn )

293

Worked Solutions where γn2 = a2 + kn2 now. Therefore, the general solution is u3 (r, z) =

∞ X

An

n=1

sinh(γn z) J0 (kn r). sinh(γn )

Using the boundary condition at z = 1, we have that 1 = u3 (r, 1) =

∞ X

An J0 (kn r).

n=1

a Fourier-Bessel series. The Fourier coefficient An is given by Z 1 2kn J1 (kn ) 2 2 (1)rJ0 (kn r) dr = 2 2 = . An = 2 J1 (kn ) 0 kn J1 (kn ) kn J1 (kn ) Consequently, the solution for the third part is u3 (r, z) = 2

∞ X J0 (kn r) sinh(γn z) , k J (k ) sinh(γn ) m=0 n 1 n

where kn is the nth root of J0 (k) = 0 and γn2 = a2 + kn2 . The final answer is then u(r, z) =

∞ 4 X sin[(2m + 1)πz] I0 (γm r) π m=0 2m + 1 I0 (γm )

+2 +2

∞ X J0 (kn r) sinh[βn (1 − z)] k J (k ) sinh(βn ) m=0 n 1 n

∞ X J0 (kn r) sinh(βn z) , k J (k ) sinh(βn ) m=0 n 1 n

2 where kn is the nth root of J0 (k) = 0, βn2 = a2 +kn2 , and γm = a2 +(2m+1)2 π 2 .

29. If you substitute the given solutions into differential equation and boundary conditions, they satisfy these conditions provided     kn d kn d and An = −Cn exp − . Bn = Cn sinh 2a 2a From the continuity equation u(r, d− /2) = u(r, d+ /2), we now have −V −

      kn d kn r kn d Cn exp − cosh J0 2a 2a a n=1       ∞ X kn r kn d kn d Cn exp − = sinh J0 , 2a 2a a n=1 ∞ X

294

Advanced Engineering Mathematics with MATLAB

or −V = Computing the cofficients Cn , Cn = −

2V 2 a J12 (kn )

=−

2V kn2 J12 (kn )

∞ X

Cn J0

n=1

Z

a

rJ0 0

Z

kn 0





kn r a





dr

kn r a

.

τ J0 (τ ) dτ = −

2V . kn J1 (kn )

Subsituting for An , Bn and Cn , the final answer is (   )  ∞ X kn r kn d cosh(kn z/a) J0 exp − u(r, z) = −V 1 − 2 kn J1 (kn ) 2a a n=1 if |z| < d/2, and

    ∞ X kn r kn |z| sinh[kn d/(2a)] J0 exp − u(r, z) = −2V kn J1 (kn ) a a n=1

if |z| > d/2. 30. Let u(r, z) = R(r)Z(z). Then   1 1 Z ′′ R′′ + R′ = − = −k 2 , R r Z with R′ (b) = 0. If k > 0, the solution to this singular Sturm-Liouville problem is Rn (r) = J0 (kn r) with kn J0′ (kn ) = 0 or kn J1 (kn ) = 0. The most convenient solution for Zn (z) that satisfies the boundary conditions at infinity is Zn (z) = An e−kn z . If k = 0, the eigenfunction is R0 (r) = 1 and Zn (z) = A0 . Therefore, by the principle of superpositions, u(r, z) = A0 +

∞ X

An J0 (kn r)e−kn z .

n=1

From the boundary condition at z = 0, u(r, 0) = A0 +

∞ X

n=1

An J0 (kn r) =



A, 0,

0 ≤ r < a, a < r < b.

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

295

Worked Solutions and A

An =

Ra

rJ0 (kn r) dr 0 2 b J02 (kn b)/2

=

2aAJ1 (kn a) . b2 kn J02 (kn b)

Thus, the final answer is u(r, z) =

∞ a2 A 2aA X J1 (kn a)J0 (kn r) −kn z + e . b2 b2 n=1 kn J02 (kn b)

31. Let u(r, z) = R(r)Z(z). Then 1 R

  1 Z ′′ − Z ′ R′′ + R′ = − = −k 2 , r Z

with R′ (1) = −BR(1). The solution to this singular Sturm-Liouville problem is Rn (r) = J0 (kn r) with kn J0′ (kn ) = −BJ0 (kn ) or kn J1 (kn ) = BJ0 (kn ). The most convenient solution for that satisfies the boundary conditions at √ Zn (z) 2 )/2 z(1− 1+4kn . Therefore, infinity is Zn (z) = An e u(r, z) =

∞ X

An ez(1−



2 )/2 1+4kn

J0 (kn r).

n=1

From the boundary condition at z = 0, u(r, 0) = 1 =

∞ X

An J0 (kn r).

n=1

From Equation 6.5.31, Equation 6.5.35 and Equation 6.5.45, An =

R1 2kn2 0 rJ0 (kn r) dr 2kn J1 (kn ) 2B = 2 = 2 , (kn2 + B 2 )J02 (kn ) (kn + B 2 )J02 (kn ) (kn + B 2 )J0 (kn )

because kn J1 (kn ) = BJ0 (kn ). Thus, the final answer is p ∞ X exp[z(1 − 1 + 4kn2 )/2]J0 (kn r) . u(r, z) = 2B (kn2 + B 2 )J0 (kn ) n=1 32. Let u(r, z) = R(r)Z(z). Then 1 R



1 R′′ + R′ r



=−

Z ′′ − Z ′ /H k2 =− 2, Z b

296

Advanced Engineering Mathematics with MATLAB

with R′ (b) = −hR(b). The solution to this singular Sturm-Liouville problem is Rn (r) = J0 (kn r/b) with kn J0′ (kn )/b+hJ0 (kn ) = 0, or kn J1 (kn ) = hbJ0 (kn ). The most convenient solution for√Zn (z) that satisfies the boundary condition 2 2 at infinity is Zn (z) = An eκz/b e−z kn +κ /b , where κ = b/(2H). Therefore, the superposition of the product solutions yields u(r, z) = eκz/b

∞ X

An J0 (kn r/b)e−z



2 +κ2 /b kn

.

n=1

From the boundary condition at z = 0, ∞  X

κ+

n=1

p

kn2

+

κ2



An J0 (kn r/b) =



Qb, 0,

0 ≤ r < a, a < r < b.

From Equation 6.5.31, Equation 6.5.35 and Equation 6.5.45, Ra   p QbJ0 (kn r) r dr 2k 2 2Qakn J1 (kn a/b) = 2 κ + kn2 + κ2 An = 2n 20 b (kn + h2 b2 )J02 (kn ) (kn + h2 b2 )J02 (kn ) 2QaJ1 (kn a/b) = , kn [J02 (kn ) + J12 (kn )] because kn J1 (kn ) = hbJ0 (kn ). Thus, the final answer is u(r, z) = 2Qae

κz/b

√ 2 2 ∞ X J1 (kn a/b)J0 (kn r/b) e−z kn +κ /b p . k [J 2 (kn ) + J12 (kn )] κ + kn2 + κ2 n=1 n 0

33. Let u(r, z) = R(r)Z(z). Then separation of variables yields 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 ∞ A(k)e−kz J0 (kr) dk, u(r, z) = u∞ − 0

since k can take on any any value from 0 to ∞. Now Z ∞ A(k)e−kz J0 (kr) dk < ∞, lim |u(r, z)| = lim u∞ − r→0

r→0

0

because the integrand oscillates and decays as k increases. Similarly, Z ∞ −kz A(k)e J0 (kr) dk < ∞ lim |u(r, z)| = lim u∞ − r→∞

r→∞

0

297

Worked Solutions for the same reason. Finally, as z → ∞, the integral vanishes and 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 ∞ k A(k)e−kz J0 (kr) dk,

uz (r, z) =

0

the boundary condition for the region a < r < ∞ yields Z ∞ k A(k)J0 (kr) dk = 0. uz (r, 0) = 0

Since

Z



sin(ka)J0 (kr) dk = 0

if

0

a < r < ∞,

a direct comparsion with the previous equation shows that kA(k) = C sin(ka). Finally, because Z ∞ dk π sin(ka)J0 (kr) = , k 2 0 Z ∞ dk Cπ sin(ka)J0 (kr) = u∞ − = u∞ − ∆u. u(r, 0) = u∞ − C k 2 0 Therefore, C = 2∆u/π. Substitution of C into the equation for u(r, z) completes the demonstration. 34. Let u(x, y) = X(x)Y (y). Then separation of variables yields 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 ∞ A(k)e−ky cos(kx) dk, u(x, y) = 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

∞ 0

J1 (k) cos(kx) dk = 0, k

1 < |x| < ∞.

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

u(r, θ) =

An

n=0

u(a, µ) =

∞ X

n=0

 r n a

Pn [cos(θ)],

An Pn (µ) = 100(µ − µ5 ).

Therefore, we only need P1 (µ), P3 (µ) and P5 (µ) and A1 P1 (µ) + A3 P3 (µ) + A5 P5 (µ) = 100(µ − µ5 )

A1 µ + 21 A3 (5µ3 − 3µ) + 81 A5 (63µ5 − 70µ3 + 15µ) = 100(µ − µ5 ). Setting the coefficients of equal powers of µ, A1 − 23 A3 +

15 8 A5

= 100, 52 A3 −

70 8 A5

=0

and

63 8 A5

= −100.

Solving for A1 , A3 , and A5 , we find that A1 = 400/7, A3 = −400/9 and A5 = −800/63. The final solution is   1  r 3 2  r 5 r P3 [cos(θ)] − P5 [cos(θ)] . P1 [cos(θ)] − u(r, θ) = 400 7a 9 a 63 a 36. Because u(r, θ) =

∞ X

n=0

u(a, µ) =

∞ X

1 A0 = 2 and

2n + 1 An = 2

Z

 r n

An Pn (µ) =

n=0

Therefore,

An

Z

a



Pn [cos(θ)],

100, 0,

0 < µ < 1, −1 < µ < 0.

1

100 P0 (µ) dµ = 50, 0

1

100 Pn (µ) dµ 0

= 50(2n + 1)

Z

1 0

Pn (µ) dµ = 50[Pn−1 (0) − Pn+1 (0)]

299

Worked Solutions for n ≥ 1. The final solution is u(r, θ) = 50 + 50 = 50 + 50

∞ X

[Pn−1 (0) − Pn+1 (0)]

n=1 ∞ X

m=1

u(r, θ) =

∞ X

An

n=0 ∞ X

An Pn (µ) =

n=0

Therefore, A0 =

a

[P2m−2 (0) − P2m (0)]

37. Because

u(a, µ) =

 r n

T0 T0 2

Z

 r n



a

 r 2m−1 a

P2m−1 [cos(θ)].

Pn [cos(θ)],

T0 , 0,

1

Pn (µ) dµ = cos(α)

Pn [cos(θ)]

cos(α) < µ < 1, −1 < µ < cos(α). [1 − cos(α)]T0 , 2

and An =

2n + 1 T0 2

Z

1 cos(α)

Pn (µ) dµ = 12 T0 {Pn−1 [cos(α)] − Pn+1 [cos(α)]}

for n ≥ 1. The final solution is u(r, θ) = 12 T0

∞ X

n=0

38.

Z

π

 r n a

Pn [cos(θ)].

1 − r2 dθ 2 −π 1 + r − 2r cos(θ − ϕ)  Z π dη T0 1 − r 2 = 2 2 2π 1 + r −π 1 − 2r cos(η)/(1 + r )   Z 2π dτ T0 1 − r 2 = 2 2π 1 + r 1 + 2r cos(τ )/(1 + r2 ) 0   1 1 − r2 p = T0 = T0 2 1 + r2 1 − 4r /(1 + r2 )2

u(r, ϕ) =

Section 9.4

{Pn−1 [cos(α)] − Pn+1 [cos(α)]}

T0 2π

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 u(x, y) = −

∞ ∞ X X

4anm 2 π 2 /a2 + (2m − 1)2 π 2 /b2 (2n − 1) n=1 m=1     (2m − 1)πy (2n − 1)πx cos , × cos 2a 2b

where anm

     Z bZ a R 4 (2n − 1)πx (2m − 1)πy − cos cos dx dy = ab 0 0 T 2a 2b   a   2 (2n − 1)πx 4R sin =− T (2n − 1)π 2a 0  b    (2m − 1)πy 2 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 ]

×

2. Separation of variables leads to   1 d dR Z ′′ r + = λ. rR dr dr Z The eigenfunctions that satisfy the boundary conditions are Rn (r) = J0 (kn r/a), with n = 1, 2, 3, . . ., and    1 πz/b , Zm (z) = cos m + 2 with m = 0, 1, 2, . . . Thus, the product solution unm (r, z) follows by multiplying Rn (r) and Zm (z) together. Let f (r, z) =

 r An (z)J0 kn , a n=1 ∞ X

301

Worked Solutions then

2 An (z) = 2 2 a J1 (kn )

Z

 r r dr. f (r, z)J0 kn a

a 0

Now, we also have that An (z) =

∞ X

"

 # m + 21 πz , b

"

 # m + 12 πz dz. b

anm cos

m=0

where anm

1 = b

Z

b

An (z) cos −b

Substitution of An (z) into the first summation leads to f (r, z) =

∞ ∞ X X

n=1 m=0

anm J0



r cos kn a

"

 # m + 21 πz b

with anm

2 = 2 2 a bJ1 (kn )

Z

b −b

Z

a

f (r, z)J0 0



Finally, because λnm = −(kn /a)2 − and

r kn cos a



m+

1 2



"

 # m + 21 πz r dr dz. b

π/b

2

,

   λ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

diff = zeros(M,N); R = zeros(M,N); %************************************************************* % % find the "answer" using the Gauss-Seidel method % %************************************************************* % create initial guess for the Gauss-Seidel solution answ = zeros(M,N); % introduce boundary conditions for m = 1:M; answ(m,1) = 0; answ(m,N) = 1 + x(m); end for n = 1:N; answ(1,n) = y(n); answ(M,n) = 2*y(n); end maxdiff = 1; while (maxdiff > 1.e-6) maxdiff = 0; saveit = answ; for n = 2:N-1; for m = 2:M-1; answ(m,n) = (answ(m+1,n) + answ(m-1,n) + answ(m,n+1) + answ(m,n-1)) / 4; diff(m,n) = abs(answ(m,n) - saveit(m,n)); if (diff(n,m) > maxdiff) maxdiff = diff(n,m); end end; end end %************************************************************* % % find the number of iteration needed by successive % over-relaxation (SOR) to yield an |absolute error| < error % %************************************************************* for iomega = 1:19 omega(iomega) = 1 + 0.05 * iomega; icount(iomega) = 0 % set up initial guess and initialize values icount(iomega) = 0; maxdiff = 1; u = zeros(M,N); % introduce boundary conditions for m = 1:M; u(m,1) = 0; u(m,N) = 1 + x(m); end for n = 1:N; u(1,n) = y(n); u(M,n) = 2*y(n); end

Worked Solutions

303

while (maxdiff > error) icount(iomega) = icount(iomega) + 1; maxdiff = 0; for n = 2:N-1; for m = 2:M-1; R(m,n) = (u(m+1,n)+u(m-1,n)+u(m,n+1)+u(m,n-1)) / 4; u(m,n) = omega(iomega) * R(m,n) + (1-omega(iomega))*u(m,n); diff(m,n) = abs(u(m,n) - answ(m,n)); if (diff(n,m) > maxdiff) maxdiff = diff(n,m); end 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 ( ) % % % % % % % % % % % % %

FEM 50 applies the finite element method to Laplace’s equation. Discussion: FEM 50 is a set of MATLAB routines to apply the finite element method to solving Laplace’s equation in an arbitrary region, using about 50 lines of MATLAB code. FEM 50 is partly a demonstration, to show how little it takes to implement the finite element method (at least using every possible MATLAB shortcut.) The user supplies datafiles that specify the geometry of the region and its arrangement

304

Advanced Engineering Mathematics with MATLAB

% into triangular and quadrilateral elements, and the location % and type of the boundary conditions, which can be any mixture % of Neumann and Dirichlet. % % The unknown state variable U(x,y) is assumed to satisfy % Laplace’s equation: % -Uxx(x,y) - Uyy(x,y) = F(x,y) in Omega % with Dirichlet boundary conditions % U(x,y) = U D(x,y) on Gamma D % and Neumann boundary conditions on the outward normal % derivative: Un(x,y) = G(x,y) on Gamma N % If Gamma designates the boundary of the region Omega, % then we presume that % Gamma = Gamma D + Gamma N % but the user is free to determine which boundary conditions % to apply. Note, however, that the problem will generally be % singular unless at least one Dirichlet boundary condition is % specified. % % The code uses piecewise linear basis functions for triangular % elements, and piecewise isoparametric bilinear basis functions % for quadrilateral elements. % % The user is required to supply a number of data files and % MATLAB functions that specify the location of nodes, the % grouping of nodes into elements, the location and value of % boundary conditions, and the right hand side function in % Laplace’s equation. Note that the fact that the geometry is % completely up to the user means that just about any two % dimensional region can be handled, with arbitrary shape, % including holes and islands. % % Author: % Jochen Alberty, Carsten Carstensen, Stefan Funken. % % Reference: % % Jochen Alberty, Carsten Carstensen, Stefan Funken, % Remarks Around 50 Lines of MATLAB: % Short Finite Element Implementation, % Numerical Algorithms, % Volume 20, pages 117-137, 1999. % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

305

Worked Solutions clear % Read the nodal coordinate data file. load coordinates.dat; % Read the triangular element data file. load elements3.dat; % Read the quadrilateral element data file. load elements4.dat; % Read the Neumann boundary condition data file. % I THINK the purpose of the EVAL command is to create % an empty NEUMANN array if no Neumann file is found. eval ( ’load neumann.dat;’, ’neumann=[];’ ); % Read the Dirichlet boundary condition data file. load dirichlet.dat; A = sparse ( size(coordinates,1), size(coordinates,1) ); b = sparse ( size(coordinates,1), 1 ); % 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 + det( [1,1,1; coordinates(elements3(j,:),:)’] f(sum(coordinates(elements3(j,:),:))/3)/6;

)

* ...

end 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 % Determine which nodes are associated with Dirichlet % conditions. Assign the corresponding entries of U, and % adjust the right hand side. u = sparse ( size(coordinates,1), 1 ); BoundNodes = unique ( dirichlet ); u(BoundNodes) = u d ( coordinates(BoundNodes,:) b = b - A * u;

);

% Compute the solution by solving A * U = B for the % remaining unknown values of U. FreeNodes = setdiff ( 1:size(coordinates,1), BoundNodes ); u(FreeNodes) = A(FreeNodes,FreeNodes)

b(FreeNodes);

% Graphic representation. show ( elements3, elements4, coordinates, full ( u ) ); return; end %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Worked Solutions %%%%%%%%%%% 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

307

308

Advanced Engineering Mathematics with MATLAB 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59

44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59

45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 1

%%%%%%%%%%% elements3.dat 12 14 14 16 16 18 18

13 88 97 96 15 97 107 106 17 107 118 117 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 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

309

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 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

311

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.

2.

5i 5i 2−i 5 + 10i = × = = 1 + 2i 2+i 2+i 2−i 4+1 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

313

Worked Solutions 3.

1 + 2i 3 + 4i 2 − i −5i −1 + 2i 1 + 2i 2 1 + 2i 2 − i + = × + × = − =− 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. r=

p

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. r=

p

θ = tan−1 (0/ − 4) = 0 or

42 + 02 = 4 and

π

Because −4 lies in the left side of the complex plane, θ = π and z = 4eπi . 8.



4 + 12 = 4 √ √ θ = tan−1 (2 3/2) = tan−1 ( 3) = π/3 or √ Because 2 + 2 3i lies in the first quadrant, z = 4eπi/3 . r=

9. r=

4π/3

√ √ 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.



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 . r=



314

Advanced Engineering Mathematics with MATLAB

12. e(α+β)i = eαi eβi cos(α + β) + i sin(α + β) = [cos(α) + i sin(α)][cos(β) + i sin(β)] = cos(α) cos(β) − sin(α) sin(β) + i cos(α) sin(β) + i sin(α) cos(β) Taking the real and imaginary parts, cos(α + β) = cos(α) cos(β) − sin(α) sin(β) and sin(α + β) = cos(α) sin(β) + sin(α) cos(β).

13. N X

eint =

n=0

1 − exp[i(N + 1)t] 1 − exp(it)

exp[i(N + 1)t/2] − exp[−i(N + 1)t/2] exp(it/2) − exp(−it/2) sin[(N + 1)t/2] = eiN t/2 . sin(t/2)

= exp(iN t/2)

To obtain the final answer, take the real and imaginary parts of the last equation. 14. (a) ∞ X

ǫn eint =

n=0

=

1 1 = 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

n=1

e−na sin(nt) =

e−a sin(t) sin(t) = . 1 + e−2a − 2e−a cos(t) 2 cosh(a) − 2 cos(t)

Now multiply both sides of the equation by 2.

315

Worked Solutions Section 10.2 1. 8 = 23 e0i+2kπi . Therefore, zk = or



2ekπi/3 ,

k = 0, 1, 2, 3, 4, 5

# "  π i √ 1 √3i π  √ h + i sin = 2 + , z1 = 2 cos 3 3 2 2 " √ #      √ √ 1 2π 3i 2π z2 = 2 cos + i sin = 2 − + , 3 3 2 2 √ √ z3 = 2eπi = − 2, " √ #      √ √ 4π 1 3i 4π + i sin = 2 − − z4 = 2 cos 3 3 2 2

√ z0 = 2,

and

" √ #      √ 1 √ 5π 3i 5π + i sin = 2 . z5 = 2 cos − 3 3 2 2

2. −1 = eπi+2kπi . Therefore, zk = e(π+2kπ)i/3 , or z0 = e

πi/3

= cos

and z2 = e

π

5πi/3

3

+ i sin

= cos



5π 3

π 3



k = 0, 1, 2 √ 3 1 = + i, 2 2

+ i sin



5π 3



z1 = eπi = −1

√ 1 3 = − i. 2 2

3. −i = e3πi/2+2kπi . Therefore, zk = eπi/2+2kπi/3 ,

k = 0, 1, 2

or

z1 = e7πi/6

z0 = eπi/2 = i, √     7π 7π i 3 = cos + i sin =− − 6 6 2 2

316

Advanced Engineering Mathematics with MATLAB

and z2 = e

11πi/6

= cos



11π 6



+ i sin



11π 6



√ i 3 = − . 2 2

4. −27i = 33 e3πi/2+2kπi . Therefore, zk =

√ πi/4+kπi/3 3e ,

k = 0, 1, 2, 3, 4, 5

or       π i π √ √ h 7π 7π + i sin , z1 = 3 cos + i sin , z0 = 3 cos 4 4 12 12      √ 11π 11π + i sin , 3 cos 12 12      √ 5π 5π z3 = 3 cos + i sin , 4 4      √ 19π 19π + i sin , z4 = 3 cos 12 12

z2 =

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 But cos(θ/2) √ = ± [1 + cos(θ)]/2 and sin(θ/2) = ± [1 − cos(θ)]/2, where cos(θ) = a/ a2 + b2 . Therefore,  s√  s√ a 2 + b2 + a a 2 + b2 − a  (a2 + b2 )1/4  √ √ √ − 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 < π.

317

Worked Solutions √ −9 + 8)/2 = 2i, i. Therefore,   1 i πi/4 z3,4 = ±e =± √ +√ . 2 2

6. From the quadratic formula, z 2 = (3i ± √ z1,2 = ± 2eπi/4 = ±(1 + i)

and

7. From the quadratic formula, 2

z =

−6i ±



−36 − 64 = −8i, 2i. 2

Therefore, √ z1,2 = ± 2eπi/4 = ±(1 + i)

and

√ z3,4 = ±2 2e−πi/4 = ±2(1 − i).

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. 2. w = u + iv = e−(x+iy) = e−x [cos(y) − i sin(y)]. Therefore, u = e−x cos(y) and v = −e−x sin(y). Then, vx = e−x sin(y), ux = −e−x cos(y), vy = −e−x cos(y) and uy = −e−x sin(y). Thus, ux = vy and vx = −uy for all x and y. Therefore, e−z 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. 4. w = u + iv = cosh(x + iy) = cosh(x) cos(y) + i sinh(x) sin(y). Therefore, u = cosh(x) cos(y) and v = sinh(x) sin(y). Then, ux = sinh(x) cos(y), vy = sinh(x) cos(y), vx = cosh(x) sin(y) and uy = − cosh(x) sin(y). Thus, ux = vy and vx = −uy for all x and y. Therefore, cosh(z) is an entire function because the derivatives are continuous. 5. f ′ (z) =

3 (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. f ′ (z) =

2z − i 5i 2 − = 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 3 = lim =− z→i z 4 + 2z 2 + 1 z→i 4z + 4z z→i 12z 2 + 4 4 lim

11. lim

z→0

z − sin(z) 1 − cos(z) sin(z) cos(z) 1 = lim = lim = lim = z→0 z→0 6z z→0 z3 3z 2 6 6

12. Because u = x and v = −y, we have ux = 1 and vy = −1. Therefore, ux 6= vy for any x and y and f (z) is not differentiable anywhere on the complex plane. 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 uxx = [−2 sin(x) − x cos(x)]e−y + ye−y sin(x) 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: vy = ux = [cos(x) − x sin(x)]e−y − ye−y cos(x) or v(x, y) = x sin(x)e−y + ye−y cos(x) + f (x). To find f (x) we use vx = sin(x)e−y + x cos(x)e−y − sin(x)ye−y + f ′ (x) = −uy = x cos(x)e−y + sin(x)[e−y − ye−y ]

or f ′ (x) = 0. Therefore, the final answer is v(x, y) = x sin(x)e−y + ye−y cos(x) + constant.

16. Because uxx = 2 cos(y)ex + 4x cos(y)ex + (x2 − y 2 ) cos(y)ex − 4y sin(y)ex − 2xy cos(y)ex 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: vy = ux = 2x cos(y)ex + (x2 − y 2 ) cos(y)ex − 2y sin(y)ex − 2xy sin(y)ex or v(x, y) = 2xy cos(y)ex + (x2 − y 2 ) sin(y)ex + f (x). To find f (x) we use vx = 2y cos(y)ex + 2xy cos(y)ex + 2x sin(y)ex + (x2 − y 2 ) sin(y)ex + f ′ (x) = −uy = 2y cos(y)ex + (x2 − y 2 ) sin(y)ex + 2x sin(y)ex + 2xy cos(y)ex

or f ′ (x) = 0. Therefore, the final answer is v(x, y) = 2xy cos(y)ex + (x2 − y 2 ) sin(y)ex + constant.

320

Advanced Engineering Mathematics with MATLAB

Section 10.4 1. Because z = eθi , z ∗ = e−θi and dz = ieθi dθ. Then 2π Z 2π I Z 2π −θi −θi −2θi θi ∗ 2 e i dθ = −e = 0. e ie dθ = (z ) dz = 2.

I

2

C

0

0

C

I

(x2 + y 2 )(dx + i dy) Z Z Z = |z|2 dz + |z|2 dz +

|z| dz =

C

C1

Then Z C1

Z

2

|z| dz = 2

|z| dz =

C3

Z

Z

0

C2

1 2

2

(x + 0 ) dx = 0

1 3,

Z

2

C2

|z| dz =

0 2

2

(x + 1 ) dx = 1

Finally,

I

C

− 31

C3

− 1,

Z

Z

|z|2 dz +

Z

C4

|z|2 dz

1 0

(12 + y 2 )i dy = i(1 + 13 ),

2

|z| dz =

C4

Z

0

(02 + y 2 )i dy = − 3i .

1

|z|2 dz = −1 + i.

3. We have z = eθi and dz = ieθi dθ with −π/2 < θ < π/2. Then Z

C

|z| dz =

Z

π/2 −π/2

π/2 1 × ieθi dθ = eθi −π/2 = 2i.

4. Because y = x, z = x + ix and dz = dx + i dx. Then Z 1 Z 1 e(1+i)x (1 + i) dx = e(1+i)x ez dz = C

=e

−1 1+i

−e

−1−i

−1

= 2 sinh(1) cos(1) + 2i cosh(1) sin(1).

5. Because y = x2 , z = x + x2 i and dz = (1 + 2ix) dx. Then Z Z 1 ∗ 2 (x − ix2 )2 (1 + 2ix) dx (z ) dz = C

= =

Z

Z

0

1

(x2 − x4 − 2ix3 )(1 + 2ix) dx

0 1 0

(x2 + 3x4 − 2ix5 ) dx =

14 15

− 3i .

321

Worked Solutions 6. For (a), z = eθi and dz = ieθi dθ. Then Z

C

Z

dz √ = z

For (b)

Z

π 0

C

i exp(θi) dθ = exp(θi/2)

dz √ = z

Z

0 −π

Z

π 0

π ieθi/2 dθ = 2eθi/2 = −2 + 2i. 0

0 ieθi/2 dθ = 2eθi/2

−π

= 2 + 2i.

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 1. Because u = e−2x cos(2y) and v = −e−2x sin(2y), ux = −2e−2x cos(2y) = vy and vx = 2e−2x sin(2y) = −uy for all x and y. Therefore, any integration between two points is path independent. Thus, Z

2+3πi 1−πi

2+3πi   e−2z dz = − 21 e−2z 1−πi = − 12 e−4−6πi − e−2+2πi =

1 2



 e−2 − e−4 .

2. Because u = ex cos(y) − cos(x) cosh(y) and v = ex sin(y) + sin(x) sinh(y), ux = ex cos(y) + sin(x) cosh(y) = vy and vx = ex sin(y) + cos(x) sinh(y) = −uy for all x and y. Therefore, any integration between two points is path independent. Thus, Z

2π 0

2π [ez − cos(z)] dz = [ez − sin(z)] 0 = e2π − 1.

3. Because u = 21 − 12 cos(2x) cosh(2y) and v = 21 sin(2x) sinh(2y), ux = sin(2x) cosh(2y) = vy and vx = cos(2x) sinh(2y) = −uy for all x and y. Therefore, any integration between two points is path independent. Thus, Z π π Rπ sin2 (z) dz = 12 0 [1 − cos(2z)] dz = 21 [z − 12 sin(2z)] 0 = π/2. 0

4. Because u = x + 1 and v = y, ux = 1 = vy and vx = 0 = −uy for all x and y. Therefore, any integration between two points is path independent. Thus, Z

2i

(z + 1) dz = −i

1 2 2z

 2i + z −i = − 32 + 3i.

322

Advanced Engineering Mathematics with MATLAB

Section 10.6 1.

I

2.

I

|z|=1

|z|=1

πi sin6 (z) dz = 2πi sin6 (π/6) = z − π/6 32

2πi d2 [sin6 (z)] sin6 (z) dz = (z − π/6)3 2! dz 2 z=π/6   4 = πi 30 sin (π/6) cos2 (π/6) − 6 sin6 (π/6) = 21πi/16

3.

I

|z|=1

dz = 2 z(z + 4)

4.

I

5. I

|z−1|=1/2

|z|=1

I

|z|=1

tan(z) dz = 2πi tan(z) z=0 = 0 z

dz = (z − 1)(z − 2)

I

|z−1|=1/2

6. I

|z|=5

7. I

|z−1|=1

1 1/(z − 2) dz = 2πi = −2πi z−1 z − 2 z=1

2   2πi d2 (ez ) exp(z 2 ) 2 z2 z2 = 2πi = πi 4z e + 2e dz = z3 2! dz 2 z=0 z=0

z2 + 1 dz = z2 − 1

8.

9.

1 1/(z 2 + 4) πi dz = 2πi 2 = z z + 4 z=0 2

I I

|z|=2

I

|z−1|=1

|z|=2

(z 2 + 1)/(z + 1) z 2 + 1 dz = 2πi = 2πi z−1 z + 1 z=1

2πi d3 (z 2 ) z2 dz = =0 (z − 1)4 3! dz 3 z=1

2πi d2 (z 3 ) z3 = 6πiz|z=i = −6π dz = (z + i)3 2! dz 2 z=i

323

Worked Solutions 10.

I

|z|=1

2πi d2n [cos(z)] cos(z) 2πi dz = (−1)n = 2n+1 2n z (2n)! dz (2n)! z=0

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % MATLAB Code for Complex Variables Project % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % initialize parameters clear n = 11; R = 1; x 0 = 2; y 0 = 0; % load in values for Gaussian-Legendre quadrature x x x x x

gauss(1) gauss(2) gauss(3) gauss(4) gauss(5)

= -0.906179845938664; A(1) = 0.236926885056189; = -0.538469310105683; A(2) = 0.478628670499366; = 0.000000000000000; A(3) = 0.568888888888889; = 0.538469310105683; A(4) = 0.478628670499366; = 0.906179845938664; A(5) = 0.236926885056189;

% compute n! factorial = 1; radius = 1; answer ave = 0; for j = 1:n factorial = j * factorial; radius = R * radius; end % test out various resolutions for m = 1:85 M = m+15; m plot(m) = M; dtheta = 2 * pi / M; answer1 = 0; answer2 = 0; % now do the integration the circle for j = 1:M a = (j-1)*dtheta; b = j*dtheta; h = 0.5*(b-a); ave = 0.5*(b+a); 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 % nth derivative = answer1 + i * answer2 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 % plot difference in the answer as a function of order of scheme answer ave = answer ave / m; plot(m plot,derivative plot-answer ave) xlabel(’number of Gaussian intervals’,’Fontsize’,20) ylabel(’the eleventh derivative of f(z)’,’Fontsize’,20) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Section 10.7 1.

∞ X f (n) (0) n 1 = z 2 (1 − z) n! n=0

Because f (n) (z) = (n + 1)!/(1 − z)n+2 , f (n) (0) = (n + 1)! Then ∞ ∞ X 1 (n + 1)! n X (n + 1)z n . = z = (1 − z)2 n! n=0 n=0

325

Worked Solutions 2. f (z) = e(z − 1)e(z−1)   (z − 1)3 z − 1 (z − 1)2 + + + ··· = 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. f (z) = z

10



1 1 1 1 + ··· 1 − + 2 − 3 + ··· − z 2z 6z 11!z 11

= z 10 − z 9 + 12 z 8 − 61 z 7 + · · · −

1 11!z

+ ···



We have an essential singularity and the residue equals −1/11! 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! =

25 z 3 1 23 z − + − ··· z 4! 6!

We have a simple pole with a residue that equals 1. 5.

  cosh(z) − 1 z2 1 z4 z6 1 + = + + + · · · − 1 z2 z2 2! 4! 6! 2 4 z z 1 + + + ··· = 2! 4! 6!

f (z) =

We have a removable singularity where the value of the residue equals zero. 6. f (z) =

2 1 z+2−2 =− + (z + 2)2 (z + 2)2 z+2

We have a second-order pole where the residue equals one. 7.

2 + z + 21 z 2 + 61 z 3 + · · · ez + 1 = e−z − 1 1 − z + 12 z 2 − 61 z 3 + · · · − 1

= − z1 (2 + z + 21 z 2 + 61 z 3 + · · ·)(1 + 12 z + = − z2 − 2 − 76 z − 21 z 2 − · · ·

We have a simple pole and the residue equals −2.

1 2 12 z

+ · · ·)

326

Advanced Engineering Mathematics with MATLAB

8. z2

eiz ei(z−bi) e−b = 2 +b (z − bi)[2bi + (z − bi)]   z − bi (z − bi)2 e−b 1 1− − · · · + = 2bi z − bi 2bi (2bi)2   × 1 + i(z − bi) + 12 i2 (z − bi)2 + · · · =

e−b e−b e−b 1 + 2 (1 + 2b) − 3 (1 + 2b + 2b2 )(z − bi) + · · · 2bi z − bi 4b 8b i

We have a simple pole and the residue equals e−b /(2bi). 9.   1 z − 2 (z − 2)2 1 1 1− = + − ··· [2 + (z − 2)](z − 2) 2 z−2 2 4 1 1 1 1 − + (z − 2) − · · · = 2z−2 4 8

f (z) =

We have a simple pole and the residue equals 1/2. 10. f (z) =

1 z4



1 + z2 +

z4 z6 + + ··· 2! 3!



=

1 1 1 z2 + 2+ + + ··· 4 z z 2 6

We have a fourth-order pole and the residue equals zero. Section 10.8 1.

I

|z|=1

z+1 dz = 2πi Res 4 z − 2z 3



 3πi z+1 ;0 = − , 4 3 z − 2z 4

because Res



   z+1 1 d2 3 z+1 z 3 ; 0 = lim z→0 2! dz 2 z 4 − 2z 3 z (z − 2)   1 3 z+1 = lim − =− . + 2 3 z→0 (z − 2) (z − 2) 8

2. I

|z|=1

  (z + 4)3 16πi (z + 4)3 dz = 2πi Res 4 ;0 = − z 4 + 5z 3 + 6z 2 z + 5z 3 + 6z 2 9

327

Worked Solutions because  Res

   (z + 4)3 d (z + 4)3 2 z 2 2 ; 0 = lim z→0 dz z 4 + 5z 3 + 6z 2 z (z + 5z + 6)   8 (z + 4)3 (2z + 5) 3(z + 4)2 =− . − = lim 2 z→0 z + 5z + 6 (z 2 + 5z + 6)2 9

3. Because 1 1 1 =− = 1 − ez z 1 − 1 − z − 21 z 2 − · · ·   1 1 =− 1 − z − ··· , z 2



1 1 + 21 z + · · ·



we have a simple pole at z = 0 with Res = −1. Therefore, I 1 dz = −2πi. z |z|=1 1 − e 4.

I

|z|=2

 2  z2 − 4 z −4 dz = 2πi Res ; 1 =0 (z − 1)4 (z − 1)4

because    2 d3 1 z2 − 4 4 z −4 (z − 1) = 0. ;1 = lim Res (z − 1)4 3! z→1 dz 3 (z − 1)4 

5. The singularities are located where z 4 = 1 or zn = ±1 and ±i. The corresponding residues are Res 

and



    1 (z − 1)z 3 1 z3 3 lim = , ; 1 = lim = lim z z→1 4z 3 z→1 z 4 − 1 z→1 z4 − 1 4

    z3 1 1 (z + 1)z 3 3 Res lim = , ; −1 = lim = lim z z→−1 4z 3 z→−1 z 4 − 1 z→−1 z4 − 1 4    3   1 (z − i)z 3 1 z 3 = lim ; i = lim 4 = lim z Res z→i 4z 3 z→i z − 1 z→i z4 − 1 4

Res



z3 ; −i 4 z −1



(z + i)z 3 = z→−i z 4 − 1

= lim



lim z 3

z→−i



1 z→−i 4z 3 lim



=

1 . 4

328

Advanced Engineering Mathematics with MATLAB

Therefore,

I

|z|=2

z3 dz = 2πi. z4 − 1

6. Because the Laurent expansion of the integrand is f (z) = z n + 2z n−1 + · · · +

2n+1 1 + ···, (n + 1)! z

we have an essential singularity and the residue equals 2n+1 /(n+1)! Therefore, I

z n e2/z dz = 4πi |z|=1

2n . (n + 1)!

7. Because e1/z cos(1/z) =

i 1 h (1+i)/z 1 0 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

|z|=2

   2 + 4 cos(πz) 2 + 4 cos(πz) dz = 2πi Res ;0 z(z − 1)2 z(z − 1)2   2 + 4 cos(πz) + Res ; 1 = 16πi z(z − 1)2

because Res



 2 + 4 cos(πz) 2 + 4 cos(πz) ; 0 = lim z =6 2 z→0 z(z − 1) z(z − 1)2

and    d 2 + 4 cos(πz) 2 2 + 4 cos(πz) (z − 1) = 2. ; 1 = lim Res z→1 dz z(z − 1)2 z(z − 1)2 

Section 10.9 1.

Z

∞ 0

dx 1 = x4 + 1 2

Z

∞ −∞

dx 1 = x4 + 1 2

I

C

dz , z4 + 1

329

Worked Solutions

where C denotes a semicircle of infinite radius in the upper half-plane. This contour encloses two simple poles at z = eπi/4 and z = e3πi/4 . Therefore,     I 1 1 dz πi/4 3πi/4 + 2πi Res 4 = 2πi Res 4 ;e ;e 4 z +1 z +1 C z +1 z − eπi/4 z − e3πi/4 + 2πi lim z4 + 1 z→eπi/4 z 4 + 1 z→e3πi/4 √ i h π 2 πi −3πi/4 = e + e−9πi/4 = . 2 2 = 2πi

lim

The final result follows by substitution into the first equation. 2.

Z

∞ −∞

dx = 2 (x + 4x + 5)2

I

C

(z 2

dz , + 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πi Res ; −2 + i 2 2 (z 2 + 4z + 5)2 C (z + 4z + 5)   (z + 2 − i)2 d = 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 The final result follows by substitution into the first equation. 3.

Z

∞ −∞

x dx = (x2 + 1)(x2 + 2x + 2)

I

C

z dz , (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πi Res ;i 2 2 (z 2 + 1)(z 2 + 2z + 2) C (z + 1)(z + 2z + 2)   z ; −1 + i + 2πi Res (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)   π −1 + i i =− . + = 2πi (2i)(1 + 2i) (2i)(1 − 2i) 5

330

Advanced Engineering Mathematics with MATLAB

The final result follows by substitution into the first equation. 4.

Z

∞ 0

x2 dx 1 = 6 x +1 2

Z

∞ −∞

x2 dx 1 = 6 x +1 2

I

C

z 2 dz , z6 + 1

where C denotes a semicircle of infinite radius in the upper half-plane. This contour encloses three simple poles at z = eπi/6 , z = eπi/2 and z = e5πi/6 . Therefore, I

C

  2  z z2 πi/6 πi/2 + 2πi Res ; e ; e z6 + 1 z6 + 1   2 z ; e5πi/6 + 2πi Res 6 z +1

z 2 dz = 2πi Res z6 + 1



(z − eπi/6 )z 2 (z − eπi/2 )z 2 + 2πi lim 6 z +1 z6 + 1 z→eπi/6 z→eπi/2   (z − e5πi/6 )z 2 π 1 1 1 + 2πi lim = . = 2πi + + z6 + 1 6i −6i 6i 3 z→e5πi/6 = 2πi

lim

The final result follows by substitution into the first equation. 5.

Z

∞ 0

1 dx = 2 2 (x + 1) 2

Z

∞ −∞

dx 1 = 2 2 (x + 1) 2

I

C

(z 2

dz , + 1)2

where C denotes a semicircle of infinite radius in the upper half-plane. This contour encloses a second-order pole at z = i. Therefore, I

C

    (z − i)2 1 d dz = 2πi Res ; i = 2πi lim z→i dz (z − i)2 (z + i)2 (z 2 + 1)2 (z 2 + 1)2 −2 π = 2πi lim = . z→i (z + i)3 2

The final result follows by substitution into the first equation. 6. Z

∞ 0

dx 1 = 2 2 2 (x + 1)(x + 4) 2

Z

∞ −∞

dx 1 = 2 2 2 (x + 1)(x + 4) 2

I

C

(z 2

dz , + 1)(z 2 + 4)2

where C denotes a semicircle of infinite radius in the upper half-plane. This contour encloses simple poles at z = i and a second-order pole at z = 2i.

Worked Solutions

331

Therefore, I

  dz 1 = 2πi Res ; i 2 2 2 (z 2 + 1)(z 2 + 4)2 C (z + 1)(z + 4)   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   (z − 2i)2 d + 2πi lim z→2i dz (z 2 + 1)(z − 2i)2 (z + 2i)2 2πi (2πi)(−2) (2πi)(−1)(4i) 5π = + + = . 3 2 2 (2i)(9) (4i) (−3) (4i) (−3) 144 The final result follows by substitution into the first equation. 7.

I x2 z2 dx = dz, 2 2 2 2 2 2 2 2 2 2 −∞ (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 dz = 2πi Res ; ai 2 2 2 2 2 (z 2 + a2 )(z 2 + b2 )2 C (z + a )(z + b )   z2 . ; bi + 2πi Res (z 2 + a2 )(z 2 + b2 )2 At z = ai,   (z − ai) z2 z2 ; ai = lim lim Res z→ai (z − ai)(z + ai) z→ai (z 2 + b2 )2 (z 2 + a2 )(z 2 + b2 )2 ai . = 2(a2 − b2 )2 At z = bi,     z2 d z2 Res ; bi = lim z→bi dz (z 2 + a2 )(z + bi)2 (z 2 + a2 )(z 2 + b2 )2 i bi i =− − + . 2b(a2 − b2 ) 2(a2 − b2 )2 4b(a2 − b2 ) Therefore,  Z ∞ i ai x2 dx = 2πi − 2 + a2 )(x2 + b2 )2 2 − b2 ) 2 2 − b2 ) (x 2(a 2b(a −∞  i bi + − 2(a2 − b2 )2 4b(a2 − b2 ) π = . 2b(a + b)2 Z



332

Advanced Engineering Mathematics with MATLAB

8.

Z



(t2

0

+

t2 dt + 1) + (a/h − 1)] Z t2 1 ∞ = dt 2 2 2 −∞ (t + 1)[t (a/h + 1) + (a/h − 1)] I z2 1 dz = 2 2(1 + a/h) C (z + 1)(z 2 + b2 )

1)[t2 (a/h

where b2 = [(1 − h/a)/(1 + h/a)]. We have a simple pole at z = i and z = bi. Then   I z2 z2 dz = 2πi Res ;i 2 2 2 (z 2 + 1)(z 2 + b2 ) C (z + 1)(z + b )   z2 ; bi + 2πi Res (z 2 + 1)(z 2 + b2 ) (z − i)z 2 = 2πi lim z→i (z − i)(z + i)(z 2 + b2 ) (z − bi)z 2 + 2πi lim 2 z→bi (z + 1)(z − bi)(z + bi) −1 −b2 π(1 − b) = 2πi + 2πi = 2 2 (2i)(b − 1) (2bi)(1 − b ) 1 − b2 and I

C

π z2 dz = 2 (z + 1)(z 2 + b2 ) 1 − [(1 − h/a)/(1 + h/a)]

1−

s

1 − h/a 1 + h/a

!

.

Substitution into the first equation yields the desired result. 9. We begin by converting the real integral into a closed contour integration: Z

π/2 0

dθ 1 = 4 a + sin2 (θ)

Z

2π 0

dθ =i a + sin2 (θ)

I

|z|=1

z dz, (z 2 − 1)2 − 4az 2

√ √ where z = eθi . The integrand has four poles: z = ± a ± 1 + a. Only two are located inside the contour: √ √ z1 = − a + 1 + a

and

z2 =

√ √ a − 1 + a.

The corresponding residues are  Res

 z (z − z1 )z 1 ; z1 = lim 2 =− √ 2 2 2 2 2 z→z (z − 1) − 4az 1 (z − 1) − 4az 8 a + a2

333

Worked Solutions and Res



 (z − z2 )z z 1 ; z ; z1 = − √ . 2 = lim z→z2 (z 2 − 1)2 − 4az 2 (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 a + sin (θ) 2 a + a2 0 10. We begin by converting the real integral into a closed contour integration: Z

π/2 0

1 dθ = 2 2 2 2 4 a cos (θ) + b sin (θ)

Z

= −i



a2

0

I

|z|=1

dθ + b2 sin2 (θ) z dz, 2 2 2 a (z + 1) − b2 (z 2 − 1)2 cos2 (θ)

where z = eθi . The integrand has four simple poles located at 2 z+ =

b+a , b−a

and

Only two are located inside the contour: r b−a (1) z− = , and b+a

2 z− =

(2)

b−a . b+a

z− = −

r

b−a . b+a

The corresponding residues are  Res

 (1) z(z − z− ) z (1) ; z = lim 2 2 2 2 2 2 (1) a2 (z 2 + 1)2 − b2 (z 2 − 1)2 − z→z− a (z + 1) − b (z − 1) = lim

(1) z→z−

=

1 , 8ab

1 4a2 (z 2 + 1) − 4b2 (z 2 − 1)

and  Res

 (2) z(z − z− ) z (2) = lim ; z − 2 2 2 2 2 2 (2) a2 (z 2 + 1)2 − b2 (z 2 − 1)2 z→z− a (z + 1) − b (z − 1) = lim

(2) z→z−

=

1 . 8ab

1 4a2 (z 2 + 1) − 4b2 (z 2 − 1)

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 (θ) 2ab a 0 11. We begin by converting the real integral into a closed contour integration: Z

π 0

Z 1 2π sin2 (θ) sin2 (θ) dθ = dθ 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

where z = eθi . The integrand has a second-order pole at z = 0 and simple √ poles at z1,2 √= (−a ± a2 − b2 )/b. Only the poles located at z = 0 and z1 = (−a + a2 − b2 )/b lie within the closed contour. The corresponding residues are     (z 2 − 1)2 2a (z 2 − 1)2 d Res =− 2, ; 0 = lim 2 2 2 z→0 [b(z + 1) + 2az]z dz b(z + 1) + 2az b and  Res

 (z 2 − 1)2 (z − z1 )(z 2 − 1)2 ; z 1 = lim 2 2 z→z1 [b(z 2 + 1) + 2az]z 2 [b(z + 1) + 2az]z 1 (z 2 − 1)2 lim = lim z→z1 2a + 2bz z→z1 z2 √ 2 a 2 − b2 . = b2

Employing the residue theorem and substituting into the top line, we have that Z π  p sin2 (θ) π  dθ = 2 a − a2 − b2 . b 0 a + b cos(θ) 12. We begin by converting the real integral into a closed contour integration: Z

2π 0

einθ dθ = −i 1 + 2r cos(θ) + r2

I

|z|=1

zn dz, 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 z − z+ (−r)n n Res = lim z . ; z = + z→z+ r(z 2 + 1) + (1 + r2 )z r(z 2 + 1) + (1 + r2 )z 1 − r2

335

Worked Solutions

Employing the residue theorem and substituting into the top line, we have that Z 2π einθ (−r)n dθ = 2π . 1 + 2r cos(θ) + r2 1 − r2 0 13. We begin by converting the real integral into a closed contour integration: I Z 2π (z 2 − 1)2n −i dz, sin2n (θ) dθ = n 2n (−1) 2 z 2n+1 |z|=1 0 where z = eθi . The integrand has a pole of order 2n + 1 at z = 0. To find the residue, we first note that (z 2 − 1)2n = z 4n − 2nz 4n−1 + · · · + Therefore

(2n)!(−1)n 2n z + ···. n!n!



 (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 . (2 n!) 0 14. We begin by converting the real integral into a closed contour integration: Z π Z π I cos(nθ) einθ + e−inθ z n + z −n 1 dθ = dθ = dz, iθ −iθ + 2α i |z|=1z 2 + 2αz + 1 −π cos(θ) + α −π e + e 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 n + z −n z + z −n = √ − . z 2 + 2αz + 1 z − z1 z − z2 2 α2 − 1 The simplest residue is   n  z 2n + 1 z + z −n Res ; z1 = lim z n + z −n = 1 n . z→z1 z − z1 z1

To compute the residue at z = 0, we first observe that " #    2  3  z n + z −n 1 z z z = − z n + z −n 1+ + + + ··· . z − z1 z1 z1 z1 z1

336

Advanced Engineering Mathematics with MATLAB

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   2n Z π 1 2πi 1 2πz1n z1 + 1 cos(nθ) n √ √ dθ = − + z = . 1 i 2 α2 − 1 z1n z1n α2 − 1 −π cos(θ) + α Substituting for z1 , yields the final answer. If n = 0, we only have the pole at z = z1 and Z π 1 2πi 1 2π √ dθ = ·2= √ . 2 cos(θ) + α i 2 α −1 α2 − 1 −π 15. We begin by converting the real integral into a closed contour integration: Z Z π cos(nθ) 1 π cos(nθ) dθ = − dθ cosh(α) − cos(θ) 2 cos(θ) − cosh(α) −π 0 I 1 z n + z −n dz, =− 2 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 + z −n z n + z −n 1 z n + z −n , − = z 2 − 2z cosh(α) + 1 2 sinh(α) z − eα z − eα the corresponding residues are   z n + z −n sinh(nα) Res 2 ;0 = z − 2z cosh(α) + 1 sinh(α) from Example 1.7.5 and   z n + z −n 1 cosh(nα) Res 2 ; e−α = − lim z n + z −n = − . z − 2z cosh(α) + 1 2 sinh(α) z→e−α sinh(α) Therefore, 1 i

I

|z|=1

z n + z −n 2πe−nα dz = − . z 2 − 2z cosh(α) + 1 sinh(α)

337

Worked Solutions Substitution of this result into the top line gives the final result. 16. As before, Z ∞ 0

x2 dx = (1 − x2 )2 + a2 x2

1 2

=

1 2

Z I

∞ −∞ C

x2 dx (1 − x2 )2 + a2 x2

z2 dz, (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 a2 − 4 , if 2 < |a|. 2 |a| ±

If |a| = 2, we have second-order poles at zn = i. Upon substituting into the residue formula, we have that √ √   (± 4 − a2 + |a|i)/2 1 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 i z2 =− . z→i dz (z + i)2 4

Res [f (z); i ] = lim

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 dz = dz + dz 2 2 2 C cosh (bz) C1 cosh (bz) C2 cosh (bz) Z Z eiaz eiaz + dz + dz 2 2 C3 cosh (bz) C4 cosh (bz)

338

Advanced Engineering Mathematics with MATLAB

Because the integrand behaves as e−2R as R → ∞, the integrals along C2 and C4 vanish. On the other hand, Z and

Z

C3

C1

eiaz dz = cosh2 (bz)

Z

∞ −∞

eiaz dz = −e−πa/b cosh2 (bz)

eiax dx, cosh2 (bx)

Z

∞ −∞

eiax dx, 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 ia eiazs eiaz eiazs − + ···. =− 2 2 b (z − zs )2 b2 (z − zs ) cosh (bz) Therefore, (1 − e

−πa/b

)

Z

∞ −∞

2πae−πa/(2b) eiax dx = 2 b2 cosh (bx)

and 2

Z

Z

∞ 0 ∞ 0

2πae−πa/(2b) cos(ax) dx = b2 (1 − e−πa/b ) cosh2 (bx) πa πa cos(ax) dx = 2 πa/(2b) = 2 . 2 −πa/(2b) 2b sinh[πa/(2b)] b [e −e ] cosh (bx)

18. Let f (z) =

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

Computing the residues, Res[f (z); z1 ] = lim

z→z1

πi z − z1 z lim =− , cosh(z + a) z→z1 cosh(z) 2 sinh(a)

and z z − z2 Res[f (z); z2 ] = lim lim = z→z2 cosh(z) z→z2 cosh(z + a)



πi −a 2



1 . sinh(a)

339

Worked Solutions

On the other hand, if a = 0, we have a second-order pole located at z1 = πi/2 within the closed contour. Therefore, I f (z) dz = 2πi Res[f (z); z1 ]. C

The residue for this case is     d η 2 (η + πi/2) d z(z − πi/2)2 = − lim Res[f (z); z1 ] = lim η→0 dη z→πi/2 dz cosh2 (z) sinh2 (η)   η + πi/2 d = − lim η→0 dη (1 + η 2 /6 + · · ·)2   (1 + η 2 /6 + · · ·) − (η + πi/2)(3η + · · ·) = − lim = −1. η→0 (1 + η 2 /6 + · · ·)4 Therefore, if a 6= 0,

while

I

2πai z dz = − , cosh(z) cosh(z + a) sinh(a)

C

I

C

z dz = −2πi, cosh(z) cosh(z + a)

if a = 0. Regardless of the value of a, let us denote the contour along and parallel to the y-axis at x = ∞ as C2 and the contour along and parallel to the y-axis at x = −∞ as C4 . Then, Z f (z) dz → 0 as x → ∞, C2

and

Z

C4

f (z) dz → 0

as

x → −∞,

because |f (z)| tends rapidly to zero as x → ±∞. If C1 denotes the contour along the real axis, Z Z ∞ x dx, f (z) dz = cosh(x) cosh(x + a) −∞ C1 while along the contour C3 , which runs parallel to the real axis but π units above it, Z Z −∞ x + πi dx f (z) dz = cosh(x + πi) cosh(x + a + πi) ∞ C3 Z ∞ x + πi =− dx. cosh(x) cosh(x + a) −∞

340

Advanced Engineering Mathematics with MATLAB

Therefore, if a 6= 0, we have that Z ∞ dx 2πai −πi =− , cosh(x) cosh(x + a) sinh(a) −∞ while for a = 0, we have that −πi

Z

∞ −∞

dx = −2πi. cosh2 (x)

Simplification yields the final result.  19. The integrand has simple poles at z = σ and zn = ±i n + 21 . Computing the residues, we have that   sinh(xz) sinh(σx) sinh(xz) ; σ = lim = Res z→σ cosh(πz) cosh(πz) (z − σ) cosh(σπ) and Res



 sinh(xz) sinh(xz) z − zn ; zn = lim lim z→zn z − σ z→zn cosh(πz) cosh(πz) (z − σ)    sin n + 21 x     = −σ ± i n + 21 π sin n + 21 π    (−1)n sin n + 12 x  . =  −σ ± i n + 21 π

Summing the residues gives the desired result. To show that the contour integral vanishes,

z (exz − e−xz ) z sinh(xz) = . cosh(πz) (z − σ) (z − σ) (eπz + e−πz ) 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 X (−1)n sin n + 21 x (−1)n sin n + 21 x  = 2σ 2 σ − i n + 21 σ 2 + n + 12 n=−∞ n=0    ∞ X cos n + 21 (x − π) = 2σ 2 σ 2 + n + 12 n=0

      because cos n + 21 (x − π) = (−1)n sin n + 12 x . Equating this sum with π sinh(σx)/ cosh(σπ) finishes the problem.

341

Worked Solutions Section 10.10 1. PV

Z

π 0

Z

θ−ǫ

dϕ cos(ϕ) − cos(θ) Z 0π dϕ + lim ǫ→0 θ+ǫ cos(ϕ) − cos(θ) sin(θ − ǫ/2) 1 = 0. lim ln = sin(θ) ǫ→0 sin(θ + ǫ/2)

dϕ = lim cos(ϕ) − cos(θ) ǫ→0

2. We begin by noting that   Z ∞ Z ∞ iπx/2 cos(πx/2) e dx = ℜ P V dx . 2 x2 − 1 −∞ −∞ x − 1 Consider now the integral I

C

eiπz/2 dz, z2 − 1

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 Z π iπR cos(θ)/2−Rπ sin(θ)/2 eiπz/2 e θi iRe dθ + dz lim 2 R→∞ 0 R2 e2θi − 1 C1 z − 1 Z Z −1−η iπx/2 eiπz/2 e + dz + lim dx 2−1 2−1 η→0 z x C2 −R Z R iπx/2 Z 1−ǫ iπx/2 e e + lim dx + lim dx = 0, ǫ,η→0 −1+η x2 − 1 ǫ→0 1+ǫ x2 − 1 where C1 and C2 denote the integrals around the indentations at −1 and 1, respectively. The modulus of the first term on the left side is less than πR/(R2 − 1) so that this term tends to zero as R → ∞. To evaluate C1 , we observe that z = −1 + ηeθi along C1 , where θ decreases from π to 0. Hence,   Z 0 Z exp iπ(−1 + ηeθi )/2 eiπz/2 dz = lim iηeθi dθ 2 η→0 π −2ηeθi + η 2 e2θi C1 z − 1   Z π exp iπ(−1 + ηeθi )/2 π = lim dθ = . η→0 0 2 − ηeθi 2

342

Advanced Engineering Mathematics with MATLAB

Similarly, Z

C2

  exp iπ(1 + ǫeθi )/2 iǫeθi dθ θi + ǫ2 e2θi 2ǫe π   Z π exp iπ(1 + ǫeθi )/2 π dθ = . = lim ǫ→0 0 −2 − ǫeθi 2

eiπz/2 dz = lim ǫ→0 z2 − 1

Z

0

Substituting these results into the second equation, we find that Z ∞ iπx/2 e PV dx = −π. 2−1 x −∞ Using the first equation completes the proof. 3. Consider the integral

I

C

eaz − ebz dz, 1 − ez

where the closed contour C consists of the rectangular box with vertices (−R, 0), (R, 0), (−R, π) and (R, π) with a semicircular indentation Cǫ at the origin. Because the integrand is analytic within and on the contour C, it equals zero. Breaking up the closed contour integral into a collection of line integrals, Z −R Z −R+πi az eaz − ebz e − ebz dz + lim dz lim R→∞ −R+πi 1 − ez R→∞ R+πi 1 − ez Z −ǫ az Z e − ebz eaz − ebz + lim dz + dz z z R→∞,ǫ→0 −R 1−e Cǫ 1 − e Z R az Z R+πi az e − ebz e − ebz + lim dz + lim dz = 0. R→∞,ǫ→0 ǫ R→∞ R 1 − ez 1 − ez Now, Z

eaz − ebz dz z Cǫ 1 − e Z 0 1 + aǫeθi + a2 ǫ2 e2θi /2 + · · · − 1 − bǫeθi − b2 ǫ2 e2θi /2 − · · · = lim ǫ→0 π 1 − 1 − ǫeθi − ǫ2 e2θi /2 − · · ·

lim

R→∞

Z

× iǫeθi dθ = 0,

−R −R+πi

and lim

R→∞

Z

eaz − ebz dz = lim R→∞ 1 − ez

R+πi R

Z

eaz − ebz dz = lim R→∞ 1 − ez

0 π

Z

e−aR eayi − e−bR ebyi i dy = 0, 1 − e−R eyi π

0

eaR eayi − ebR ebyi i dy = 0, 1 − eR eyi

343

Worked Solutions because 0 < a, b < 1. The remaining terms yield Z

∞ −∞

eax − ebx dx = 1 − ex

Z



eax eaπi dx − 1 + ex

−∞ aπi

bπi

Z

∞ −∞

ebx ebπi dx 1 + ex

πe πe − = π [cot(aπ) + i] − π [cot(bπ) + i] sin(aπ) sin(bπ) = π [cot(aπ) − cot(bπ)] =

4. From the residue theorem, Z

+

C∞

Z

−ζ−ǫ

+

−R

Z

+ Cǫ

Z

R −ζ+ǫ

!

f (z) dz = 2πi Res[f (z); iα],

where C∞ denotes the semicircular contour of infinite radius, Cǫ is the semicircular indentation at z = −ζ and f (z) =

1 − e2ia(z+ζ) . (z + ζ)2 (z 2 + α2 )

Taking the limit of R → ∞ and ǫ → 0, Z

∞ −∞

f (x) dx = 2πi Res[f (z); iα] + πi Res[f (z); −ζ].

Now, 1 − e2ia(z+ζ) 1 − e−2aα e2iaζ = 2 z→iα (z + ζ) (z + iα) (ζ + αi)2 (2iα) ζ 2 − α2 − e−2aα [(ζ 2 − α2 ) cos(2aζ) + 2αζ sin(2aζ)] = 2iα(ζ 2 + α2 )2 2αζ + e−2aα [(ζ 2 − α2 ) sin(2aζ) − 2αζ cos(2aζ)] − 2α(ζ 2 + α2 )2

Res[f (z); iα] = lim

and

  2ia d 1 − e2ia(z+ζ) =− 2 . Res[f (z); −ζ] = lim z→−ζ dz z 2 + α2 ζ + α2

Substituting into the integral and taking the real part completes the problem. 5. From the residue theorem, Z

+ C∞

Z

a−ǫ

+ −R

Z

+ Cǫ

Z

R a+ǫ

!

eimz dz = 0 z−a

344

Advanced Engineering Mathematics with MATLAB

because the interior of the contour is analytic. Here C∞ denotes the semicircular contour of infinite radius and Cǫ is the semicircular indentation at z = a. Taking the limit of R → ∞ and ǫ → 0,  imz  Z ∞ imx e e PV dx = πi Res ; a = πieima . z−a −∞ x − a Taking the real and imaginary parts of the equation, we obtain the final answer. 6. From the residue theorem, Z

+ C∞

Z

−π−ǫ −R

+

Z

+ Cǫ 1

Z

π−ǫ

+ −π+ǫ

Z

+ Cǫ 2

Z

R π+ǫ

!

zeiz dz = 0 z2 − π2

because the interior of the contour is analytic. Here C∞ denotes the semicircular 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 dx = πi Res 2 ; −π + πi Res 2 ;π 2 2 z − π2 z − π2 −∞ x − π = 12 πie−πi + 12 πieπi = −πi

For the second part, Z

+ C∞

Z

1−ǫ

+ −R

Z

+ Cǫ 1

Z

3−ǫ

+ 1+ǫ

Z

+ Cǫ 2

Z

R 3+ǫ

!

eimz dz = 0 (z − 1)(z − 3)

because the interior of the contour is analytic. Here C∞ denotes the semicircular 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 (z − 1)(z − 3) −∞ (x − 1)(x − 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 Z −R+Ri eiz Z R  e−y 1 1 R −y p dz ≤ 1 − e−R , e dy = dy < −R z R 0 R R2 + y 2 0

345

Worked Solutions which tends to zero as R → ∞. Similarly, Z R+Ri eiz Z R e−y p dz ≤ dy, R z R2 + y 2 0

which also tends to zero as R → ∞. Finally, Z Z R R+Ri eiz  √  dx −R √ dz ≤ 2e = 2 ln 1 + 2 e−R , −R+Ri z R 2 + x2 0

which tends to zero as R → ∞. Thus, just as in the case of the semicircle close contour, we only have the integration along the real axis, which gives the same result. 8. It follows from the definition of the transformation that z2 + 1 dz = dz; 2 z z2 2    1 1 = 1 + 41 z 2 − 2 + 2 = 1 − x2 = 1 + 41 z − z z 2i dx = dz +

or

and

1 4



z+

z 2 + 2iαz − 1 z



.

    p 1 1 1 z2 + 1 1 − x2 = z+ = ; 2 z 2 z

x+α=

1 2i



z−

1 z



+α=

1 2i



1 z

2

Direct substitution into the original integral yields G(α) as a contour integration on the unit circle. √ If |α| < 1, we have two singularities within the contours located at z = ± 1 − α2 − αi. In that case, 2πi 2πi √ + = 0. G(α) = √ 2 2 1 − α − 2iα + 2iα −2 1 − α2 − 2iα + 2iα 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 2 α − 1 − 2iα + 2iα α −1 Finally, if α < −1, √ there is a single singularity within the contours and it is located at z = −i α2 − 1 − αi. Therefore, G(α) =

π 2πi √ = −√ . −2 α2 − 1 − 2iα + 2iα α2 − 1

346

Advanced Engineering Mathematics with MATLAB

9. Because the point z = c is a simple pole, its Laurent expansion is Res[f (z); c] + a0 + a1 (z − c) + · · · . z−c

f (z) =

Therefore, the contour integration C1 around the indentation at z = c is Z

f (z) dz = lim C1

ǫ→0

Z

θ0 θ0 +α



 Res[f (z); c] θi + a + a ǫe + · · · iǫeθi dθ 0 1 ǫeθi

= −Res[f (z); c]αi,

where we set z − c = ǫeθi . Section 10.11 3. From Equation 10.11.6, we have dz = C ′ τ −1/2 , dτ because α1 = π/2 and k1 = α1 − 1. Integrating this differential equation, z = C′

Z

τ

√ dη √ = C τ + K. η

At τ = 0, z = −π + πi, or K = −π + πi. Because we did not specify any further requirements, the most general transformation is √ z = C τ − π + πi. 4. From Equation 10.11.6, we have dz = C ′ τ π/(3π)−1 , dτ because α1 = π/3 and k1 = α1 − 1. Integrating this differential equation, z = C′

Z

τ

dη = Cτ 1/3 + K. η 2/3

At τ = 0, z = 0 and K = 0. Because we did not specify any further requirements, the most general transformation is z = Cτ 1/3 ,

or

τ = Az 3 .

347

Worked Solutions 5. From Equation 10.11.6, we have 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. At τ = 0, z = 0, and K = 0. Furthermore, at τ = 1, z = 1, and C = 1. Therefore, z = τ 7/4 , or τ = z 4/7 . 6. From Equation 10.11.6, we have dz = C(τ + 1)−1/2 (τ − 1)−1/2 , dτ because α1 = α2 = π/2 and kn = αn −1. Integrating this differential equation, Z τ   p dη p z=C + K = C log τ + τ 2 − 1 + K. η2 − 1

At x = −a, −a = C log(−1) + K while at x = a, a = C log(1) + K. Consequently, K = a and C = 2ai/π. Therefore, z−a=

  p 2ai log τ + τ 2 − 1 , π

Solving for τ ,

  p −π/2 ≤ arg τ + τ 2 − 1 < 3π/2.

  p πi τ − exp − (z − a) = − τ 2 − 1. 2a

Squaring both sides and solving for τ ,  πz  τ = sin , or 2a

πz = arcsin(τ ). 2a

7. From Equation 10.11.6, we have dz = C(τ + 1)−1/2 (τ − 1)−1/2 , dτ because α1 = α2 = π/2 and kn = αn −1. Integrating this differential equation, Z τ dη p + K = C cosh−1 (τ ) + K. z=C η2 − 1

348

Advanced Engineering Mathematics with MATLAB

Because (0, a) → (−1, 0) and (0, 0) → (1, 0), C = a/π and K = 0. Therefore, z=

a cosh−1 (τ ), π

  0 ≤ ℑ cosh−1 (τ ) ≤ π.

8. From Equation 10.11.6, we have dz = C ′ τ π/(2π)−1 (τ − 1)(3π)/(2π)−1 = C ′ dτ

r

τ −1 =C τ

r

1−τ , τ

because α1 = π/2, α2 = 3π/2, and kn = αn − 1. Setting τ = sin2 (α), Z Z   z = 2C cos2 (α) dα = C [1 + cos(2α)] dα = C α + 12 sin(2α) + K i h p √ = C arcsin( τ ) + τ (1 − τ ) + K.

Because (0, 0) → (0, 0), K = 0. Furthermore, (0, a) → (1, 0), C = 2ai/π. Therefore, i p √ 2ai h z= arcsin( τ ) + τ (1 − τ ) . π

10. Because z = x + iy and τ = ρ + iσ, ρ + iσ = exp(x + iy) = ex [cos(y) + i sin(y)] . Taking the real and imaginary parts ρ = ex cos(y),

and

σ = ex sin(y).

Therefore, for

z = ∞ + πi, for

for

z = πi,

z = −∞ + yi, for

and for

z = 0, z = ∞,

ρ = e∞ cos(π) = −∞, ρ = e0 cos(π) = −1,

and

ρ = e0 cos(0) = 1,

σ = e0 sin(π) = 0;

and

ρ = e−∞ cos(y) = 0,

and

and

ρ = e∞ cos(0) = ∞,

σ = e∞ sin(π) = 0;

σ = e−∞ sin(y) = 0;

σ = e0 sin(0) = 0;

and

σ = e∞ sin(0) = 0.

Using the Fourier method from Section 11.7,    Z 1 ∞ σ 1 π −1 1 − ρ u(ρ, σ) = dt = − tan π 1 (t − ρ)2 + σ 2 π 2 σ   1 σ = 1 − tan−1 . π ρ−1

349

Worked Solutions Direct substitution for ρ and σ yields the final result. 11. Because z = reθi and τ = ρ + iσ, ρ + iσ = rπ/α eπθi/α = rπ/α cos(πθ/α) + irπ/α sin(πθ/α). Taking the real and imaginary parts ρ = rπ/α cos(πθ/α),

σ = rπ/α sin(πθ/α).

and

If θ = 0, ρ = rπ/α cos(0) > 0,

σ = rπ/α sin(0) = 0.

ρ = rπ/α cos(π) < 0,

σ = rπ/α sin(π) = 0.

If θ = α, Using the Fourier method from Section 11.7,      Z σ 1 1 1 −1 1 − ρ −1 1 + ρ tan + tan dt = π 0 (t − ρ)2 + σ 2 π σ σ   2 2 ρ +σ −ρ 1 . = cot−1 π σ

u(ρ, σ) =

Direct substitution for ρ and σ yields   2π/α 1 cos2 (πθ/α) + r2π/α sin2 (πθ/α) − rπ/α cos(πθ/α) −1 r u(r, θ) = cot π rπ/α sin(πθ/α)   π/α 1 r − cos(πθ/α) = cot−1 . π sin(πθ/α) 12. Because z = x + iy and τ = ρ + iσ, ρ+iσ = − cos[π(x+iy)/a] = − cos(πx/a) cosh(πy/a)+i sin(πx/a) sinh(πy/a). Taking the real and imaginary parts ρ = − cos(πx/a) cosh(πy/a),

and

σ = sin(πx/a) sinh(πy/a).

Therefore, for z = ∞i,

ρ = − cos(0) cosh(∞) = −∞,

and

σ = sin(0) sinh(∞) = 0.

for z = 0,

ρ = − cos(0) cosh(0) = −1,

and

σ = sin(0) sinh(0) = 0.

for z = a/2,

ρ = − cos(π/2) cosh(0) = 0, and σ = sin(π/2) sinh(0) = 0.

for z = a,

ρ = − cos(π) cosh(0) = 1,

and

σ = sin(π) sinh(0) = 0.

350

Advanced Engineering Mathematics with MATLAB

for z = a + ∞i,

ρ = − cos(π) cosh(∞) = ∞, and σ = sin(π) sinh(∞) = 0.

Using the Fourier method from Section 11.7,      σ 1 −1 1 − ρ −1 1 + ρ tan + tan dt = 2 2 π σ σ −1 (t − ρ) + σ        2 2 1 1−ρ 1+ρ 1 −1 σ −1 ρ + σ − 1 1− . = cot . = cot π 2 σ σ π 2σ

1 u(ρ, σ) = π

Z

1

Direct substitution for ρ and σ yields h    i   πy   πx  1 2 πy 2 πx −1 u(x, y) = cot sinh − sin sinh 2 sin π a a a a       2 πy πx sinh . = tan−1 sin π a a For Step 4, we note that 1 − u(x, y) satisfies both Laplace’s equation and the boundary condition. Section 11.1 1. F (ω) =

Z

0

e(a−ωi)t dt + −∞

2. F (ω) =

Z

Z



e−(a+ωi)t dt =

0

0

te

(a−ωi)t

dt +

−∞

=−

Z



1 2a 1 + = 2 . a − ωi a + ωi ω + a2

te−(a+ωi)t dt

0

1 1 4aωi + =− 2 . (a − ωi)2 (a + ωi)2 (ω + a2 )2

3. F (ω) =

Z



2

e−at e−iωt dt = 2

−∞

4. F (ω) =

Z

Z

∞ 0

0

e(2−ωi)t dt + −∞

2

e−at cos(ωt) dt =

Z

∞ 0

r

  ω2 π . exp − a 4a

e−(1+ωi)t dt

0 ∞ e−(1+ωi)t 3 e(2−ωi)t − = = . 2 − ωi −∞ 1 + ωi 0 (2 − iω)(1 + iω)

351

Worked Solutions 5. F (ω) =

Z

F (ω) =

Z

0

e

−(1+i+iω)t

dt −

Z

0

e(1−i−iω)t dt −∞

1 1 2i(ω + 1) − =− . 1 + (ω + 1)i 1 − (ω + 1)i (ω + 1)2 + 1

=

6.



1

cos(at)e−iωt dt = −1

1 2

Z

1 −1

h

i ei(a−ω)t + e−i(a+ω)t dt

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. F (ω) =

Z

a −a

a t −iωt e−iωt e dt = (1 + iωt) 2 a aω −a

(1 − iωa)eiωa 2i cos(ωa) 2i sin(ωa) (1 + iωa)e−iωa − = − = 2 2 aω aω ω aω 2

9. F (ω) =

Z

a  2 e−iωt t e−iωt dt = 2 3 (2 + 2iωt − ω 2 t2 ) a ia ω −a −a a

eiωa e−iωa 2 2 (2 + 2iωa − ω a ) − (2 − 2iωa − ω 2 a2 ) ia2 ω 3 ia2 ω 3 4 cos(ωa) 2 sin(ωa) 4 sin(ωa) = + − aω 2 ω a2 ω 3 =

352

Advanced Engineering Mathematics with MATLAB

10. F (ω) =

Z



(1 − t/τ ) e

0

−iωt

2τ 2τ e−iωt e−iωt + 2 (−iωt − 1) dt = − iω 0 ω τ 0

 e−2iωτ 1 1  −2iωτ e −1 − (2iωτ + 1) + 2 2 ωi ω τ  ω τ  1 sin(ωτ ) e−2iωτ 1 − e−2iωτ 2e−iωτ = cos(ωτ ) − + + = ωi ωi ω2 τ ωi ωτ

=−

11.

 2 # t e−iωt dt 1− F (ω) = a −a a 4 cos(ωa) 2 sin(ωa) 4 sin(ωa) e−iωt − = − + −iω −a aω 2 ω a2 ω 3 Z

=

12. F (ω) = =

"

a

4 sin(ωa) 4 cos(ωa) − a2 ω 3 aω 2

Z

Z

=2



e−iωt dt + 2 (t + a2 )ν+1/2

0 ∞

e−iωt dt + 2 (t + a2 )ν+1/2

0

Z



(t2

0

cos(ωt) + a2 )ν+1/2

Z Z

0 −∞ ∞

(t2

e−iωt dt + a2 )ν+1/2

eiωt dt + a2 )ν+1/2 0  2|ω|ν Γ 21 Kν (a|ω| )  . dt = Γ ν + 12 (2a)ν (t2

13. Let X(ω) = 2πKδ(ω), then x(t) =

1 2π

Z



2πKδ(ω)eiωt dω = K

−∞

from Equation 11.20. Therefore, F[K] = 2πKδ(ω). 14. Z

b a

τ δ(τ − t) dτ =

If t < a,

Z

Z

b ′

a

τ H (τ − t) dτ = τ H(τ −

b t)|a



b a

τ δ(τ − t) dτ = b − a − (b − a) = 0.

Z

b a

H(τ − t) dτ.

353

Worked Solutions If a < t < b,

Z

Finally, if b < t,

b a

τ δ(τ − t) dτ = b − (b − t) = t. Z

b a

τ δ(τ − t) dτ = 0 − 0 = 0.

We may express the final solution in terms of Heavisides as given in the text. 15. From the definition of the Fourier transform, Z ∞ Z ∞ f (t) sin(ωt) dt = P (ω) + iQ(ω) f (t) cos(ωt) dt + i F (ω) = −∞

−∞

and F (−ω) =

Z

∞ −∞

f (t) cos(ωt) dt − i

Therefore, |F (ω)| =

Z

∞ −∞

f (t) sin(ωt) dt = P (ω) − iQ(ω).

p P 2 (ω) + Q2 (ω) = |F (−ω)|.

On the other hand, if F (ω) = |F (ω)|eiΦ(ω) ,

Φ(ω) = tan−1 [Q(ω)/P (ω)] = −Φ(ω). Section 11.2 1. Z Z 1 ∞ 1 ∞ H(t)e−i(ω−ω0 )t dt − H(t)e−i(ω+ω0 )t dt 2i −∞ 2i −∞     1 1 1 1 ′ ′ = + πδ(ω ) + πδ(ω ) − ′ ′ 2i iω 2i iω ω ′ =ω−ω0 ω ′ =ω+ω0 ω0 πi = 2 + [δ(ω + ω0 ) − δ(ω − ω0 )]. ω0 − ω 2 2

F (ω) =

2. Z Z 1 ∞ 1 ∞ H(t)e−i(ω−ω0 )t dt + H(t)e−i(ω+ω0 )t dt 2 −∞ 2 −∞     1 1 1 1 ′ ′ + + πδ(ω ) + πδ(ω ) = ′ ′ ′ 2 iω 2 iω ω ′ =ω−ω0 ω =ω+ω0 iω π = 2 + [δ(ω + ω0 ) + δ(ω − ω0 )]. ω0 − ω 2 2

F (ω) =

354

Advanced Engineering Mathematics with MATLAB

3. From Equation 11.2.18, Z ∞ 1 H(t)e−iωt dt = πδ(ω) + , ωi −∞

or

Z

∞ 0

e−iωt dt = πδ(ω) −

i . ω

Replacing ω with −ω, we have Z ∞ i i eiωt dt = πδ(−ω) + = πδ(ω) + . ω ω 0 4.  Z 0 eǫt sin(ω0 t)e−iωt dt F[sgn(t) sin(ω0 t)] = lim − ǫ→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ω −∞ ∞ ∞  1 e−ǫt−iω0 t−iωt 1 e−ǫt+iω0 t−iωt − + 2i −ǫ + iω0 − iω 0 2i −ǫ − iω0 − iω 0   1 i i i i = + + + 2i ω0 − ω ω0 + ω ω0 − ω ω0 + ω 1 2ω0 1 + = 2 = ω0 − ω ω0 + ω ω0 − ω 2  Z 0 eǫt cos(ω0 t)e−iωt dt F[sgn(t) cos(ω0 t)] = lim − ǫ→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 1. From the scaling property,   π −|ω/a| 1 = e . F 2 2 1+a t |a|

355

Worked Solutions 2. Because

cos(at) eiat e−iat = + , 1 + t2 2(1 + t2 ) 2(1 + t2 )

we have that F



  π  −|ω−a| cos(at) −|ω+a| . e + e = 1 + t2 2

3. From Parseval’s equality, Z ∞ Z ∞ 1 dω 1 e−2at dt = = 2π −∞ a2 + ω 2 2a 0

or

Z

∞ −∞

dx π = . a2 + x 2 a

4. From Parseval’s equality,  Z 0 Z ∞ Z ∞ Z ∞ 1 π dx −2ω 2ω 2 −2|ω| e dω e dω + = π e dω = 2 2 2π −∞ 2 −∞ 0 −∞ (x + 1) " ∞ # 0 π 2ω π = e − e−2ω = 4 2 −∞ 0

5. Computing the Fourier transform, Z ∞ sin(bt)e−(a+iω)t dt F (ω) = 0

∞ e−(a+ωi)t [(a + iω) sin(bt) − b cos(bt)] 2 2 (a + iω) + b 0 b = 2 . a + b2 − ω 2 + 2iaω

=

Therefore,

F ∗ (ω) = Consequently, Z

∞ −∞

|F (ω)|2 dω =

On the other hand, Z Z ∞ f 2 (t) dt = −∞

b . a2 + b2 − ω 2 − 2iaω

Z

∞ −∞

(a2

+

b2

b2 dx. − x2 )2 + 4a2 x2

Z ∞ e−2at sin2 (bt) dt = 21 e−2at [1 − cos(2bt)] dt 0 0 ∞ ∞ e−2at 1 −2at − =− e [−2a cos(2bt) + 2b sin(2bt)] 2 2 4a 8a + 8b 0 0

=



b2 . + b2 )

4a(a2

356

Advanced Engineering Mathematics with MATLAB

From Parseval’s theorem, 1 2π

Z

∞ −∞

(x2

+

a2

b2 b2 dx = 2 2 2 2 2 − b ) + 4a b 4a(a + b2 )

after a little algebra. Solving for the integral gives the final result. 6.

 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

F[e−bt sin(at)H(t)] =

1 2i F

7. Because the Fourier transform of f (t) = e−|t| is F (ω) = 2/(ω 2 + 1), we have from Poisson’s summation formula with α = 2π that # " ∞ ∞ ∞ X X X  1 −2π n −|2πn| e e =π 1+2 =π n2 + 1 n=−∞ n=−∞ n=1   2 e−2π 1 + e−2π =π 1+ =π . −2π 1−e 1 − e−2π 8. We begin by noting that      exp −a(n + c)2 + 2b(n + c) = exp −a (n + c)2 − 2b(n + c)/a i h 2 2 = e−b /a exp −a (n + c − b/a) . Therefore, ∞ X

n=−∞

∞ h i X   2 2 exp −a(n + c)2 + 2b(n + c) = e−b /a exp −a (n + c − b/a) . n=−∞

We now use Poisson’s summation formula, Equation 11.3.51, with f (t) = 2 e−pt , its corresponding Fourier transform   r π ω2 , F (ω) = exp − p 4p α = 1, and p = a. We must also use the time shifting theorem, Equation 11.3.6, with τ = b/a − c. All of these substitution leads to the stated result.

357

Worked Solutions

9. Using the fact that F[δ(t − a)] = e−iaω , direct substitution into the summation formula leads to the result with α = 2π/T . 10. We begin by inventing a periodic function g(x, y) defined by g(x, y) =

∞ X

∞ X

f (x + 2πk1 , y + 2πk2 ).

k1 =−∞ k2 =−∞

Because g(x, y) is a periodic function of 2π in both directions, it can be represented by the complex double Fourier series: ∞ X

g(x, y) =

∞ X

cn1 n2 ein1 x ein2 y

n1 =−∞ n2 =−∞

or g(0, 0) =

∞ X

∞ X

∞ X

∞ X

f (2πk1 , 2πk2 ) =

cn1 n2 .

n1 =−∞ n2 =−∞

k1 =−∞ k2 =−∞

Computing cn1 n2 , we find that Z π Z π 1 cn1 n2 = g(x, y)e−in1 x e−in2 y dx dy 4π 2 −π −π Z π X Z π X ∞ ∞ 1 = f (x + 2k1 π, y + 2k2 π) 4π 2 −π −π k2 =−∞

k1 =−∞

−in1 x −in2 y

=

1 4π 2

×e Z π ∞ X

k2 =−∞

Z

Z

e Z ∞ X

−π k =−∞ 1

dx dy

π

f (x + 2k1 π, y + 2k2 π) −π

× e−in1 x e−in2 y dx dy

∞ ∞ 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

f (2πk1 , 2πk2 ) =

k1 =−∞ k2 =−∞

1 4π 2

∞ X

∞ X

F (n1 , n2 )

n1 =−∞ n2 =−∞

or ∞ X

∞ X

k1 =−∞ k2 =−∞

f (α1 k1 , α2 k2 ) =

1 α1 α2

∞ X

∞ X

n1 =−∞ n2 =−∞

F



2πn1 2πn2 , α1 α2



.

358

Advanced Engineering Mathematics with MATLAB

Section 11.4 1. F −1

2.



iωπ −|ω| e 2



=

i 4

Z

0

ωeω eiωt dω + −∞

i 4

Z



ωe−ω eiωt dω

0

0 ie(1+it)ω = [(1 + it)ω − 1] 4(1 + it)2 −∞ ∞ −(1−it)ω ie t =− + [−(1 − it)ω − 1] 2 4(1 − it) (1 + t2 )2 0

2 1 1 = − = (1 + iω)(1 + 2iω) 1 + 2iω 1 + iω

1 2

1 1 − + iω 1 + iω

Taking the inverse term by term, f (t) = e−t/2 H(t) − e−t H(t). 3.

1 1 1 = + (1 + iω)(1 − iω) 2(1 + iω) 2(1 − iω)

Taking the inverse term by term,

f (t) = 12 e−t H(t) + 12 et H(−t). 4.

1 1 1 1 iω = − = − (1 + iω)(1 + 2iω) 1 + iω 1 + 2iω 1 + iω 2( 12 + iω)

Taking the inverse term by term, f (t) = e−t H(t) − 12 e−t/2 H(t). 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( 2 + iω)2 2 + iω

Taking the inverse term by term, f (t) = e−t H(t) − e−t/2 H(t) + 12 te−t/2 H(t). 6. The inversion formula is 1 f (t) = 2π

Z

∞ −∞

eiωt dω. ω 2 + a2

359

Worked Solutions

The poles are located at z = ±ai. For t < 0, we take the pole in the lower half-plane and f (t) =

  izt  e (z + ai)eitz eat 1 −2πi Res ; −ai = −i lim = . 2 2 z→−ia (z + ai)(z − ai) 2π z +a 2a

The negative sign comes from taking the contour in the negative sense. For t > 0, we use the pole z = ai and f (t) =

  izt  1 e (z − ai)eitz e−at 2πi Res ; ai = i lim = . 2 2 z→ia (z + ai)(z − ai) 2π z +a 2a

Therefore, the total answer, using the absolute value sign, is f (t) =

e−a|t| . 2a

7. The inversion formula is 1 f (t) = 2π

Z

∞ −∞

ωeiωt dω. ω 2 + a2

The poles are located at z = ±ai. For t < 0, we take the pole in the lower half-plane and    zeizt 1 −2πi Res ; −ai f (t) = 2π z 2 + a2 −ieat (z + ai)zeitz = . = −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 f (t) =

   1 (z − ai)zeitz zeizt ie−at 2πi Res ; ai = i lim = . 2 2 z→ia (z + ai)(z − ai) 2π z +a 2

Therefore, the total answer, using the absolute value sign, is f (t) =

i sgn(t)e−a|t| , 2

where

sgn(t) =



1, −1,

8. The inversion formula is f (t) =

1 2π

Z

∞ −∞

ωeiωt dω. + a2 )2

(ω 2

t > 0, t < 0.

360

Advanced Engineering Mathematics with MATLAB

The poles are located at z = ±ai and are second order. For t < 0, we take the pole in the lower half-plane and    zeizt 1 −2πi Res ; −ai f (t) = 2π (z 2 + a2 )2   d (z + ai)2 zeitz = −i lim z→−ia dz (z + ai)2 (z − ai)2   itzeitz 2zeitz eitz + − = −i lim z→−ia (z − ai)2 (z − ai)2 (z − ai)3  at  e iteat teat eat = −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      d zeizt (z − ai)2 zeitz 1 2πi Res ; ai = i lim f (t) = z→ia dz (z + ai)2 (z − ai)2 2π (z 2 + a2 )2   eitz itzeitz 2zeitz = i lim + − z→−ia (z + ai)2 (z + ai)2 (z + ai)3  −at  e ite−at te−at e−at = =i − 2 + + . 2 4a 4a 4a 4a Therefore, the total answer, using the absolute value sign, is f (t) =

it −a|t| e . 4a

9. The inversion formula is 1 f (t) = 2π

Z

∞ −∞

ω 2 eiωt dω. (ω 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    z 2 eizt 1 −2πi Res f (t) = ; −ai 2π (z 2 + a2 )2   (z + ai)2 z 2 eitz d = −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

361

Worked Solutions

The negative sign comes from taking the contour in the negative sense. For t > 0, we use the pole z = ai and      1 d z 2 eizt (z − ai)2 z 2 eitz 2πi Res f (t) = ; ai = i lim z→ia dz (z + ai)2 (z − ai)2 2π (z 2 + a2 )2   itz 2 eitz 2z 2 eitz 2zeitz + − = 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 f (t) =

1 (1 − a|t|)e−a|t| . 4a

10. The inversion formula is Z



eiωt dω. − 3iω − 3 −∞ √ The simple poles are located at z = (± 3 + 3i)/2. Because there are no singularities in the lower half-plane, f (t) = 0 for t < 0. For t > 0,    √ eizt 1 2πi Res 2 ; ( 3 + 3i)/2 f (t) = 2π z − 3iz − 3   √ eizt + 2πi Res 2 ; (− 3 + 3i)/2 z − 3iz − 3 √  [z − ( 3 + 3i)/2]eizt =i lim √ z 2 − 3iz − 3 z→( 3+3i)/2 √  [z − (− 3 + 3i)/2]eizt + lim √ z 2 − 3iz − 3 z→(− 3+3i)/2 √ √ ie−3t/2 [cos( 3t/2) + i sin( 3t/2)] √ = 2( 3/2 + 3i/2) − 3i √ √ ie−3t/2 [cos( 3t/2) − i sin( 3t/2)] √ + 2(− 3/2 + 3i/2) − 3i √ ! 2 3t = − √ e−3t/2 sin . 2 3 f (t) =

1 2π

ω2

Therefore, the total answer is √ 2 f (t) = − √ e−3t/2 sin( 3t/2)H(t). 3

362

Advanced Engineering Mathematics with MATLAB

11. The inversion formula is 1 2π

f (t) =

Z

∞ −∞

eiωt dω. (ω − ai)2n+2

The pole is located at z = ai and it is a (2n + 2)th order pole. Because there are no singularities in the lower half-plane, f (t) = 0 for t < 0. For t > 0,   eizt 1 2πi Res ; ai f (t) = 2π (z − ai)2n+2    1 d2n+1 (z − ai)2n+2 eizt = lim z→ai (2n + 1)! dz 2n+1 (z − ai)2n+2 (−1)n+1 2n+1 −at 1 (i)2n+2 t2n+1 e−at = t e . = (2n + 1)! (2n + 1)! Therefore, the total answer is f (t) = 12. The inversion formula is

(−1)n+1 2n+1 −at t e H(t). (2n + 1)! Z



ω 2 eiωt dω. − 1)2 + 4a2 ω 2 −∞ √ The simple poles are located at z = ± 1 − a2 ± ai. Let us assume that a < 1. Then   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 2 − 1)2 + 4a2 z 2 z→ 1−a2 +ai f (t) =

1 2π

= = and

 Res

(ω 2

√lim z→ 1−a2 +ai √ it 1−a2 −at

4(z 2

zeizt − 1) + 8a2

p e e √ ( 1 − a2 + ia) 2 8ia 1 − a

 p z 2 eizt 2 ; − 1 − a + ai (z 2 − 1)2 + 4a2 z 2 √   (z + 1 − a2 − ai)z 2 eizt = lim √ (z 2 − 1)2 + 4a2 z 2 z→− 1−a2 +ai = =

√lim z→− 1−a2 +ai √ −it 1−a2 −at

4(z 2

zeizt − 1) + 8a2

p e e √ (− 1 − a2 + ia). −8ia 1 − a2

363

Worked Solutions Therefore, for t > 0, the residue theorem gives p  p  p e−at 1 − a2 cos t 1 − a2 − a sin t 1 − a2 f (t) = √ 8a 1 − a2   p p p + ia cos t 1 − a2 + i 1 − a2 sin t 1 − a2  p  p p + 1 − a2 cos t 1 − a2 − a sin t 1 − a2   p p p 2 2 2 − ia cos t 1 − a − i 1 − a sin t 1 − a  p p  e−at e−at 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 2 − 1)2 + 4a2 z 2 z→ 1−a2 −ai =

= = and

√lim z→ 1−a2 −ai √ it 1−a2 at

4(z 2

zeizt − 1) + 8a2

p e e √ ( 1 − a2 − ia) −8ia 1 − a2

 p z 2 eizt 2 ; − 1 − a − ai Res (z 2 − 1)2 + 4a2 z 2 √   (z + 1 − a2 + ai)z 2 eizt = lim √ (z 2 − 1)2 + 4a2 z 2 z→− 1−a2 −ai 

=

√lim z→− 1−a2 −ai √ −it 1−a2 at

4(z 2

zeizt − 1) + 8a2

p e e √ (− 1 − a2 − ia). 2 8ia 1 − a Therefore, for t < 0, the residue theorem gives  p  p  p eat √ − 1 − a2 cos t 1 − a2 − a sin t 1 − a2 f (t) = − 8a 1 − a2 p   p p − ia cos t 1 − a2 + i 1 − a2 sin t 1 − a2  p  p p − 1 − a2 cos t 1 − a2 − a sin t 1 − a2 p   p p + ia cos t 1 − a2 − i 1 − a2 sin t 1 − a2 =

=

p p   eat eat cos t 1 − a2 + √ sin t 1 − a2 . 4a 4 1 − a2

364

with

Advanced Engineering Mathematics with MATLAB Now, a > 1. √ The easiest method is to use the above results √ let us consider √ 1 − a2 = i a2 − 1 or −i a2 − 1. Therefore, the total answer is  −a|t| √ √ −a|t| cosh( a2 −1|t|) sinh( a2 −1|t|) e √ , −e 2 −1 4a 4 a f (t) = e−a|t| cos(√1−a2 |t|) e−a|t| sin(√1−a2 |t|)  √ , − 4a

4 1−a2

a > 1, 0 < a < 1.

13. The inversion formula is

1 f (t) = 2π

Z

∞ −∞

3eiωt dω. (2 − iω)(1 + iω)

The poles are located at z = i and z = −2i. For t > 0,

  3eizt 1 (2πi) Res ;i f (t) = 2π (2 − iz)(1 + iz) 3eizt = i lim (z − i) = e−t . z→i i(2 − iz)(z − i)

For t < 0,   1 3eizt (−2πi) Res ; −2i 2π (2 − iz)(1 + iz) 3eizt = e2t . = −i lim (z + 2i) z→−2i (−i)(z + 2i)(1 + iz)

f (t) =

Therefore, the total answer is f (t) =



e2t , e−t ,

t < 0, t > 0.

14. From the definition of the Fourier transform, 1 f (t) = 4π =

1 4π

Z Z

∞ −∞ ∞ −∞

ei(t+1)ω 1 dω + 2 2 ω +a 4π i(t+1)z

e 1 dz + z 2 + a2 4π

Z

Z



ei(t−1)ω dω ω 2 + a2

−∞ ∞ i(t−1)z

−∞

e dz. z 2 + a2

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,  i(t+1)z  Z ∞ i(t+1)ω e π e dω = 2πi Res 2 ; ai = e−a(t+1) . 2 + a2 2 ω z + a a −∞

365

Worked Solutions

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 semicircle in the top half-plane and compute the residue of the enclosed singularities. Thus, Z

∞ −∞

 i(t−1)z  π e ei(t−1)ω 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 halfplane and compute the residue of the enclosed singularities. Thus, Z

∞ −∞

 i(t−1)z  π e ei(t−1)ω dω = −2πi Res ; −ai = ea(t−1) . ω 2 + a2 z 2 + a2 a

The final answer is    −a(t−1) + e−a(t+1) /(4a),  e  f (t) = ea(t−1) + e−a(t+1) /(4a),    a(t−1) e + ea(t+1) /(4a),

t > 1, −1 < t < 1, t < −1.

15. From the definition of the Fourier transform, f± (t) =

1 2π

Z

∞ −∞

ei(t−1±1)ω dω. (ω − ai)(R2 − e−2ωi )

The singularities consist of simple poles at z = ai and zn = ±nπ + i ln(R), where n = 0, ±1, ±2, ±3, . . . For the case of F+ (ω), we have f+ (t) =

1 2π

Z

∞ −∞

eitω dω. (ω − ai)(R2 − e−2ωi )

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 ; z Res + 2πi n . (z − ai)(R2 − e−2zi ) n=−∞

366

Advanced Engineering Mathematics with MATLAB

Because  eitz e−at eitz ; ai = lim = Res z→ai R2 − e−2zi (z − ai)(R2 − e−2zi ) R2 − e2a 

and 

 eitz eitz z − zn Res = lim ; z lim 2 n 2 −2zi −2zi z→z z→z (z − ai)(R − e ) n z − ai n R − e −t ±inπt R e = , 2 2iR {±nπ + [ln(R) − a] i} f+ (t) =

∞ X einπt 1 i e−at + . 2 2a t+2 R −e 2R nπ + [ln(R) − a] i n=−∞

If t < 0, we close the contour with an infinite semi-circle in the bottom halfplane and compute the residue of the enclosed singularities. Because there are none, f+ (t) = 0 if t < 0. The final answer is f+ (t) =

∞ i e−at H(t) X einπt H(t) + . 2 2a t+2 R −e 2R nπ + [ln(R) − a] i n=−∞

Turning to the case of F− (ω), we have 1 f− (t) = 2π

Z

∞ −∞

ei(t−2)ω dω. (ω − ai)(R2 − e−2ω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)z ei(t−2)ω dω = 2πi Res ; ai 2 −2ωi ) (z − ai)(R2 − e−2zi ) −∞ (ω − ai)(R − e   ∞ X ei(t−2)z . ; z Res + 2πi n (z − ai)(R2 − e−2zi ) n=−∞ Because Res



 ei(t−2)z e−at ei(t−2)z ; ai = lim 2 = 2 −2a 2 −2zi −2zi z→ai R − e (z − ai)(R − e ) R e −1

and 

 ei(t−2)z ei(t−2)z z − zn Res = lim ; z lim 2 n 2 −2zi −2zi z→z z→z (z − ai)(R − e ) n z − ai n R − e −t+2 ±inπt R e = , 2 2iR {±nπ + [ln(R) − a] i}

367

Worked Solutions f− (t) =

∞ i e−at 1 X einπ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 halfplane and compute the residue of the enclosed singularities. Because there are none, f− (t) = 0 if t < 2. The final answer is f− (t) =

∞ H(t − 2) X einπt i e−at H(t − 2) + . 2 −2a t R e −1 2R nπ + [ln(R) − a] i n=−∞

16. From the definition of the Fourier transform, √ cosh(y ω 2 + 1 )eiωt √ √ dω ω 2 + 1 sinh(p ω 2 + 1/2) −∞ √ I 1 cosh(y z 2 + 1 )eizt √ √ = dz, 2π C z 2 + 1 sinh(p z 2 + 1/2)

f (t) =

1 2π

Z



where we have closed the line integral with an infinite semicircle √ in the upper half-plane if t > 0. Simple poles are located at z = i and p z 2 + 1 = 2nπi, p 2 2 2 n = 0, 1, 2, . . ., or zn = i 1 + 4n π /p . Now the residue at z = i is √   cosh(y z 2 + 1 )eizt √ Res √ ;i z 2 + 1 sinh(p z 2 + 1/2)

√ e−t (z − i) cosh(y z 2 + 1 )eizt = = lim 2 z→i (z + 1)p[1 + p2 (z 2 + 1)/24 + · · ·]/2 ip

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 ∞ 2 X (−1)n cos(2nπy/p) exp(− 1 + 4n2 π 2 /p2 t) e−t p + . f (t) = p p n=1 1 + 4n2 π 2 /p2

368

Advanced Engineering Mathematics with MATLAB

For t < 0 we close the p contour in the lower half-plane and evaluate the poles at z = −i and zn = −i 1 + 4n2 π 2 /p2 . We find that √   cosh(y z 2 + 1 )eizt √ Res √ ; −i z 2 + 1 sinh(p z 2 + 1/2)

√ (z + i) cosh(y z 2 + 1 )eizt et = lim = − z→−i (z 2 + 1)p[1 + p2 (z 2 + 1)/24 + · · ·]/2 ip

and

√  cosh(y z 2 + 1 )eizt √ ; zn Res √ 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) p . f (t) = + p p n=1 1 + 4n2 π 2 /p2

17. From the definition of the Fourier transform, 1 f (t) = 2π

Z

∞ −∞

cos

n

eitω ωL β[1+iγsgn(ω)]

1 o dω = 2π

I

C

cos

n

eitz zL β[1+iγsgn(z)]

o dz.

The integral has singularities at zn = ±

(2n − 1)βπ (2n − 1)iβγπ + , 2L 2L

where n = 1, 2, 3, . . . Because the poles are only in the upper half-plane, f (t) = 0 for t < 0. For t > 0, f (t) = i

"

∞ X

n=1

Res cos

n

eitz zL β[1+iγsgn(z)]

+ Res cos

o ; z = zn+

n

!

eitz

zL β[1+iγsgn(z)]

o ; z = zn−

!#

,

369

Worked Solutions where  Res

cos

n

eitz zL β[1+iγsgn(z)]

 o ; z = zn = lim

z→zn





cos

(z − zn )eitz n o zL β[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, f (t) =

∞  iβ X (−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

∞ −∞

 eix dx 2 −∞ x + 4x + 5 I  eiz =ℑ dz , 2 C z + 4z + 5

sin(x) dx = ℑ 2 x + 4x + 5

Z



if C is a semicircle of infinite radius in the upper half-plane. Within the contour there is a simple pole at z = −2 + i. Then, I

C

 eiz ; −2 + i z 2 + 4z + 5 π (z + 2 − i)eiz = e−2i . = 2πi lim z→−2+i z 2 + 4z + 5 e

eiz dz = 2πi Res z 2 + 4z + 5



Taking the imaginary part gives the desired result. 19. Z

∞ 0

cos(x) 1 dx = (x2 + 1)2 2

Z



cos(x) 1 dx = ℜ 2 2 2 −∞ (x + 1)  I iz 1 e = ℜ dz , 2 + 1)2 2 (z C

Z

∞ −∞

eix dx 2 (x + 1)2



370

Advanced Engineering Mathematics with MATLAB

if C is a semicircle of infinite radius in the upper half-plane. Within the contour there is a second-order pole at z = i. Therefore, I

    d (z − i)2 eiz eiz eiz dz = 2πi Res ; i = 2πi lim z→i dz (z − i)2 (z + i)2 (z 2 + 1)2 (z 2 + 1)2   iz iz ie π 2e = 2πi lim = − 3 z→i (z + i)2 (z + i) e

C

Substituting into the first equation gives the desired result. 20. Z

∞ −∞

x sin(ax) dx = ℑ x2 + 4

Z

∞ −∞

xeaxi dx x2 + 4



=ℑ

I

C

 zeazi dz , z2 + 4

if C is a semicircle of infinite radius in the upper half-plane. Within the contour there is a simple pole at z = 2i. Then, I

C

 zeazi ; 2i z2 + 4 z(z − 2i)eazi = πie−2a . = 2πi lim z→2i (z − 2i)(z + 2i)

zeazi dz = 2πi Res z2 + 4



Substituting into the first equation gives the desired result. 21. Z

∞ 0

x2 cos(ax) 1 dx = (x2 + b2 )2 2

Z

∞ −∞

x2 cos(ax) 1 dx = ℜ (x2 + b2 )2 2

Z

∞ −∞

 x2 eaxi . dx (x2 + b2 )2

If we now introduce a semicircle of infinite radius in the upper-half of the complex plane, CR , Z

∞ −∞

x2 eaxi dx = (x2 + b2 )2

I

C

z 2 eazi dz − (z 2 + b2 )2

Z

CR

z 2 eazi dz. (z 2 + b2 )2

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

C

 2 azi   2 azi  z 2 eazi d z e z e dz = 2πi Res ; bi = 2πi lim z→2i dz (z + bi)2 (z 2 + b2 )2 (z 2 + b2 )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

371

Worked Solutions

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 aix cosh(hx) − 1 cos(ax) dx = ℜ e dx −∞ x sinh(hx) −∞ x sinh(hx)  I cosh(hz) − 1 aiz e dz , =ℜ C z sinh(hz) if a > 0 and C is a semicircle of infinite radius in the upper half-plane. Within the contour there is a removal singularity at z = 0 and simple poles at hzn = nπi with n = 1, 2, 3, . . . within the contour. Therefore, I

  ∞ X cosh(hz) − 1 aiz cosh(hz) − 1 aiz nπi Res e dz = 2πi e ; z sinh(hz) z sinh(hz) h n=1

C

with Res



   cosh(hz) − 1 aiz cosh(hz) − 1 aiz nπi = lim e ; e z sinh(hz) h z z→nπi/h   1 × lim z→nπi/h h cosh(hz) 1 − (−1)n −nπa/h = e . nπi

Thus, Z

∞ −∞

∞ X exp[−(2m − 1)πa/h] cosh(hx) − 1 cos(ax) dx = 4 x sinh(hx) 2m − 1 m=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. f (t) ∗ g(t) =

Z

∞ 0

e−(t−x) H(t − x)e−x dx = e−t

If t < 0, f (t) ∗ g(t) = 0. If t > 0, f (t) ∗ g(t) = e

−t

Z

Z

t

dx = te−t . 0

∞ 0

H(t − x) dx

372

Advanced Engineering Mathematics with MATLAB

Therefore, f (t) ∗ g(t) = te−t H(t). 2. f (t) ∗ g(t) =

Z

∞ 0

e(t−x) H(x − t)e−x dx = et

If t < 0, f (t) ∗ g(t) = e If t > 0, f (t) ∗ g(t) = e

Z

t

t

Z

∞ 0 ∞

t

Z

∞ 0

e−2x H(x − t) dx

e−2x dx = 12 et .

e−2x dx = 12 e−t .

Therefore, f (t) ∗ g(t) = 21 e−|t| . 3. f (t) ∗ g(t) =

Z

∞ 0

e−(t−x) H(t − x)e−2x dx = e−t

Z

∞ 0

e−x H(t − x) dx

If t < 0, f (t) ∗ g(t) = 0. If t > 0, f (t) ∗ g(t) = e−t Therefore, f (t) ∗ g(t) = e−t − e 4.

Z

t 0

 −2t

t

e H(−t) ∗ [H(t) − H(t − 2)] = =

Z

e−x dx = e−t − e−2t .

H(t).



−∞ Z 2 0

et−x H(x − t)[H(x) − H(x − 2)] dx

et−x H(x − t) dx.

If t > 2, the integrand is always zero and the convolution equals zero. If t < 0, et H(−t) ∗ [H(t) − H(t − 2)] =

Z

2

et−x dx = et − et−2 .

0

Finally, if 0 < t < 2, et H(−t) ∗ [H(t) − H(t − 2)] =

Z

2 t

et−x dx = 1 − et−2 .

373

Worked Solutions 5. [H(t) − H(t − 2)] ∗ [H(t) − H(t − 2)] =

Z

=

Z

∞ −∞

[H(t − x) − H(t − x − 2)] × [H(x) − H(x − 2)] dx

2 0

[H(t − x) − H(t − x − 2)] dx.

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, [H(t) − H(t − 2)] ∗ [H(t) − H(t − 2)] =

Z

t

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 t−2 Z 2 dx = 4 − t. dx − [H(t) − H(t − 2)] ∗ [H(t) − H(t − 2)] = 0

0

6. e−|t| ∗ e−|t| = =

Z



−∞ Z 0

e−|x| e−|t−x| dx ex e−|t−x| dx +

−∞

Z



e−x e−|t−x| dx.

0

If t < 0, e−|t| ∗ e−|t| =

Z

t

ex e−(t−x) dx + −∞

t 1 −t 2x = 2e e

−∞

If t > 0,

e−|t| ∗ e−|t| = =

Z

0

−∞

ex e(t−x) dx + t

Z

∞ 0

Z

t

e−x e−(t−x) dx + 0

Z

∞ t

e−x e(t−x) dx

t ∞ 1 t −2x −t + e x − 2 e e = e (1 + t). −t

0

t

7. From Equation 11.1.21, Z ∞ δ(t − x − a)δ(x − b) dx = δ(t − b − a). −∞

e−x e(t−x) dx

0

t

ex e−(t−x) dx +

1 −t 2x 2e e

0

∞ 0 1 t −2x t t + e x − 2 e e = e (1 − t).

0 −∞

Z

374

Advanced Engineering Mathematics with MATLAB

Section 11.6 1. Taking the Fourier transform of both sides of the equation, we have that (2 + 3iω − ω 2 )Y (ω) =

1 1 + iω

Therefore,

I

1 y(t) = − 2π

C

or

Y (ω) =

1 . (1 + iω)2 (2 + iω)

eitz dz, i(z − i)2 (z − 2i)

where C includes the singularities in the upper half-plane for t > 0 and includes 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, y(t) =

     −1 eitz eitz (2πi) Res ; i + Res ; 2i , 2π i(z − i)2 (z − 2i) i(z − i)2 (z − 2i)

where 

   eitz d eitz 2 Res (z − i) ; i = lim z→i dz i(z − i)2 (z − 2i) i(z − i)2 (z − 2i)   itz t − 1 −t eitz te =− − e = lim 2 z→i (z − 2i) i(z − 2i) i and 

 eitz eitz e−2t Res ; 2i = lim (z − 2i) = − z→2i i(z − i)2 (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 [(iω)2 + 4iω + 4]Y (ω) = or Y (ω) = Therefore, 1 y(t) = − 2π

Z

(ω 2 ∞

−∞

1 ω2 + 1

1 . + 1)(iω + 2)2

eitω dω. (ω 2 + 1)(ω − 2i)2

375

Worked Solutions

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 y(t) = −

1 2π

I

C

(z 2

eitz dz + 1)(z − 2i)2

occur at z = i and z = 2i. Therefore, y(t) =

   1 eitz ; i (2πi) Res − 2 2π (z + 1)(z − 2i)2   eitz + Res − 2 ; 2i , (z + 1)(z − 2i)2

where  Res −

 eitz eitz e−t = − lim (z − i) ; i = 2 2 2 z→i (z + 1)(z − 2i) (z − i)(z + i)(z − 2i) 2i

and 

   eitz eitz d 2 Res − 2 (z − 2i) 2 ; 2i = − lim z→2i dz (z + 1)(z − 2i)2 (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 dz. y(t) = − 2π C (z 2 + 1)(z − 2i)2 The only singularity in the lower half-plane is at z = −i. Therefore, y(t) = where  Res −

  eitz 1 ; −i , (−2πi)Res − 2 2π (z + 1)(z − 2i)2

 eitz eitz et ; −i = − lim (z + i) =− 2 2 2 z→−i (z + 1)(z − 2i) (z − i)(z + i)(z − 2i) 18i

376

Advanced Engineering Mathematics with MATLAB

or

et 18 for t < 0. Thus, the particular solution is  1 −t 1 −2t 4 −2t e − 3 te − 9e , y(t) = 2 1 t e , 18 y(t) =

t > 0, t < 0.

3. Taking the Fourier transform of both sides of the equation, we have that [(iω)2 − 4iω + 4]Y (ω) =

1 1 + ωi

or

Y (ω) =

1 . (1 + ωi)(iω − 2)2

Therefore, for t > 0 1 y(t) = 2π

Z

∞ −∞

eitω dω. (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 y(t) =

1 2π

I

C

eitz dz (1 + zi)(iz − 2)2

occur at z = i and z = −2i. Therefore, for t > 0   1 eitz y(t) = (2πi)Res ; i , 2π (1 + zi)(iz − 2)2 where  eitz e−t eitz ; i = lim (z − i) = Res z→i (1 + zi)(iz − 2)2 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, 1 y(t) = − 2π

I

C

eitz dz. (1 + iz)(z + 2i)2

The only singularity in the lower half-plane is at z = −2i. Therefore,   1 eitz y(t) = ; −2i , (−2πi)Res 2π (1 + zi)(iz − 2)2

377

Worked Solutions where  Res

   eitz d eitz 2 (z + 2i) ; −2i = − lim z→−2i dz (1 + zi)(iz − 2)2 (1 + iz)(z + 2i)2  itz  ite i ieitz it = − lim = e2t − e2t − 2 z→−2i 1 + iz (1 + iz) 9 3

or y(t) = e2t /9 − te2t /3 for t < 0. Thus, the particular solution is y(t) =

(

1 −t 9e , 1 2t 1 2t 9 e − 3 te ,

t > 0, t < 0.

4. Taking the Fourier transform of both sides of the equation, we have that Y (ω) = Therefore, 1 y(x) = 2π

Z

1 . ω 4 − λ4 ∞

−∞

eiωx dω. ω 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

and

  izx (z − λi)eizx e−λx e ; iλ = lim =− 3 Res 4 4 4 4 z→iλ z −λ z −λ 4λ i 

eizx Res 4 ; −λ z − λ4



Therefore, y(x) = −

(z + λ)eizx e−iλx = − . z→−λ z 4 − λ4 4λ3

= lim

 1 e−λx + ie−iλx . 3 4λ

For x < 0, the poles −iλ and λ lie in the lower half-plane. Thus,

  izx  e eizx ; −iλ + Res 4 ;λ , y(x) = (−i) Res 4 z − λ4 z − λ4 

where Res





eizx ; −iλ 4 z − λ4



eλx (z + λi)eizx = 3 4 4 z→−iλ z −λ 4λ i

= lim

378

Advanced Engineering Mathematics with MATLAB

and

 izx  e eiλx (z − λ)eizx Res 4 ; λ = lim = . z→λ z − λ4 z 4 − λ4 4λ3

Therefore, y(x) = − In general, y(x) = −

 1 eλx + ieiλx . 3 4λ

 1  −λ|x| −iλ|x| e + ie . 4λ3

Section 11.7 1.

 1  Z y 1 1 1 −1 x − t dt = − tan 2 2 π 0 (x − t) + y π y 0      1 −1 1 − x −1 x tan + tan = π y y

u(x, y) =

2. Z y y 1 0 dt − dt 2 + y2 2 + y2 (x − t) π (x − t) 0 −∞  ∞  0   1 1 x − t −1 x − t + = − tan−1 tan π y π y 0 −∞       1 1 1 1 2 x −1 x −1 x = + + − = tan tan tan−1 2 π y π y 2 π y

1 u(x, y) = π

3.

Z

  0 x − t y T0 dt = − 2 2 π y −∞ (x − t) + y −∞        x π T π x T0 0 − tan−1 + = − tan−1 = π y 2 π 2 y

u(x, y) =

4.



T0 π

Z

Z y T0 1 y dt + dt 2 2 π −1 (x − t)2 + y 2 −∞ (x − t) + y  −1  1   T0 2T0 −1 x − t −1 x − t − =− tan tan π y π y −∞ −1

u(x, y) =

2T0 π

Z

0

−1

379

Worked Solutions     2T0 T0 −1 x + 1 −1 x − 1 u(x, y) = − + T0 − tan tan π y π y   T0 x + 1 + tan−1 π y      T0 −1 1 + x −1 1 − x = π − tan + tan π y y 5.

Z y yt T1 − T0 1 dt + dt 2 2 2 2 π −1 (x − t) + y 0 (x − t) + y  1  T0 T1 − T0 −1 x − t 2 2 1 tan =− + 2π y ln[(x − t) + y ] 0 π y −1  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 (x − 1) + y T1 − T0 y ln + 2π x2 + y 2      x T1 − T0 1−x + tan−1 + x tan−1 π y y

u(x, y) =

6.

T0 π

Z

1

Z Z y y T 0 a1 T 1 a2 dt + dt π −∞ (x − t)2 + y 2 π a1 (x − t)2 + y 2 Z Z T 2 a3 y y Tn ∞ + dt + · · · + dt π a2 (x − t)2 + y 2 π an (x − t)2 + y 2  a1  a2   T1 T0 −1 x − t −1 x − t − =− tan tan π y π y −∞ a1  a3    ∞ T T2 x − t x − t − · · · − n tan−1 , − tan−1 π y π y

u(x, y) =

an

a2

or

T0 π T1 + π T2 + π







π a1 − x + tan−1 2 y      a2 − x a1 − x tan−1 − tan−1 y y      a3 − x a2 − x tan−1 − tan−1 y y    Tn π an − x + ··· + − tan−1 π 2 y

u(x, y) =

380

Advanced Engineering Mathematics with MATLAB

Section 11.8 1. u(x, t) = = = = =

 (ξ − x)2 √ dξ exp − 4a2 t 4a2 πt −b (Z     ) Z x b (ξ − x)2 1 (ξ − x)2 √ exp − exp − dξ + dξ 4a2 t 4a2 t 4a2 πt x −b Z (b−x)/√4a2 t Z 0 2 2 1 1 √ e−τ dτ e−τ dτ + √ √ π 0 π (−b−x)/ 4a2 t Z (b−x)/√4a2 t Z (b+x)/√4a2 t 2 1 1 −τ 2 √ e dτ + √ e−τ dτ π 0 π 0     b−x b+x 1 1 √ √ + , erf erf 2 2 4a2 t 4a2 t Z

1



b

where erf(·) is the error function. 2.      Z 0 (ξ − x)2 (ξ − x)2 bξ u(x, t) = √ e exp − dξ + dξ e exp − 4a2 t 4a2 t 4a2 πt 0 −∞  Z ∞  ξ2 4a2 bt − 2x exp(−x2 /4a2 t) √ exp − 2 − dξ ξ = 4a t 4a2 t 4a2 πt 0    Z ∞ 4a2 bt + 2x ξ2 ξ dξ exp − 2 − + 4a t 4a2 t 0     √ √ 2 2 2 2 x x = 21 ea b t−bx erfc ab t − √ + 12 ea b t+bx erfc ab t + √ , 2a t 2a t 1

Z



−bξ

where erfc(·) = 1− erf(·) and we used Formula 3.462.1 from I. S. Gradshteyn and I. M. Ryrhik’s Table of Integrals, Series and Products. 3. If x < 0,  Z (b−x)/√4a2 t 2 (ξ − x)2 T0 exp − u(x, t) = √ dξ = √ e−τ dτ √ 2t 2 4a π 2 4a πt 0 −x/ 4a t     b − x −x − 21 T0 erf √ = 21 T0 erf √ 4a2 t 4a2 t     b−x x 1 1 = 2 T0 erf √ + 2 T0 erf √ , 4a2 t 4a2 t T0

Z

b



381

Worked Solutions where erf(·) is the error function. If x > b,  Z (x−b)/√4a2 t 2 T0 (ξ − x)2 u(x, t) = √ dξ = − √ e−τ dτ exp − √ 2 4a t π x/ 4a2 t 4a2 πt 0     x x−b = 21 T0 erf √ − 12 T0 erf √ 2 4a t 4a2 t     b−x x + 12 T0 erf √ , = 21 T0 erf √ 4a2 t 4a2 t Z

T0



b

where erf(·) is the error function. If 0 < x < b, u(x, t) = √

T0 4a2 πt Z 0

T0 =√ π

Z

x

0



(ξ − x)2 exp − 4a2 t

√ −x/ 4a2 t

e

−τ 2





T0 dτ + √ π

dξ + √ Z

T0 4a2 πt √

(b−x)/ 4a2 t

Z

b x



(ξ − x)2 exp − 4a2 t





2

e−τ dτ 0

   −x b−x 1 1 + 2 T0 erf √ = − 2 T0 erf √ 4a2 t 4a2 t     b−x x 1 1 = 2 T0 erf √ + 2 T0 erf √ , 4a2 t 4a2 t

where erf(·) is the error function. Thus, in all cases, u(x, t) =

1 2 T0



b−x erf √ 4a2 t



+

1 2 T0



x

erf √ 4a2 t



.

4. u(x, t) = √

    x2 1 (ξ − x)2 √ exp − dξ = δ(ξ) exp − 4a2 t 4a2 t 2a πt 4a2 πt −∞ 1

Z



5. If v(r, t) = ru(r, t), then 1 ∂v v ∂u = − 2, ∂r r ∂r r Therefore,

so that

and

1 ∂2v ∂ 2 u 2 ∂u + , = ∂r2 r ∂r r ∂r2 ∂v ∂2v = a2 2 , ∂t ∂r

∂2u 1 ∂2v 2 ∂v 2v = − 2 + 3. 2 ∂r r ∂r2 r ∂r r

and

∂u 1 ∂v = ∂t r ∂t

0 ≤ r < ∞, 0 < t,

382

Advanced Engineering Mathematics with MATLAB

with v(r, 0) = ru0 (r). From Equation 11.8.14,   (ξ − r)2 f (ξ) exp − dξ 4a2 t 2a πt −∞   Z ∞ 1 (r − ρ)2 ρ dρ = √ u0 (ρ) exp − 4a2 t 2a πt 0   Z ∞ 1 (r + ρ)2 ρ dρ − √ u0 (ρ) exp − 4a2 t 2a πt 0      Z ∞ (r + ρ)2 1 (r − ρ)2 − exp − ρ dρ = √ u0 (ρ) exp − 4a2 t 4a2 t 2a πt 0

v(r, t) =

Z

1 √



because u0 (ρ) = u0 (−ρ). Thus, 1 √ u(r, t) = 2ar πt

Z

∞ 0

"  "  2 # 2 #) r+ρ r−ρ √ √ − exp − ρ dρ. u0 (ρ) exp − 2a t 2a t (

For the given u0 (ρ), we have that "  "  2 # 2 #) Z r0 ( N0 r+ρ r−ρ √ √ √ u(r, t) = − exp − ρ dρ exp − 2ar πt 0 2a t 2a t "  "  2 # 2 #) Z r0 ( r+ρ r−ρ N0 √ √ + exp − dρ exp − = √ 2a πt 0 2a t 2a t "  2 # Z r0  N0 r−ρ √ √ − (r − ρ) exp − 2ar πt 0 2a t "  2 # r+ρ √ dρ + (r + ρ) exp − 2a t N0 u(r, t) = √ π

Z

√ (r0 +r)/ 4a2 t

e

−η 2

0

N0 dη + √ π

Z

√ (r0 −r)/ 4a2 t 0

2

e−η dη

√ √ √ 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 √ √ + erf = 12 N0 erf 2a t 2a t " # "  √   2 2 # N0 a t r0 + r r0 − r √ √ + √ exp − , − exp − r π 2a t 2a t

where erf(·) is the error function.

383

Worked Solutions Section 12.1 1. L[cosh(at)] =

Z



cosh(at)e−st dt

0

1 = 2

Z



1 dt + 2

Z



e−(s+a)t dt ∞   1 1 1 e−(s−a)t 1e 1 + =− − = 2 s − a 0 2 s + a 0 2 s−a s+a s = 2 s − a2 e

−(s−a)t

0

0 −(s+a)t ∞

2. Z 1 ∞ [1 + cos(2at)]e−st dt 2 0  −st ∞   ∞  e 1 e−st − −s cos(2at) + 2a sin(2at) = + 2 2 2 s 0 s + 4a 0   s2 + 2a2 s 1 1 = + = 2 s s2 + 4a2 s(s2 + 4a2 )

L[cos2 (at)] =

3. 2

−t



(t + 1)2 e−st dt ∞ Z 2 ∞ (t + 1)2 −st =− (t + 1)e−st dt e + s s 0 0 ∞   Z (t + 1) −st 1 2 1 ∞ −st − e + e dt = + s s s s 0 0 ∞ 2 2 2 2 1 1 = + 2 − 3 e−st = + 2 + 3 s s s s s s 0

L[(t + 1) ] =

4.

Z

0

Z



(t + 1)e−t e−st dt Z ∞ Z ∞ −(s+1)t e−(s+1)t dt te dt + = 0 0 ∞ ∞ e−(s+1)t e−(s+1)t = [−(s + 1)t − 1] − (s + 1)2 s + 1 0 0 1 s+2 1 + = = (s + 1)2 s+1 (s + 1)2

L[(t + 1)e ] =

0

384

Advanced Engineering Mathematics with MATLAB

5. F (s) =

Z

2 t −st

ee 0

6. F (s) =

Z

2 1 − e−2(s−1) e−(s−1)t = dt = − s − 1 0 s−1

π

sin(t)e−st dt = e−st 0

π [−s sin(t) − cos(t)] 1 + e−sπ = 2 2 s +1 s +1 0

7. L[2 sin(t) − cos(2t) + cos(3) − t] = 2L[sin(t)] − L[cos(2t)] + cos(3)L[1] − L[t] =

2 s cos(3) 1 − + − 2 s2 + 1 s2 + 4 s s

8. L[t − 2 + e−5t − sin(5t) + cos(2)] = L[t] − 2L[1] + L[e−5t ] − L[sin(5t)] + cos(2)L[1] =

2 1 5 cos(2) 1 − + − 2 + 2 s s s + 5 s + 25 s

9. From Equation 12.1.5, f (t) = e−3t . 10. Because F (s) =

1 3! 1 3! × = × 4, 4 s 3! 6 s

f (t) = 16 t3 .

11. Because F (s) =

3 1 1 3 × = × 2 , 3 s2 + 9 3 s +9

12. Because F (s) =

f (t) =

2s + 3 s 3 =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.

1 3

sin(3t).

385

Worked Solutions 13. Because f (t) = 2L−1



 1 − s2 + 1

15 −1 2 L



     s 2 1 −1 −1 − 6L , + 2L s3 s+1 s2 + 4

then f (t) = 2 sin(t) −

15 2 2 t

+ 2e−t − 6 cos(2t)

by Equation 12.1.7 and Equation 12.1.9. 14. Because       1 2 s −1 15 −1 f (t) = 3L + 2L +L s s3 s2 + 1     1 1 + 5L−1 − 6L−1 s2 + 1 s−2 −1

then f (t) = 3 +

15 2 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. 15. Because f ′ (t) = a cos(at), f (0) = 0 and L [f ′ (t)] = as/(s2 + a2 ), we have that a sF (s) − f (0) = s 2 − 0 = L[f ′ (t)]. s + a2 This verifies Equation 12.1.20. 16. By definition L[f (at)] =

Z

∞ 0

f (at)e−st dt =

1 a

Z



f (x)e−(s/a)x dx =

0

1 s , F 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. f (t) =?H(t − a)+?H(t − 2a)+?H(t − 3a)

= (1 − 0)H(t − a) + (−1 − 1)H(t − 2a) + [0 − (−1)]H(t − 3a) = H(t − a) − 2H(t − 2a) + H(t − 3a)

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)

7. y ′′ − 3y ′ + 2y = e−t H(t − 2)

8. y ′′ − 3y ′ + 2y = t2 H(t − 1)

9. y ′′ + y = sin(t)[1 − H(t − π)]

  10. y ′′ + 3y ′ + 2y = t + ae−(t−a) − t H(t − a) Section 12.3

1. From the first shifting theorem a = 1 and f (t) = sin(2t). Then F (s) = 2/(s2 + 4). Finally   L e−t sin(2t) =

2 2 = 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   L e−2t cos(2t) =

s+2 s+2 = 2 . (s + 2)2 + 4 s + 4s + 8

3. f (t) = [(t − 1) + 1]2 H(t − 1) = (t − 1)2 H(t − 1) + 2(t − 1)H(t − 1) + H(t − 1) By the second shifting theorem, F (s) =

2 −s 2 1 e + 2 e−s + e−s . s3 s s

4. f (t) = e6 e2(t−3) H(t − 3).

387

Worked Solutions By the second shifting theorem, F (s) = e6 e−3s /(s − 2). 5.

s′ 3 1 + + F (s) = ′2 s 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.

s′ 3 4! + + s′5 s′ =s+2 s′2 + 9 s′ =s−1 s′2 + 16 s′ =s−2 4! 3 s−2 = + 2 + (s + 2)5 s − 2s + 10 s2 − 4s + 20

F (s) =

7.

2 s′ 2 F (s) = ′3 + + s s′ =s+1 s′2 + 4 s′ =s−1 s′2 + 9 s′ =s+3 2 s+3 2 + 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 F (s) =

2 −s 1 −s e2 −2s 2 −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 F (s) =

2 −s 2 3 1 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 F (s) =

2 −s 4 4 e2 −2s e + 2 e−s + e−s + e . 3 s s s s−1

11. f (t) = sin(t)H(t) + sin(t − π)H(t − π) By the second shifting theorem, F (s) =

s2

e−sπ 1 + 2 . +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 13. Let f (t) = e−3t g(t), where g(t) = t sin(2t). Now   4s 2 d = 2 . G(s) = − ds s2 + 4 (s + 4)2 By the first shifting theorem, F (s) =

14.

4(s + 3) . (s2 + 6s + 13)2

1 1 . F (s) = = ′4 (s + 2)4 s s′ =s+2

Therefore,

f (t) = 16 t3 e−2t .

15. F (s) =

(s + 2) − 2 1 2 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. F (s) =

s2

s s+1 1 s = = − 2 2 + 2s + 2 (s + 1) + 1 (s + 1) + 1 (s + 1)2 + 1

389

Worked Solutions Therefore, f (t) = e−t cos(t) − e−t sin(t). 17. F (s) =

s+3 s+1 2 = + 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 s+1 1 − + 2 3 (s + 1) (s + 1) (s + 1)2 + 1 1 s′ 1 , − + = ′2 s s′ =s+1 s′3 s′ =s+1 s′2 + 1 s′ =s+1

F (s) =

then

f (t) = te−t − 21 t2 e−t + cos(t)e−t . 19. Because s+1 2 1 1 + − + s + 2 (s + 2)2 (s + 1)2 + 1 (s + 1)2 + 1 1 1 2 s′ = ′ + − ′2 + ′2 s s′ =s+2 s s′ =s+2 s + 1 s′ =s+1 s′2 + 1 s′ =s+1

F (s) =

then f (t) = e−2t − 2te−2t + cos(t)e−t + sin(t)e−t . 20. Because

1 2 s+2 2 − + + (s + 2)2 (s + 2)3 (s + 2)2 + 1 (s + 2)2 + 1 2 2 s′ 1 + , − ′3 + ′2 = ′2 s s′ =s+2 s s′ =s+2 s + 1 s′ =s+2 s′2 + 1 s′ =s+2

F (s) =

then

f (t) = te−2t − t2 e−2t + cos(t)e−2t + 2 sin(t)e−2t . 21. By the second shifting theorem, f (t) = et−3 H(t − 3). 22. L−1



 1 = te−t (s + 1)2

390

Advanced Engineering Mathematics with MATLAB

by the first shifting theorem. Then, by the second shifting theorem, f (t) = (t − 2)e−(t−2) H(t − 2). 23. L−1



   (s + 1) − 1 s −1 = L s2 + 2s + 2 (s + 1)2 + 1     s+1 1 −1 = L−1 − L (s + 1)2 + 1 (s + 1)2 + 1 = e−t [cos(t) − sin(t)]

by the first shifting theorem. Then, by the second shifting theorem, f (t) = e−(t−1) [cos(t − 1) − sin(t − 1)]H(t − 1). 24. L



−1

   1 1 −1 =L = e−2t sin(t) s2 + 4s + 5 (s + 2)2 + 1

by the first shifting theorem. Then, by the second shifting theorem, f (t) = e−2(t−4) sin(t − 4)H(t − 4). 25. Because L−1



s s2 + 4



= cos(2t)

L−1

and



 1 = 16 t3 e2t , (s − 2)4

f (t) = cos[2(t − 1)]H(t − 1) + 61 (t − 3)3 e2(t−3) H(t − 3). 26. Because L−1



f (t) =

1 2

1 s2 + 4



=

1 2

sin(2t)

and

sin[2(t − 1)]H(t − 1) +



L−1



s−1 s4



=

t2 t3 − , 2 6

 (t − 3)2 (t − 3)3 H(t − 3). − 2 6

27. Because L

−1



s+1 s2 + 4



= cos(2t) +

1 2

sin(2t)

and

L

−1



1 s4



=

t3 , 6

391

Worked Solutions f (t) = {cos[2(t − 1)] +

1 2

sin[2(t − 1)]}H(t − 1) +

(t − 3)3 H(t − 3). 6

28. From the definition, F (s) = = =

Z

2 t −st

te e

dt =

1 −2(s−1)

Z

2

te 1

−(s−1)t

2 e−(s−1)t [−(s − 1)t − 1] dt = (s − 1)2 1

e−(s−1) e [−2(s − 1) − 1] − [−(s − 1) − 1] 2 (s − 1) (s − 1)2 e−(s−1) e−(s−1) 2e−2(s−1) e−2(s−1) + − − . 2 s−1 (s − 1) s−1 (s − 1)2

For part (b), f (t) = et g(t), where g(t) = t[H(t − 1) − H(t − 2)]. Next, we note that g(t) = (t − 1)H(t − 1) + H(t − 1) − (t − 2)H(t − 2) − 2H(t − 2) or

e−s e−2s e−2s e−s + − − 2 s2 s s2 s by the second shifting theorem. Finally, G(s) =

F (s) = G(s − 1) =

e−(s−1) e−2(s−1) e−2(s−1) e−(s−1) + − − 2 (s − 1)2 s−1 (s − 1)2 s−1

by the first shifting theorem. 29. Following Example 6.1.2, we have that f (t) = (t − 0)H(t) + (0 − t)H(t − a) = t[1 − H(t − a)]. From the definition of the Laplace transform, a Z a e−as ae−as e−st 1 −st . te dt = 2 (−st − 1) = 2 − 2 − F (s) = s s s s 0 0

On the other hand, f (t) = t − (t − a)H(t − a) − aH(t − a). Applying the second shifting theorem term by term, F (s) =

30. f (t) =

1 e−as ae−as − 2 − . 2 s s s

1 1 1 t−2 t − tH(t − 2) = t − H(t − 2) − H(t − 2) 2 2 2 2

392

Advanced Engineering Mathematics with MATLAB

From the second shifting theorem, F (s) =

31.

1 e−2s e−2s − − . 2 2 2s 2s s

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, F (s) =

32.

e−s e−2s 1 − − . s2 s2 s

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, F (s) =

1 2e−2s e−4s − + . s2 s2 s2

33. f (t) = (t − 1)H(t − 1) + [1 − (t − 1)]H(t − 2) + (0 − 1)H(t − 3) = (t − 1)H(t − 1) − (t − 2)H(t − 2) − H(t − 3)

From the second shifting theorem, F (s) =

e−s e−2s e−3s − − . s2 s2 s

34. s2 Y (s) − sy(0) − y ′ (0) + 3sY (s) − 3y(0) + 2Y (s) = Y (s) =

e−s s(s + 1)(s + 2)

35. s2 Y (s) − sy(0) − y ′ (0) + 4Y (s) = Y (s) =

3e−4s s + s2 + 4 s(s2 + 4)

3e−4s s

e−s s

393

Worked Solutions 36. s2 Y (s) − sy(0) − y ′ (0) + 4sY (s) − 4y(0) + 4Y (s) = Y (s) =

2e−2s e−2s + s2 s

2 e−2s 2e−2s + + (s + 2)2 s2 (s + 2)2 s(s + 2)2

37. s2 Y (s) − sy(0) − y ′ (0) + 3sY (s) − 3y(0) + 2Y (s) = Y (s) =

e−(s−1) (s − 1)(s + 1)(s + 2)

38. s2 Y (s) − sy(0) − y ′ (0) − 3sY (s) + 3y(0) + 2Y (s) = Y (s) =

e e−s s−1

e−2 e−2s s+1

2(s − 3) e−2 e−2s + (s − 1)(s − 2) (s + 1)(s − 1)(s − 2)

39. s2 Y (s) − sy(0) − y ′ (0) − 3sY (s) + 3y(0) + 2Y (s) =

e−s 2e−s e−s + 2 + 3 s s s

e−s 5 + 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)

Y (s) =

40. s2 Y (s) − sy(0) − y ′ (0) + Y (s) = Y (s) =

(s2

s2

1 e−sπ + 2 +1 s +1

e−sπ 1 + 2 2 + 1) (s + 1)2

41. s2 Y (s) − sy(0) − y ′ (0) + 3sY (s) − 3y(0) + 2Y (s)=

1 ae−as e−as ae−as + − 2 − s2 s+1 s s

394

Advanced Engineering Mathematics with MATLAB 1 ae−as + + 2)(s + 1) (s + 1)2 (s + 2) e−as ae−as − 2 − s (s + 1)(s + 2) s(s + 1)(s + 2)

Y (s) =

s2 (s

42. f (0) = 0, F (s) = 1/s2 , lims→∞ sF (s) = lims→∞ 1/s = 0 = f (0). 43. f (0) = 1, F (s) = s/(s2 + a2 ), lims→∞ sF (s) = lims→∞ s2 /(s2 + a2 ) = 1 = f (0). 44. f (0) = 0, F (s) = 1/(s + 1)2 , lims→∞ sF (s) = lims→∞ s/(s + 1)2 = 0 = f (0). 45. f (0) = 0, F (s) = 3/(s2 − 2s + 10), lims→∞ sF (s) = lims→∞ 3s/(s2 − 2s + 10) = 0 = f (0). 46. No 47. Yes, f (t) = 1, lims→0 sF (s) = 1 = f (∞). 48. Yes, f (t) = e−t , lims→0 sF (s) = 0 = f (∞). 49. No 50. Yes, f (t) = 1 + e−2t − 2e−t , lims→0 sF (s) = 1 = f (∞). 51. No 52. We derive the second equation by setting ξ = ax and c = s/(s+b). Taking the inverse Laplace of this equation, we find    Z ax      1 asx bη −η −1 −1 1 −1 1 e L =L − dη exp − exp L s s+b s s+b s+b 0 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. x(t) = Therefore, X(s) =

Z



sin(t), 0,

0 ≤ t ≤ π, t ≥ π.

π

sin(t)e−st dt = 0

1 + e−sπ . s2 + 1

395

Worked Solutions Then F (s) =

 sπ  1 + e−sπ 1 X(s) . = = coth 1 − e−sπ (s2 + 1)(1 − e−sπ ) s2 + 1 2

2. x(t) = Therefore X(s) =

Z



sin(t), 0,

0 ≤ t ≤ π, t > π.

π

sin(t)e−st dt = 0

1 + e−sπ . s2 + 1

Then F (s) =

1 + e−sπ 1 X(s) = = 2 . −2sπ 2 −sπ −sπ 1−e (s + 1)(1 − e )(1 + e ) (s + 1)(1 − e−sπ )

3. x(t) = Therefore X(s) =

Z

a

te

F (s) =

t, 0,

Z

a

(1) e 0

−st

dt +

0 ≤ t < a, t > a.

  1 −as . dt = 2 1 − (1 + as)e s

X(s) 1 − (1 + as)e−as = . 1 − e−2as s2 (1 − e−2as )

 1,   0, x(t) =   −1, 0,

Therefore X(s) =

−st

0

Then

4.



Z

0 < t < a, a < t < 2a, 2a < t < 3a, t > 3a.

3a

(−1) e−st dt = 2a

1 − e−as e−3as − e−2as + . s s

Then F (s) =

X(s) (1 − e−as )(1 − e−2as ) 1 − e−as = = . −4as −4as 1−e s(1 − e ) s(1 + e−2as )

396

Advanced Engineering Mathematics with MATLAB

Section 12.5 1. F (s) =

1 A B = + , (s + 1)(s + 2) s+2 s+1

where A = lim (s + 2)F (s) = −1

and

s→−2

Therefore, F (s) =

1 1 − s+1 s+2

2.

or

B = lim (s + 1)F (s) = 1. s→−1

f (t) = e−t − e−2t .

A B + , s+4 s−2

F (s) = where

A = lim (s + 4)F (s) = s→−4

1 6

and B = lim (s − 2)F (s) = 65 . s→2

Therefore, F (s) = or

1 6



1 5 + s+4 s−2



f (t) = 16 e−4t + 65 e2t . 3. F (s) = where A = lim

s→−2

B C A + + , s+2 s+1 s−3

(s + 2)F (s) = − 56 ,

B = lims→−1 (s + 1)F (s) =

and 1 C = lim (s − 3)F (s) = − 20 . s→3

Therefore, f (t) = 54 e−t − 65 e−2t − 4. F (s) =

1 3t 20 e .

A B C + + , s − 2i s + 2i s + 1

5 4

397

Worked Solutions where A = lim (s − 2i)F (s) = s→2i

8−i 20 ,

B = lim (s + 2i)F (s) = s→−2i

8+i 20

and C = lim (s + 1)F (s) = − 54 . s→−1

Therefore, f (t) = = 5.

8−i 2it 20 e 4 5

+

8+i −2it 20 e

cos(2t) +

1 10

− 45 e−t

sin(2t) − 45 e−t .

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 2e

+

1 −3πi/2 2e

s+2−i s+2+i f (t) = 12 e−2t+ti+3πi/2 + 21 e−2t−ti−3πi/2   3π −2t =e cos t + 2 6. s2

7.

1 1 = + 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

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 = + 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 2e /4 2e /4 1 + + = 2s s+1−i s+1+i √ √ 1 2 −t+ti+3πi/4 2 −t−ti−3πi/4 e + e f (t) = + 2 √4 4   2 −t 1 3π = + e cos t + 2 2 4

s(s2

9. s+2 1 −1/4 − i/4 −1/4 + i/4 s+2 = = + + s(s2 + 4) s(s + 2i)(s − 2i) 2s s − 2i s + 2i √ 5πi/4 √ −5πi/4 1 2e /4 2e /4 = + + 2s s − 2i s + 2i √ √ 1 2 2ti+5πi/4 2 −2ti−5πi/4 e + e f (t) = + 2 √4 4   2 1 5π = + cos 2t + 2 2 4 Section 12.6 1. 1∗1=

Z

t

dx = t 0

2. 1 ∗ cos(at) = L



and

Z

L(t) =

t

cos(ax) dx = 0

1 = L(1)L(1) s2

t sin(at) sin(ax) = a 0 a

 1 sin(at) = 2 = L(1)L[cos(at)] a s + a2

3. 1 ∗ et =  L et − 1 =

Z

t 0

t

ex dx = ex |0 = et − 1

1 1 1 − = = L(1)L(et ) s−1 s s(s − 1)

399

Worked Solutions 4. t∗t=

Z

t

(t − x)x dx =

0

L(t3 /6) = 5. t ∗ sin(t) =

Z

t t tx2 x3 − = 61 t3 2 0 3 0

1 = L(t)L(t) s4

t 0

(t − x) sin(x) dx t

t

= − t cos(x)|0 − [sin(x) − x cos(x)]|0 = t − sin(t) 1 1 1 − 2 = 2 2 = L(t)L[sin(t)] s2 s +1 s (s + 1)

L[t − sin(t)] = 6. t ∗ et =

Z

t 0

t t (t − x)ex dx = tex 0 − ex (x − 1) 0 = et − t − 1

L(t ∗ et ) = 7. 2

t ∗ sin(at) =

Z

1 1 1 1 − 2− = 2 = L(t)L(et ) s−1 s s s (s − 1) t

0

(t − x)2 sin(ax) dx

Z t 1 2 t 2 = − (t − x) cos(ax) 0 − (t − x) cos(ax) dx a a 0 Z t t 2 2 t2 − 2 (t − x) sin(ax) 0 − 2 sin(ax) dx = a a a 0 t t2 2 2 t2 + 3 cos(ax) 0 = − 3 [1 − cos(at)] = a a a a 4 t2 2 − 3 sin (at/2) = a a    2  2 2 a t = L(t2 )L[sin(at)] L − 3 [1 − cos(at)] = 3 a a s s 2 + a2 8. t ∗ H(t − 1) =

Z

t 0

(t − x)H(x − 1) dx

If 0 < t < 1, t ∗ H(t − 1) = 0 because the integrand is always zero. If t > 1, t ∗ H(t − 1) =

Z

t 1

(t − x) dx =



tx −

 t x2 = 21 (t − 1)2 . 2 1

400

Advanced Engineering Mathematics with MATLAB

Therefore, t ∗ H(t − 1) = 12 (t − 1)2 H(t − 1). From the second shifting theorem, L[t ∗ H(t − 1)] =

e−s 1 e−s = × 2 = L[H(t − 1)]L[t] 3 s s s

and the convolution theorem holds. 9. Let b ≥ a. The case b < a follows by analog. Then H(t − b) ∗ H(t − a) =

Z

t

H(t − b − x)H(x − a) dx.

0

Therefore, if t < a, the convolution equals zero. If t > a H(t − b) ∗ H(t − a) =

Z

t a

H(t − b − x) dx = −

Z

−b

H(η) dη,

t−b−a

if η = t − b − x. If t < b + a, the convolution equals zero because the Heaviside always equals zero. On the other hand, if t > b + a, H(t − b) ∗ H(t − a) = −

Z

0 t−b−a

dη = t − a − b

or H(t − b) ∗ H(t − a) = (t − a − b)H(t − a − b). Then L[H(t − b) ∗ H(t − a)] =

e−as−bs = s2



e−as s



e−bs s



= L[H(t − b)]L[H(t − a)]. 10. t ∗ [H(t) − H(t − 2)] =

Z

t 0

(t − x)[H(x) − H(x − 2)] dx

If 0 < t < 2, t ∗ [H(t) − H(t − 2)] = If t > 2, t ∗ [H(t) − H(t − 2)] =

Z

Z

t 0

(t − x) dx = t2 /2.

2 0

(t − x) dx = 2t − 2.

401

Worked Solutions Using Heaviside’s step function, t ∗ [H(t) − H(t − 2)] =

(t − 2)2 t2 − H(t − 2). 2 2

From the second shifting theorem, 



1 1 1 L t ∗ [H(t) − H(t − 2)] = 3 − 3 e−2s = 2 s s s

11. f (t) = et ∗ t =

Z



1 e−2s − s s



= L(t)L[H(t) − H(t − 2)]. t

et−x x dx = et 0

Z

t

xe−x dx 0

 t = et e−x (−x − 1) 0 = et − t − 1

12. f (t) = t ∗ te =

−at

=

Z

t 0

(t − x)xe

dx = t

  t 2 1 + e−at + 3 e−at − 1 2 a a

13.

s ea/s ea/s = = s−1 s−1 s

Because

L−1 L−1

−ax



ea/s s−1





ea/s s





Z

1+

t

xe

−ax

0

1 s−1



dx −

Z

t

x2 e−ax dx 0

ea/s s

 √  = I0 2 at ,

 √    = δ(t) + et ∗ I0 2 at

Z t √  √  e−x I0 2 ax dx δ(t − x)I0 2 ax dx + et 0  √   √  0 = I0 2 at − et e−t I0 2 at + et Z t √  √ dx e−x I1 2 ax (2 a ) √ + et 2 x 0  2 Z √4at √ 2τ dτ /(4a) τ √ I1 (τ ) a = et + et exp − 4a τ /(2 a ) 0 √  2 Z 4at τ I1 (τ ) dτ, exp − = et + et 4a 0 =

Z

t

402

Advanced Engineering Mathematics with MATLAB

where τ 2 = 4ax. 14. From Equation 11.1.21 and assuming that a, b > 0, Z

t 0

δ(t − x − a)δ(x − b) dx = δ(t − b − a).

Section 12.7 1. F (s) =

1 1 + 2F (s) , s s+2

F (s) =

1 1 + F (s) 2 , s s +1

F (s) =

1 1 + F (s) , s2 s+1

2.

3.

F (s) =

1 2 + , s s2

F (s) =

f (t) = 1 + 2t

1 1 + , f (t) = 1 + 12 t2 s s3

1 1 + 3, s2 s

F (s) =

f (t) = t + 21 t2

4. 8 1 − F (s) , 3 s s+1

F (s) =

5. F (s) =

F (s) =

1 6 + F (s) 2 , s4 s +1

8(s + 1) , s3 (s + 2)

F (s) =

f (t) = 2t2 + 2t − 1 + e−2t

6 6 + 6, s4 s

f (t) = t3 +

1 5 20 t

6. F (s) =

16 1 − 3F (s) 2 , 3 s s +1

7. F (s) =

F (s) =

2 2 − 2F (s) 2 , 3 s s −4

16(s2 + 1) , s3 (s2 + 4)

F (s) =

f (t) = 3 + 2t2 − 3 cos(2t)

2 8 − 5, 3 s s

f (t) = t2 − 13 t4

8. F (s) =

s 1 + 2F (s) 2 , s s +1

F (s) =

1 2 + , s (s − 1)2

f (t) = 1 + 2tet

403

Worked Solutions 9. F (s) =

s 1 − 2F (s) 2 , s−2 s +1

F (s) =

5 4 2 − − s − 2 s − 1 (s − 1)2

f (t) = 5e2t − 4et − 2tet 10. F (s) =

2 1 + F (s) 2 , 3 s s +1

11. F (s) = F (s) =

F (s) =

2 2 + 5, 3 s s

f (t) = t2 +

s 1 − 2F (s) 2 s+1 s +1

s2 + 1 1 2 2 = − + (s + 1)3 s + 1 (s + 1)2 (s + 1)3

f (t) = e−t − 2te−t + t2 e−t = (1 − t)2 e−t 12. F (s) =

6 2 + 4F (s) 3 s2 s

s+1 3 1 − + s − 2 (s + 1)2 + 3 (s + 1)2 + 3 √ √ √ f (t) = e2t − e−t cos( 3 t) + 3 e−t sin( 3 t) F (s) =

13.

√ √ a π π F (s) = 3/2 − √ F (s) s 2s √ a π √ F (s) = 2s( π + s1/2 ) √ i ah f (t) = 1 − eπt erfc( πt) 2

14. sF (s) − f (0) = F (s) =

5 4 1 + + 5 3 s s s

1 s + F (s) 2 s2 s +1

or

f (t) = 4 + 52 t2 +

1 4 24 t

1 4 12 t

404

Advanced Engineering Mathematics with MATLAB

15. sF (s) − f (0) = F (s) = 16.

or

or

1 , s3

1 s + F (s) 2 +1 s +1 f (t) = 12 t2

 Z t ′ √ x (τ ) √ L(A) = BL( t ) + CL dτ t−τ 0 r √ B π A π = 3/2 + C [sX(s)] s s 2s X(s) =

17.

s2

A B √ − 2Cs2 C πs3/2

and

Z

x(t) =

t

Bt 2A √ t− . πC 2C

x′ (τ ) √ dτ t−τ 0 r π 1 1 X(s) + 2 = √ [sX(s)] s s c π

1 L[x(t)] + L(t) = √ L c π

X(s) = −



√ c c(c + s ) √ . = − s2 (c2 − s) s2 (c − s )

Using partial fractions, X(s) = −

1 c2



1+

 √  2 c 1 1 s . + − c s2 s s − c2

Taking the inverse of X(s), r  1 1 t 2 c2 t x(t) = 2 −c t − 1 + e − 2c − √ c π c πt   √  2 1 1 √ + cec t erf c t + c πt ( r ) h  √ i 2 t 1 . = 2 ec t 1 + erf c t − c2 t − 1 − 2c c π 18. Taking the Laplace transform of both sides of the equation: √ α π β sF (s) − f (0) = − √ [sF (s) − f (0)] √ s π s

405

Worked Solutions or

√ α sF (s) + β s F (s) = s after substitution of the initial condition. Thus  α s1/2 − β α α αβ  = 3/2 F (s) = 3/2 1/2 = − s (s − β 2 ) s3/2 (s − β 2 ) s (s − β 2 ) s s +β α αβ α − − = 2 . β (s − β 2 ) β 2 s s3/2 (s − β 2 ) Taking the inverse term-by-term, ! 2 Z 2β 3 eβ t t −β 2 x √ α β2 t e x dx f (t) = 2 e − 1 − √ β π 0 ! √ 2 Z α 4eβ t β t −u2 2 β2 t = 2 e −1− √ e u du β π 0   β √t √ 2 2 Z 2eβ t −u2 2eβ t β t −u2  α  β2 t − √ e du = 2 e − 1 + √ ue β π π 0 0 ! √ √ 2 Z 2β t 2eβ t β t −u2 α β2 t = 2 e −1+ √ − √ e du . β π π 0 19. Taking the Laplace transform of both sides of the equation:   a a 1 − √ = 2. F (s) s s s + a2 s Solving for F (s), √ √ a s + a2 a(s + a2 ) + a2 s + a2 F (s) = √ = s2 s [ s + a2 − a]

a4 a a3 a2 + √ . + 2 + √ s s s s + a2 s 2 s + a2 Taking the inverse term-by-term, √ √ √ 2 a2 t f (t) = a + a2 t + 12 a erf( at ) + a3 t erf( at ) + √ e−a t π because √   √ √ 1 t −a2 t L t erf(a t ) − 2 erf(a t ) + √ e 2a a π   1 a d 1 √ √ − =− + 2 ds s s + a2 2a (s + a2 )3/2 2as s + a a 1 a 1 √ + + = √ − 2s(s + a2 )3/2 2a (s + a2 )3/2 s 2 s + a2 2as s + a2 a . = √ s 2 s + a2 =

406

Advanced Engineering Mathematics with MATLAB

20. Because L[(ty ′ )′ ] = sL(ty ′ ) − ty ′ (t)|t=0 = −s

d [sY (s) − y(0)] = −s[sY ′ (s) + Y ], ds

and

d [sY (s) − y(0)] = −sY ′ (s) − Y, ds the Laplace transformed version of the differential equation is L(ty ′ ) = −s

−s2 Y ′ − sY + sY ′ + Y + nY = 0, or s(s − 1)Y ′ (s) = (n + 1 − s)Y (s). Section 12.8 1. The Laplace transform of the ordinary differential equation is sY (s) − y(0) − 2Y (s) =

1 1 − 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. 2. The Laplace transform of the ordinary differential equation is s2 Y (s) − sy(0) − y ′ (0) − 4sY (s) + 4y(0) + 3Y (s) =

1 . 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 y(t) = 41 e3t − 14 et − 21 tet . 3. The Laplace transform of the ordinary differential equation is s2 Y (s) − sy(0) − y ′ (0) − 4sY (s) + 4y(0) + 3Y (s) =

1 . s−2

407

Worked Solutions

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 . 4. The Laplace transform of the ordinary differential equation is s2 Y (s) − sy(0) − y ′ (0) − 6sY (s) + 6y(0) + 8Y (s) =

1 . s−1

Substituting the values of the initial conditions and solving for Y (s), we find that 5 1 1 + + . Y (s) = 3(s − 1) 3(s − 4) s − 2 Taking the inverse of Y (s) term-by-term, the final answer is y(t) = 31 et + 35 e4t + e2t . 5. The Laplace transform of the ordinary differential equation is s2 Y (s) − sy(0) − y ′ (0) + 4sY (s) − 4y(0) + 3Y (s) =

1 . s+1

Substituting the values of the initial conditions and solving for Y (s), we find that 1 s+5 + 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 + 21 te−t . 4e 6. The Laplace transform of the ordinary differential equation is s2 Y (s) − sy(0) − y ′ (0) + Y (s) =

1 . s2

Substituting the values of the initial conditions and solving for Y (s), we find that s 1 s 1 1 + 2 2 = 2 + 2− 2 . Y (s) = 2 s + 1 s (s + 1) s +1 s s +1 Taking the inverse of Y (s) term-by-term, the final answer is y(t) = cos(t) + t − sin(t).

408

Advanced Engineering Mathematics with MATLAB

7. The Laplace transform of the ordinary differential equation is s2 Y (s) − sy(0) − y ′ (0) + 4sY (s) − 4y(0) + 3Y (s) =

1 . s−1

Substituting the values of the initial conditions and solving for Y (s), we find that 1 2 + Y (s) = (s + 3)(s + 1) (s + 3)(s − 1)(s + 1) 7 1 3 1 1 1 =− + + . 8s+3 4s+1 8s−1

Taking the inverse of Y (s) term-by-term, the final answer is y(t) = 1 t 7 −3t . 8e − 8e

3 −t 4e

+

8. The Laplace transform of the ordinary differential equation is s2 Y (s) − sy(0) − y ′ (0) − 4sY (s) + 4y(0) + 5Y (s) = 0. 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 . 9. The Laplace transform of the ordinary differential equation is sY (s) − y(0) + Y (s) =

e−s e−s + . 2 s s

Substituting the value of the initial condition and solving for Y (s), we find that e−s Y (s) = 2 . s Taking the inverse of Y (s), the final answer is y(t) = (t − 1)H(t − 1). 10. The Laplace transform of the ordinary differential equation is s2 Y (s) − sy(0) − y ′ (0) + 3sY (s) − 3y(0) + 2Y (s) =

e−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+1 s+2 2s 2(s + 2) s + 1

409

Worked Solutions Taking the inverse of Y (s) term-by-term, the final answer is   y(t) = e−t − e−2t + 21 + 12 e−2(t−1) − e−(t−1) H(t − 1). 11. The Laplace transform of the ordinary differential equation is s2 Y (s) − sy(0) − y ′ (0) − 3sY (s) + 3y(0) + 2Y (s) =

e−s . s

Substituting the values of the initial conditions and solving for Y (s), we find that e−s 1 + Y (s) = (s − 2)(s − 1) s(s − 2)(s − 1) 1 e−s e−s e−s 1 − + + − . = 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). 12. The Laplace transform of the ordinary differential equation is s2 Y (s) − sy(0) − y ′ (0) + 4Y (s) = 3e−4s /s. Substituting the values of the initial conditions and solving for Y (s), we find that   s 3 1 s e−4s . Y (s) = 2 + − 2 s +4 4 s s +4 Taking the inverse of Y (s) term-by-term, the final answer is y(t) = cos(2t) + 34 {1 − cos[2(t − 4)]}H(t − 4). 13. The Laplace transform of the ordinary differential equation is s2 Y (s) − sy(0) − y ′ (0) + 4sY (s) − 4y(0) + 4Y (s) = 4e−2s /s. Substituting the values of the initial conditions and solving for Y (s), we find that e−2s e−2s 2e−2s 4e−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

14. The Laplace transform of the ordinary differential equation is s2 Y (s) − sy(0) − y ′ (0) + 3sY (s) − 3y(0) + 2Y (s) =

e−s . s−1

Substituting the values of the initial conditions and solving for Y (s), we find that e−s 1 + 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). 15. The Laplace transform of the ordinary differential equation is s2 Y (s) − sy(0) − y ′ (0) − 3sY (s) + 3y(0) + 2Y (s) =

e−2s . s+1

Substituting the values of the initial conditions and solving for Y (s), we find that Y (s) =

e−2s 1 e−2s 1 e−2s 1 e−2s = − + . (s − 2)(s − 1)(s + 1) 3s−2 2s−1 6s+1

Taking the inverse of Y (s) term-by-term, the final answer is   y(t) = 13 e2(t−2) − 12 et−2 + 61 e−(t−2) H(t − 2). 16. The Laplace transform of the ordinary differential equation is s2 Y (s) − sy(0) − y ′ (0) − 3sY (s) + 3y(0) + 2Y (s) =

e−s e−2s − . s s

Substituting the values of the initial conditions and solving for Y (s), we find that e−2s e−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

Y (s) =

Taking the inverse of Y (s) term-by-term, the final answer is     y(t) = 12 + 21 e2(t−1) − et−1 H(t − 1) − 12 + 12 e2(t−2) − et−2 H(t − 2).

411

Worked Solutions 17. The Laplace transform of the ordinary differential equation is s2 Y (s) − sy(0) − y ′ (0) + Y (s) =

1 e−sT − . s s

Substituting the values of the initial conditions and solving for Y (s), we find that Y (s) =

1 e−sT 1 s e−sT se−sT − = − − + . s(s2 + 1) s(s2 + 1) s s2 + 1 s s2 + 1

Taking the inverse of Y (s) term-by-term, the final answer is y(t) = 1 − cos(t) − [1 − cos(t − T )] H(t − T ). 18. First we write the forcing function f (t) in terms of Heaviside step functions: 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 L

−1



 1 = 12 [sin(t) − t cos(t)]. (s2 + 1)2

Taking the inverse of Y (s) term-by-term, the final answer is y(t) = 21 [sin(t) − t cos(t)] + 12 [sin(t − π) − (t − π) cos(t − π)]H(t − π). 19. First we write the forcing function f (t) in terms of Heaviside step functions: f (t) = t + [ae−(t−a) − t]H(t − a)

= t + ae−(t−a) H(t − a) − (t − a)H(t − a) − aH(t − a).

412

Advanced Engineering Mathematics with MATLAB

Then we take the Laplace transform of the ordinary differential equation and find that s2 Y (s)−sy(0)−y ′ (0)+3sY (s)−3y(0)+2Y (s) =

ae−as e−as ae−as 1 + − 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 e ae ae−as ae−as 3e − − − + . + 2 4s 2s 2s 2(s + 2) s+1 Taking the inverse of Y (s) term-by-term, the final answer is y(t) = e−t − 41 e−2t − 43 + 12 t   − e−(t−a) − 41 e−2(t−a) − 34 + 21 (t − a) H(t − a)   + a 12 e−2(t−a) + (t − a)e−(t−a) − 12 H(t − a). 20. First we write the forcing function f (t) in terms of Heaviside step functions:     t t−a t−a t f (t) = + 1 − H(t − a) − 1 − H(t − b) − a b−a a b−a     t t−b t−a t−a = − 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 s2 Y (s) − sy(0) − y ′ (0) + ω 2 Y (s) =

e−as e−as e−bs 1 − − + . 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) = − e−as − 2 − 2 aω 2 s2 s + ω2 aω 2 s2 s + ω2     1 1 1 1 1 1 −as e + e−bs . − − 2 − 2 (b − a)ω 2 s2 s + ω2 (b − a)ω 2 s2 s + ω2

413

Worked Solutions Taking the inverse of Y (s) term-by-term, the final answer is     1 1 sin(ωt) sin[ω(t − a)] − H(t − a) t − t − a − aω 2 ω aω 2 ω   1 sin[ω(t − a)] H(t − a) − t − a − (b − a)ω 2 ω   1 sin[ω(t − b)] + H(t − b). t − b − (b − a)ω 2 ω

y(t) =

21. The Laplace transform of the ordinary differential equation is s2 Y (s) − sy(0) − y ′ (0) − 2sY (s) + 2y(0) + Y (s) = 3e−2s . Substituting the values of the initial conditions and solving for Y (s), we find that 3 1 + e−2s . Y (s) = (s − 1)2 (s − 1)2 Taking the inverse of Y (s) term-by-term, the final answer is y(t) = tet + 3(t − 2)et−2 H(t − 2). 22. The Laplace transform of the ordinary differential equation is s2 Y (s) − sy(0) − y ′ (0) − 5sY (s) + 5y(0) + 4Y (s) = e−s . Substituting the values of the initial conditions and solving for Y (s), we find that e−s e−s 1 e−s = − . Y (s) = (s − 4)(s − 1) 3(s − 4) 3(s − 1) Taking the inverse of Y (s) term-by-term, the final answer is y(t) =

1 3



 e4(t−1) − et−1 H(t − 1).

23. The Laplace transform of the ordinary differential equation is s2 Y (s) − sy(0) − y ′ (0) + 5sY (s) − 5y(0) + 6Y (s) = 3e−2s − 4e−5s . Substituting the values of the initial conditions and solving for Y (s), we find that 3 −2s 4 −5s 4 −5s 3 −2s e − e + e − e . Y (s) = s+2 s+3 s+3 s+2

414

Advanced Engineering Mathematics with MATLAB

Taking the inverse of Y (s) term-by-term, the final answer is i i h h y(t) = 3 e−2(t−2) − e−3(t−2) H(t − 2) + 4 e−3(t−5) − e−2(t−5) H(t − 5). 24. The Laplace transform of the ordinary differential equation is s2 Y (s) − sy(0) − y ′ (0) + ωsY (s) − ωy(0) = Ae−sτ − Be−sτ /s. Substituting the values of the initial conditions and solving for Y (s), we find that Ae−sτ Be−sτ − 2 s(s + ω) s (s + ω)     A e−sτ B ωe−sτ e−sτ e−sτ e−sτ = − 2 − − + ω s s+ω ω s2 s2 s+ω

Y (s) =

Taking the inverse of Y (s) term-by-term, the final answer is y(t) =



B A − 2 ω ω



H(t−τ )−



A B + 2 ω ω



e−ω(t−τ ) H(t−τ )−

B (t−τ )H(t−τ ). ω

25. The Laplace transform of the ordinary differential equations is sX(s) − x(0) − 2X(s) + Y (s) = 0 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 X(s) =

s−4 s−3 1 = − (s − 3)2 + 2 (s − 3)2 + 2 (s − 3)2 + 2

and Y (s) =

3 . (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 − and y(t) =

√3 2

√1 2

√ sin( 2t)e3t

√ sin( 2t)e3t .

415

Worked Solutions 26. The Laplace transform of the ordinary differential equations is sX(s) − x(0) − 2sY (s) + 2y(0) = 1/s 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 Y (s) =

1−s 2 1 1 = − − 2. − 1) 2s − 1 s s

s2 (2s

Taking the inverse of X(s) and Y (s) term-by-term, the final answer is x(t) = 2et/2 − 2 − t and

y(t) = et/2 − 1 − t.

27. The Laplace transform of the ordinary differential equations is sX(s) − x(0) + 2X(s) − sY (s) − y(0) = 0 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 X(s) =

2 1 1 s+1 = 2− + s2 (s2 + 2s + 2) s s (s + 1)2 + 1

and Y (s) =

1 1 2 − 2+ . 3 s s (s + 1)2 + 1

Taking the inverse of X(s) and Y (s) term-by-term, the final answer is x(t) = t − 1 + e−t cos(t),

and

y(t) = t2 − t + e−t sin(t).

28. The Laplace transform of the ordinary differential equations is sX(s) − x(0) + 3X(s) − Y (s) =

1 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 X(s) =

2 1 1 3 1 + − = + s(s + 3) s + 3 s(s + 1)(s + 3) 2(s + 1) 2(s + 3)

and Y (s) = −

1 1 1 = − . s(s + 1) s+1 s

Taking the inverse of X(s) and Y (s) term-by-term, the final answer is x(t) = 21 e−t + 32 e−3t

and

y(t) = e−t − 1.

29. The Laplace transform of the ordinary differential equations is (s2 − 1)X(s) − 2(s + 1)Y (s) =

F1 s

2(s − 1)X(s) + (s2 − 3)Y (s) =

F2 . s

and

Solving for X(s) and Y (s), X(s) =

(s2 − 3)F1 + 2(s + 1)F2 s(s2 − 1)(s2 + 1)

Y (s) =

(s2 − 1)F2 − 2(s − 1)F1 . s(s2 − 1)(s2 + 1)

and

Using partial fraction, we find that F1 F2 − F1 /2 3F1 − 2F2 − + s 2(s + 1) s−1 (1 + i)F2 /2 − F1 (1 − i)F2 /2 − F1 + + s−i s+i

X(s) =

and Y (s) =

F1 F2 + (−1 + i)F1 F2 + (−1 − i)F1 F2 − 2F1 + − − . s s+1 2(s − i) 2(s + i)

Taking the inverse and using Euler’s identify, x(t) = 3F1 − 2F2 − F1 cosh(t) + F2 et − 2F1 cos(t) + F2 cos(t) − F2 sin(t)

417

Worked Solutions and y(t) = F2 − 2F1 + F1 e−t − F2 cos(t) + F1 cos(t) + F1 sin(t). 30. Taking the Laplace transform, we obtain s2 Y (s) − sy(0) − y ′ (0) − 2

d [sY (s) − y(0)] − 8Y (s) = 0, ds

or s2 Y (s) − s − 2sY ′ (s) − 2Y (s) − 8Y (s) = 0, or ′

2

2sY (s) + (10 − s )Y (s) = −s,



or

Y (s) +

The integrating factor here is µ(s) = s5 e−s equation can be rewritten

2

/4



5 s − s 2



Y (s) = − 21 .

. Therefore, the differential

i 2 d h 5 −s2 /4 s e Y (s) = − 21 s5 e−s /4 . ds

Integrating from s to ∞ s5 e−s or

2

/4

 2 Y (s) = A + s4 + 8s2 + 32 e−s /4 , 2

8 32 Aes /4 1 . 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. 31. Taking the Laplace transform, we obtain s2 Y (s) − sy(0) − y ′ (0) +

d [sY (s) − y(0)] + 2Y (s) = 0, ds

or s2 Y (s) + s + sY ′ (s) + Y (s) + 2Y (s) = 0, or sY ′ (s) + (s2 + 3)Y (s) = −s,

Y ′ (s) +

or 2



 3 + s Y (s) = −1. s

The integrating factor here is µ(s) = s3 es /2 . Therefore, the differential equation can be rewritten i 2 d h 3 s2 /2 s e Y (s) = −s3 es /2 . ds

418

Advanced Engineering Mathematics with MATLAB

Integrating from 0 to s, s 3 es

2

/2

Y (s) = A − 2 + (2 − s2 )es

or

2

/2

,

2

2 1 (A − 2)e−s /2 − + . 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. Y (s) =

32. Taking the Laplace transform, we obtain − or

 d d 2 s Y (s) − sy(0) − y ′ (0) −2 [sY (s) − y(0)]− [sY (s) − y(0)]−Y (s) = 0, ds ds 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

s (s + 1) Y (s) = A + 3y(0) or Y (s) =



 1 3 1 2 s + s , 3 2

A y(0) y(0) + + . 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)

.

33. Taking the Laplace transform, we obtain −

 d 2 s Y (s) − sy(0) − y ′ (0) − 2a [sY (s) − y(0)] ds dY d = 0, +2b [sY (s) − y(0)] + 2abY (s) − b2 ds ds

419

Worked Solutions or (s − b)2 Y ′ (s) + 2(1 + a)(s − b)Y (s) = (1 + 2a)y(0), or Y ′ (s) +

2(1 + a) (1 + 2a)y(0) 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, (s − b)2+2a Y (s) = A + y(0)(s − b)1+2a , or Y (s) = Inverting the previous equation, y(t) = y(0)ebt +

y(0) A + . 2+2a (s − b) s−b

 A t1+2a ebt = C1 + C2 t1+2a ebt . (2a + 1)!

Section 12.9 1. From Bromwich’s integral, f (t) =

1 2πi

I

C

(z + 1)etz dz, (z + 2)2 (z + 3)

where C is a semicircle of infinite radius with the diameter running along the imaginary axis and closed in the left half-plane. The singularities are a second-order pole at z = −2 and a simple pole at z = −3. The corresponding residues are     (z + 1)etz d (z + 1)etz 2 (z + 2) ; −2 = lim Res z→−2 dz (z + 2)2 (z + 3) (z + 2)2 (z + 3) tz (z + 1)etz etz (z + 1)te − + = lim z→−2 z+3 (z + 3)2 z+3 = 2e−2t − te−2t and Res



 (z + 1)etz (z + 1)etz ; −3 = lim (z + 3) = −2e−3t . 2 z→−3 (z + 2) (z + 3) (z + 2)2 (z + 3)

420

Advanced Engineering Mathematics with MATLAB

Therefore, f (t) = (2 − t)e−2t − 2e−3t . 2. From Bromwich’s integral, f (t) =

1 2πi

I

C

etz dz, + a)2

z 2 (z

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 halfplane. The singularities are second-order poles at z = 0 and z = −a. The corresponding residues are     etz etz d 2 Res 2 z 2 ; 0 = lim z→0 dz z (z + a)2 z (z + a)2 tz 2etz at − 2 te − = = lim 3 z→0 (z + a)2 (z + a) a3 and

   etz d etz 2 (z + a) 2 Res 2 ; −a = lim z→−a dz z (z + a)2 z (z + a)2 tz tz 2e at + 2 −at te − 3 = e . = lim 2 z→−a z z a3 Therefore, at − 2 at + 2 −at + e . f (t) = a3 a3 

3. From Bromwich’s integral, f (t) =

1 2πi

I

C

etz dz, z(z − 2)3

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 a simple pole at z = 0 and a third-order pole at z = 2. The corresponding residues are   etz etz 1 Res ; 0 = lim z =− z→0 z(z − 2)3 z(z − 2)3 8 and

   1 d2 etz etz 3 (z − 2) ; 2 = lim Res z→2 2 dz 2 z(z − 2)3 z(z − 2)3  2  2 tz 1 t tz 2t tz e − 2e + 3e = lim z→2 2 z z z  2  t t 1 2t = e . − + 4 4 8 

421

Worked Solutions Therefore, the inverse equals the sum of the residues or f (t) =



t 1 t2 − + 4 4 8



1 e2t − . 8

4. From Bromwich’s integral, 1 f (t) = 2πi

I

C

etz dz, z(z + a)2 (z 2 + b2 )

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 Res



 etz 1 etz ; 0 = lim z = 2 2, 2 2 2 z→0 z(z + a)2 (z 2 + b2 ) z(z + a) (z + b ) a b

 etz etz = lim (z − bi) ; bi Res z→bi z(z + a)2 (z 2 + b2 ) z(z + a)2 (z 2 + b2 ) 

=− Res



ebti a2 − b2 − 2iab , 2b2 (a2 + b2 )2

 etz etz ; −bi = lim (z + bi) 2 2 2 z→−bi z(z + a) (z + b ) z(z + a)2 (z 2 + b2 ) =−

e−bti a2 − b2 + 2iab 2b2 (a2 + b2 )2

and  Res

   etz etz d 2 (z + a) ; −a = lim z→−a dz z(z + a)2 (z 2 + b2 ) z(z + a)2 (z 2 + b2 )   tz etz 2etz te − 2 2 + = lim 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

Therefore, the inverse equals the sum of the residues or 1 + at 2 1 − 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

f (t) =

422

Advanced Engineering Mathematics with MATLAB

5. From Bromwich’s integral, f (t) =

1 2πi

I

C

e(t−1)z dz, z 2 (z + 2)

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 secondorder pole at z = 0 and a simple pole at z = −2. The corresponding residues are     (t−1)z e(t−1)z d e z2 2 ; 0 = lim Res 2 z→0 dz z (z + 2) 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→−2 z (z + 2) z (z + 2) 4

Therefore, the inverse equals the sum of the residues or f (t) =



 t − 1 1 1 −2(t−1) H(t − 1). − + e 2 4 4

6. From Bromwich’s integral, 1 f (t) = 2πi

I

C

etz dz, z(1 + e−az )

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 all simple poles and are located at z = 0 and zn = ±(2n − 1)πi/a, where n = 1, 2, 3, . . . The corresponding residues are  etz 1 etz ; 0 = lim z = Res z→0 z(1 + e−az ) z(1 + e−az ) 2 

and Res



 etz etz = lim (z − z ) ; z n n z→zn z(1 + e−az ) z(1 + e−az ) exp[±(2n − 1)πit/a] . =± (2n − 1)πi

423

Worked Solutions Therefore, f (t) =

∞ 1 2 X sin[(2n − 1)πt/a] + . 2 π n=1 (2n − 1)π

7. From Bromwich’s integral, 1 f (t) = 2πi

I

C

etz dz, (z + b) cosh(az)

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 all simple poles and are located at z = −b and zn = ±(2n − 1)πi/(2a), where n = 1, 2, 3, . . . because cosh(az) = cos(iaz) = 0. The corresponding residues are  etz e−bt etz ; −b = lim (z + b) = Res z→−b (z + b) cosh(az) (z + b) cosh(az) cosh(ab) 

and  Res

 etz etz ; zn = lim (z − zn ) z→zn (z + b) cosh(az) (z + b) cosh(az) exp[±(2n − 1)πit/(2a)] . =± ai[b ± (2n − 1)πi/(2a)] sin[(2n − 1)π/2]

Summing the residues, ∞

X exp[(2n − 1)πit/(2a)] e−bt + f (t) = cosh(ab) n=1 ai[b + (2n − 1)πi/(2a)](−1)n+1 − =

∞ X

exp[−(2n − 1)πit/(2a)] ai[b − (2n − 1)πi/(2a)](−1)n+1 n=1

∞ X e−bt sin[(2n − 1)πt/(2a)] (−1)n 2 2 − 8ab cosh(ab) 4a b + (2n − 1)2 π 2 n=1

+4

∞ X

(−1)n

n=1

(2n − 1)π cos[(2n − 1)πt/(2a)] . 4a2 b2 + (2n − 1)2 π 2

8. From Bromwich’s integral, f (t) =

1 2πi

I

C

etz dz, z(1 − e−az )

424

Advanced Engineering Mathematics with MATLAB

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,  az 1 + tz + · · · 1  etz 1 + tz + = = + · · · z(1 − e−az ) az 2 (1 − az/2 + · · ·) az 2 2 so that Res



 t 1 etz ; 0 = + . z(1 − e−az ) a 2

The remaining residues are  etz exp(±2nπit/a) etz (z − z ) = lim ; z =± . Res n n z→zn z(1 − e−az ) z(1 − e−az ) 2nπi 

Therefore, ∞ t 1 1 X sin(2nπt/a) + + . a 2 π n=1 n

f (t) =

9. From the definition of the Laplace transform F (z) =

Z



f (τ )e

−zτ

0

dτ ⇒ G(z) = F [ϕ(z)] =

Z



f (τ )e−ϕ(z)τ dτ.

0

From Bromwich’s integral, g(t) =

1 2πi

Z

c+∞i

G(z) etz dz = c−∞i

1 2πi

Z

c+∞i

F [ϕ(z)] etz dz. c−∞i

Substituting for F [ϕ(z)], 1 g(t) = 2πi

Z

c+∞i c−∞i

Z



f (τ )e

−ϕ(z)τ

0



dτ etz dz.

Reversing the order of integration, g(t) =

Z

∞ 0



1 f (τ ) 2πi

Z

c+∞i

e c−∞i

−ϕ(z)τ tz



e dz dτ.

√ √ Finally, the inverse of exp(−τ z ) is τ exp(−τ 2 /4t)/2 πt3 .

425

Worked Solutions Section 12.10 1. Taking the Laplace transform of the partial differential equation

d2 U (x, s) = 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 s2 U (x, s) − su(x, 0) − ut (x, 0) −

d2 U (x, s) − s2 U (x, s) = −1, dx2 The general solution is

0 < x < 1.

1 + A cosh(sx) + B sinh(sx). s2 Using the boundary conditions, the transformed solution equals U (x, s) =

U (x, s) =

1 − cosh(sx) [cosh(s) − 1] sinh(sx) + . s2 s2 sinh(s)

The transformed solution has simple poles at zn = ±nπi with n = 1, 2, 3, . . . and a removable pole at z = 0. From Bromwich’s integral, I I 1 1 [1 − cosh(zx)]etz [cosh(z) − 1] sinh(zx)etz u(x, t) = dz + dz 2πi C z2 2πi C z 2 sinh(z) I 1 [cosh(z) − 1] sinh(zx)etz = dz. 2πi C z 2 sinh(z) Now, the residues equal   [cosh(z) − 1] sinh(zx)etz Res ; zn z 2 sinh(z) z − zn [cosh(z) − 1] sinh(zx)etz lim = lim z→zn sinh(z) z→zn z2 [cos(nπ) − 1] sin(nπx) exp(±nπti) =± . n2 π 2 i cos(nπ) Therefore, u(x, t) =

∞ X [1 − (−1)n ] sin(nπx) exp(nπti) n2 π 2 i n=1

[1 − (−1)n ] sin(nπx) exp(−nπti) n2 π 2 i ∞ n X [1 − (−1) ] sin(nπx) sin(nπt) =2 n2 π 2 n=1 −

=

∞ 4 X sin[(2m − 1)πx] sin[(2m − 1)πt] . π 2 m=1 (2m − 1)2

426

Advanced Engineering Mathematics with MATLAB

2. Taking the Laplace transform of the partial differential equation, s2 U (x, s) − su(x, 0) − ut (x, 0) −

d2 U (x, s) = 0, dx2

0 < x < 1,

with the boundary condition 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) = −x, dx2

0 < x < 1.

The general solution is U (x, s) =

x + A cosh(sx) + B sinh(sx). s2

Using the boundary condition, the transformed solution equals U (x, s) =

xs cosh(s) − sinh(sx) . s3 cosh(s)

The transformed solution has simple poles at zn = ±(2n − 1)πi/2 with n = 1, 2, 3, . . . and a removable pole at z = 0. From Bromwich’s integral, u(x, t) =

1 2πi

I

C

[xz cosh(z) − sinh(zx)]etz dz. z 3 cosh(z)

Now, the residues equal Res



 [xz cosh(z) − sinh(zx)]etz ; z n z 3 cosh(z) z − zn [xz cosh(z) − sinh(zx)]etz lim = lim 3 z→zn cosh(z) z→zn z 8(−1)n+1 sin[(2n − 1)πx/2] exp[±(2n − 1)πti/2] =± . (2n − 1)3 π 3 i

Therefore,   ∞ X 16(−1)n+1 (2n − 1)πx u(x, t) = sin (2n − 1)3 π 3 2 n=1

exp[(2n − 1)πti/2] − exp[−(2n − 1)πti/2] 2i     ∞ 16 X (−1)n+1 (2n − 1)πt (2n − 1)πx = 3 sin . sin π n=1 (2n − 1)3 2 2 ×

427

Worked Solutions 3. Taking the Laplace transform of the partial differential equation, s2 U (x, s) − su(x, 0) − ut (x, 0) −

d2 U (x, s) = 0, dx2

0 < x < 1,

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), dx2

0 < x < 1.

The general solution is U (x, s) = A cosh(sx) + B sinh(sx) +

s−1 sin(πx). s2 + π 2

Using the boundary conditions, the transformed solution equals U (x, s) =

s−1 sin(πx). + π2

s2

Inverting by inspection, u(x, t) = sin(πx) cos(πt) −

1 sin(πx) sin(πt). π

4. Taking the Laplace transform of the partial differential equation, s2 U (x, s) − su(x, 0) − ut (x, 0) − c2

d2 U (x, s) = 0, dx2

0 < x < a,

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, dx2 c

0 < x < a.

The general solution is U (x, s) = A cosh[s(a − x)/c] + B sinh[s(a − x)/c]. Using the boundary condition, the transformed solution equals U (x, s) =

ω sinh[s(a − x)/c] . (s2 + ω 2 ) sinh(sa/c)

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

Now, the residues equal   ω sinh[z(a − x)/c]etz Res ; ωi (z 2 + ω 2 ) sinh(za/c) ω(z − ωi) sinh[z(a − x)/c]etz lim = lim z→ωi z→ωi sinh(za/c) z2 + ω2 1 sin[ω(a − x)/c] ωti = e , 2i sin(ωa/c)   ω sinh[z(a − x)/c]etz Res ; −ωi (z 2 + ω 2 ) sinh(za/c) ω(z + ωi) sinh[z(a − x)/c]etz lim = lim z→−ωi z 2 + ω 2 z→−ωi sinh(za/c) 1 sin[ω(a − x)/c] −ωti =− e 2i sin(ωa/c) and   ω sinh[z(a − x)/c]etz ; zn Res (z 2 + ω 2 ) sinh(za/c) z − zn ω sinh[z(a − x)/c]etz lim = lim 2 2 z→z z→zn z +ω n sinh(az/c) ωa2 i sin[nπ(a − x)/a] exp(±nπcti/a) =± 2 2 a ω − n2 π 2 c2 (a/c) cos(nπ)     nπcti nπ(a − x) ωac(−1)n i exp ± . sin =± 2 2 a ω − n2 π 2 c2 a a Therefore, the final answer is sin[ω(a − x)/c] sin(ωt) sin(ωa/c)     ∞ X 2ωac(−1)n nπct nπ(a − x) + sin . sin n2 π 2 c2 − a2 ω 2 a a n=1

u(x, t) =

  ∞ sin[ω(a − x)/c] 2ωa X sin(nπx/a) nπct = . sin(ωt) − sin sin(ωa/c) c n=1 n2 π 2 − a2 ω 2 /c2 a

5. Taking the Laplace transform of the partial differential equation s2 U (x, s) − su(x, 0) − ut (x, 0) − c2

d2 U (x, s) =0 dx2

with the boundary conditions U ′ (0, s) = −F (s)

and

U ′ (L, s) = 0,

429

Worked Solutions

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 U (x, s) = A(s) cosh[s(L − x)/c]. Using the boundary conditions, the transformed solution equals U (x, s) =

cF (s) cosh[s(L − x)/c] . s sinh(sL/c)

Replacing sinh and cosh by their definitions and expanding the denominator as a geometric series, U (x, s) =

i  cF (s) h −sx/c e + e−s(2L−x)/c 1 + e−2sL/c + e−4sL/c + · · · . s

Multiplying everything out and inverting term by term, we obtain u(x, t) = c +c

∞ X

n=0 ∞ X

m=1

f (t − x/c − 2nL/c)H(t − x/c − 2nL/c) f (t + x/c − 2mL/c)H(t + x/c − 2mL/c).

6. Taking the Laplace transform of the partial differential equation s2 U (x, s) − su(x, 0) − ut (x, 0) = c2

d2 U (x, s) − sQ(s) + q(0), dx2

a < x < b,

with the boundary conditions U (a, s) = 0

and

U ′ (b, s) = 0.

Substituting the initial conditions into the first equation, we finally obtain c2

d2 U (x, s) − s2 U (x, s) = sQ(s), dx2

a < x < b.

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

Let us expand the right side using an eigenfunction expansion consisting of sin[kn (x − a)]. Then sQ(s) =

  ∞ 4sQ(s) X 1 (2n + 1)π(x − a) . sin π 2n + 1 2(b − a) n=0

Assuming that 

 (2n + 1)π(x − a) An sin U (x, s) = , 2(b − a) n=0 ∞ X

direct substitution yields  −1 4sc2 Q(s) 2 (2n + 1)2 π 2 c2 An = − s + . π(2n + 1) 4(b − a)2 Substituting An into the expression for U (x, s) and inverting term-by-term, the final answer is   ∞ 4c2 X 1 (2n + 1)π(x − a) sin u(x, t) = − π n=0 2n + 1 2(b − a)   Z t (2n + 1)πc(t − τ ) q(τ ) cos × dτ. 2(b − a) 0 7. Taking the Laplace transform of the partial differential equation s2 U (x, s) − su(x, 0) − ut (x, 0) −

e−x d2 U (x, s) = 2 2 dx s

with the boundary conditions U (0, s) =

1 1 − s s+1

and

lim |U (x, s)| ∼ xn .

x→∞

Substituting the initial conditions into the first equation, we finally obtain e−x d2 U (x, s) 2 − s U (x, s) = −x − . dx2 s2 The general solution is U (x, s) = Ae−sx +

x e−x + . s2 s2 (s2 − 1)

431

Worked Solutions Using the boundary conditions, the transformed solution equals U (x, s) =



1 1 1 1 − + 2− 2 s s+1 s s −1



e−sx +

x e−x e−x − 2 + 2 . 2 s s s −1

Inverting the transformed solution term by term yields u(x, t) = xt − te−x + sinh(t)e−x h i + 1 − e−(t−x) + t − x − sinh(t − x) H(t − x). 8. Taking the Laplace transform of the partial differential equation s2 U (x, s) − su(x, 0) − ut (x, 0) −

d2 U (x, s) x = 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 x d2 U (x, s) − s2 U (x, s) = −s − . dx2 s+1 The general solution is U (x, s) = Ae−sx +

x 1 + . s s2 (s + 1)

Using the boundary condition, the transformed solution equals U (x, s) =



1 s − s2 + 1 s



e−sx +

1 x x x − + + . s s2 s s+1

Inverting the transformed solution term by term yields u(x, t) = 1 + xt − x + xe−t + [cos(t − x) − 1]H(t − x). 9. Taking the Laplace transform of the partial differential equation, s2 U (x, s) − su(x, 0) − ut (x, 0) −

d2 U (x, s) = 0, dx2

0 < x < L,

with the boundary conditions U (0, s) = 0,

s2 U (L, s) − su(L, 0) − ut (L, 0) + ω 2 U ′ (L, s) =

g , s

432

Advanced Engineering Mathematics with MATLAB

where ω 2 = k/m. Substituting the initial conditions into these equations, d2 U (x, s) − s2 U (x, s) = 0, dx2

0 (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 

 2c exp(τ z) 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] where τ = t − (r − a)/c. Applying the residue theorem, the final answer is     √ 1 ap0 α −βτ / 2 √ √ − u(r, t) = e sin(βτ ) + cos(βτ ) ρr[(β/ 2 − α)2 + β 2 ] 2 β  − e−ατ H(τ ). 16. Taking the Laplace transform of the partial differential equation, L(utt ) = c2 L(uxx ) + gL(1), or s2 U (x, s) − su(x, 0) − ut (x, 0) = c2

d2 U g + . dx2 s

Because u(x, 0) = −gx2 /2c2 and ut (x, 0) = 0, d2 U (x, s) s2 sgx2 g − 2 U (x, s) = − 2, 2 dx c 2c4 sc

U ′ (0, s) = U ′ (L, s) = 0.

The solution to this differential equation is U (x, s) = A cosh

 sx  c

+ B sinh

 sx  c



gx2 . 2sc2

440

Advanced Engineering Mathematics with MATLAB

Satisfying the boundary conditions, U (x, s) =

gL cosh(sx/c) gx2 . − cs2 sinh(sL/c) 2sc2

Therefore, the solution is   gx2 −1 gL cosh(sx/c) . u(x, t) = − 2 + L 2c cs2 sinh(sL/c) To finish the problem, we must invert the Laplace transform. This is given by the Bromwich’s integral, gL 2πic

I

C

  ∞ cosh(zx/c) etz gL X cosh(zx/c) etz dz = ; z Res n . z 2 sinh(zL/c) c n=0 z 2 sinh(zL/c)

The poles are located at z = 0 and zn = ±nπci/L. To find the residue at z = 0, we note that (1 + z 2 x2 /2c2 + · · ·)(1 + tz + t2 z 2 /2 + · · ·) cosh(zx/c) etz = z 2 sinh(zL/c) (z 3 L/c)(1 + z 2 L2 /6c2 + · · ·) c ct x2 ct2 L = + + + − + ···. 3 2 Lz Lz 2cLz 2Lz 6cz Therefore, Res



 x2 ct2 L cosh(zx/c) etz ; 0 = + − . 2 z sinh(zL/c) 2cL 2L 6c

For zn = ±nπci/L, Res



 cosh(zx/c) etz cosh(zx/c) etz z − zn ; z lim n = lim 2 z→zn z→zn sinh(zL/c) z sinh(zL/c) z2 L cos(nπx/L) exp(±nπcti/L) . =− n2 π 2 c cos(nπ)

Summing the residues,   ∞  nπx  nπct gL2 2gL2 X (−1)n gt2 cos . − 2 − 2 2 cos u(x, t) = 2 6c c π n=1 n2 L L 17. Taking the Laplace transform of the partial differential equation, L(utt ) − L(uxx ) + L(1) = 0,

441

Worked Solutions or s2 U (x, s) − su(x, 0) − ut (x, 0) =

1 d2 U − . dx2 s

Because u(x, 0) = 0 and ut (x, 0) = 1 − x2 , d2 U (x, s) 1 − s2 U (x, s) = + x2 − 1, dx2 s

U ′ (0, s) = 0,

U ′ (1, s) =

1 . s

The solution to this differential equation is U (x, s) = A cosh (sx) + B sinh (sx) +

1 2 1 − x2 − 3 − 4. s2 s s

Satisfying the boundary conditions, U (x, s) =

1 2 cosh(sx) 2 cosh(sx) 1 − x2 − 3− 4+ 2 + 3 . 2 s s s s sinh(s) s sinh(s)

Therefore, the solution is     cosh(sx) t3 cosh(sx) t2 −1 −1 + 2L . u(x, t) = (1 − x )t − − + L 2 3 s2 sinh(s) s3 sinh(s) 2

To finish the problem, we must invert the Laplace transforms. This is given by the Bromwich’s integral, 1 2πi and 1 πi

I

I

C

C

  ∞ X cosh(zx)etz cosh(zx)etz Res dz = ; z n z 2 sinh(z) z 2 sinh(z) n=0

  ∞ X cosh(zx)etz cosh(zx)etz Res dz = 2 ; z n . z 3 sinh(z) z 3 sinh(z) n=0

The poles are located at z = 0 and zn = ±nπi. To find the residue at z = 0, we note that

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 x2 1 1 t = 3+ 2+ + − + ···, z z 2 2 6 z and (1 + z 2 x2 /2 + · · ·)(1 + tz + t2 z 2 /2 + t3 z 3 /6 + · · ·) cosh(zx)etz = 3 z sinh(z) z 4 (1 + z 2 /6 + · · ·)   2 3 1 t x2 1 1 x2 t t 1 t t = 4+ 3+ + + − + − + ···. z z 2 2 6 z2 6 2 6 z

442

Advanced Engineering Mathematics with MATLAB

Therefore,

 t2 x2 1 cosh(zx)etz ; 0 = + − , Res z 2 sinh(z) 2 2 6 

and



 t3 x2 t t cosh(zx)etz Res ; 0 = + − . 3 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)   2 cosh(zx)etz z − nπi cosh(zx)etz + = lim z→nπi z2 z3 sinh(z) cos(nπx) cos(nπx) nπit e −2 3 3 enπit . =− 2 2 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)   2 cosh(zx)etz z + nπi cosh(zx)etz + = lim z→−nπi z2 z3 sinh(z) cos(nπx) cos(nπx) −nπit e +2 3 3 e−nπit . =− 2 2 n π cos(nπ) n π i cos(nπ)

Summing the residues, the final answer is u(x, t) =

  ∞ X 2t x2 1 cos(nπt) 2 sin(nπt) . (−1)n cos(nπx) + − −2 + 3 2 6 n2 π 2 n3 π 3 n=1

18. Taking the Laplace transform of the partial differential equation, L(utt ) + kL(ut ) = c2 L(uxx ) + αc2 L(ux ) or s2 U (x, s) − su(x, 0) − ut (x, 0) + ksU (x, s) − ku(x, 0) = c2

d2 U dU + αc2 . dx2 dx

Because u(x, 0) = u0 and ut (x, 0) = 0, dU (x, s) d2 U (x, s) +α − 2 dx dx



s2 + ks c2



U (x, s) = −



s+k c2



u0

443

Worked Solutions with U ′ (0, s) = −u0 and limx→∞ |U (x, s)| < ∞. The solution to this differential equation is   q exp x (s + k2 )2 + a2 /c u0 q U (x, s) = + Ae−αx/2 s α + (s + k2 )2 + a2 /c 2   q k 2 2 exp −x (s + 2 ) + a /c q + Be−αx/2 . α k 2 2 /c (s + + ) + a 2 2 Satisfying the boundary conditions,

U (x, s) =

u0 + u0 e−αx/2 s

Therefore, the solution is

  q exp −x (s + k2 )2 + a2 /c q . α (s + k2 )2 + a2 /c 2 +

 q    k 2 2 /c    exp −x (s + ) + a   2 q u(x, t) = u0 + u0 e−αx/2 L−1 .   α k 2 2 /c   (s + + ) + a  2  2

Let s′ =

p

p2 + a2 , where p = s + k/2. Then   ′ −1 exp(−xs /c) L = ceαc(t−x/c)/2 H(t − x/c). α/2 + s′ /c

Therefore, # " p 2 2 −1 exp(−x p + a /c) p L α p2 + a2 /c 2 +  h αc i = cH(t − x/c) exp − (t − x/c) 2 √  Z t i  h αc J 1 a t2 − τ 2 √ τ exp − (τ − x/c) dτ . −a 2 t2 − τ 2 x/c

Finally, the first shifting theorem yields q   exp[−x (s + k2 )2 + a2 /c]  q L−1  k 2 α 2 (s + 2 ) + a /c 2 + = ce

−a

Z

t x/c



h αc i H(t − x/c) exp − (t − x/c) 2 √  i  h J 1 a t2 − τ 2 αc √ τ exp − (τ − x/c) dτ . 2 t2 − τ 2

−kt/2

444

Advanced Engineering Mathematics with MATLAB

Substitution into the u(x, t) equation and simplification leads to the final answer. 19. Taking the Laplace transform of the partial differential equation, L[utt ] = c2 L[uxx ] +

P L[δ(t − x/V )] ρV

or s2 U (x, s) − su(x, 0) − ut (x, 0) = c2

P −sx/V d2 U + e . dx2 ρV

Because u(x, 0) = ut (x, 0) = 0, s2 U (x, s) = c2

d2 U (x, s) P −xs/V + e . dx2 ρV

Next, we find the half-range sine expansion for e−sx/V or e−sx/V =

∞ X

An sin

n=1

where 2 An = L

Z

L

e−sx/V sin 0

 nπx  L

 nπx  L

,

0 < x < L,

dx

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 i 2nπV 2 h n −sL/V = 2 2 1 − (−1) e . L (s + βn2 )

=

Thus, we must solve the ordinary differential equation,

∞ i  nπx  s2 2P X βn h d2 U n −sL/V sin . 1 − (−1) e − U = − dx2 c2 ρLc2 n=1 s2 + βn2 L

Substituting in U (x, s) =

∞ X

n=1

Bn sin

 nπx  L

,

h i 2P βn n −sL/V 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

Bn =

445

Worked Solutions Therefore,   ∞ 1 1 βn 2P X − 2 U (x, s) = ρL n=1 (βn2 − αn2 ) s2 + αn2 s + βn2 i  nπx  h × 1 − (−1)n e−Ls/V sin . L

Term-by-term inversion plus the second shifting theorem yields  ∞   nπx  sin(βn t) 2P X βn sin(αn t) sin − u(x, t) = ρL n=1 αn (βn2 − αn2 ) βn2 − αn2 L X  ∞   L nπx 2P 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) sin − = 2 2 2 2 ρ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 20. Taking the Laplace transform of the partial differential equation,  2     2    u 1 ∂ u δ(r − α) 1 ∂ u ∂u +L 2 =L −L − L , L c2 ∂t2 ∂r2 r ∂r r α2

or

d2 U (r, s) 1 dU (r, s) U (r, s) + − dr2 r dr r2 2 s s 1 δ(r − α) − 2 U (r, s) + 2 u(r, 0) + 2 ut (r, 0) = − c c c sα2

with lim |U (r, s)| < ∞

r→0

and

dU (a, s) h + U (a, s) = 0. dr a

Because u(r, 0) = ut (r, 0) = 0, d2 U (r, s) 1 dU (r, s) U (r, s) s2 δ(r − α) + − − 2 U (r, s) = − . 2 2 dr r dr r c sα2 Next, we find the Fourier-Bessel expansion for δ(r − α),   ∞ X βn r , 0 < r < a, An J1 δ(r − α) = a n=1

446

Advanced Engineering Mathematics with MATLAB

where

  Z a 2βn2 /a2 βn r δ(r − α) J r dr 1 (βn2 + h2 − 1) J12 (βn ) 0 a 2αβ 2 J1 (βn α/a) = 2 2 n 2 a (βn + h − 1)J12 (βn )

An =

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 1 s d2 U (r, s) 1 dU (r, s) + + 2 U (r, s) − dr2 r dr c2 r ∞ 2c2 X βn2 J1 (βn α/a) =− J1 (βn r/a). 2 2 sαa n=1 (βn + h2 − 1)J12 (βn ) Substituting U (r, s) =

∞ X

n=1

Bn J1



βn r a



into this ordinary differential equation, we find that 2βn2 c2 αJ1 (βn α/a) + − 1)s(s2 + c2 βn2 /a2 ) J12 (βn )   2J1 (βn α/a) 1 s = . − α(βn2 + h2 − 1) J12 (βn ) s s2 + c2 βn2 /a2

Bn =

a2 (βn2

h2

The final inversion is straightforward. 21. Taking the Laplace transform of the partial differential equation, 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 U (0, s) =

1 , s+1

and

lim |U (x, s)| < ∞.

x→∞

Multiplying the differential equation by its integrating factor, ex/s , we have that i d h x/s e U (x, s) = 0. dx

447

Worked Solutions

Integrating both sides of the equation, U (x, s) = Ae−x/s . The arbitrary constant is determined by the boundary condition at x = 0. This gives U (x, s) =

e−x/s e−x/s e−x/s = − . s+1 s s(s + 1)

Using tables and the convolution theorem, we immediately find that √ u(x, t) = J0 (2 xt ) − e−t

Z

t

√ eτ J0 (2 xτ ) dτ.

0

22. Taking the Laplace transform of the partial differential equation, dU (x, s) d [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) + asU (x, s) = a. (s + b) dx Taking the Laplace transform of the boundary condition gives U (0, s) =

1 , s−c

and

lim |U (x, s)| < ∞.

x→∞

To solve the differential equation, we first multiply by the integrating factor exp[asx/(s + b)] and the differential equation becomes       a asx asx d exp U (x, s) = . exp dx s+b s+b s+b Integrating and solving for U (x, s), U (x, s) =

  1 asx . + C exp − s s+b

The value of C is determined by the boundary condition at x = 0. This yields       1 asx 1 1 c 1 bx U (x, s) = + exp − = + . − e−ax exp s s−c s s+b s s(s − c) s+b Using tables, the first shifting theorem, and the convolution theorem yields the final solution: Z t  √  ct−ax e−(b+c)τ I0 2 bxτ dτ. u(x, t) = 1 + c e 0

448

Advanced Engineering Mathematics with MATLAB

Section 12.11 1. Taking the Laplace transform of both sides of the partial differential equation, sU (x, s) − u(x, 0) =

d2 U (x, s) − a2 [U (x, s) − T0 /s], dx2

0 < x < 1,

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) a2 T0 2 − (s + a )U (x, s) = − . dx2 s The general solution is U (x, s) =

  p   p a2 T0 2 + B sinh x s + a2 . s + a + A cosh x s(s + a2 )

Taking the derivative, h  p   p i p 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 s + a2 = 0, U ′ (1, s) = s + a2 A sinh or A = 0. Therefore, the transformed solution is     2 1 1 ⇒ u(x, t) = T0 1 − e−a t . − U (x, s) = T0 2 s s+a

2. 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 U (1, s) = 1/s2 . Substituting 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 .

449

Worked Solutions

√ 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 ) Taking the inverse, 1 u(x, t) = 2πi

I

C

√ cosh (x z ) etz √ dz. z 2 cosh ( z )

The contour integral has a second-order pole at z = 0 and simple poles at √ zn = −(2n − 1)2 π 2 /4 with zn = (2n − 1)πi/2. To compute the residue at z = 0, we note that √ cosh (x z ) etz (1 + zx2 /2 + · · ·)(1 + tz + t2 z 2 /2 + · · ·) √ = z 2 (1 + z/2 + z 2 /4! + · · ·) z 2 cosh ( z ) 1 t + (x2 − 1)/2 = 2+ + ··· z z 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 )

√ z − zn cosh (x z ) etz √ lim = lim 2 z→z z→zn z z) n cosh ( 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)2 π 2 t (2n − 1)πx = exp − . cos (2n − 1)3 π 3 2 4

The final solution is     ∞ (2n − 1)2 π 2 t 16 X (−1)n (2n − 1)πx 1 2 exp − . cos u(x, t) = t+ (x −1)− 3 2 π n=1 (2n − 1)3 2 4 3. 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

450

Advanced Engineering Mathematics with MATLAB

subject to the boundary conditions U (0, s) = 0 and U (1, s) = 1/s. Substituting 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 ) . 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, 1 u(x, t) = 2πi

I

C

√ sinh (x z ) etz √ dz. z sinh ( z )

The contour integral has simple poles at z = 0 and zn = −n2 π 2 with nπi. The residue at z = 0 is   √ √ sinh (x z ) etz sinh(x z )etz √ √ Res ; 0 = lim = x. z→0 z sinh ( z ) sinh( z )

√ zn =

The residues for the poles at zn equals   √ √ z − zn sinh(x z )etz sinh (x z ) etz √ √ lim ; zn = lim Res z→zn sinh ( z ) z→zn z z sinh ( z ) 1 sinh(nπxi) exp(−n2 π 2 t) = −n2 π 2 cosh(nπi)/(2nπi) 2(−1)n = sin(nπx) exp(−n2 π 2 t). nπ The final solution is u(x, t) = x +

∞ 2 2 2 X (−1)n sin(nπx)e−n π t . π n=1 n

4. Taking the Laplace transform of both sides of the partial differential equation, d2 U (x, s) , − 21 < x < 21 , sU (x, s) − u(x, 0) = dx2   subject to the boundary conditions U ′ − 21 , s = 0 and U ′ 12 , s = 1. Substituting in the initial condition yields the ordinary differential equation d2 U (x, s) − sU (x, s) = 0. dx2

451

Worked Solutions

√ √ 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   √  √  s + exp − x + 12 s 1 exp x + 21 √ √ U (x, s) = √ − s s s e −e   √   √  1  1 s + exp − x + 23 s = √ exp x − 2 s   √ √ × 1 + e−2 s + e−4 s + · · · . Taking the inverse term-by-term, ( " " 2 # 2 #) ∞ 2n + 12 − x 2n + 32 + x 1 X exp − u(x, t) = √ + exp − . 4t 4t π t n=0

On the other hand, we can use Bromwich’s integral and find that   √  tz I cosh x + 21 z e 1 √ √ 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 √ √ ;0 Res z sinh( z ) h i 2 1 + x + 21 z/2 + · · · [1 + tz + t2 z 2 /2 + · · ·] = lim = 1. z→0 1 + z/6 + · · · The residues for the poles at zn equals    √  tz  √  tz   z e z e cosh x + 21 cosh x + 12 z − zn √ √ √ √ Res ; zn = lim lim z→zn z→zn sinh ( z ) z sinh( z ) z   2 2 = 2(−1)n cos nπ x + 21 e−n π t .

Summing the residues, yields the final answer of u(x, t) = 1 + 2

∞ X

n=1

  2 2 (−1)n cos nπ x + 12 e−n π t .

452

Advanced Engineering Mathematics with MATLAB

5. Taking the Laplace transform of both sides tion, d2 U (x, s) sU (x, s) − u(x, 0) − = dx2

of the partial differential equa1 , s

0 < x < 1,

subject to the boundary conditions U (0, s) = U (1, s) = 0. Substituting in the initial condition yields the ordinary differential equation 1 d2 U (x, s) − sU (x, s) = − . dx2 s √ √ The general solution is U (x, s) = 1/s2 + A cosh (x s ) + B sinh (x s ) . Applying 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 ) Taking the inverse, √ I [1 − cosh(x z )]etz 1 dz 2πi C z2 √ √ I 1 [1 − cosh( z )] sinh(x z )etz √ dz. − 2πi C z 2 sinh( z )

u(x, t) =

The contour integral has a second-order pole at z = 0 and simple poles at √ zn = −n2 π 2 with zn = nπi. Because √ [1 − cosh(x z )]etz (−x2 z/2 − x4 z 2 /24 − · · ·)(1 + tz + t2 z 2 /2 + · · ·) = z2 z2 2 x = − − ···, 2z 1 2πi

I

C

√ [1 − cosh(x z]etz ) x2 dz = − . 2 z 2

The second integral requires the residues at z = 0 and zn . Because √ √ [1 − cosh( z )] sinh(x z )etz √ z 2 sinh( z ) (−z/2 − z 2 /24 − · · ·)(x + x3 z/3! + · · ·)(1 + tz + t2 z 2 /2 + · · ·) = . z 2 (1 + z/6 + z 2 /5! + · · ·) x = − − ···, 2z

453

Worked Solutions The residue equals −x/2. The residues for the poles at zn equals

  √ √ [1 − cosh( z )] sinh(x z )etz √ ; z Res n z 2 sinh( z ) √ √ z − zn [1 − cosh( z )] sinh(x z )etz √ lim = lim z→zn sinh ( z ) z→zn z2 [1 − cosh(nπi)] sinh(nπxi) exp(−n2 π 2 t) = n4 π 4 1 × cosh(nπi)/(2nπi) 2[1 − (−1)n ] = sin(nπx) exp(−n2 π 2 t). n3 π 3

The final solution is u(x, t) =

∞ 4 X sin[(2m − 1)πx] −(2m−1)2 π2 t x(1 − x) − 3 e . 2 π m=1 (2m − 1)3

6. 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 U (0, s) = 1/s and limx→∞ |U (x, s)| < ∞. Substituting in the initial condition yields the ordinary differential equation s d2 U (x, 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 equation, d2 U (x, s) , 0 < x < ∞, sU (x, s) − u(x, 0) = 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) = − , U ′√(1, s) = sBe √ − sB = 1/s. Therefore, the transformed solution is U (x, s) = −e−x s /s3/2 . From an extensive table of inverses, u(x, t) = x erfc



x √ 2 t



r

−2

 2 t x , exp − π 4t

where erfc(·) is the complementary error function. 8. Taking the Laplace transform of both sides of the partial differential equation, 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 U (x, s) =

e−x + s−1



1 1 − s s−1



e−x



s

.

From an extensive table of inverses,        √ √ x x x √ − t +ex erfc √ + t , u(x, t) = et−x +erfc √ − 21 et e−x erfc 2 t 2 t 2 t where erfc(·) is the complementary error function. 9. Taking the Laplace transform of both sides of the partial differential equation, sU (x, s) − u(x, 0) = a2

dU (x, s) d2 U (x, s) + a2 (1 + δ) + a2 δU (x, s), 2 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 dU (x, s)  s d2 U (x, s) U (x, s) = 0. + (1 + δ) + δ − dx2 dx a2

455

Worked Solutions The general solution is "

# r (1 + δ)x x a2 (1 − δ)2 U (x, s) = A exp − + +s 2 a 4 # " r (1 + δ)x x a2 (1 − δ)2 − +s . + B exp − 2 a 4 Applying the boundary condition as x → ∞, A = 0. Using the boundary condition at x = 0, we have that " # r (1 + δ)x x a2 (1 − δ)2 u0 exp − − +s . U (x, s) = s 2 a 4 From an extensive table of inverses, √   a(1 − δ) t u0 −δx x √ + u(x, t) = e erfc 2 2 2a t √   a(1 − δ) t u0 −x x √ − + e erfc . 2 2 2a t 10. Taking the Laplace transform of both sides of the partial differential equation, sU (x, s) − u(x, 0) = a2

d2 U (x, s) , dx2

0 < x < ∞,

subject to the boundary conditions limx→∞ |U (x, s)| < ∞ and κd + (s + κd )a2 U ′ (0, s) = sκr U (0, 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   √ 1 1 2κd exp(−x s/a) √ √ , − √ U (x, s) = a∆ s 2a s + κr − ∆ 2a s + κr + ∆

456

Advanced Engineering Mathematics with MATLAB p

κ2r − 4a2 κd . Using tables, we find that i 2 κd −x2 /(4a2 t) h x2− u(x, t) = e erfc(x− ) − ex+ erfc(x+ ) , e ∆ √ where x± = [x + (κr ± ∆)a2 t]/(2a t ) and erfc(·) is the complementary error function. where ∆ ≡

11. Taking the Laplace transform of both sides of the partial differential equation, sU (x, s) − u(x, 0) =

d2 U (x, s) − βU (x, s), dx2

0 < x < ∞,

subject to the boundary conditions ρU (0, s) − U ′ (0, s) =

1 , s + β − σ2

lim |U (x, s)| < ∞.

x→∞

Substituting in the initial condition yields the ordinary differential equation d2 U (x, s) − (s + β)U (x, s) = 0. dx2 The general solution is U (x, s) = Aex



s+β

+ Be−x



s+β

.

Applying the boundary condition as x → ∞, A = 0. Using the boundary condition at x = 0, we have that √ exp(−x s + β ) √ U (x, s) = . (s + β − σ 2 )(ρ + s + β ) Using partial fractions, √















e−x s e−x s √ √ √ U (x, s) = = √ (s′ + σ 2 )( s′ + ρ) ( s′ + σ)( s′ − σ)( s′ + ρ) √



e−x s e−x s √ √ + = (ρ2 − σ 2 )( s′ + ρ) 2σ(ρ + σ)( s′ − σ)

e−x s √ − , 2σ(ρ − σ)( s′ + σ)

where s′ = s + β. Using the first shifting theorem and the fact that √ !    2 √ 2 k e−k s 1 k −1 √ − aeak ea t erfc a t + √ , L = √ exp − 4t a+ s πt 2 t

457

Worked Solutions

    √ √ eσx e−σx x x u(x, t) = erfc √ − σ t + erfc √ + σ t ρ+σ ρ−σ 2 t 2 t   √ 2 ρ x − 2 eρx+ρ t−βt erfc √ + ρ t . ρ − σ2 2 t 1 σ 2 t−βt 2e



12. Taking the Laplace transform of both sides of the partial differential equation, sU (x, s) − u(x, 0) = a2

d2 U (x, s) A −kx + e , dx2 s

0 < x < ∞,

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 s u0 A d2 U (x, s) − 2 U (x, s) = − 2 − 2 e−kx . dx2 a a a s The general solution is U (x, s) = where q = becomes



u0 Ae−kx − 2 2 + Be−qx , s a s(k − q 2 )

s/a. Applying the boundary conditions, the general solution

  k −qx A u0 −kx e − + e s s(s − a2 k 2 ) q   −kx Ae−qx u0 Ae−qx Ae 1 1 √ − √ . = + + 2 2 − 2 2 s a k s−a k s aks s ak s(s − a2 k 2 )

U (x, s) =

Taking the inverse and using the convolution theorem,  Ae−kx  2 2 u(x, t) = u0 + 2 2 ea k t − 1 a k " r #    A t x x2 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 4a τ πτ 0 13. Taking the Laplace transform of both sides of the partial differential equation, sU (x, s) − u(x, 0) = a2

d2 U (x, s) P − , dx2 s

0 < x < L,

458

Advanced Engineering Mathematics with MATLAB

subject to the boundary conditions U (0, s) = 1/s2 and U (L, s) = 0. Substituting in the initial condition yields the ordinary differential equation d2 U (x, s) s P − 2 U (x, s) = 2 . dx2 a sa The general solution is U (x, s) = A cosh(qx) + B sinh(qx) − P/s2 , where q = √ s/a. Applying the boundary conditions, the general solution becomes U (x, s) =

  sinh[q(L − x)] P sinh(qx) − 1 + (P + 1) 2 . s2 sinh(qL) s sinh(qL)

Now L−1



   I tz  1 sinh(qx) e 1 sinh(qx) − 1 = − 1 dz. s2 sinh(qL) 2πi C z 2 sinh(qL)

Because   (1 + tz + t2 z 2 /2 + · · ·)[(x − L) + z(x3 − L3 )/6a2 + · · ·] etz sinh(qx) − 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 − 1 ;0 = + . 2 z sinh(qL) L 6a2 L For the poles at zn = −n2 π 2 a2 /L2 , we have that 

   etz sinh(qx) sinh(qx) etz z − zn Res = lim lim − 1 ; z n 2 2 z→z z→z z sinh(qL) z n n sinh(qL) 2L2 (−1)n sin(nπx/L) exp(−n2 π 2 a2 t/L2 ) . =− a2 n3 π 3

On the other hand,   I tz 1 e sinh[q(L − x)] sinh[q(L − x)] −1 = L dz. s2 sinh(qL) 2πi C z 2 sinh(qL) Because (1 + tz + t2 z 2 /2 + · · ·)[(L − x) + z(L − x)3 /6a2 + · · ·] etz sinh[q(L − x)] = z2 sinh(qL) z 2 L(1 + zL2 /6a2 + · · ·) L − x (L − x)3 t(L − x) L(L − x) = + + − + ···, z2 6a2 Lz Lz 6a2 z

459

Worked Solutions 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 For the poles at zn = −n2 π 2 a2 /L2 , we have that

  tz sinh[q(L − x)] etz z − zn e sinh[q(L − x)] = lim lim ; z Res n z→zn z→zn sinh(qL) z2 sinh(qL) z2 2

2 2

2L2 (−1)n sin[nπ(L − x)/L]e−n π a a2 n3 π 3 2 2L sin(nπx/L) exp(−n2 π 2 a2 t/L2 ) = . a2 n3 π 3

t/L2

=−

The final solution is t(L − x) P x(x − L) x(x − L)(x − 2L) − + L 2a2 6a2 L  2 2 2  ∞   2 X n 2P L a n π t nπx (−1) − 2 3 exp − sin 3 a π n=1 n L L2  2 2 2  ∞  nπx  a n π t 2(P + 1)L2 X 1 exp − + . sin 2 3 3 a π n L L2 n=1

u(x, t) =

14. Taking the Laplace transform of both sides of the partial differential equation, sU (x, s) − u(x, 0) = a2

d2 U (x, s) + kU (x, s), dx2

0 < x < L,

subject to the boundary conditions U (0, s) = U (L, s) = T0 /s. Substituting in the initial condition yields the ordinary differential equation d2 U (x, s) s − k T0 − U (x, s) = − 2 . dx2 a2 a The general solution is U (x, s) = where q = tion is



T0 + A sinh(qx) + B sinh[q(L − x)], s−k

s − k/a. Applying the boundary conditions, the particular solu-

U (x, s) =

kT0 sinh(qx) + sinh[q(L − x)] T0 − . s − k s(s − k) sinh(qL)

460 Now L

−1

Advanced Engineering Mathematics with MATLAB



sinh(qx) + sinh[q(L − x)] s (s − k) sinh(qL)



1 = 2πi

I

C

sinh(qx) + sinh[q(L − x)] tz e dz. 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→0 z (z − k) sinh(qL) (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 e ; k = lim e Res z→k z (z − k) sinh(qL) 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→zn sinh(qL) z(z − k) i sin(nπx/L) + i sin(nπ − nπx/L) kt−n2 π2 a2 t/L2 2na2 πi = e (k − n2 π 2 a2 /L2 )(−n2 π 2 a2 /L2 ) L2 cos(nπ) n n 2(−1) [1 − (−1) ] sin(nπx/L) kt−n2 π2 a2 t/L2 e . = nπ(k − n2 π 2 a2 /L2 ) Inverting the first term in U (x, s) by inspection and summing the residues, we obtain the final answer p T0 cos[(L/2 − x) k/a2 ] p u(x, t) = cos(L k/a2 /2) ∞ 2 2 2 2 4kT0 X sin[(2m − 1)πx/L] + ekt−(2m−1) π a t/L 2 2 2 2 π m=1 (2m − 1)[k − (2m − 1) π a /L ]       ∞ (2m − 1)πx 4T0 X κm k 1 ekt−κm t sin , = − π m=1 2m − 1 κm − k κm − k L

461

Worked Solutions where κm = (2m − 1)2 π 2 a2 /L2 .

15. Taking the Laplace transform of both sides of the partial differential equation,   2 1 2 d U (x, s) +q + αU (x, s) , −L < x < L, sU (x, s) − u(x, 0) = a dx2 s subject to the boundary conditions U (−L, s) = U (L, s) = 0. Substituting in the initial condition yields the ordinary differential equation q d2 U (x, s) αq − s + U (x, s) = − 2 . 2 2 dx a a s The general solution is   √ √ q + A cosh x s − αq/a + B sinh x s − αq/a . U (x, s) = s(s − αq)

Applying the boundary conditions, the general solution becomes √ q cosh (x s − αq/a) q √ − . 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) √ q cosh (x z − αq/a) etz z − zn √ 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 u(x, t) =

∞ 4q X (−1)n cos[(2n − 1)πx/2L] π 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 ∂2v ∂v = 2, ∂t ∂r

0 ≤ r < 1, t > 0,

with the boundary conditions limr→0 v(r, t) → 0 and ∂v(1, t) − v(1, t) = 1, ∂r

t>0

and the initial condition v(r, 0) = 0, 0 ≤ r < 1. Taking the Laplace transform of both sides of the partial differential equation, sV (r, s) − v(r, 0) =

d2 V (r, s) , dr2

0 ≤ r < 1,

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 equation 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 =

463

Worked Solutions

we have a second-order pole at z = 0 and the residue equals r3 /2+3tr−3r/10. √ We also have poles where zn = iλn , zn = −λ2n and tan(λn ) = λn . Their residues equal   √ sinh(r z ) √ √ √ ; zn Res z [ z cosh( z ) − sinh( z )] √ sinh(r z )etz z − zn √ √ = lim lim √ z→zn z→zn z z cosh( z ) − sinh( z ) 2 sin(λn r) exp(−λ2n t) =− . λ2n sin(λn ) Bring all of these parts together, u(r, t) =

∞ r2 3 2 X sin(λn r) −λ2n t e , + 3t − − 2 10 r n=1 λ2n sin(λn )

where tan(λn ) = λn . 17. Taking the Laplace transform of both sides of the partial differential equation, sU (r, s) − u(r, 0) =

a2 d2 [rU (r, s)] + Q(s), r dr2

b < r < ∞,

subject to the boundary conditions U ′ (b, s) = U (b, s),

lim U (r, s) =

r→∞

u0 + Q(s) . s

Substituting in the initial condition yields the ordinary differential equation s r[Q(s) + u0 ] d2 [rU (r, s)] − 2 rU (r, s) = − . 2 dr a a2 The general solution is U (r, s) = where q =

Q(s) + u0 A e−q(r−b) + , s r

√ s/a. Applying the boundary condition at r = b, A=−

[Q(s) + u0 ]b , s(q + 1/β)

where β = b/(1 + b). Therefore, the transformed solution is U (r, s) =

u0 + Q(s) e−q(r−b) b Q(s) e−q(r−b) b u0 − − . s s(q + 1/β) r s(q + 1/β) r

464

Advanced Engineering Mathematics with MATLAB

Because  −√s (r−b)/a  e −1 √ L s( s/a + 1/β)     √    r−b a t r−b r − b a2 t √ − exp = β erfc + 2 erfc + √ , β β β 2a t 2a t the final solution is  Z t   b−β b−β 1− f (r, t) + f (r, t − τ ) q(τ ) dτ, u(r, t) = u0 1 − r r 0 where 

r−b √ f (r, t) = erfc 2a t





r − b a2 t + 2 − exp β β



 √  a t r−b √ erfc + . β 2a t

18. Taking the Laplace transform of both sides of the partial differential equation, sU (x, s) − u(x, 0) − ν

d2 U (x, s) = 0, dx2

0 < x < L,

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 (L − x) . U (x, s) = A sinh ν Applying the boundary condition at x = 0, r  r   r  s s s 2µ g sA sinh L + = . A cosh L ν m ν ν s Therefore, the transformed solution is p g sinh[(L − x) s/ν ] p p U (x, s) = . √ √ s[s sinh(L s/ν ) + 2µ s cosh(L s/ν )/(m ν )]

Taking the inverse, u(x, t) =

1 2πi

I

C

z[z sinh(L

p

p g sinh[(L − x) z/ν ]etz p dz. √ √ z/ν ) + 2µ z cosh(L z/ν )/(m ν )]

465

Worked Solutions

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  Res

p  g sinh[(L − x) z/ν ]etz p ; 0 √ √ z[z sinh(L z/ν ) + 2µ z cosh(L z/ν )/(m ν )] p g sinh[(L − x) z/ν ]etz p p = lim √ √ z→0 z sinh(L z/ν ) + 2µ z cosh(L z/ν )/(m ν ) mg(L − x) , = 2µ p

while the residue at zn = −νλ2n /L2 is

p  g sinh[(L − x) z/ν ]etz p p ; zn Res √ √ z[z sinh(L z/ν ) + 2µ z cosh(L z/ν )/(m ν )] p (z − zn )g sinh[(L − x) z/ν ]etz p p = lim √ √ z→zn z[z sinh(L z/ν ) + 2µ z cosh(L z/ν )/(m ν )] 

=−

4gµL3 sin[λn (L − x)/L] exp(−νλ2n t/L2 ) . mν 2 λ2n [λ2n + k(1 + k)] sin(λn )

The final solution is u(x, t) =

∞ mg(L − x) 4gµL3 X sin[λn (L − x)/L] exp(−νλ2n t/L2 ) − . 2µ mν 2 n=1 λ2n [λ2n + k(1 + k)] sin(λn )

19. Taking the Laplace transform of both sides of the partial differential equation, sU (x, s) − u(x, 0) − ν

d2 U (x, s) = 0, dx2

0 < x < L,

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).

Substituting in the initial condition yields the ordinary differential equation s d2 U (x, s) − U (x, s) = 0. dx2 ν The general solution that satisfies the boundary condition U (L, s) = 0 is U (x, s) = B sinh

r

 s (L − x) . ν

466

Advanced Engineering Mathematics with MATLAB

Applying the boundary condition at x = 0, ms2 Y (s) + 2µB and

r

 r  s s + mω 2 Y (s) = msA cosh L ν ν

 r  s . sY (s) − A = B sinh L ν

Eliminating B between the two equations, r r    r   r  s s s s 2 2 ms + 2µs + mω Y (s) = msA + 2µA , coth L coth L ν ν ν ν or

 p  p ms + 2µ s/ν coth L s/ν  p  . Y (s) = A p ms2 + 2µs s/ν coth L s/ν + mω 2

Taking the inverse,

y(t) =

A 2πi

I

C

h

 p i p mz + 2µ z/ν coth L z/ν etz  p  dz. p mz 2 + 2µz z/ν coth L z/ν + 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  Res

 p i p  mz + 2µ z/ν coth L z/ν etz   ; λ n p p mz 2 + 2µz z/ν coth L z/ν + mω 2  p i h p (z − λn ) mz + 2µ z/ν coth L z/ν etz  p  = lim p z→λn mz 2 + 2µz z/ν coth L z/ν + mω 2 h  p i p 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 / ν h

=

4µω 2 mL λ4n − (

2µ mL )(1

+

λ n eλ n t 2µL 3 2 2 mν )λn + 2ω λn

+

6ω 2 µ mL λn

+ ω4

467

Worked Solutions

  p √ 3/2 because coth L λn /ν = −m ν(ω 2 + λ2n )/(2µλn ). The final solution is y(t) =

∞ 4µAω 2 X mL n=1 λ4n − ( 2µ )(1 + mL

λ n eλ n t

2µL 3 mν )λn

+ 2ω 2 λ2n +

6ω 2 µ mL λn

+ ω4

.

20. Taking the Laplace transform of both sides of the partial differential equation, sU (x, s) − u(x, 0) − a2

d2 U (x, s) = 0, dx2

0 < x < L,

subject to the boundary conditions U ′ (0, s) = 0 and a2 U ′ (L, s) + αU (L, s) = F/s. Substituting in the initial condition yields the ordinary differential equation s d2 U (x, s) − 2 U (x, s) = 0. dx2 a The general solution that satisfies the boundary condition U ′ (0, s) = 0 is U (x, s) = A cosh(qx),

q=



s/a.

Applying the boundary condition at x = L, U (x, s) =

F cosh(qx) . s[a2 q sinh(qL) + α cosh(qL)]

Taking the inverse, F u(x, t) = 2πi

I

C

cosh(qx) etz dz. z[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  Res

 cosh(qx) etz cosh(qx) etz 1 ; 0 = lim 2 = , 2 z→0 a q sinh(qL) + α cosh(qL) z[a q sinh(qL) + α cosh(qL)] α

while the residue for z = sn is   cosh(qx) etz Res ; s n z[a2 q sinh(qL) + α cosh(qL)] z − sn cosh(qx) etz lim = lim z→sn a2 q sinh(qL) + α cosh(qL) z→sn z 2hL cos(λn x/L) exp(−a2 λ2n t/L2 ) =− , α (hL + h2 L2 + λ2n ) cos(λn )

468

Advanced Engineering Mathematics with MATLAB

where h = α/a2 . Therefore, summing all of the residues yields ) ( ∞ X F cos(λn x/L) exp(−a2 λ2n t/L2 ) . 1 − 2hL u(x, t) = α [hL(1 + hL) + λ2n ) cos(λn ) n=1 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 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 ). 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 U (x, s) =

√ sinh(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 sinh(x z )etz 1 √ √ √ √ dz. u(x, t) = 2πi C 3a [ z cosh( z ) − sinh( z )] + z sinh( z) Now  Res

and

 √ sinh(x z )etz √ √ √ √ ;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

 Res

 √ sinh(x z )etz √ √ √ √ ; 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 )

469

Worked Solutions The final answer is ∞ X x sin(λn x) exp(−λ2n t) u(x, t) = +2 . a+1 [3a + 3 + λ2n /(3a)] sin(λn ) n=1

22. Taking the Laplace transform of both sides of the partial differential equation, sU (x, s) − u(x, 0) + V

d2 U (x, s) dU (x, s) = , dx dx2

0 < x < 1,

subject to the boundary conditions U (0, s) = 1/s and U ′ (1, s) = 0. Substituting in the initial condition yields the ordinary differential equation dU (x, s) d2 U (x, s) −V − sU (x, s) = 0. 2 dx dx The general solution is h i h i p p U (x, s) = AeV x/2 cosh (1 − x) s + V 2 /4 +BeV x/2 sinh (1 − x) s + V 2 /4 .

Applying the boundary conditions,

µ cosh [µ(1 − x)] + (V /2) sinh [µ(1 − x)] s [µ cosh(µ) + (V /2) sinh(µ)] h h √ i √ i √ s′ cosh (1 − x) s′ + (V /2) sinh (1 − x) s′ √ i , h√ √  = eV x/2 (s′ − V 2 /4) s′ cosh s′ + (V /2) sinh s′

U (x, s) = eV x/2

p where µ = s + V 2 /4 and s′ = s + V 2 /4. We have simple poles at s′ = V 2 /4 and s′n = −λ2n with λn cot(λn ) = −V /2, where n = 1, 2, 3, . . . From Bromwich’s integral,  exp V x/2 − V 2 t/4 u(x, t) = 2πi √ √ I √ { z cosh [(1 − x) z ] + (V /2) sinh [(1 − x) z ]} etz √ √ √ dz. × (z − V 2 /4) [ z cosh ( z ) + (V /2) sinh ( z )] C Now,   √ √ √ { z cosh [(1 − x) z ] + (V /2) sinh [(1 − x) z ]} etz V 2 √ √ √ ; Res 4 (z − V 2 /4) [ z cosh ( z ) + (V /2) sinh ( z )] √ √ √ { z cosh [(1 − x) z ] + (V /2) sinh [(1 − x) z ]} etz √ √ √ = lim2 z cosh ( z ) + (V /2) sinh ( z ) z→V /4 = eV

2

t/4−V x/2

,

470

Advanced Engineering Mathematics with MATLAB

and Res

 √  √ √ { z cosh [(1 − x) z ] + (V /2) sinh [(1 − x) z ]} etz 2 √ √ √ ; −λ 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 − V 2 /4 z→−λn 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 )]

Thus, the final answer is 2

u(x, t) = 1 − 2eV x/2−V t/4 2 ∞ X λn {(V /2) sin[λn (1 − x)] + λn cos[λn (1 − x)]}e−λn t . × (λ2n + V 2 /4)[λn sin(λn ) − (1 + V /2) cos(λn )] n=1 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 U (x, s) =

  1 asx . exp − s s+b

Because e−cξ = 1 − c 1 U (x, s) = − s

Z

ax

e 0

Z

−η

ξ

e−cη dη, 0



bη exp s+b



dη . s+b

Inverting the Laplace transform term-by-term and using the first shifting theorem, Z ax  p  e−η I0 2 btη dη. u(x, t) = 1 − e−bt 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

471

Worked Solutions

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 I0 (r z ) − I0 (a z ) tz 1 √ e dz. u(r, t) = 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 e ; zn = lim lim z→zn I0 (a z ) z→zn z z I0 (a z ) 2 J0 (kn r/a) −kn2 t/a2 . e =− kn J1 (kn ) Thus, the final answer is u(r, t) = −2

∞ X J0 (kn r/a) −kn2 t/a2 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 √ e ; 0 Res 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

  √ √ √ √ z − zn I0 (a z ) − I0 (r z ) tz I0 (a z ) − I0 (r z ) tz √ √ e ; zn = lim lim Res e z→zn I0 (a z) z→zn z2 z 2 I0 (a z) 2a2 J0 (kn r/a) −kn2 t/a2 e . =− kn3 J1 (kn )

Thus, the final answer is u(r, t) =

∞ X a2 − r 2 J0 (kn r/a) −kn2 t/a2 − 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 ). Applying the boundary conditions,   √ 1 I0 (r s ) 1 1 √ . − 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 √ e dz. u(r, t) = 1 + − 2πi C z + 1/τ0 z I0 (a z )

Now,

and

  √ √ I0 (r z ) tz 1 1 I0 (r z ) tz √ e ; 0 = − lim √ e = −1, − z→0 I0 (a z ) z + 1/τ0 z I0 (a z )    √ √ 1 I0 (r z ) tz 1 I0 (r z ) tz 1 √ e ;− √ e Res = lim − 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 )

 Res

Res



  √ 1 1 I0 (r z ) tz √ e ; zn − z + 1/τ0 z I0 (a z)   √ 1 z − zn 1 √ I0 (r z )etz − = lim lim z→zn I0 (a z ) z→zn z + 1/τ0 z   2kn 1 J0 (kn r/a) −kn2 t/a2 1 = 2 + 2 2 e a −kn2 /a2 + 1/τ0 kn /a J1 (kn ) 2 2 2a2 J0 (kn r/a) e−kn t/a . = 2 2 kn (a − kn τ0 )J1 (kn )

473

Worked Solutions Thus, the final answer is p ∞ X 2 2 J0 (r 1/τ0 ) −t/τ0 J0 (kn r/a) p + 2a2 e u(r, t) = e−kn t/a 2 2 k (a − kn τ0 ) J1 (kn ) J0 (a 1/τ0 ) n=1 n ∞   X 2 J0 (kn r/a) −kn t/a2 −t/τ0 e − e = e−t/τ0 + 2a2 . k (a2 − kn2 τ0 ) J1 (kn ) n=1 n

27. Taking the Laplace transform of both sides of the partial differential equation,   s 1 d dU (r, 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,     √ d (1 + r2 z/4a2 + · · ·)(1 + tz + · · ·) I0 (r z/a)etz √ ; 0 = lim Res 2 z→0 dz 1 + b2 z/4a2 + · · · z I0 (b z/a) b2 − r 2 , =t− 4a2 and Res



 √ √ I0 (r z/a)etz z − zn I0 (r z/a)etz √ √ = lim ; z lim n z→zn I0 (b z/a) z→zn z2 z 2 I0 (b z/a) √ √ 2a zn I0 (r zn /a)etzn = ′ √ zn2 bI0 (b z/a) 2

=

2

Thus, the final answer is # ∞ 2 X J0 (κn r) b2 − r 2 . + 2 u(r, t) = k t − 4a2 a b n=1 κ3n J1 (κn b) "

2

2

2J0 (κn r)e−a κn t 2iI0 (irκn )e−a κn t = . a2 bκ3n I0′ (ibκn ) a2 bκ3n J1 (κn b)

474

Advanced Engineering Mathematics with MATLAB

28. Introducing the variable change, ∂u 1 ∂v = , ∂t r ∂t

∂u 1 ∂v v = − 2, ∂r r ∂r r

∂2u 1 ∂2v 2 ∂v 2v = − 2 + 3. 2 2 ∂r r ∂r r ∂r r

Substituting these equations into the original differential equation and boundary conditions yields the desired result. Taking the Laplace transform of the partial differential equation in Step 1 gives s A d2 V (r, s) − 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: Vp (r, s) = u1 (r, s) cosh(qr) + u2 (r, s) sinh(qr). Then, u′1 (r, s) = where

and

Thus, u1 (r, s) =

W1 W

and

u′2 (r, s) =

W2 , W

cosh(qr) sinh(qr) = q, W = q sinh(qr) q cosh(qr) A 0 sinh(qr) = W1 = sinh(qr), −A/sr3 q cosh(qr) sr3

cosh(qr) W2 = q sinh(qr) A sq

Z

r β

sinh(qτ ) dτ, τ3

A 0 cosh(qr). 3 =− −A/sr sr3 and

u2 (r, s) = −

A sq

Z

r β

cosh(qτ ) dτ. τ3

Therefore, the general solution is V (r, s) = c1 cosh(qr) + c2 sinh(qr) Z r Z r A sinh(qτ ) cosh(qτ ) A + cosh(qr) dτ − sinh(qr) dτ 3 sq τ sq τ3 β β Z A r sinh[q(r − τ )] = C sinh[q(r − β)] − dτ. sq β τ3

475

Worked Solutions This solution satisfies the condition that V (β, s) = 0. Because

V ′ (α, s) = Cq cosh[q(β − α)] + and V (α, s) = C sinh[q(α − β)] +

Z

A s

Z

A sq

β α

β α

cosh[q(α − τ )] dτ, τ3

sinh[q(α − τ )] dτ, τ3

we have from the boundary condition V ′ (α, s) + V (α, s)/α = 0 that

[qα cosh(qℓ ) + sinh(qℓ )]C =

A sq

Z

αA − s

β α

Z

β α

sinh[q(α − τ )] dτ τ3 cosh[q(α − τ )] dτ. τ3

Thus, sinh[q(r − β)] α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 αq cosh(qη) + sinh(qη) sinh[q(β − r)] = dη sq αq cosh(qℓ ) + sinh(qℓ ) 0 (α + η)3  Z β−r sinh(qη) , dη − (r + η)3 0

V (r, s) =

where η = τ − α in the first integral and η = τ − r in the second. Finally we divide V (r, s) by r to find U (r, s). There are simple poles at s = 0 and sn = −a2 γn2 where γn is the nth root of αγn cos(γn ℓ ) + sin(γn ℓ ) = 0. If we denote

F (z) =

etz rzq



sinh[q(β − r)] αq cosh(qℓ ) + sinh(qℓ )  Z β−r sinh(qη) dη , − (r + η)3 0

Z

ℓ 0

αq cosh(qη) + sinh(qη) dη (α + η)3

476

Advanced Engineering Mathematics with MATLAB

the residue for z = 0 is  Z ℓ A αq cosh(qη) + sinh(qη) sinh[q(β − r)] Res[F (z); 0] = lim dη z→0 qr αq cosh(qℓ ) + sinh(qℓ ) 0 (α + η)3  Z β−r sinh(qη) dη − (r + η)3 0 " # Z β−r Z β−r Z A β−r ℓ dη dη dη = − +r r α + ℓ 0 (α + η)2 (r + η)2 (r + η)3 0 0 # "   ℓ β−r β−r r 1 1 1 A r−β − + = r α + ℓ α + η 0 r + η 0 2 (r + η)2 0       A r r 1 1 1 1 1 1 1 = 1− + − − − + r β α β r 2 r β r β     1 1 1 1 1 1 =A . − − + r β α 2 r β For the simple poles at zn = −a2 γn2 , we have that Z sinh[q(β − r)]etz ℓ αq cosh(qη) + sinh(qη) Res[F (z); zn ] = lim dη z→zn zqr (α + η)3 0 z − zn × lim z→zn αq cosh(qℓ ) + sinh(qℓ ) 2a2 γn sin[γn (β − r)] exp(−a2 γn2 t) ra2 γn3 [α cos(γn l) − αℓγn sin(γn ℓ) + ℓ cos(γn ℓ)] Z ℓ αγn cos(γn η) + sin(γn η) dη × (α + η)3 0 2 sin[γn (β − r)] exp(−a2 γn2 t) = 2 rγn [α cos(γn l) − αℓγn sin(γn ℓ) + ℓ cos(γn ℓ)] Z ℓ cos(γn ℓ) sin(γn η) − sin(γn ℓ) cos(γn η) × dη cos(γn ℓ)(α + η)3 0 Z 2 sin[γn (β − r)] exp(−a2 γn2 t) ℓ sin[γn (ℓ − η)] = dη rγn2 cos2 (γn ℓ)(β + α2 ℓγn2 ) (α + η)3 0 Z 2α2 sin[γn (β − r)] exp(−a2 γn2 t) 1 sin(γn ℓτ ) dτ, =− (δ − τ )3 rℓ2 sin2 (γn ℓ)(β + α2 ℓγn2 ) 0

Res[F (z); zn ] = −

where η = ℓ − ℓτ and we have used αγn + tan(γn ℓ) = 0 many times. The final answer results from the sum of the residues. 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

477

Worked Solutions

w′′ = 0 with w(0) = w(L) = 1. The steady-state solution is w(x) = 1. To find the transient solution, we solve ∂2v ∂v = a2 2 , ∂t ∂x

0 < x < L, t > 0,

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 ∞  nπx  X 2 2 2 2 e−a n π t/L . Bn sin v(x, t) = L n=1 Using the initial condition, v(x, 0) =

∞ X

Bn sin

n=1

 nπx  L

= −1.

This is a half-range Fourier sine expansion and 2 Bn = − L

Z

L

sin 0

 nπx  L

Thus, the final solution is A(x, t) = 1 −

 nπx  L n 2 = − 2[1 − (−1) ] . cos dx = nπ L 0 nπ

∞ 4 X sin[(2m − 1)πx/L] −a2 (2m−1)2 π2 t/L2 e . π m=1 2m − 1

From Duhamel’s theorem, u(x, t) = f (t)A(x, 0) +

Z

t 0

f (τ )At (x, t − τ ) dτ.

Now   ∞ 4a2 π X (2m − 1)πx −a2 (2m−1)2 π2 t/L2 e . At (x, t) = (2m − 1) sin L2 m=1 L Therefore the final answer is   ∞ 4a2 π X (2m − 1)πx −a2 (2m−1)2 π2 t/L2 u(x, t) = e (2m − 1) sin L2 m=1 L Z t 2 2 2 2 f (τ )ea (2m−1) π τ /L dτ. × 0

478

Advanced Engineering Mathematics with MATLAB

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, dr dr

lim |w(r)| < ∞, w(b) = 1.

r→0

The steady-state solution is w(r) = 1. To find the transient solution, we solve ∂v a2 ∂ = ∂t r ∂r



∂v r ∂r



,

0 ≤ r < b, t > 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 v(r, t) =

∞ X

An J0

n=1



kn r b





 a2 kn2 exp − 2 t , b

where J0 (kn ) = 0. Using the initial condition, v(r, 0) =

∞ X

An J0

n=1

where An = −

2 2 J1 (kn )b2

Z

b

rJ0 0





kn r b

kn r b





= −1,

dr = −

2 . kn J1 (kn )

The final solution is  2 2  ∞ X a k J0 (kn r/b) exp − 2 n t . A(r, t) = 1 − 2 k J (k ) b n=1 n 1 n From Duhamel’s theorem, u(r, t) = f (t)A(r, 0) + Now

Z

t 0

f (τ )At (r, t − τ ) dτ.

 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

Therefore the final answer is u(r, t) =

 2 2  Z ∞ a kn (t − τ ) 2a2 X kn J0 (kn r/b) t ϕ(τ ) exp − dτ. b2 n=1 J1 (kn ) b2 0

479

Worked Solutions For ϕ(τ ) = Gτ , Z ∞ 2 2 2 2a2 X kn J0 (kn r/b) −a2 kn2 t/b2 t Gτ ea kn τ /b dτ e u(r, t) = 2 b n=1 J1 (kn ) 0    t ∞ X J0 (kn r/b) 2 2 b2 a2 k n τ /b2 −a2 kn t/b2 τ − 2 2 e = 2G e k J (k ) a kn 0 n=1 n 1 n   ∞ X J0 (kn r/b) 2 2 2 b2 b2 t − 2 2 + 2 2 e−a kn t/b . = 2G k J (k ) a kn a kn n=1 n 1 n

3. Taking the Laplace transform of both sides of the partial differential equation, d2 A(x, s) sA(x, s) − A(x, 0) = ν , 0 1. 3. F (z) =

5  n X 1

n=0

z

=

1 − (1/z)6 z6 − 1 = 6 1 − (1/z) z − z5

if |z| > 0. 4. n n m  11 X 10  ∞  ∞  X X 1 1 − (1/2z)11 1 1 1 F (z) = + = + 2z 4z 1 − (1/2z) 4z 4z n=0 n=11 m=0 =

1 1 1 (2z)11 − 1 1 − (1/2z)11 + + = 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 a2 1 a2 + a − z 1 X n −n a z =− + 2 = 2 − = F (z) = − + z n=2 z z m=0 z z − az z z(z − a)

if |z| > a. Section 13.2 1. We have that fn = gn e−anT , where gn = nT . Now Z(nT ) = zT /(z − 1)2 . Therefore, from Equation 13.2.2, we have that F (z) = zT eaT /(zeaT − 1)2 . 2. Because Z(an ) = z/(z − a), F (z) = −

z d a dz



z z−a



=

z (z − a)2

484

Advanced Engineering Mathematics with MATLAB

by Equation 13.2.25. 3. Here we have that fn = ngn , where gn = nan−1 . From problem 2, G(z) = z/(z − a)2 . From F (z) = −zG′ (z) = z(z + a)/(z − a)3 . 4. We first write F (z) =

1 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 + 2 z − aei z − ae−i   1 z z = + 2 z − a cos(1) − ia sin(1) z − a cos(1) + ia sin(1) z[z − a cos(1)] 1 . = 2 2 z − 2az cos(1) + a2

F (z) =

5. F (z) = z −2 Z[cos(n)] = 6.

z − cos(1) z[z 2 − 2z cos(1) + 1]

 F (z) = Z(3) + Z e−2nT =

z 3z + z − 1 z − e−2T

7. Because sin(nω0 T + θ) = sin(nω0 T ) cos(θ) + cos(nω0 T ) sin(θ), 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. F (z) = where X(z) = 0 +

X(z) , 1 − z −4 1 2 1 + 2 + 3. z z z

485

Worked Solutions Therefore, F (z) =

9. F (z) = Therefore,

z(z + 1) z 3 + 2z 2 + z = . z4 − 1 (z − 1)(z 2 + 1)

X(z) , 1 − z −2 F (z) =

10.

where

1 X(z) = 1 − . z

z z(z − 1) = . z2 − 1 z+1

    d z z d Z(1) = −z = dz dz z − 1 (z − 1)2     d d z(z + 1) z 2 Z(n ) = −z Z(n) = −z = dz dz (z − 1)2 (z − 1)3 Z(n) = −z

11. From the definition wn = f n ∗ g n =

n X

1 = n + 1.

k=0

Therefore, W (z) = z 2 /(z −1)2 = F (z)G(z), because F (z) = G(z) = z/(z −1). 12. From the definition wn = f n ∗ g n =

n X

k = 12 n(n + 1).

k=0

Therefore, W (z) =

z2 = F (z)G(z) (z − 1)3

because F (z) = z/(z − 1) and G(z) = z/(z − 1)2 . 13. From the definition wn = fn ∗ g n =

n X

k=0

n 1 X (1 + x)n 1 n! 2n = = . = k!(n − k)! n! k!(n − k)! n! x=1 n! k=0

Therefore, W (z) = e2/z = F (z)G(z), because F (z) = G(z) = e1/z .

486

Advanced Engineering Mathematics with MATLAB

14. Z[an fn ] =

∞ X

an fn z −n =

∞ X

n=0

n=0

fn

 a n

=

z

∞ X

fn ζ −n = F (ζ) = F (z/a),

n=0

where ζ = z/a. Section 13.3 1. 0.007143 + 0.08503z −1 + 0.1626z −2 + 0.2328z −3 2

12.6z −24z+11.4

2

0.09z + 0.9000z 0.09z 2 − 0.1714z 1.0714z 1.0714z

+ + + −

0.0900 0.0814 0.0086 2.0407 2.0493 2.0493

+ ···

+ 0.9693z −1 − 0.9693z −1 − 3.9024z −1 + · · ·

2.9331z −1 + · · ·

2. 0.5z −3 + z −4 + z −5 2z 4 −2z 3 +2z−2

z z

+1 −1

2 2

+ 0.5z −6 + 0z −7

+ 0z −1 + z −2

+ 0z −8

+ ···

− z −3

+ 0z −1 − z −2 + z −3 − 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 −2

− z −3 + 0z −4 + · · · − z −3 + 0z −4 + · · · + ···

3. 0.09836 + 0.3345z −1 + 0.6099z −2 + 0.7935z −3 2

15.25z −36.75z+30.75

2

1.5z 1.5z 2

+ −

1.5000z 3.6147z 5.1147z 5.1147z

+ − −

+ ···

3.0246 3.0246 12.3260 9.3014 9.3014

+ − −

10.3136z −1 10.3136z −1 22.4138z −1 12.1002z −1

+ ··· + ···

487

Worked Solutions 4. 0.3158z −1 + 0.8643z −2 + 1.1521z −3 + 1.1620z −4 19z 3 −33z 2 +21z−7

6z 2 6z 2

+ 6.0000z − 10.4214z +

+ ···

6.6318 − 2.2106z −1

16.4214z − 6.6318 + 2.2106z −1 16.4214z − 28.5219 + 18.1503z −1 − · · · 21.8901 − 15.9397z −1 + · · · 21.8901 − 38.0193z −1 + · · ·

22.0796z −1 + · · ·

5.

A z+1 B C F (z) = , = + + z (z − 1)(z − 1/2)2 z − 1 z − 1/2 (z − 1/2)2

where A = lim (z − 1) z→1

  F (z) F (z) d (z − 1/2)2 = −8 = 8, B = lim z z z→1/2 dz

and C = lim (z − 1/2)2 z→1/2

Therefore, F (z) = or

8z 8z 3z − − z − 1 z − 1/2 (z − 1/2)2

fn = 8 − 8 6.

F (z) = −3. z

 1 n 2

− 6n

.

F (z) 1 − e−aT A B = = + , z (z − 1)(z − e−aT ) z − 1 z − e−aT

where A = lim (z − 1) z→1

F (z) =1 z

and B=

lim (z − e−aT )

z→e−aT

Therefore, F (z) = or

 1 n 2

F (z) = −1. z

z z − z − 1 z − e−aT

fn = 1 − e−anT .

488

Advanced Engineering Mathematics with MATLAB

7.

z A B F (z) = = + , z (z − 1)(z − α) z−1 z−α

where A = lim (z − 1) z→1

and B = lim (z − α) z→α

Therefore, F (z) =

8.

F (z) 1 = z 1−α

F (z) α =− . z 1−α

1 z z α − 1−αz−1 1−αz−α

or

fn =

1 − αn+1 . 1−α

2z − a − b A B F (z) = = + , z (z − a)(z − b) z−a z−b

where A = lim (z − a) z→a

and B = lim (z − b) z→b

Therefore, F (z) = or

F (z) =1 z

F (z) = 1. z

z z + z−a z−b

f n = a n + bn . 9. F (z) = z −10 or fn = from Equation 11.2.10.

z+1 z z = z −10 + z −11 z − 1/2 z − 1/2 z − 1/2  1 n−10 2

Hn−10 +

 1 n−11 2

Hn−11

10.   I z+3 1 d2 1 n+1 n n z + 3z z dz = fn = 3 2 2πi C (z − 1/2) 2 dz z=1/2 h i   n−1 n−2 = n(7n − 5) + 3n(n − 1) 21 = 12 n(n + 1) 12

 1 n 2

.

489

Worked Solutions 11. I

zn dz (z + 1)2 (z − 1/2) C    zn 1 zn = Res , ; −1 + Res ; (z + 1)2 (z − 1/2) (z + 1)2 (z − 1/2) 2

fn =

1 2πi

where Res



   zn d zn ; −1 = lim z→−1 dz (z + 1)2 (z − 1/2) z − 1/2   n−1 zn nz − = lim z→−1 z − 1/2 (z − 1/2)2 6n − 4 = (−1)n 9

and Res Therefore,



  n zn zn 4 1 1 = lim . = ; (z + 1)2 (z − 1/2) 2 9 2 z→1/2 (z + 1)2 4 6n − 4 (−1)n + fn = 9 9

12.

 n 1 . 2

I

zn dz 2 2 C (z + 1) (z − 1)     zn zn = Res + Res , ; −1 ; 1 (z + 1)2 (z − 1)2 (z + 1)2 (z − 1)2

fn =

where Res



1 2πi

   zn d zn 2 (z − 1) ; 1 = lim z→1 dz (z + 1)2 (z − 1)2 (z − 1)2 (z + 1)2   nz n−1 n−1 2z n = lim = − z→1 (z + 1)2 (z + 1)3 4

and 

   zn zn d 2 Res (z + 1) ; −1 = lim z→−1 dz (z + 1)2 (z − 1)2 (z − 1)2 (z + 1)2   n−1 1−n 2z n nz = − (−1)n . = lim 2 3 z→−1 (z − 1) (z − 1) 4 Therefore, fn =

n−1 [1 − (−1)n ]. 4

490

Advanced Engineering Mathematics with MATLAB

13. fn = Because

1 2πi

I

C

h i ea/z z n−1 dz = Res ea/z z n−1 ; 0

a2 a 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

1. Taking the z-transform of the difference equation, we obtain Z(yn+1 ) − Z(yn ) = Z(n2 ) or Y (z) = Taking the inverse,

or

zY (z) − zy0 − Y (z) =

z(z + 1) (z − 1)3

z(z + 1) z + . z − 1 (z − 1)4

yn = 1 + Z

−1



 z(z + 1) . (z − 1)4

From the inversion integral,     I 1 z+1 n 1 d3 −1 z(z + 1) n+1 n Z = z +z z dz = lim z→1 3! dz 3 (z − 1)4 2πi C (z − 1)4 = 61 n(n − 1)(2n − 1).

Therefore, the final answer is yn = 1 + 61 n(n − 1)(2n − 1). 2. Taking the z-transform of the difference equation, we obtain Z(yn+2 ) − 2Z(yn+1 ) + Z(yn ) = 0 or z 2 Y (z) − z 2 y0 − zy1 − 2zY (z) + 2zy0 + Y (z) = 0 or Y (z) = Taking the inverse, yn = 1.

z . z−1

3. Taking the z-transform of the difference equation, we obtain Z(yn+2 ) − 2Z(yn+1 ) + Z(yn ) = Z(1)

491

Worked Solutions or z 2 Y (z) − z 2 y0 − zy1 − 2zY (z) + 2zy0 + Y (z) =

z z or Y (z) = . z−1 (z − 1)3

From the inversion integral, yn =

1 2πi

I

C

zn dz = 12 n(n − 1). (z − 1)3

4. Taking the z-transform of the difference equation, we obtain Z(yn+1 ) + 3Z(yn ) = Z(n) or zY (z) − zy0 + 3Y (z) = or Y (z) =

z (z − 1)2

z . (z − 1)2 (z + 3)

From the inversion integral, I zn 1 dz yn = 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   n z d 1 zn = − ; 1 = lim Res z→1 dz (z − 1)2 (z + 3) z+3 4 16 

and



Therefore,

 zn zn (−3)n Res ; −3 = lim = . z→−3 (z − 1)2 (z − 1)2 (z + 3) 16 yn =

n (−3)n − 1 + . 4 16

5. Taking the z-transform of the difference equation, we obtain Z(yn+1 ) − 5Z(yn ) = Z[cos(nπ)] or zY (z) − zy0 − 5Y (z) = or Y (z) = Therefore, yn =

1 6

  z 1 z z . = − (z − 5)(z + 1) 6 z−5 z+1

[5n − (−1)n ] .

z z+1

492

Advanced Engineering Mathematics with MATLAB

6. Taking the z-transform of the difference equation, we obtain Z(yn+2 ) − 4Z(yn ) = Z(1) or z 2 Y (z) − z 2 y0 − zy1 − 4Y (z) = or (z 2 − 4)Y (z) = z 2 + Using partial fractions, Y (z) =

z z−1

z . z−1

3 z 7 z 1 z + − . 4 z − 2 12 z + 2 3 z − 1

Inverting term-by-term, the final answer is yn = 43 2n +

7 n 12 (−2)

− 13 .

7. Taking the z-transform of the difference equation, we obtain Z(yn+2 ) − 41 Z(yn ) = Z or



  1 n 2

z 2 Y (z) − z 2 y0 − zy1 − 41 Y (z) = or yn =

1 2πi

I

C

z z − 1/2

zn dz. (z − 1/2)2 (z + 1/2)

Computing the residues,    d zn 1 zn = lim Res ; (z − 1/2)2 (z + 1/2) 2 z→1/2 dz z + 1/2   nz n−1 zn = lim − (z + 1/2)2 z→1/2 z + 1/2  1 n = (2n − 1) 2 

and

Res



 n  zn zn 1 1 = lim . = − ; − (z − 1/2)2 (z + 1/2) 2 2 z→−1/2 (z − 1/2)2

Therefore, yn = (2n − 1)

 1 n 2

+ − 21

n

.

8. Taking the z-transform of the difference equation, we obtain Z(yn+2 ) − 5Z(yn+1 ) + 6Z(yn ) = 0

493

Worked Solutions or z 2 Y (z) − z 2 y0 − zy1 − 5zY (z) + 5zy0 + 6Y (z) = 0 or Y (z) =

2z z − z−2 z−3

by partial fractions. Inverting term-by-term, yn = 2n+1 − 3n . 9. Taking the z-transform of the difference equation, we obtain Z(yn+2 ) − 3Z(yn+1 ) + 2Z(yn ) = Z(1) or z 2 Y (z) − z 2 y0 − zy1 − 3[zY (z) − zy0 ] + 2Y (z) = or Y (z) =

z . (z − 1)2 (z − 2)

z z−1

From the inversion integral, I 1 zn yn = dz 2πi C (z − 1)2 (z − 2)     zn zn ; 1 + Res ;2 , = Res (z − 1)2 (z − 2) (z − 1)2 (z − 2) where

and



 n   zn d z Res = −n − 1 ; 1 = lim z→1 dz (z − 1)2 (z − 2) z−2 Res



 zn zn ; 2 = lim = 2n . 2 z→2 (z − 1)2 (z − 1) (z − 2)

Therefore, yn = 2n − n − 1.

10. Taking the z-transform of the difference equation, we obtain Z(yn+2 ) − 2Z(yn+1 ) + Z(yn ) = 2Z(1) or z 2 Y (z) − z 2 y0 − zy1 − 2[zY (z) − zy0 ] + Y (z) = or Y (z) =

2z 2 . (z − 1)3

2z z−1

From the inversion integral,   I 2z n+1 2z n+1 1 dz = Res ; 1 , yn = 2πi C (z − 1)3 (z − 1)3

494

Advanced Engineering Mathematics with MATLAB

where    n+1 d2 1 2z n+1 3 2z (z − 1) = n(n + 1). ; 1 = lim Res (z − 1)3 2 z→1 dz 2 (z − 1)3 

Therefore, yn = n(n + 1). 11. Taking the z-transform of the difference equation, we obtain zX(z) − x0 z = 3X(z) − 4Y (z),

zY (z) − y0 z = 2X(z) − 3Y (z)

or (z − 3)X(z) + 4Y (z) = 3z,

−2X(z) + (z + 3)Y (z) = 2z.

Solving for X(z) and Y (z), X(z) =

z(3z + 1) 2z z 2z 2 z z = + and Y (z) = = + . z2 − 1 z−1 z+1 z2 − 1 z−1 z+1

Taking the inverse term-by-term, xn = 2 + (−1)n and yn = 1 + (−1)n . 12. Taking the z-transform of the difference equation, we obtain zX(z) − x0 z = 2X(z) − 10Y (z) zY (z) − y0 z = −X(z) − Y (z) or (z − 2)X(z) + 10Y (z) = 3z X(z) + (z + 1)Y (z) = −2z. Solving for X(z) and Y (z), X(z) = and Y (z) =

z(3z + 23) 5z 2z = − (z − 4)(z + 3) z−4 z+3

z(1 − 2z) z 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 . 13. Taking the z-transform of the difference equation, we obtain zX(z) − x0 z = X(z) − 2Y (z),

zY (z) − y0 z = −6Y (z)

or (z − 1)X(z) + 2Y (z) = −z,

(z + 6)Y (z) = −7z.

495

Worked Solutions Solving for X(z) and Y (z), X(z) = −

z 2z z(z − 8) = − (z − 1)(z + 6) z−1 z+6

and

Y (z) = −

7z . z+6

Taking the inverse term-by-term, xn = 1 − 2(−6)n and yn = −7(−6)n . 14. Taking the z-transform of the difference equation, we obtain zX(z) − x0 z = 4X(z) − 5Y (z) zY (z) − y0 z = X(z) − 2Y (z) or (z − 4)X(z) + 5Y (z) = 6z −X(z) + (z + 2)Y (z) = 2z. Solving for X(z) and Y (z), X(z) =

6z 2 + 2z 5z z = + (z − 3)(z + 1) z−3 z+1

Y (z) =

2z(z − 1) z z = + . (z − 3)(z + 1) z−3 z+1

and

Taking the inverse term-by-term, xn = 5 3n + (−1)n and yn = 3n + (−1)n . Section 13.5 1. Taking the z-transform, Y (z) = z −1 Y (z) + X(z). Therefore, G(z) =

z Y (z) = X(z) z−1

and the system is marginally stable. 2. Taking the z-transform, Y (z) = 2z −1 Y (z) − z −2 Y (z) + X(z). Therefore, G(z) =

Y (z) z2 = X(z) (z − 1)2

and the system is marginally stable.

496

Advanced Engineering Mathematics with MATLAB

3. Taking the z-transform, Y (z) = 3z −1 Y (z) + X(z). Therefore, z Y (z) = X(z) z−3

G(z) = and the system is unstable. 4. Taking the z-transform,

Y (z) = 14 z −2 Y (z) + X(z). Therefore, G(z) =

z2 Y (z) = 2 X(z) z −

1 4

and the system is stable. Section 14.1 1. Z



dτ t−ǫ R = −A lim ln |t − τ ||t+ǫ − A lim ln |t − τ ||−R R→∞ R→∞ −∞ t − τ ǫ→0 ǫ→0 t − R =0 = −A lim ln R→∞ t + R

H(A) = A

2. From the definition, H [cos(ωt)] =

1 π

Z

∞ −∞

cos(ωτ ) dτ. t−τ

If x = t − τ , then

Z Z sin(ωt) ∞ sin(ωx) 1 ∞ cos[ω(t − x)] dτ = dx π −∞ x π x −∞ = sin(ωt) sgn(ω).

H [cos(ωt)] = −

3. From the definition, 1 H [δ(t)] = π

Z

∞ −∞

δ(τ ) 1 dτ = , t−τ πt

from the sifting property of the delta function, Equation 11.1.21.

497

Worked Solutions 4. From the definition, x b(t) =

1 PV π

Z

∞ −∞

1 dτ. (t − τ )(τ 2 + 1)

Because of the singularity on the real axis at τ = t, we treat this integral in the sense of Cauchy principal value. We convert this integral into a closed contour integration by introducing a semicircle CR of infinite radius in the upper half plane. This yields a closed contour C which consists of the real line plus this semicircle. Therefore, PV

Z

∞ −∞

1 dτ = P V (t − τ )(τ 2 + 1) Z −

CR

I

1 dz 2 + 1) (t − z)(z C 1 dz. (t − z)(z 2 + 1)

The second integral on the right side vanishes by Equation 10.9.7. The evaluation of the closed integral follows from an application of residue theorem. We have that   1 z−t 1 Res ; t = lim =− 2 , z→t (t − z)(z 2 + 1) (t − z)(z 2 + 1) t +1 and

 z−i 1 1 ; i = lim = . Res 2 2 z→i (t − z)(z + 1) (t − z)(z + 1) 2i(t − i) 

Therefore, PV

Z

The final result is

∞ −∞

1 πi π (t + i) dτ = − 2 + 2 . (t − τ )(τ 2 + 1) t +1 t +1  t 1 = 2 . H 2 t +1 t +1 

5. Z



sin[2πω(t − τ )] dτ π(t − τ ) −∞ Z 1 ∞ sin(2πωt) cos(2πωτ ) − cos(2πωt) sin(2πωτ ) dτ = x(τ ) π −∞ t−τ Z Z sin(2πωt) ∞ cos(2πωτ ) cos(2πωt) ∞ sin(2πωτ ) = x(τ ) dτ − x(τ ) dτ π t − τ π t−τ −∞ −∞

y(t) =

x(τ )

= sin(2πωt)H [x(t) cos(2πωt)] − cos(2πωt)H [x(τ ) sin(2πωτ )]

498

Advanced Engineering Mathematics with MATLAB

6. Because X(ω) = πe−|ω| , x b(t) =

Z



e

−ω

0

sin(tω) dω = − e

∞ t + t cos(tω) = 2 . 2 1+t t +1 0

−ω sin(tω)

7. Because X(ω) = 2 sin(ωa)/ω, 2 x b(t) = π

Z

∞ 0

sin(aω) sin(tω) 1 t + a dω = ln ω π t − a

from Gradshteyn, I. S., and I. M. Ryzhik, 1965: Tables of Integrals, Series and Products, Academic Press, New York, Formula 3.741.1. 8.

1 1 ∗ [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).

H[f (t) ∗ g(t)] =

Section 14.2 1. Since x b(t) = t(1 + t2 )/ Z



√

 2 (1 + t4 ) ,

x(t)b x(t) dt =

−∞

Z



−∞

t(1 + t2 ) √ dt = 0, 2 (1 + t4 )2

because the integrand is an odd function.   2. Since x b(t) = e−1 − cos(t) /(t2 + 1), Z



x(t)b x(t) dt =

−∞

Z



−∞

[e−1 − cos(t)] sin(t) dt = 0, (1 + t2 )2

because the integrand is an odd function. 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. π ∞

499

Worked Solutions

4. With u(t) = H(t) − H(t − a) and v(t) = sin(t), Z a a sin(t − x) dx = cos(t − x)|0 = cos(t − a) − cos(t), w(t) = u(t) ∗ v(t) = 0

so that w(t) b = sin(t − a) − sin(t). Because vb(t) = − cos(t), Z a a b cos(t − x) dx = sin(t − x)|0 = sin(t − a) − sin(t) = w(t) u(t) ∗ vb(t) = − 0

and we verify that the convolution theorem w(t) b = u(t) ∗ vb(t) holds true for Hilbert transforms in this particular case. 5. With u(t) = sin(t) and v(t) = 1/(1 + t2 ), Z ∞ sin(t − x) w(t) = u(t) ∗ v(t) = dx 2 −∞ 1 + x Z ∞ Z ∞ cos(t) sin(x) sin(t) cos(x) dx − dx = πe−1 sin(t) = 2 1 + x 1 + x2 −∞ −∞ so that w(t) b = −πe−1 cos(t). Because vb(t) = t/(1 + t2 ), Z ∞ x sin(t − x) u(t) ∗ vb(t) = dx 1 + x2 −∞ Z ∞ Z ∞ cos(t)x sin(x) sin(t)x cos(x) dx − dx = 1 + x2 1 + x2 −∞ −∞ Z ∞ x sin(x) = − cos(t) dx = −πe−1 cos(t) = w(t) b 2 −∞ 1 + x

and we verify that the convolution theorem w(t) b = u(t) ∗ vb(t) holds true for Hilbert transforms in this particular case. 6. If f (t) = Jn (bt), then

  |ω| 2(−1)m Tn H(b − |ω|), F (ω) = √ b b2 − ω 2 while g(t) = sin(at) has the Fourier transform G(ω) =

1 [δ(ω − a) − δ(ω + a)] . 2i

Because 0 < b < a, F (ω) and G(ω) fulfill condition (1) of the product theorem. Since gb(t) = − cos(at), H[f (t)g(t)] = H[sin(at)Jn (bt)] = f (t)b g (t) = − cos(at)Jn (bt).

500

Advanced Engineering Mathematics with MATLAB

7. If f (t) = Ci(a|t|), then  0, F (ω) = −π/|ω|,

0 < |ω| < a, a < |ω| < ∞,

0 < a,

while g(t) = sin(bt) has the Fourier transform G(ω) =

1 [δ(ω − b) − δ(ω + b)] . 2i

Because 0 < b < a, F (ω) and G(ω) fullfill condition (1) of the product theorem. Since gb(t) = − cos(at), H[f (t)g(t)] = H[sin(bt)Ci(a|t|)] = f (t)b g (t) = − sgn(t) sin(bt)Si(a|t|).

8. From the definition, Z Z Z 1 ∞ τ x(τ ) t ∞ x(τ ) 1 ∞ H [tx(t)] = x(τ ) dτ dτ = dτ − π −∞ t − τ π −∞ t − τ π −∞ Z 1 ∞ x(τ ) dτ. = tb x(t) − π −∞ Section 14.3 1. From Table 6.1.1, we have that x b(t) = sin(ωt) so that z(t) = cos(ωt) + i sin(ωt) = eiωt .

2. Because z(t) = |z(t)|eiϕ(t) = |z(t)| cos[ϕ(t)] + i|z(t)| sin[ϕ(t)], x(t) = |z(t)| cos[ϕ(t)] and x b(t) = |z(t)| sin[ϕ(t)]. If we square x(t) and x b(t) and add the results together, we get z 2 (t) = x2 (t) + x b2 (t). On the other hand, if we divide x b(t) by x(t) and take the inverse of the tangent, we obtain the second desired result. ′

3. From the definition of z(t), z(t) = |z(t)|eiϕ(t) = |z(t)|eiω0 t eiϕ (t) = r(t)eiω0 t , ′ if r(t) = |z(t)|eiϕ (t) . Section 14.4

1. Because x(t) = xe (t) + xo (t), x(−t) = xe (−t) + xo (−t) = 0 for a causal function. Then xe (t) = xo (t) and xe (−t) = −xo (−t). Therefore, xe (t) = sgn(t)xo (t) and xo (t) = sgn(t)xe (t). 2. For this case, x(t) = xe (t) − sgn(t)xe (t), we have that X(ω) = Xe (ω) − F [sgn(t)xe (t)] Z i ∞ Xe (τ ) be (ω), dτ = Xe (ω) + iX = Xe (ω) + π −∞ ω − τ

501

Worked Solutions where

be (ω) = 1 X π

t

If x(t) = e H(−t),

X(ω) = From this, we find that x(t) =

1 t2 + 1

Z

∞ −∞

Xe (τ ) dτ. ω−τ

1 1 + ωi = 2 . 1 − ωi ω +1

and

x b(t) =

t . t2 + 1

Checking the tables, we find this is true, verifying this version of KramersKronig relationship. 3. From the definition of the Fourier transform, Z ∞ Z ∞ te−(1+iω)t dt te−t e−iωt dt = G(ω) = 0 0 ∞ e−(1+iω)t (1 − iω)2 1 = = [−1 − (1 + iω)t] = . (1 + iω)2 (1 + iω)2 (ω 2 + 1)2 0 Therefore,

x(t) =

1 − t2 (1 + t2 )2

and

x b(t) =

2t . (1 + t2 )2

4. From the definition of the Fourier transform, Z ∞ Z ∞ cos(at)e−(1+iω)t dt cos(at)e−t e−iωt dt = G(ω) = 0 0 ∞ e−(1+iω)t = [−(1 + iω) cos(at) + a sin(at)] (1 + iω)2 + a2 0 =

1 + a2 + ω 2 + i(a2 ω − ω 3 − ω) . (1 + a2 − ω 2 )2 + 4ω 2

Therefore, x(t) =

1 + a 2 + t2 (1 + a2 − t2 )2 + 4t2

and

x b(t) = t

1 − a 2 + t2 . (1 + a2 − t2 )2 + 4t2

5. To verify the Kramers-Kronig relationship, we must show that Z dτ 1 ∞ ω = . ω2 + 1 π −∞ (τ 2 + 1)(ω − τ )

502

Advanced Engineering Mathematics with MATLAB

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 ; i + 2i Res (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 1. To find the Green’s function, we must solve g ′ + kg = δ(t − τ ),

g(0|τ ) = 0.

Taking the Laplace transform and introducing the initial condition, sG(s|τ ) + kG(s|τ ) = e−sτ . The transfer function is 1/(s + k). Then the impulse response is e−kt . Taking the inverse Laplace transform, the Green’s function is g(t|τ ) = e−k(t−τ ) H(t − τ ). 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. 2. To find the Green’s function, we must solve g ′′ − 2g ′ − 3g = δ(t − τ ),

g(0|τ ) = g ′ (0|τ ) = 0.

Taking the Laplace transform and introducing the initial conditions, s2 G(s|τ ) − 2sG(s|τ ) − 3G(s|τ ) = e−sτ , or (s − 3)(s + 1)G(s|τ ) = e−sτ . The transfer function is 1/(s2 − 2s − 3) and the impulse response is g(t|0) =

 1 3t e − e−t . 4

503

Worked Solutions Solving for G(s|τ ), G(s|τ ) =

e−sτ 1 e−sτ 1 e−sτ = − . (s − 3)(s + 1) 4s−3 4s+1

Taking the inverse Laplace transform, the Green’s function is g(t|τ ) = 14 e3(t−τ ) H(t − τ ) − 41 e−(t−τ ) H(t − τ ). The step response is given by a′′ − 2a′ − 3a = H(t) and A(s) = 1/[s(s − 1 3t e + 41 e−t − 13 . 3)(s + 1)]. Taking the inverse, a(t) = 12 3. To find the Green’s function, we must solve g ′′ + 4g ′ + 3g = δ(t − τ ),

g(0|τ ) = g ′ (0|τ ) = 0.

Taking the Laplace transform and introducing the initial conditions, s2 G(s|τ ) + 4sG(s|τ ) + 3G(s|τ ) = e−sτ , or (s + 3)(s + 1)G(s|τ ) = e−sτ . The transfer function is 1/(s2 + 4s + 3) and the impulse response is g(t|0) = Solving for G(s|τ ), G(s|τ ) =

 1 −t e − e−3t . 2

1 e−sτ 1 e−sτ e−sτ = − . (s + 3)(s + 1) 2s+1 2s+3

Taking the inverse Laplace transform, the Green’s function is g(t|τ ) = 12 e−(t−τ ) H(t − τ ) − 21 e−3(t−τ ) H(t − τ ). 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 . 4. To find the Green’s function, we must solve g ′′ − 2g ′ + 5g = δ(t − τ ),

g(0|τ ) = g ′ (0|τ ) = 0.

Taking the Laplace transform and introducing the initial conditions, s2 G(s|τ ) − 2sG(s|τ ) + 5G(s|τ ) = e−sτ ,

504

Advanced Engineering Mathematics with MATLAB

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|τ ), G(s|τ ) =

e−sτ . (s − 1)2 + 4

Using the first and second shifting theorems, the Green’s function is g(t|τ ) = 21 et−τ sin[2(t − τ )]H(t − τ ). The step response is given by a′′ − 2a′ + 5a = H(t) and A(s) = 1/{s[(s − 1 t 1) + 4]}. Taking the inverse, a(t) = 51 − 15 et cos(2t) + 10 e sin(2t). 2

5. To find the Green’s function, we must solve g ′′ − 3g ′ + 2g = δ(t − τ ),

g(0|τ ) = g ′ (0|τ ) = 0.

Taking the Laplace transform and introducing the initial conditions, s2 G(s|τ ) − 3sG(s|τ ) + 2G(s|τ ) = e−sτ , 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|τ ), G(s|τ ) =

e−sτ e−sτ e−sτ = − . (s − 2)(s − 1) s−2 s−1

Inverting G(s|τ ) term by term, the Green’s function is g(t|τ ) = e2(t−τ ) H(t − τ ) − et−τ H(t − τ ). 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 . 6. To find the Green’s function, we must solve g ′′ + 4g ′ + 4g = δ(t − τ ),

g(0|τ ) = g ′ (0|τ ) = 0.

Taking the Laplace transform and introducing the initial conditions, s2 G(s|τ ) + 4sG(s|τ ) + 4G(s|τ ) = e−sτ ,

505

Worked Solutions 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 G(s|τ ) =

e−sτ . (s + 2)2

Using the first and second shifting theorems, the Green’s function is g(t|τ ) = (t − τ )e−2(t−τ ) H(t − τ ). 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 . 7. To find the Green’s function, we must solve g ′′ − 9g = δ(t − τ ),

g(0|τ ) = g ′ (0|τ ) = 0.

Taking the Laplace transform and introducing the initial conditions, s2 G(s|τ ) − 9G(s|τ ) = e−sτ , or (s − 3)(s + 3)G(s|τ ) = e−sτ . The transfer function is 1/(s2 − 9) and the impulse response is

Solving for G(s|τ ), G(s|τ ) =

 g(t|0) = e3t − e−3t /6.

e−sτ 1 e−sτ 1 e−sτ = − . (s − 3)(s + 3) 6s−3 6s+3

Inverting G(s|τ ) term by term, the Green’s function is g(t|τ ) = 16 e3(t−τ ) H(t − τ ) − 61 e−3(t−τ ) H(t − τ ). The step response is given by a′′ −9a = H(t)  and A(s) = 1/[s(s−3)(s+3)]. 1 Taking the inverse, a(t) = 18 e3t + e−3t − 2

8. To find the Green’s function, we must solve g ′′ + g = δ(t − τ ),

g(0|τ ) = g ′ (0|τ ) = 0.

506

Advanced Engineering Mathematics with MATLAB

Taking the Laplace transform and introducing the initial conditions, s2 G(s|τ ) + G(s|τ ) = e−sτ , 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 g(t|τ ) = sin(t − τ )H(t − τ ). 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). 9. To find the Green’s function, we must solve g ′′ − g ′ = δ(t − τ ),

g(0|τ ) = g ′ (0|τ ) = 0.

Taking the Laplace transform and introducing the initial conditions, s2 G(s|τ ) − sG(s|τ ) = e−sτ , 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|τ ), G(s|τ ) =

e−sτ e−sτ e−sτ = − . s(s − 1) s−1 s

Inverting G(s|τ ) term by term, the Green’s function is g(t|τ ) = et−τ H(t − τ ) − H(t − τ ). 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 10. Solving the differential equation g ′′ = 0, we have g(x|ξ) =



Ax + B, Cx + D,

x < ξ, x > ξ.

507

Worked Solutions

From the boundary condition g(0|ξ) − αg ′ (0|ξ) = B − αA = 0, or B = αA. From g(L|ξ) = CL + D, or D = −LC. Because the Green’s function must be continuous at x = ξ, g(ξ − |ξ) = g(ξ + |ξ), or Aξ + B = Cξ + D. Integrating x=ξ + the differential equation from x = ξ − to x = ξ + , g ′ (x|ξ)|x=ξ− = −1, or C − A = −1. Solving for A, B, C and D, we find that A=

L−ξ , L+α

α(L − ξ) , L+α

B=

Therefore, 1 L+α

g(x|ξ) =



C=−

ξ+α , L+α

(L − ξ)(x + α), (L − x)(ξ + α),

D=

L(ξ + α) . L+α

x < ξ, x > ξ,

or more conveniently, g(x|ξ) =

(L − x> )(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, ϕn (0) − αϕ′n (0) = An sin(kn L) + αkn An cos(kn L) = 0, or tan(kn L) = −αkn . To find the value of An so that ϕn (x) is orthonormal, Z 1 2 2 An

1 2 2 An

L 0

Z

(

and 1 2 2 An

A2n sin2 [kn (L − x)] dx = 1,

L 0

{1 − cos[2kn (L − x)]} dx = 1,

L ) 1 = 1, L+ sin[2kn (L − x)] 2kn 0 

L−

sin(kn L) cos(kn L) kn



= 1.

If we use tan(kn L) = −αkn to eliminate sin(kn L), we find that [L + α cos2 (kn L)]A2n = 2.

508

Advanced Engineering Mathematics with MATLAB

Therefore, substituting these eigenfunctions into Equation 15.2.123, g(x|ξ) = 2 or g(x|ξ) = 2

∞ X sin[kn (L − ξ)] sin[kn (L − x)] , [L + α cos2 (kn L)]kn2 n=1

∞ X (1 + α2 kn2 )sin[kn (L − ξ)] sin[kn (L − x)] , [α + L(1 + α2 kn2 )]kn2 n=1

because [1 − cos2 (kn L)]2 = α2 kn2 cos2 (kn L) or (1 + α2 kn2 ) cos2 (kn L) = 1 from the dispersion relationship. 11. Solving the differential equation g ′′ = 0, we have g(x|ξ) =



Ax + B, Cx + D,

x < ξ, x > ξ.

From the boundary condition g(0|ξ) − g ′ (0|ξ) = B − A = 0, or B = A. From g(L|ξ) − g ′ (L|ξ) = CL + D − C = 0, or D = C − LC. Because the Green’s function must be continuous at x = ξ, g(ξ − |ξ) = g(ξ + |ξ), or Aξ +B = Cξ +D. x=ξ + Integrating the differential equation from x = ξ − to x = ξ + , g ′ (x|ξ)|x=ξ− = −1, or C − A = −1. Solving for A, B, C and D, we find that A=B=

L−ξ−1 , L

Therefore, 1 g(x|ξ) = L



C=−

ξ+1 , L

(ξ + 1)(L − 1) . L

D=

(L − ξ − 1)(x + 1), (1 + ξ)(L − 1 − x),

x < ξ, x > ξ,

or more conveniently, g(x|ξ) =

(1 + x< )(L − 1 − 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 cos(kn x) + Bn sin(kn x). From the boundary condition ϕn (0) − ϕ′n (0) = 0, ϕn (0) − ϕ′n (0) = An − kn Bn = 0, or An = kn Bn . From the boundary condition ϕn (L) − ϕ′n (L) = 0, ϕn (L) − ϕ′n (L) = An cos(kn L) + Bn sin(kn L) + kn An sin(kn L) − kn Bn cos(kn L) = 0,

509

Worked Solutions 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 (x) = A0 ex ,

λ0 = −1; and λn = n2 π 2 /L2 ;

ϕn (x) = An [sin(nπx/L) + nπ cos(nπx/L)/L] .

To find the value of An so that ϕn (x) is orthonormal, Z and

0

h

 A20 e2x dx = 21 A20 e2L − 1 = 1,  nπx 

 nπx i2 nπ dx = 1, cos L L L 0 Z L  nπx   nπx  2nπ  nπx  + cos sin sin2 A2n L L L L 0  nπx  n2 π 2 dx = 1, cos2 + L2 L A2n

and

Z

L

L

sin

A2n



+

L n2 π 2 + 2 2L



= 1.

Therefore, substituting these eigenfunctions into Equation 15.2.123, g(x|ξ) = −

∞ 2ex+ξ 2L3 X ϕn (ξ)ϕn (x) + , e2L − 1 π 2 n=1 n2 (n2 π 2 + L2 )

where ϕn (x) = sin(nπx/L) + nπ cos(nπx/L)/L. 12. Solving the differential equation g ′′ = 0, we have g(x|ξ) =



Ax + B, Cx + D,

x < ξ, x > ξ.

510

Advanced Engineering Mathematics with MATLAB

From the boundary condition g(0|ξ) − g ′ (0|ξ) = B − A = 0, or B = A. From g(L|ξ) + g ′ (L|ξ) = CL + D + C = 0, or D = −C − LC. Because the Green’s function must be continuous at x = ξ, g(ξ − |ξ) = g(ξ + |ξ), or Aξ + B = Cξ + D. Integrating the differential equation from x = ξ − to x=ξ + x = ξ + , g ′ (x|ξ)|x=ξ− = −1, or C − A = −1. Solving for A, B, C and D, we find that A=B=

L+1−ξ , L+2

C=−

ξ+1 , L+2

D=

(ξ + 1)(L + 1) . L+2

Therefore, 1 g(x|ξ) = L+2



(L + 1 − ξ)(x + 1), (ξ + 1)(L + 1 − x),

x < ξ, x > ξ,

or more conveniently, g(x|ξ) =

(x< + 1)(L + 1 − x> ) . L+2

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 cos(kn x) + Bn sin(kn x). From the boundary condition ϕn (0) − ϕ′n (0) = 0, ϕn (0) − ϕ′n (0) = An − kn Bn = 0, or An = kn Bn . From the boundary condition ϕn (L) + ϕ′n (L) = 0, ϕn (L) + ϕ′n (L) = An cos(kn L) + Bn sin(kn L) − kn An sin(kn L) + kn Bn cos(kn L) = 0, or [cos(kn L) − kn sin(kn L)] An + [sin(kn L) + kn cos(kn L)] Bn = 0. Eliminating An from these equations, we see that 2kn = tan(kn L), kn2 − 1

n = 1, 2, 3, . . . .

The eigenfunctions are ϕn (x) = Bn [sin(kn x) + kn cos(kn x)] . To find the value of Bn so that ϕn (x) is orthonormal, Bn2

Z

L 0



 sin2 (kn x) + 2kn sin(kn x) cos(kn x) + cos2 (kn x) dx = 1,

511

Worked Solutions 1 2 2 Bn

Z

L 0

[1 − cos(2kn x)] dx + kn Bn2

Z

+ 21 kn2 Bn2 1 2 2 Bn

L

sin(2kn x) dx 0

Z

L

[1 + cos(2kn x)] dx = 1, 0

[L − sin(2kn L)/(2kn )] + 12 Bn2 [1 − cos(2kn L)]

+ 21 kn2 Bn2 [L + sin(2kn L)/(2kn )] = 1,

or 1 2 2 Bn



 sin(kn ) cos(kn ) kn2 sin(kn L) cos(kn L) 2 2 L− = 1. + 2 sin (kn L) + kn L + kn kn

Using (kn2 − 1) sin(kn L) = 2kn cos(kn L), 1 2 2 Bn



L−

kn2 − 1 4kn2 sin2 (kn L) kn2 (kn2 − 1) 2 2 sin (k L) + + k L + sin2 (kn L) n n 2kn2 2kn2 2kn2 = 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 . Eliminating 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, g(x|ξ) = 2

∞ X

ϕ(ξ)ϕ(x) , (2 + L + kn2 L)kn2 n=1

where ϕn (x) = sin(kn x) + kn cos(kn x). 13. Solving the differential equation g ′′ − k 2 g = 0, we have g(x|ξ) =



A sinh(kx), B sinh[k(L − x)],

x < ξ, x > ξ.

These solutions satisfy the boundary conditions: g(0|ξ) = g(L|ξ) = 0. Because the Green’s function must be continuous at x = ξ, g(ξ − |ξ) = g(ξ + |ξ), or A sinh(kξ) = B sinh[k(L − ξ)]. Integrating the differential equation from x=ξ + x = ξ − to x = ξ + , g ′ (x|ξ)|x=ξ− = −1, or −kB cosh[k(L − ξ)] − kA cosh[k(L − ξ)] = −1. Therefore, A=

sinh[k(L − ξ)] , k sinh(kL)

and

B=

sinh(kξ) . k sinh(kL)

512

Advanced Engineering Mathematics with MATLAB

Therefore, g(x|ξ) =

sinh[k(L − ξ)] sinh(kx) k sinh(kL)

g(x|ξ) =

sinh(kξ) sinh[k(L − x)] k sinh(kL)

if x < ξ, and

if x > ξ. More conveniently, g(x|ξ) =

sinh(kx< ) sinh[k(L − x> )] . k sinh(kL)

To find the eigenfunction expansion, we note that p(x) = 1, q(x) = 0, r(x) = 1, and λ = −k 2 . Let λn = kn2 . The eigenfunction solution to the Sturm-Liouville problem is ϕn (x) = An sin(nπx/L) because it satisfies the boundary conditions ϕn (0) = ϕn (L) = 0. To find the value of An so that ϕn (x) is orthonormal, A2n

Z

L

sin2

0

 nπx  L

dx =

LA2n = 1. 2

p Therefore, An = 2/L. Therefore, substituting this orthonormal eigenfunctions into Equation 15.2.123, g(x|ξ) = 2L

∞ X sin(nπξ/L) sin(nπx/L) . n2 π 2 + k 2 L2 n=1

14. Solving the differential equation g ′′ − k 2 g = 0, we have g(x|ξ) =



A cosh(kx), B cosh[k(x − L)],

x < ξ, x > ξ.

These solutions satisfy the boundary conditions: g ′ (0|ξ) = g ′ (L|ξ) = 0. Because the Green’s function must be continuous at x = ξ, g(ξ − |ξ) = g(ξ + |ξ), or A cosh(kξ) = B cosh[k(ξ − L)]. Integrating the differential equation from x=ξ + x = ξ − to x = ξ + , g ′ (x|ξ)|x=ξ− = −1, or kB sinh[k(ξ − L)] − kA sin(kξ) = −1. Therefore, cosh(kξ) cosh[k(ξ − L)] , and B = . A= k sinh(kL) k sinh(kL) Therefore, g(x|ξ) =

cosh[k(L − ξ)] cosh(kx) k sinh(kL)

513

Worked Solutions if x < ξ, and g(x|ξ) =

cosh(kξ) cosh[k(L − x)] k sinh(kL)

if x > ξ. More conveniently, g(x|ξ) =

cosh(kx< ) cosh[k(L − x> )] . k sinh(kL)

To find the eigenfunction expansion, we note that p(x) = 1, q(x) = 0, r(x) = 1, and λ = −k 2 . Let λn = kn2 . The eigenfunction solution to the Sturm-Liouville problem is ϕ0 (x) = A0 and ϕn (x) = An cos(nπx/L) because it satisfies the boundary conditions ϕ′n (0) = ϕ′n (L) = 0. To find the value of An so that ϕn (x) is orthonormal, A20 and A2n

Z

Z

L 0

L

cos2 0

dx = LA20 = 1,

 nπx  L

dx =

LA2n = 1. 2

Therefore, substituting this orthonormal eigenfunctions into Equation 15.2. 123, ∞ X cos(nπξ/L) cos(nπx/L) 1 g(x|ξ) = 2 + 2L . k L n2 π 2 + k 2 L2 n=1 15. Solving the differential equation g ′′ − k 2 g = 0, we have g(x|ξ) =



A sinh(kx), B{sinh[k(x − L)] − k cosh[k(x − L)]},

x < ξ, x > ξ.

These solutions satisfy the boundary conditions: g(0|ξ) = g(L|ξ) + g ′ (L|ξ) = 0. Because the Green’s function must be continuous at x = ξ, g(ξ − |ξ) = g(ξ + |ξ), or A sinh(kξ) = B{sinh[k(ξ − L)] − k cosh[k(ξ − L)]}. Integrating x=ξ + the differential equation from x = ξ − to x = ξ + , g ′ (x|ξ)|x=ξ− = −1, or kB{cosh[k(ξ − L)] − k sinh[k(ξ − L)]} − kA cosh(kξ) = −1. Therefore, A=

sinh(kξ) k cosh[k(ξ − L)] − sinh[k(ξ − L)] , and B = − . 2 k sinh(kL) + k cosh(kL) k sinh(kL) + k 2 cosh(kL)

Therefore, g(x|ξ) =

sinh(kx){k cosh[k(ξ − L)] − sinh[k(ξ − L)]} k sinh(kL) + k 2 cosh(kL)

514

Advanced Engineering Mathematics with MATLAB

if x < ξ, and g(x|ξ) =

sinh(kξ){k cosh[k(x − L)] − sinh[k(x − L)]} k sinh(kL) + k 2 cosh(kL)

if x > ξ. More conveniently, g(x|ξ) =

sinh(kx< ){k cosh[k(x> − L)] − sinh[k(x> − L)]} . k sinh(kL) + k 2 cosh(kL)

To find the eigenfunction expansion, we note that p(x) = 1, q(x) = 0, r(x) = 1, and λ = −k 2 . Let λn = kn2 . The eigenfunction solution to the Sturm-Liouville problem is ϕn (x) = An sin(kn x) because it satisfies ϕn (0) = 0. To satisfy the boundary condition ϕn (L) + ϕ′n (L) = 0, tan(kn L) = −kn . To find the value of An so that ϕn (x) is orthonormal, Z L Z L 2 2 1 2 sin (kn x) dx = 2 An An [1 − cos(2kn x)] dx = 1, 0

or

1 2 2 An

0



L−

   sin(2kn 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 [1 + (1 + kn2 )L](kn2 + k 2 ) n=1

16. Solving the differential equation g ′′ − k 2 g = 0, we have  A sinh(kx), g(x|ξ) = B{sinh[k(x − L)] + k cosh[k(x − L)]},

x < ξ, x > ξ.

These solutions satisfy the boundary conditions: g(0|ξ) = g(L|ξ) − g ′ (L|ξ) = 0. Because the Green’s function must be continuous at x = ξ, g(ξ − |ξ) = g(ξ + |ξ), or A sinh(kξ) = B{sinh[k(ξ − L)] + k cosh[k(ξ − L)]}. Integrating x=ξ + the differential equation from x = ξ − to x = ξ + , g ′ (x|ξ)|x=ξ− = −1, or kB{cosh[k(ξ − L)] + k sinh[k(ξ − L)]} − kA cosh(kξ) = −1. Therefore, A=

sinh[k(ξ − L)] + k cosh[k(ξ − L)] sinh(kξ) and B = 2 . 2 k cosh(kL) − k sinh(kL) k cosh(kL) − k sinh(kL)

Therefore, g(x|ξ) =

sinh(kx){k cosh[k(ξ − L)] + sinh[k(ξ − L)]} k 2 cosh(kL) − k sinh(kL)

515

Worked Solutions if x < ξ, and g(x|ξ) =

sinh(kξ){k cosh[k(x − L)] + sinh[k(x − L)]} k 2 cosh(kL) − k sinh(kL)

if x > ξ. More conveniently, sinh(kx< ){k cosh[k(x> − L)] + sinh[k(x> − L)]} . k 2 cosh(kL) − k sinh(kL)

g(x|ξ) =

To find the eigenfunction expansion, we note that p(x) = 1, q(x) = 0, r(x) = 1, and λ = −k 2 . Let λn = kn2 . The eigenfunction solution to the Sturm-Liouville problem is ϕn (x) = An sin(kn x) because it satisfies ϕn (0) = 0. To satisfy the boundary condition ϕn (L) − ϕ′n (L) = 0, tan(kn L) = kn . To find the value of An so that ϕn (x) is orthonormal, A2n

Z

L 0

or 1 2 2 An

sin2 (kn x) dx = 21 A2n



L−

Z

L 0

[1 − cos(2kn x)] dx = 1,

   sin(2kn 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, g(x|ξ) = 2

∞ X (1 + kn2 ) sin(kn ξ) sin(kn x) . [(1 + kn2 )L − 1](kn2 + k 2 ) n=1

17. Solving the differential equation g ′′ − k 2 g = 0, we have  A[a sinh(kx) − k cosh(kx)], x < ξ, g(x|ξ) = B cosh[k(L − x)], x > ξ. These solutions satisfy the boundary conditions: ag(0|ξ) + g ′ (0|ξ) = g ′ (L|ξ) = 0. Because the Green’s function must be continuous at x = ξ, g(ξ − |ξ) = g(ξ + |ξ), or aA sinh(kξ) − kA cosh(kξ) = B cosh[k(L − ξ)]}. Integrating the x=ξ + differential equation from x = ξ − to x = ξ + , g ′ (x|ξ)|x=ξ− = −1, or −kB sinh[k(L − ξ)] − kA[a cosh(kξ) − k sinh(kξ)] = −1. Therefore, A=

a sinh(kξ) − k cosh(kξ) cosh[k(L − ξ)] , and B = . k[a cosh(kL) − k sinh(kL)] k[a cosh(kL) − k sinh(kL)]

516

Advanced Engineering Mathematics with MATLAB

Therefore, g(x|ξ) =

[a sinh(kx) − k cosh(kx)] cosh[k(L − ξ)] k[a cosh(kL) − k sinh(kL)]

g(x|ξ) =

[a sinh(kξ) − k cosh(kξ)] cosh[k(L − x)] k[a cosh(kL) − k sinh(kL)]

if x < ξ, and

if x > ξ. More conveniently, g(x|ξ) =

[a sinh(kx< ) − k cosh(kx< )] cosh[k(L − x> )] . k[a cosh(kL) − k sinh(kL)]

To find the eigenfunction expansion, we note that p(x) = 1, q(x) = 0, r(x) = 1, and λ = −k 2 . Let λn = kn2 . The eigenfunction solution to the Sturm-Liouville problem is ϕn (x) = An cos[kn (x − L)] because it satisfies ϕ′n (L) = 0. To satisfy the boundary condition aϕn (0) + ϕ′n (0) = 0, kn tan(kn L) = −a, where n = 1, 2, 3, . . .. To find the value of An so that ϕn (x) is orthonormal, A2n

Z

L 0

cos2 [kn (x − L)] dx = 21 A2n

or 1 2 2 An



Z

L 0

{1 + cos[2kn (x − L)]} dx = 1,

  sin(2kn L) 1 2 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 eliminating cos2 (kn L) from this equation. Therefore, substituting this orthonormal eigenfunctions into Equation 15.2.123, g(x|ξ) = 2

∞ X (a2 + kn2 ) cos[kn (ξ − L)] cos[kn (x − L)] . [(a2 + kn2 )L − a](kn2 + k 2 ) n=1

18. Solving the differential equation g ′′ − k 2 g = 0, we have g(x|ξ) =



A[sinh(kx) − k cosh(kx)], B{sinh[k(L − x)] − k cosh[k(L − x)]}

x < ξ, x > ξ.

These solutions satisfy the boundary conditions: g(0|ξ) + g ′ (0|ξ) = g(L|ξ) − g ′ (L|ξ) = 0. Because the Green’s function must be continuous at x = ξ, g(ξ − |ξ) = g(ξ + |ξ), or A[sinh(kξ) − k cosh(kξ)] = B{sinh[k(L − ξ)] −

517

Worked Solutions

k cosh[k(L−ξ)]}. Integrating the differential equation from x = ξ − to x = ξ + , x=ξ + g ′ (x|ξ)|x=ξ− = −1, or kB{− cosh[k(L − ξ)] + k sinh[k(L − ξ)]} − kA[cosh(kξ) − k sinh(kξ)] = −1. Therefore, A=

sinh[k(L − ξ)] − k cosh[k(L − ξ)] , k[(k 2 + 1) sinh(kL) − 2k cosh(kL)]

B=

sinh(kL) − k cosh(kL) . k[(k 2 + 1) sinh(kL) − 2k cosh(kL)]

and

Therefore, [sinh(kx) − k cosh(kx)]{sinh[k(L − ξ)] − k cosh[k(L − ξ)]} k[(k 2 + 1) sinh(kL) − 2k cosh(kL)]

g(x|ξ) = if x < ξ, and

[sinh(kξ) − k cosh(kξ)]{sinh[k(L − x)] − k cosh[k(L − x)]} k[(k 2 + 1) sinh(kL) − 2k cosh(kL)]

g(x|ξ) =

if x > ξ. More conveniently, g(x|ξ) =

[sinh(kx< ) − k cosh(kx< )]{sinh[k(L − x> )] − k cosh[k(L − x> )]} . k[(k 2 + 1) sinh(kL) − 2k cosh(kL)]

To find the eigenfunction expansion, we note that p(x) = 1, q(x) = 0, r(x) = 1, and λ = −k 2 . Let λn = kn2 . The eigenfunction solution to the Sturm-Liouville problem is ϕn (x) = An [sin(kn x) − kn cos(kn x)] because it satisfies ϕn (0) + ϕ′n (0) = 0. To satisfy the boundary condition ϕn (L) − ϕ′n (L) = 0, tan(kn L) = 2kn /(1 − kn2 ), where n = 1, 2, 3, . . .. To find the value of An so that ϕn (x) is orthonormal, A2n

Z

L 0



 sin2 (kn x) − 2kn sin(kn x) cos(kn x) + kn2 cos2 (kn x) dx = 1,

1 2 2 An

Z

L 0

L [1 − cos(2kn x)] dx − A2n sin2 (kn x) 0 + 12 kn2 A2n

Z

L

[1 + cos(2kn x)] dx = 1,

0

    sin(2kn L) sin(2kn L) − 2A2n sin2 (kn L) + kn2 A2n L + = 2, A2n L − 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, g(x|ξ) = 2

∞ X

ϕn (ξ)ϕn (x) , [(1 + kn2 )L − 2](kn2 + k 2 ) n=1

where ϕn (x) = sin(kn x) − kn cos(kn x). 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

1 ∂ 2 g(x, t|0, 0) = 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 x 2 t + J0 (ξ)δ(x)δ(t).

Now, J0 (ξ)δ(x)δ(t) = δ(x)δ(t), and J0′ (ξ)

J0′ (ξ)

√ x √ δ(x)H(t) = 0, 2 t

√ t √ 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 Equation 6.5.1.

519

Worked Solutions

2. With c = 1, the orthonormal eigenfunctions that satisfy the boundary conditions ϕn (0) = ϕ′ (L) = 0 are r   2 (2n − 1)πx sin ϕn (x) = L 2L with kn = (2n−1)π/(2L). Therefore, direct substitution into Equation 15.3.21 yields     ∞ X (2n − 1)πx 1 (2n − 1)πξ 4 sin sin g(x, t|ξ, τ ) = H(t − τ ) π 2n − 1 2L 2L n=1   (2n − 1)π(t − τ ) . × sin 2L 3. With c = 1, the orthonormal eigenfunctions that satisfy the boundary conditions ϕ′n (0) = ϕ′ (L) = 0 are r 1 ϕ0 (x) = with k0 = 0, L and ϕn (x) =

r

  (2n − 1)πx 2 cos L 2L

with kn = nπ/L. Therefore, direct substitution into Equation 15.3.21 yields   ∞  nπx  X t−τ 2 1 nπξ g(x, t|ξ, τ ) = cos H(t − τ ) + H(t − τ ) cos L π n L L n=1   nπ(t − τ ) . × sin L 4. With c = 1, Equation 15.4.9 becomes Z t [g(x, t|L, τ )uξ (L, τ ) − u(L, τ )gξ (x, t|L, τ )] dτ u(x, t) = 0 Z t [g(x, t|0, τ )uξ (0, τ ) − u(0, τ )gξ (x, t|0, τ )] dτ − −

Z

0

L

0

[u(ξ, 0)gτ (x, t|ξ, 0) − g(x, t|ξ, 0)uξ (ξ, 0)] dξ,

since there is no source term. The Green’s function is given by Equation 15.3.27. Next, we note that g(x, t|L, τ ) = g(x, t|0, τ ) = 0 and u(0, τ ) = u(L, τ ) = 0, as well as uτ (ξ, 0) = 0. Consequently, we have Z L u(ξ, 0)gτ (x, t|ξ, 0) dξ. u(x, t) = − 0

520

Advanced Engineering Mathematics with MATLAB

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πξ πξ nπt sin dξ cos sin cos L n=1 L L L L 0     ∞ 8 X 2mπt 2mπx m =− cos . sin L m=1 4m2 − 1 L L

=−

Thus, the solution equals     ∞ 8 X 2mπt 2mπx m u(x, t) = cos . sin L m=1 4m2 − 1 L L 5. With c = 1, Equation 15.4.9 becomes Z

u(x, t) =

t

0 Z t



Z



0

[g(x, t|L, τ )uξ (L, τ ) − u(L, τ )gξ (x, t|L, τ )] dτ [g(x, t|0, τ )uξ (0, τ ) − u(0, τ )gξ (x, t|0, τ )] dτ

L

[u(ξ, 0)gτ (x, t|ξ, 0) − g(x, t|ξ, 0)uξ (ξ, 0)] dξ,

0

since there is no source term. The Green’s function is given by Equation 15.3.27. Next, we note that g(x, t|L, τ ) = g(x, t|0, τ ) = 0 and u(L, τ ) = 0. Consequently, we have u(x, t) = +

Z

t

0 Z L

u(0, τ )gξ (x, t|0, τ ) dτ −

Z

L

u(ξ, 0)gτ (x, t|ξ, 0) dξ 0

uτ (ξ, 0)g(x, t|ξ, 0) dξ.

0

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 − τ ) e−τ sin dτ (−1)n sin L n=1 L L 0

521

Worked Solutions Z ∞ 2 X  nπx  −t t s  nπs  e sin e ds sin L n=1 L L 0

=

=2

∞ X

sin

n=1

 nπx  L

×

Z



     L nπ nπt nπt −t + , e − cos sin L2 + n2 π 2 L L2 + n2 π 2 L

L

u(ξ, 0)gτ (x, t|ξ, 0) dξ 0

Z L      ∞ nπξ πξ nπt 2 X  nπx  sin dξ sin sin cos =− L n=1 L L L L 0    πx  πt = −2 sin cos , L L

and Z

L

uτ (ξ, 0)g(x, t|ξ, 0) dξ 0

  ∞  nπx   nπt  Z L 2X1 nπξ 1 sin sin dξ sin π n=1 n L L L 0   L ∞  nπx   nπt  2L X 1 nπξ =− 2 sin cos sin π n=1 n2 L L L 0     ∞ (2m − 1)πt (2m − 1)πx 1 4L X sin . sin = 2 π m=1 (2m − 1)2 L L

=

Thus, the solution equals

u(x, t) = 2

∞ X

n=1

sin

 nπx  L

     L nπ nπt nπt −t + e − cos sin L2 + n2 π 2 L L2 + n2 π 2 L    πx  πt + 2 sin cos L L     ∞ X (2m − 1)πt 4L (2m − 1)πx 1 sin . sin + 2 π m=1 (2m − 1)2 L L ×



522

Advanced Engineering Mathematics with MATLAB

6. With c = 1, Equation 15.4.9 becomes Z t [g(x, t|L, τ )uξ (L, τ ) − u(L, τ )gξ (x, t|L, τ )] dτ u(x, t) = 0 Z t [g(x, t|0, τ )uξ (0, τ ) − u(0, τ )gξ (x, t|0, τ )] dτ − −

Z

0

L

0

[u(ξ, 0)gτ (x, t|ξ, 0) − g(x, t|ξ, 0)uξ (ξ, 0)] dξ,

since there is no source term. The Green’s function is given by Problem 2 in the section. Next, we note that g(x, t|0, τ ) = gξ (x, t|L, τ ) = 0 and u(0, τ ) = 0. Consequently, we have Z L Z t u(ξ, 0)gτ (x, t|ξ, 0) dξ uξ (L, τ )g(x, t|L, τ ) dτ − u(x, t) = +

Z

0

0 L

uτ (ξ, 0)g(x, t|ξ, 0) dξ. 0

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

L

u(ξ, 0)gτ (x, t|ξ, 0) dξ 0

and Z L 0

Z t    ∞ 4 X (−1)n+1 (2n − 1)π(t − τ ) (2n − 1)πx sin = dτ sin π n=1 2n − 1 2L 2L 0    τ =t  ∞ 8L X (−1)n+1 (2n − 1)π(t − τ ) (2n − 1)πx = 2 cos sin π n=1 (2n − 1)2 2L 2L τ =0      ∞ 8L X (−1)n+1 (2n − 1)πt (2n − 1)πx 1 − cos , =− 2 sin 2 π n=1 (2n − 1) 2L 2L

   Z L   ∞ 2 X (2n − 1)πξ (2n − 1)πt (2n − 1)πx =− ξ sin cos dξ sin L n=1 2L 2L 2L 0     ∞ 8L X (−1)n+1 (2n − 1)πt (2n − 1)πx =− 2 cos , sin π n=1 (2n − 1)2 2L 2L

uτ (ξ, 0)g(x, t|ξ, 0) dξ

523

Worked Solutions

   Z L   ∞ 4X (2n − 1)πξ (2n − 1)πt (2n − 1)πx 1 1 sin sin dξ sin π n=1 2n = 1 2L 2L 2L 0      L  ∞ (2n − 1)πt (2n − 1)πξ (2n − 1)πx 1 8L X sin cos sin =− 2 π n=1 (2n − 1)2 2L 2L 2L 0     ∞ 8L X (2n − 1)πt (2n − 1)πx 1 sin . = 2 sin 2 π n=1 (2n − 1) 2L 2L =

Thus, the solution equals     ∞ 8L X (−1)n+1 (2n − 1)πt (2n − 1)πx u(x, t) = − 2 1 − cos sin π n=1 (2n − 1)2 2L 2L     ∞ 8L X (−1)n+1 (2n − 1)πt (2n − 1)πx cos + 2 sin π n=1 (2n − 1)2 2L 2L     ∞ 8L X (2n − 1)πt (2n − 1)πx 1 sin . − 2 sin π n=1 (2n − 1)2 2L 2L 7. With c = 1, Equation 15.4.9 becomes Z t [g(x, t|L, τ )uξ (L, τ ) − u(L, τ )gξ (x, t|L, τ )] dτ u(x, t) = 0 Z t [g(x, t|0, τ )uξ (0, τ ) − u(0, τ )gξ (x, t|0, τ )] dτ − −

Z

0

L

0

[u(ξ, 0)gτ (x, t|ξ, 0) − g(x, t|ξ, 0)uξ (ξ, 0)] dξ,

since there is no source term. The Green’s function is given by Problem 3 in the section. Next, we note that gξ (x, t|0, τ ) = gξ (x, t|L, τ ) = 0 and uξ (L, τ ) = uτ (ξ, 0) = 0. Consequently, we have Z L Z t u(ξ, 0)gτ (x, t|ξ, 0) dξ. uξ (0, τ )g(x, t|0, τ ) dτ − u(x, t) = − 0

0

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τ L 0 0 ∞  nπx  Z t  nπ(t − τ )  2X1 + dτ sin cos π n=1 n L L 0   ∞  nπx   t2 nπt 2L X 1 = , 1 − cos cos + 2 2L π n=1 n2 L L

524

Advanced Engineering Mathematics with MATLAB

and Z

L 0

Z 1 L u(ξ, 0)gτ (x, t|ξ, 0) dξ = − 1 dξ L 0 Z L    ∞  nπx  2 X nπξ nπt − dξ cos cos cos L n=1 L L L 0 = −1.

Thus, the solution equals   ∞  nπx   t2 2L X 1 nπt u(x, t) = 1 − . 1 − cos − 2 cos 2L π n=1 n2 L L Section 15.5 1. Let us define 1 G(x, s|ξ, τ ) = 2π where G(k, s|ξ, τ ) = Because

and

Z

∞ −∞

Z

Z

Z



G(k, s|ξ, τ )eikx dk,

−∞



G(x, s|ξ, τ )e−ikx dx.

−∞

d2 G −ikx e dx = −k 2 G(k, s|ξ, τ ), dx2

∞ −∞

dG −ikx e dx = ikG(k, s|ξ, τ ), dx

the Fourier transform of the differential equation in Step 1 is [bk 2 + ikv − a + s]G(k, s|ξ, τ ) = e−ikξ−sτ , G(k, s|ξ, τ ) =

e−ikξ−sτ . bk 2 + ikv + s − a

Taking the inverse Fourier transform, e−sτ G(x, s|ξ, τ ) = 2π

Z

∞ −∞

eik(x−ξ) dk. s − a + bk 2 + ikv

525

Worked Solutions Finally, taking the inverse Laplace transform, H(t − τ ) 2π

g(x, t|ξ, τ ) =

Z



e(a−bk

−∞

ea(t−τ ) H(t − τ ) 2π

=

ea(t−τ ) = H(t − τ ) π

Z Z

2

−ikv)(t−τ ) ik(x−ξ)

e

∞ 0

dk

2

e−(bk +ikv)(t−τ )+ik(x−ξ) dk  Z ∞ 2 e−(bk −ikv)(t−τ )−ik(x−ξ) dk + 0



e−bk

0

2

(t−τ )

cos{k[x − ξ − v(t − τ )]} dk,

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. 2. Because there is no soureces, Equation 15.5.6 simplies to u(x, t) = − +

Z

t

0 Z t

Z

0

[g(x, t|∞, τ )uξ (∞, τ ) − u(∞, τ )gξ (x, t|∞, τ )] dτ [g(x, t| − ∞, τ )uξ (−∞, τ ) − u(−∞, τ )gξ (x, t|∞, τ )] dτ



u(ξ, 0)g(x, t|ξ, 0) dξ.

0

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 vanishes. Therefore, the third integral gives u(x, t) and 1 u(x, t) = √ πa2 t

Z

∞ 0

    2 xξ x + ξ2 sinh dξ. f (ξ) exp − 4a2 t 2a2 t

3. Because ϕn (x) =

r

  (2n − 1)πx 2 sin L 2L

and

kn =

(2n − 1)π , 2L

Equation 15.5.30 with a = 1 gives ∞     2 X (2n − 1)πx (2n − 1)πξ g(x, t|ξ, τ ) = sin sin L n=1 2L 2L   (2n − 1)2 π 2 (t − τ ) H(t − τ ). × exp − 4L2

526

Advanced Engineering Mathematics with MATLAB p

1/L with k0 = 0 and r  nπx  2 ϕn (x) = with cos L L

4. Because ϕ0 (x) =

kn =

nπ , L

Equation 15.5.30 with a = 1 gives

H(t − τ ) L ∞   2 2    nπx  2 X n π (t − τ ) nπξ cos exp − + H(t − τ ). cos L n=1 L L L2

g(x, t|ξ, τ ) =

5. Because there is no soureces, Equation 15.5.6 simplies to Z t [g(x, t|L, τ )uξ (L, τ ) − u(L, τ )gξ (x, t|L, τ )] dτ u(x, t) = 0 Z t [g(x, t|0, τ )uξ (0, τ ) − u(0, τ )gξ (x, t|0, τ )] dτ − +

Z

0

L

u(ξ, 0)g(x, t|ξ, 0) dξ. 0

Now, g(x, t|L, τ ) = g(x, t|0, τ ) = 0 as well as u(L, τ ) = 0. Therefore, we only have to evaluate Z t u(0, τ )gξ (x, t|0, τ ) dτ 0

and Z

 2 2  ∞  nπx  2 X nπ n π t = sin exp − 2 L n=1 L L L  2 2  Z t n π τ exp × − τ dτ L2 0  2 2  ∞  nπx   X n π t n −t e − exp − 2 , = 2π sin 2 π 2 − L2 n L L n=1

L

u(ξ, 0)g(x, t|ξ, 0) dξ 0

  2 2 Z L  ∞ 2 X  nπx  nπξ n π t = dξ sin sin exp − 2 L n=1 L L L 0  2 2  ∞  nπx  2 X 1 − (−1)n n π t = sin exp − 2 π n=1 n L L     ∞ (2m − 1)2 π 2 t 4 X (2m − 1)πx 1 exp − = . sin π m=1 2m − 1 L L2

527

Worked Solutions Substituting these results into the first equation,  2 2  ∞  nπx   X n n π t −t u(x, t) = 2π e − exp − 2 sin 2 π 2 − L2 n L L n=1     ∞ (2m − 1)2 π 2 t 4 X (2m − 1)πx 1 + exp − . sin π m=1 2m − 1 L L2 6. Because there is no soureces, Equation 15.5.6 simplies to Z t [g(x, t|L, τ )uξ (L, τ ) − u(L, τ )gξ (x, t|L, τ )] dτ u(x, t) = 0 Z t [g(x, t|0, τ )uξ (0, τ ) − u(0, τ )gξ (x, t|0, τ )] dτ − +

Z

0

L

u(ξ, 0)g(x, t|ξ, 0) dξ. 0

Now, g(x, t|0, τ ) = gξ (x, t|L, τ ) = 0 as well as uξ (L, τ ) = 0. Therefore, we only have to evaluate Z t u(0, τ )gξ (x, t|0, τ ) dτ 0

and Z L 0

    ∞ (2n − 1)2 π 2 t (2n − 1)πx π X exp − (2n − 1) sin = 2 L n=1 2L 4L2   Z t (2n − 1)2 π 2 τ sin(τ ) exp × dτ 4L2 0   ∞ X (2n − 1)πx 2n − 1 sin = 16πL2 (2n − 1)4 π 4 + 16L4 2L n=1    2 2 (2n − 1)2 π 2 t (2n − 1) π , sin(t) − cos(t) − exp − × 4L2 4L2

u(ξ, 0)g(x, t|ξ, 0) dξ    Z L   ∞ 2 X (2n − 1)2 π 2 t (2n − 1)πξ (2n − 1)πx exp − dξ sin sin L n=1 2L 4L2 2L 0     ∞ 2 X (2n − 1)2 π 2 t (2n − 1)πx 2L = exp − sin L n=1 (2n − 1)π 2L 4L2     ∞ (2n − 1)2 π 2 t 4X 1 (2n − 1)πx exp − = . sin π n=1 2n − 1 2L 4L2 =

528

Advanced Engineering Mathematics with MATLAB

Substituting these results into the first equation,   2n − 1 (2n − 1)πx u(x, t) = 16πL sin (2n − 1)4 π 4 + 16L4 2L n=1    2 2 (2n − 1)2 π 2 t (2n − 1) π sin(t) − cos(t) − exp − × 4L2 4L2     ∞ (2n − 1)2 π 2 t (2n − 1)πx 4X 1 exp − . sin + π n=1 2n − 1 2L 4L2 2

∞ X

7. Because there is no soureces, Equation 15.5.6 simplies to u(x, t) = − +

Z

t

0 Z t

Z

0

[g(x, t|L, τ )uξ (L, τ ) − u(L, τ )gξ (x, t|L, τ )] dτ [g(x, t|0, τ )uξ (0, τ ) − u(0, τ )gξ (x, t|0, τ )] dτ

L

u(ξ, 0)g(x, t|ξ, 0) dξ. 0

Now, gξ (x, t|0, τ ) = gξ (x, t|L, τ ) = 0 as well as uξ (L, τ ) = 0. Therefore, we only have to evaluate Z

t

0

uξ (0, τ )g(x, t|0, τ ) dτ  2 2   2 2 Z t ∞  nπx  n π τ 2 X n π t dτ exp cos exp − 2 L L L L2 0 0 n=1  2 2  ∞  nπx   n π t t 2L X 1 1 − exp − 2 = + 2 , cos L π n=1 n2 L L

=

and Z L

1 L

Z

t

dτ +

u(ξ, 0)g(x, t|ξ, 0) dξ

0

=

Z

L 0

= 1.

  2 2 Z L  ∞  nπx  dξ n π t nπξ 2 X cos exp − 2 dξ + cos L L n=1 L L L 0

Substituting these results into the first equation, u(x, t) = 1 −

 2 2  ∞  nπx   t n π t 2L X 1 1 − exp − 2 . − 2 cos 2 L π n=1 n L L

529

Worked Solutions

8. Taking the Laplace transform of the partial differential equation, we find that d2 G −a2 2 + a2 k 2 G + sG = δ(x − ξ)e−sτ , dx with the boundary conditions G(0, s|ξ, τ ) = G′ (L, s|ξ, τ ) = 0. Assuming that G(x, s|ξ, τ ) and the delta function can be written as a generalized Fourier series that satisfies the boundary conditions ϕn (0) = ϕ′n (L) = 0, namely  (2n − 1)πx , Gn sin G(x, s|ξ, τ ) = 2L n=1 ∞ X

and δ(x − ξ) = we find 



    ∞ (2n − 1)πx 2 X (2n − 1)πξ sin , sin L n=1 2L 2L

   (2n − 1)2 π 2 a2 2 (2n − 1)πξ 2 2 . + a k + s Gn = sin 4L2 L 2L

Therefore, Gn = and G(x, s|ξ, τ ) =

sin[(2n − 1)πξ/(2L)] 2 e−sτ , 2 L s + a k 2 + (2n − 1)2 π 2 a2 /(4L2 ) ∞ 2 X e−sτ L n=1 s + a2 k 2 + (2n − 1)2 π 2 a2 /(4L2 )     (2n − 1)πξ (2n − 1)πx × sin sin . 2L 2L

Taking the inverse of G(x, s|ξ, τ ), the final answer is     ∞ X 2 −a2 k2 (t−τ ) (2n − 1)πx (2n − 1)πξ sin g(x, t|ξ, τ ) = e sin H(t − τ ) L 2L 2L n=1   2 2 2 (2n − 1) π a (t − τ ) . × exp − 4L2 Section 15.6 1. Because we have    ∞ nπx  2X nπξ sin δ(x − ξ) = sin , a n=1 a a

530

Advanced Engineering Mathematics with MATLAB

we write



∞ X

nπξ Gn (y|η) sin g(x, y|ξ, η) = a n=1



sin

 nπx  a

.

This solution satisfies the boundary conditions at x = 0 and x = a. Substituting these equations into the partial differential equation and equating the various harmonics, we obtain the ordinary differential equation d2 Gn n2 π 2 2 − 2 Gn = − δ(y − η) 2 dy a a with the boundary conditions lim |Gn (y|η)| < ∞.

|y|→∞

Solving this differential equation following Example 13.2.8, Gn (y|η) = Therefore, the final answer is

 nπ  1 exp − |y − η| . nπ a

∞  nπ   nπξ   nπx  1X1 sin . exp − |y − η| sin g(x, y|ξ, η) = π n=1 n a a a

2. Because we have     ∞ 2X (2n − 1)πx (2n − 1)πξ δ(x − ξ) = cos , cos a n=1 2a 2a we write g(x, y|ξ, η) =

∞ X

Gn (y|η) cos

n=1



   (2n − 1)πx (2n − 1)πξ cos . 2a 2a

This solution satisfies the boundary conditions at x = 0 and x = a. Substituting these equations into the partial differential equation and equating the various harmonics, we obtain the ordinary differential equation d2 Gn (2n − 1)2 π 2 2 − Gn = − δ(y − η) 2 dy 4a2 a with the boundary conditions lim |Gn (y|η)| < ∞.

|y|→∞

531

Worked Solutions Solving this differential equation following Example 13.2.8, Gn (y|η) =

  (2n − 1)π 2 exp − |y − η| . (2n − 1)π 2a

Therefore, the final answer is   ∞ 2X 1 (2n − 1)π g(x, y|ξ, η) = exp − |y − η| π n=1 2n − 1 2a     (2n − 1)πx (2n − 1)πξ cos . × cos 2a 2a 3. Because we have δ(y − η) = we write g(x, y|ξ, η) =

∞ 2 X  nπη   nπy  sin , sin b n=1 b b

∞ X

Gn (x|ξ) sin

n=1

 nπη  b

sin

 nπy  b

.

This solution satisfies the boundary conditions at y = 0 and y = b. Substituting these equations into the partial differential equation and equating the various harmonics, we obtain the ordinary differential equation n2 π 2 2 d2 Gn − Gn = − δ(x − ξ) dx2 b2 b with the boundary conditions Gn (0|ξ) = 0

and

G′n (a|ξ) + βGn (a|ξ) = 0.

Solving this differential equation following Example 13.2.8, Gn (x|ξ) = A sinh(nπx/b), and

0 < x < ξ,

     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π nπ(a − ξ) nπ(a − ξ) + . cosh A sinh(nπξ/b) = B β sinh b b b

532

Advanced Engineering Mathematics with MATLAB

On the other hand, integrating the ordinary differential equation from x = ξ − to x = ξ + gives the second condition, or −νB {β cosh[ν(a − ξ)] + ν sinh[ν(a − ξ)]} − Aν cosh(νξ) = −1, where ν = nπ/b. Solving for A and B, A=

β sinh[ν(a − ξ)] + ν cosh[ν(a − ξ)] , νβ sinh(νa) + ν 2 cosh(νa)

and B=

sinh(νξ) . νβ sinh(νa) + ν 2 cosh(νa)

Therefore, we can write the Green’s function with the single expression g(x, y|ξ, η) =

∞ X sinh(νx< ) {ν cosh [ν(a − x> )] + β sinh [ν(a − x> )]}

n=1

ν 2 cosh(νa) + βν sinh(νa)  nπη   nπy  × sin sin , b b

where ν = nπ/b, x> = max(x, ξ), and x< = min(x, ξ). 4. From the form of the delta function, we have that g(r, θ|ρ, θ′ ) = g0 (r|ρ) +

∞ X

n=1

gn (r|ρ) cos[n(θ − θ′ )].

Turning to the g0 (r|ρ) term first, it is given by   dg0 δ(r − ρ) d r =− . dr dr 2π The solution to this ordinary differential equation that satisfies the boundary conditions g0 (a|ρ) = g0 (b|ρ) = 0 is g0 (r|ρ) = A ln(r/a),

a < r < ρ,

g0 (r|ρ) = B ln(b/r),

ρ < r < b.

and From the continuity requirement on the Green’s function, A ln(ρ/a) = B ln(b/ρ). Integrating the ordinary differential equation from r = ρ− to r = ρ+ , the second condition is ρ+ dg0 1 r =− , dr ρ− 2π

533

Worked Solutions or B+A=

1 . 2π

Solving for A and B, we find that ln(b/a)A =

ln(b/ρ) , 2π

ln(b/a)B =

ln(ρ/a) . 2π

and

Therefore, the g0 (r|ρ) can be written g0 (r|ρ) =

ln(r< /a) ln(b/r> ) , 2π ln(b/a)

where r> = max(r, ρ) and r< = min(r, ρ). Similarly, the differential equation for gn (r|ρ) is   1 d dgn n2 δ(r − ρ) r − 2 gn = − . r dr dr r πr The solution to this ordinary differential equation that satisfies the boundary conditions gn (a|ρ) = gn (b|ρ) = 0 is   n an r a < r < ρ, gn (r|ρ) = A n − n , a r and gn (r|ρ) = B



 rn bn . − bn rn

ρ < r < b.

From the continuity requirement on the Green’s function,  n   n  ρ ρ an bn A n − n =B n − n . a ρ b ρ Integrating the ordinary differential equation from r = ρ− to r = ρ+ , the second condition is ρ+ 1 dgn =− , r dr ρ− π or

  n  1 ρ bn an ρn B n + n −A n + n =− . b ρ a ρ nπ 

Solving for A and B, 2A



   1 ρn an bn bn = − , − − an bn nπ bn ρn

534

Advanced Engineering Mathematics with MATLAB

and 2B Therefore,



   1 ρn an an bn = − . − − an bn nπ an ρn

  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 g(r, θ|ρ, θ′ ) = +

ln(r< /a) ln(b/r> ) 2π ln(b/a) ∞ 1 X cos[n(θ − θ′ )]



n=1

n [1 −

(a/b)2n ]

n n r< − a2n /r
− r> /b2n .

5. From the form of the delta function, we have that     ∞ X nπθ nπθ′ sin . gn (r|ρ) sin g(r, θ|ρ, θ′ ) = β β n=1 Substituting into the partial differential equation and equating harmonics,   dgn n2 π 2 2 1 d r − 2 2 gn = − δ(r − ρ). r dr dr β r βr The solution to this ordinary differential equation that satisfies the boundary conditions lim |gn (r|ρ)| < ∞

r→0

is

and

 nπ/β r , gn (r|ρ) = A ρ

and gn (r|ρ) = B

 ρ nπ/β

lim |gn (r|ρ)| < ∞,

r→∞

0 < r < ρ,

, ρ < 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 ρ+ 2 dgn =− , r dr ρ− β

535

Worked Solutions or

2 . β

nπB + nπA = Solving for A and B, A=B= Therefore,

1 . nπ

 nπ/β r , ρ

gn (r|ρ) =

1 nπ

gn (r|ρ) =

1  ρ nπ/β , nπ r

and

0 < r < ρ,

ρ < r < ∞.

Therefore, the final solution is

    ∞ nπθ nπθ′ 1 X 1 nπ/β −nπ/β sin . r r> sin g(r, θ|ρ, θ ) = π n=1 n < β β ′

6. From the form of the delta function, we have that g(r, θ|ρ, θ′ ) =

∞ X

gn (r|ρ) sin

n=1



nπθ′ β



sin



nπθ β



.

Substituting into the partial differential equation and equating harmonics,   1 d dgn n2 π 2 2 r − 2 2 gn = − δ(r − ρ). r dr dr β r βr The solution to this ordinary differential equation that satisfies the boundary conditions lim |gn (r|ρ)| < ∞ and gn (a|ρ) = 0, r→0

is gn (r|ρ) = A and gn (r|ρ) = B

 r nπ/β a

,

0 < r < ρ,

   r nπ/β  a nπ/β , − a r

ρ < r ≤ a.

From the continuity requirement on the Green’s function, A

 ρ nπ/β a

=B

"

 ρ nπ/β a

 nπ/β # a . − ρ

536

Advanced Engineering Mathematics with MATLAB

Integrating the ordinary differential equation from r = ρ− to r = ρ+ , the second condition is ρ+ dgn 2 r =− , dr − β ρ

or

nπB

"  ρ nπ/β

 nπ/β #  ρ nπ/β a − nπA + = −2. ρ a

a

Solving for A and B, "  nπ/β # a 1  ρ nπ/β , − A=− nπ a ρ and

1  ρ nπ/β . nπ a Therefore, Therefore, the final solution is "  # ∞ nπ/β  r nπ/β a 1 X 1  r< nπ/β > ′ g(r, θ|ρ, θ ) = − π n=1 n a r> a     nπθ nπθ′ sin . × sin β β B=−

7. Because δ(z − ζ) = then g(r, z|ρ, ζ) =

   ∞ 2 X nπz  nπζ sin , sin L n=1 L L

∞ X

gn (r|ρ) sin

n=1



nπζ L



sin

 nπz  L

.

Substituting into the partial differential equation and equating harmonics, 1 dgn n2 π 2 δ(r − ρ) d2 g n + − gn = − . dr2 r dr L2 πLr Now

    ∞ δ(r − ρ) km r km ρ 1 X 1 J , J = 0 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 g(r|ρ) =

∞ X

m=1

Anm J0



km ρ a



J0



km r a



.

537

Worked Solutions

Substituting this solution into the differential equation and equating harmonics,  2  km 2 n2 π 2 = + , a2 L2 πa2 LJ12 (km ) or Anm =

2 2 /a2 πa2 LJ12 (km )(km

+ n2 π 2 /L2 )

.

Therefore, the final answer is g(r, z|ρ, ζ) =

∞ ∞ 2 XX J0 (km ρ/a)J0 (km r/a) 2 /a2 + n2 π 2 /L2 ) πa2 L n=1 m=1 πa2 LJ12 (km )(km    nπz  nπζ × sin sin . L L

8. Because δ(x − ξ) = and δ(y − η) = where α0 =

1 2

  ∞  nπx  nπξ 2X cos αn cos a n=0 a a

∞  mπη   mπy  2 X αm cos cos , b m=0 b b

and αn = 1 for n > 0, then

g(x, y|ξ, η) =

∞ ∞ X X

Gnm cos

n=0 m=0



nπξ a



cos

 nπx  a

cos

 mπη  b

cos

 mπy  b

.

Substituting g(x, y|ξ, η) into the partial differential equation and equating harmonics,   n2 π 2 4 m2 π 2 2 k0 − 2 − Gnm = − αn αm , 2 a b ab or Gnm =

4 αn αm . ab n2 π 2 /a2 + m2 π 2 /b2 − k02

Therefore, the final solution is g(x, y|ξ, η) =

  ∞ ∞ αn αm nπξ 4 XX cos Gnm 2 2 2 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

9. From the definition of Fourier sine transform given in the textbook, we have that Z ∞ 2 ∂ g sin(kx) dx = −k 2 G(k, y|ξ, η), ∂x2 0 Z ∞ 2 ∂ g d2 G(k, y|ξ, η) sin(kx) dx = , 2 ∂y dy 2 0 and Z ∞ 0

δ(x − ξ)δ(y − η) sin(kx) dx = sin(kξ)δ(y − η).

Therefore, the partial differential equation and boundary conditions becomes d2 G − k 2 G = − sin(kξ)δ(y − η), dy 2

and G(k, 0|ξ, η) = 0,

and

lim |G(k, y|ξ, η)| < ∞.

y→∞

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 η− Substituting Gp into this equation, we find that

sin(kξ) −k|y−η| e . 2k The homogeneous solution is GH (k, y|ξ, η) = Be−k(y+η) . Therefore, the general solution is sin(kξ) −k|y−η| G(k, y|ξ, η) = e + Be−k(y+η) . 2k The constant B must be chosen so that G(k, 0|ξ, η) = 0. This yields i sin(kξ) h −k|y−η| G(k, y|ξ, η) = e − e−k(y+η) . 2k Taking the inverse of the Fourier sine transform and the integral tables, Z i 1 ∞ h −k|y−η| dk g(x, y|ξ, η) = e − e−k(y+η) sin(kξ) sin(kx) π 0 k   2 2 1 (x + ξ) + (y − η) = ln 4π (x − ξ)2 + (y − η)2   (x + ξ)2 + (y + η)2 1 ln − 4π (x − ξ)2 + (y + η)2   1 [(x − ξ)2 + (y − η)2 ][(x + ξ)2 + (y + η)2 ] =− . ln 4π [(x − ξ)2 + (y + η)2 ][(x + ξ)2 + (y − η)2 ] Gp (k, y|ξ, η) =

539

Worked Solutions

10. From the definition of Fourier transform given in the textbook, we have that Z ∞ 2 ∂ g −ikx e dx = −k 2 G(k, y|ξ, η), 2 −∞ ∂x Z ∞ 2 ∂ g −ikx d2 G(k, y|ξ, η) e dx = , 2 dy 2 −∞ ∂y and

Z

∞ −∞

δ(x − ξ)δ(y − η)e−ikx dx = e−ikx δ(y − η).

Therefore, the partial differential equation and boundary conditions becomes  d2 G − k 2 + 1 G = −e−ikx δ(y − η). 2 dy Let

Z

1 2π

G(k, y|ξ, η) = where G(k, ℓ|ξ, η) =

Z



G(k, ℓ|ξ, η)eiℓy dℓ,

−∞



G(k, y|ξ, η)e−iℓy dy.

−∞

Then, the Fourier transform of the ordinary differential equation is  ℓ2 + k 2 + 1 G(k, ℓ|ξ, η) = e−ikx−iℓy .

Taking the inverse Fourier transforms in both k and ℓ, g(x, y|ξ, η) = =

1 4π 2 1 4π 2

Z Z



Z



eik(x−ξ) eiℓ(y−η) dℓ dk ℓ2 + k 2 + 1

−∞ −∞ ∞ Z 2π irκ cos(θ−ϕ)

e

dθ κ dκ  2π−ϕ 1 κ irκ cos(ψ) = e dψ 2 dκ 4π 2 0 κ +1 −ϕ # " Z ∞ Z 2π−ϕ−π/2 1 κ = e−irκ sin(θ) dθ 2 dκ 4π 2 0 κ +1 −ϕ−π/2 Z ∞ J0 (κr) K0 (r) 1 κ dκ = , = 2π 0 κ2 + 1 2π Z

0

0

∞ Z

κ2 + 1

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

11. If g(x, y|ξ, η) = ex/2 ϕ(x, y|ξ, η), then gx (x, y|ξ, η) = 12 ex/2 ϕ(x, y|ξ, η) + ex/2 ϕx (x, y|ξ, η), 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|ξ, η). The partial differential equation becomes ϕxx + ϕyy − 14 ϕ = −e−x/2 δ(x − ξ)δ(y − η). To solve the partial differential equation, we follow very closely the previous 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 ϕ(x, y|ξ, η) =

e−ξ/2 4π 2

Z

∞ −∞

Z

∞ −∞

eik(x−ξ) eiℓ(y−η) dℓ dk ℓ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}

541

Worked Solutions 2. The possible configurations is given by the matrix 1, 1 2, 1 3, 1 4, 1 5, 1 6, 1

1, 2 2, 2 3, 2 4, 2 5, 2 6, 2

1, 3 2, 3 3, 3 4, 3 5, 3 6, 3

1, 4 2, 4 3, 4 4, 4 5, 4 6, 4

1, 5 2, 5 3, 5 4, 5 5, 5 6, 5

1, 6 2, 6 3, 6 4, 6 5, 6 6, 6

Therefore, there are 36 possible configurations. Of those 36 configurations, six throws have a sum of seven: (6, 1), (5, 2), (4, 3), (5, 2) and (6, 1). Thus, the probability of throwing a seven using two dice is 6/36 or 1/6. 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. Therefore, 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) 6! 4!2!

 2  4 1 1 15 = = 0.2344 2 2 16

6! P (X = 3) = 3!3!

 3  3 1 1 20 = = 0.3125 2 2 64

P (X = 2) = (b)

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. 8. The number of possible combinations is 4! = 24. Of these 24 combinations there are 4 possible ways that there are boys at the end: b1, g1, g2, b2; b1, g2, g1, b2; b2, g1, g2, b1 and b2, g2, g1, b1. Therefore, the probability is 4 1 P (A) = = . 24 6

542

Advanced Engineering Mathematics with MATLAB

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, P (A) =

Area covered by set A π = . Area covered by set S 4

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 )       4 4 4 48 3 + = = 51 51 51 51 52

13. P (red) = P (red|H)P (H) + P (red|T )P (T ) =



4 10

     1 1 6 1 + = . 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) P (D) = P (E)P (D|E) + P (C)P (D|C) = (0.2)(0.2) + (0.8)(0.3) = 0.28 (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.

543

Worked Solutions 16. Here we have p = 0.01 and n = 3. Then P3 (3) =

3! (0.01)3 = 1 × 10−6 , 3!0!

3! (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! P3 (2) =

and P3 (0) =

3! (0.99)3 = 0.9703. 0!3!

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % MATLAB Code For Experimenting % with Intrinsic Function rand % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% clear; N = 100; tests = 100; for j = 1:tests X1 = rand(1,N); icount = 0; for i = 1:N if (X1(i) 0) zzz(itest) = mean(ttau); end clear t tau ttau x y 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) plot(xxx,y fit,’-k’,xxx,z fit,’--k’,xxx,yyy,’+’,xxx,zzz,’o’,... ’LineWidth’,2,’MarkerSize’,10) xlabel(’h^{1/2}’,’FontSize’,20); ylabel(’mean time’,’FontSize’,20);

593

Worked Solutions

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % 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 type = 1:3 if (type == 1) sigma = if (type == 2) sigma = if (type == 3) sigma = temp3 = sqrt(h)*sigma;

1.5; end 2.0; end 2.5; end temp4 = sigma*sigma*h;

for i = 1:41 interest(i) = 0.25*(i-1); m = 0; iD = interest(i)*D/100; temp2 = iD*h; for j = 1:M % take M realizations %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % Milstein method % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% x(1) = X0; % introduce initial condition for k = 1:N-1 % take N steps Delta W = temp3*randn; % ∆Wn temp5 = 1 + temp1 + Delta W + 0.5*(Delta W*Delta W-temp4); x(k+1) = temp5*x(k) - temp2;

594

Advanced Engineering Mathematics with MATLAB

if (x(k+1)