Vous êtes sur la page 1sur 44

Solutions to Problems in Chapter Nine

Solutions to Test Your Understanding Problems


T9.1-1 The sessions are:
(a)
syms x
E1 = x^3-15*x^2+75*x-125;
E2 = (x+5)^2-20*x;
S1 = E1*E2;
factor(S1)
ans =
(x-5)^5
S2 = E1/E2;
simplify(S2)
ans =
x-5
S3 = E1+E2;
G = sym(subs(S3,x,7.1))
G =
7696088813222736*2^(-49)
G = simplify(G)
G =
481005550826421/35184372088832
H = double(G)
H =
13.6710

T9.2-1 The session is:


syms x
solve(sqrt(1-x^2)-x)
ans =
1/2*2^(1/2)

T9.2-2 The session is:


S = solve(0x+6*y=a0 ,0 2*x-3*y=90);
S.x
ans =
9-1

18/5+1/5*a
S.y
ans =
-3/5+2/15*a

T9.2-3 After the session shown at the end of Example 9.2-1, type
subs(S.y,b,sqrt(3))
ans =
4.7320
3.0180

T9.3-1 The session is:


syms x
E = diff(sinh(3*x)*cosh(5*x));
subs(E,x,0.2)
ans =
9.2288

T9.3-2 The session is:


syms x y
diff(5*cosh(2*x)*log(4*y),y)
ans =
5*cosh(2*x)/y

T9.3-3 The session is:


syms x
int(x*sin(3*x))
ans =
1/9*sin(3*x)-1/3*x*cos(3*x)

T9.3-4 The session is:


syms x y
int(6*y^2*tan(8*x),y)
ans =
2*y^3*tan(8*x)

9-2

T9.3-5 The session is:


syms x
E = int(x*sin(3*x));
subs(E,x,5)-subs(E,x,-2)
ans =
0.6672

T9.3-6 The session is:


syms x
taylor(cos(x),5)
ans =
1-1/2*x^2+1/24*x^4

T9.3-7 The session is:


syms m
symsum(m^3)
ans =
1/4*m^4-1/2*m^3+1/4*m^2

T9.3-8 The session is:


syms x
symsum(cos(pi*x),0,7)
ans =
0

T9.3-9 The session is:


syms x
limit((2*x-10)/(x^3-125),5)
ans =
2/75

9-3

T9.4-1 The session is:


dsolve(0D2y+b^2*y=00)
ans =
C1*cos(b*t)+C2*sin(b*t)

T9.4-2 The session is:


dsolve(0D2y+b^2*y = 00 ,0 y(0) = 10 ,0 Dy(0) = 00 )
ans =
cos(b*t))

T9.5-1 The session is:


syms a b t
laplace(1-exp(-a*t))
ans =
1/s-1/(s+a)
ilaplace(ans)
ans =
1-exp(-a*t)
laplace(cos(b*t))
ans =
s/(s^2+b^2)
ilaplace(ans)
ans =
cos(b*t)

T9.5-2 Applying the Laplace transform to the equation gives


5[s2 Y (s) 5s 1] + 20[sY (s) 5] + 15Y (s) = 30U (s) 4sU (s)
Solve for Y (s) using U (s) = 1/s.
Y (s) =

25s2 + 101s + 30
s(5s2 + 20s + 15)

The session is:


syms s
ilaplace((25*s^2+101*s+30)/(s*(5*s^2+20*s+15))
ans =
2-8/5*exp(-3*t)+23/5*exp(-t)

9-4

T9.6-1 The session is:


syms a
R = [cos(a),sin(a);-sin(a),cos(a)];
E = subs(R,a,3*a);
F = R*R*R;
G = F-E;
simplify(G)
ans =
[0,0]
[0,0]
The variable F represents RRR; the variable E represents R(3a). Because F - E is a zero
matrix, F = E, and thus RRR = R(3a).
T9.6-2 The session is:
syms k
A = [-2, 1;-3*k, -5];
poly(A);
ans =
x^2+7*x+10+3*k
solve(ans)
ans =
[ -7/2+1/2*(9-12*k)^(1/2) ]
[ -7/2-1/2*(9-12*k)^(1/2) ]

T9.6-3 The script file is:


syms c
A = sym([-4, 6;7, -4]);
B = sym([-2*c;23]);
x = inv(A)*B
x = A\B
The two results are equivalent. The solutions are
x=

69 4c
13

y=

46 7c
13
9-5

Solutions to End-of-Chapter Problems


1. The session is:
syms x y
E = sin(x)^2+cos(x)^2;
simplify(E)
ans =
1
F = sin(x+y);
expand(F)
ans =
sin(x)*cos(y)+cos(x)*sin(y)
G = sin(2*x);
expand(G)
ans =
2*sin(x)*cos(x)
H = cosh(x)^2-sinh(x)^2;
simplify(H)
ans =
1

2. The session is:


syms y
E = cos(5*y);
expand(E)
ans =
16*cos(y)^5-20*cos(y)^3+5*cos(y)
Thus the polynomial is 16x5 20x3 + 5x.
3. (a) The session is:
p1 = poly2sym([6, 2, 7, -3]);
p2 = poly2sym([10, -5, 8]);
p3 = p1*p2;
expand(p3)
ans =
60*x^5-10*x^4+108*x^3-49*x^2+71*x-24
Thus the polynomial is 60x5 10x4 + 108x3 49x2 + 71x 24.
(b) Continue the above session as:
9-6

syms x
subs(ans,x,2)
ans =
2546

4. The session is:


syms a b r x y
E = x^2+y^2-r^2;
F = subs(E,{x, y},{x-a,y-b});
expand(F)
ans =
x^2-2*a*x+a^2+y^2-2*y*b+b^2- r^2
Thus A = 1, B = 2a, C = 0, D = 2b, E = 1, and F = r 2 a2 b2 .
5. Note that x2 + y 2 = r 2 cos2 + r 2 sin2 = r 2 (sin2 + cos2 ) = r 2 , and that cos = x/r.
The session is:
syms a x y r th
E = r^2-a^2*cos(2*th) ;
F = expand(E)
F =
r^2-2*a^2*cos(th)^2+a^2
G = subs(F,cos(th),x/r)
G =
r^2-2*a^2*x^2/r^2+a^2
K = r^2*G
K =
r^2*(r^2-2*a^2*x^2/r^2+a^2)
expand(K)
ans =
r^4-2*a^2*x^2+r^2*a^2
L = subs(ans,r^4,(x^2+y^2)^2)
L =
(x^2+y^2)^2-2*a^2*x^2+r^2*a^2
L = subs(ans,r^2,x^2+y^2)
L =
(x^2+y^2)^2-2*a^2*x^2+(x^2+y^2)*a^2
expand(L)
ans =
x^4+2*x^2*y^2+y^4-a^2*x^2 + a^2*y^2
9-7

solve(ans,y)
The answer obtained is
1
y=
2

4x2 2a2 2a 8x2 + a2

6. The session is:


syms a b c A
E = a^2-b^2-c^2+2*b*c*cos(A);
solve(E,b)
ans =
[ c*cos(A)+(c^2*cos(A)^2+a^2- c^2)^(1/2) ]
[ c*cos(A)- (c^2*cos(A)^2+a^2-c^2)^(1/2) ]
Thus
b = c cos A

c2 cos2 A + a2 c2

Continue the above session as follows:


subs(ans, {A, a, c}, {60*pi/180, 5, 2});
double(ans)
ans =
5.6904
-3.6904
The correct answer is the positive one: b = 5.6904.
7. The session is:
syms a x
E = x^3+8*x^2+a*x+10
solve(E,x);
subs(ans, a, 17);
ans =
-1.0000 - 0.0000i
-5.0000 + 0.0000i
-2.0000 - 0.0000i
The roots are 1, 5, and 2. To check the answers, substitute the roots into the expression
x3 + 8x2 + ax + 10 with a = 17. The result should be zero for each root. To do this with
sc Matlab continue the above session as follows:
9-8

F = subs(E,a,17);
subs(F,x,-1)
ans =
0
subs(F,x,-5)
ans =
0
subs(F,x,-2)
ans =
0
Thus the answers are correct.
8. (a) The session is:
syms b x y
E = x^2+y^2/b^2-1;
F = x^2/100+4*y^2-1;
S = solve(E,F);
S.x
ans =
[ 10/(400*b^2-1)*((400*b^2-1)*(4*b^2-1)) ^(1/2)
[ -10/(400*b^2-1)*((400*b^2-1)*(4*b^2-1))^(1/2)
[ 10/(400*b^2-1)*((400*b^2-1)*(4*b^2-1)) ^(1/2)
[ -10/(400*b^2-1)*((400*b^2-1)*(4*b^2-1))^(1/2)
S.y
ans =
[ 3/(400*b^2-1)*(4400*b^2-11)^(1/2)*b ]
[ 3/(400*b^2-1)*(4400*b^2-11)^(1/2)*b ]
[ -3/(400*b^2-1)*(4400*b^2-11)^(1/2)*b ]
[ -3/(400*b^2-1)*(4400*b^2-11)^(1/2)*b ]

]
]
]
]

Thus the intersection points are given by


s

q
10
x=
(400b2 1)(4b2 1) = 10
400b2 1

4b2 1
400b2 1

p
3b
y=
4400b2 11 = 3b
2
400b 1

9-9

11
400b2 1

(b) Continue the above session as follows:


subs(S.x,b,2)
ans =
0.9685
-0.9685
0.9685
-0.9685
subs(S.y,b,2)
ans =
0.4976
-0.4976
0.4976
-0.4976
Thus the intersection points when b = 2 are x = 0.9685 and y = 0.4976.
9. The session is:
syms ep p r th
E = r-(p/(1-ep*cos(th)));
OAa = subs(E,{p,ep},{1,.01});
OBa = subs(E,{p,ep},{.1,.9});
Sa = solve(OAa,OBa);
double(Sa.r)
ans =
1.0101
double(Sa.th)
ans =
0+0.0472i
OAb = OAa;
OBb = subs(E,{p,ep},{1.1,.5});
Sb = solve(OAb,OBb);
double(Sb.r)
ans =
0.9980
double(Sb.th)
ans =
1.7767
Thus, for part (a) there is no intersection because the only mathematical solution is an
imaginary value for . For part (b), the intersection is at r = 0.998 AU , = 1.7767
radians.
9-10

10. (a) The m-file is:


syms t1 t2
S = solve(0 3*cos(t1)+2*cos(t1+t2)=30, 0 3*sin(t1)+2*sin(t1+t2)=10);
th1d = double(S.t1)*(180/pi)
th2d = double(S.t2)*(180/pi)
where th1d and th2d are the angles in degrees. When this program is executed, the answers
obtained are th1d = 19.3263 , and 56.1962 , and th2d = 104.4775 and 104.4775 .
(b) The m-file is:
syms t1 t2 x
t1a = th1d(1)*(pi/180); t1b = th1d(2)*(pi/180);
t2a = th2d(1)*(pi/180); t2b = th2d(2)*(pi/180);
S = solve(0 3*cos(t1)+2*cos(t1+t2)=x0, 0 3*sin(t1)+2*sin(t1+t2)=10, 0 t10 , 0 t20 );
xr = [2:.1:4];
t1r = [subs(S.t1(1),x,xr);subs(S.t1(2),x,xr)];
t2r = [subs(S.t2(1),x,xr);subs(S.t2(2),x,xr)];
t1d = (180/pi)*t1r;
t2d = (180/pi)*t2r;
subplot(2,1,1)
plot(xr,t1d,3,th1d(1),0x0 ,3,th1d(2),0o0 ), xlabel(0x (feet)0),...
ylabel(0Theta1 (degrees)0)
subplot(2,1,2)
plot(xr,t2d,3,th2d(1),0o0 ,3,th2d(2),0x0 ), xlabel(0x (feet)0),...
ylabel(0Theta2 (degrees)0)
The plots are shown in the figure.

9-11

80

Theta1 (degrees)

60
40
20
0
20

2.2

2.4

2.6

2.8

3
x (feet)

3.2

3.4

3.6

3.8

2.2

2.4

2.6

2.8

3
x (feet)

3.2

3.4

3.6

3.8

150

Theta2 (degrees)

100
50
0
50
100
150

Figure : for Problem 9.10.


11. Find all the values of x where dy/dx = 0. The session is:
syms x
y = 3^x-2*x;
dydx = diff(y);
solve(dydx)
ans =
log(2/log(3))/log(3)
double(ans)
ans =
0.5453
Thus the only point where the tangent is horizontal is at x = 0.5453.
12. Find all the values of x where dy/dx = 0. The session is:
syms x
y = x^4-(16/3)*x^3+8*x^2-4;
dydx = diff(y);
solve(dydx)
9-12

ans =
0
2
2
Thus the candidates for relative minima and maxima are x = 0 and x = 2. To determine
the nature of these points, and to find all inflection points, continue the session as follows.
Let dsydx2 represent d2 y/dx2 .
d2ydx2 = diff(y,2);
solve(d2ydx2)
ans =
[2/3]
[2]
p1 = subs(d2ydx2,0)
p1 =
16
p2 = subs(d2ydx2,2)
p2 =
0
p3 = subs(d2ydx2,2/3)
p3 =
0
Thus there is a relative minimum at x = 0 because d2 y/dx2 > 0, an inflection point at
x = 2 because d2 y/dx2 = 0, and another inflection point at x = 2/3.
13. To find dS/dV , first find the relation between S and V by eliminating r from the
following equations: V = 4r 3 /3 and S = 4r 2 .

Thus
r 6 = (r 3 )2 =
Thus
or

r3 =

3V
4

r2 =

S
4

9V 2
S3
2 3
=
(r
)
=
16 2
64 3

S3
9V 2
=
64 3
16 2
S 3 = 36V 2

This equation is the basis for the following session.


9-13

syms r V
S = (36*pi*V^2)^(1/3);
dSdV = diff(S,V);
subs(dSdV,V,4*pi*r^3/3)
ans =
1/18*36^(1/3)*16^(1/3)*9^(2/3)/(pi^3* r^6)^(2/3)*pi^2*r^3
[result, how] = simple(ans)
result =
2/r
how =
radsimp
subs(dSdV,V,30)
ans =
1.0376
Thus

dS
2
=
dV
r

and when V = 30 in3 ,


dS
= 1.0376 in2 /in3
dV
14. The square of the distance between a point (x, y) and the point (3, 1) is
S = (x + 3)2 + (y 1)2
Substitute the equation of the line: y = 2 x/3.
x 2
)
3
The closest point is found by finding the value of x that minimizes S by solving the equation
dS/dx = 0. Because the S is nonnegative and therefore must have a minimum, we need not
check the second derivative. Let dSdx represent dS/dx. The session is:
S = (x + 3)2 + (y 1)2 = (x + 3)2 + (1

syms x y
S = (x+3)^2+(y-1)^2;
S = subs(S,y,2-x/3);
dSdx = diff(S);
solve(dSdx)
ans =
-12/5
y = subs(2-x/3,ans)
y =
14/5

9-14

Thus the solution is


x = 12/5

y = 14/5

15. The equation for the circle is x2 + y 2 25 = 0. Evaluate the slope of this function at
x = 3. Note that there will be two values of the slope at x = 3, and that the slope will be
negative in the quadrant where x = 3, y = 4. The equation of the desired straight line is
y = mx + b. We will know its slope m in terms of b from the previous steps, and we must
solve for the constant b. The session is:
syms b x y
E = x^2 +y^2-25;
S = solve(E,y);
dydx = diff(S);
slope = subs(dydx,3)
slope =
-0.7500
0.7500
Choose the negative slope, which is in slope(1), and continue the session as follows:
F = y-slope(1)*x-b;
F = subs(F,{x,y},{3,4});
solve(F,b)
ans =
25/4
m = slope(1)
m =
-0.7500
The solution is y = 0.75x + 25/4.
16. Measure time t starting at the time ship A was dead ahead of ship B, at the intersection
of the two paths. Locate the coordinate origin at this point. Then the path of ship A is given
by yA = 6t and the path of
qship B is given by xB = 12t + 6. The distance between the
2 . To find the minimum, solve the equation dD/dt = 0
two ships is given by D = x2B + yA
for t. Because D is nonnegative and therefore must have a minimum, we need not check
the second derivative.
The session is:
syms t
yA = 6*t;
xB = -12*t+6;
D = sqrt(xB^2+yA^2);
9-15

dDdt = diff(D);
time = solve(dDdt)
time
= 2/5
dist = subs(D,time)
dist =
6/5*5^(1/2)

Thus the minimum distance is D = (6/5) 5 = 2.6833 miles, and it occurs 2/5 of an hour
after ship A is dead ahead of ship B.
17. The areas of the circle and the square are given by Acirc = (x/4)2 and Ssq = r 2 where
r = (L x)/2. The total area A = Acirc + Asq . The maximum area is found by solving
dA/dx = 0, and using the solution that gives d2 A/dx2 < 0. The session is:
syms x L
Asq = (x/4)^2;
r = (L-x)/(2*pi);
Acirc = pi*r^2;
A = Asq+Acirc;
dAdx = diff(A,x);
xsoln = solve(dAdx,x)
xsoln =
4*L/(pi+4)
d2Adx2=subs(diff(dAdx,x),xsoln)
d2Adx2 =
1/8+1/8/L*(pi+4)
The solution for x is x = 4L/( + 4), but because d2 A/dx2 > 0 the solution for x does not
give a maximum area. Therefore the minimum-area solution occurs at one of the boundaries:
x = 0 or x = L. So we evaluate A at x = 0 and x = L to see which gives the smallest area.
Continue the above session as follows:
subs(A,x,0)
ans =
1/4/pi*L^2
subs(A,x,L)
ans =
1/16*L^2
The area for x = 0 is A = L2 /4, and is greater than the area for x = L, which is A = L2 /16.
So x = 0 gives the maximum area. Thus you should use the entire length of wire to make
a circle.
9-16

18. The distance d is given by


d=

h2 + 302

Note also that sin = h/d. Substitute these expressions into the equation for B to obtain
B=

h2

c
h
ch

= 2
2
2
2
+ 30 h + 30
(h + 302 )3/2

To maximize B, solve the equation dB/dh = 0. The session is:


syms c h
B = c*h/((h^2+30^2)^(3/2));
dBdh = diff(B,h);
hsoln = solve(dBdh,h)
hsoln =
[ 15*2^(1/2) ]
[-15*2^(1/2) ]

Because the height h cannot be negative, we choose the positive solution: h = 15 2 = 21.2
feet. The session to check the second derivative is:
d2Bdh2 = diff(dBdh,h);
subs(d2Bdh2,h,hsoln(1))
ans =
-1/41006250*c*1350^(1/2)*2^(1/2)

Because the second derivative is negative, the solution h = 15 2 gives a relative maximum.
The solution for the angle is
= sin

2
h + 302

= 0.6155

Thus = 0.6155 radian (35.26 ).


19. The equation of motion becomes
100
or

dv
= 500(2 et sin 5t)
dt

dv
= 10 5et sin 5t)
dt

The solution is given by


Z

v(5) =

5

10 5e

sin 5t dt = 50 5

The session to evaluate this equation is:


9-17

5
0

et sin 5t) dt

syms t
f = exp(-t)*sin(5*pi*t);
v = double(50-5*int(f,0,5))
v =
49.6808
Thus the velocity at t = 5 seconds is 49.6808 meters/second.
20. (a) The equation of motion is
m(t)
or

v(t) =

or

dv
= T m(t)g
dt

T m(t)
dt gt =
m(t)
240
v(t) =
11

t
0

Z
0

48, 000
dt 9.81t
2200(1 0.8t
40 )

1
dt 9.81t
1 0.8t
40

The session to evaluate this integral is shown below.


syms x t
f = 1-0.8*x/40;
v = (240/11)*int(1/f,x,0,t)-9.81*t
v = -12000/11*log(50- t)+12000/11*log(2)+24000/11*log(5)-981/100*t
The answer is
v(t) =

12000
12000
24000
ln(50 t) +
ln 2 +
ln 5 9.81t
11
11
11

(b) To evaluate v(b), where b = 40, continue the above session as follows:
v = double(subs(v,t,40))
v =
1.3634e+003
Thus the velocity at burnout is 1363.4 meters/second.
21. Substituting the given parameter values we obtain
6

v(t) = 10

Z t
0

10

4 5t

+ 3 10

sin 25t dt = 10t + 300

The script file is


9-18

t
0

e5t sin 25t dt

syms t x
f = exp(-5*x)*sin(25*pi*x);
v = 10*t + 300*int(f,x,0,t)
ezplot(v,[0 0.3]),axis([0 0.3 0 10])
The result is
v(t) =

10t + 250 2 t 60e5t sin 25t 300e5t cos 25t + 300


1 + 25 2

The plot is shown in the figure.


10*t+300*(1/5*sin(t*pi)+312/5*si ~~~ i^2)*exp(5*t)+300*pi /(1+25*pi^2)
10

0.05

0.1

0.15
t

0.2

0.25

Figure : for Problem 9.21.


22. The energy dissipated is
Z

E=R

i (t) dt = R

Let

F (t) =

i2 (x) dx

i2 (x) dx

The session is:


9-19

0.3

syms x t
F = (1/25)*int((1+sin(x/5))^2,x,0,t)
F =
3/50*t-2/5*cos(1/5*t)-1/10*cos(1/5*t)*sin(1/5*t)+2/5
Thus

3
1
1
1
1
2
2
E(t) = RF (t) = R
cos
t
cos
t sin
t +
50 5
5
10
5
5
5
To calculate the energy dissipated in 60 seconds if R = 1000 ohms, continue the above
session as follows:
E=1000*double(subs(F,t,60))
E =
3.7077e+003
Thus the energy dissipated is 3707.7 joules.
23. (a) The following session finds dM/d, solve dM/d = 0 for max , and computes
d2 M/d 2 to verify that max gives a maximum of M and not a minimum.

syms w R L C
M = R*C*w/(sqrt((1-L*C*w^2)^2+(R*C*w)^2));
dMdw = diff(M,w);
wmax = solve(dMdw,w)
wmax =
[ 1/L/C*(L*C)^(1/2)]
[-1/L/C*(L*C)^(1/2)]
[ 1/L/C*(-L*C)^(1/2)]
[-1/L/C*(-L*C)^(1/2)]
Mmax = subs(M,w,wmax);
[Mmax, how] = simple(Mmax);
Mmax
Mmax =
[ 1]
[ -1]
[ i*R*C^(1/2)/(4*L-R^2*C)^(1/2)]
[-i*R*C^(1/2)/(4*L-R^2*C)^(1/2)]
d2Mdw2 = diff(dMdw,w);
second = subs(d2Mdw2(1),w,wmax(1));
simplify(second)
ans =
-4/R*(L*C)^(1/2)*L/(R^2*C/L)^(1/2)

9-20

The only candidate solution that is real and positive is wmax = [ 1/L/C*(L*C)^(1/2)].
The corresponding value of Mmax is 1. Thus

LC
max =
LC
and
Mmax = 1

The second derivative d2 M/d 2 evaluated at = LC/LC is negative, thus verifying that
a maximum solution has been found.
(b) The script file is
syms R w
C = 1e-5;L=5e-3;
M = R*C*w/(sqrt((1-L*C*w^2)^2+(R*C*w)^2));
M1 = subs(M,R,1000);
M2 = subs(M,R,10);
subplot(2,1,1)
ezplot(M1,[0 10000]),axis([0 10000 0 1.2]),title(),...
xlabel(\omega (rad/sec)), ylabel(M),gtext(R = 1000 \Omega),title()
subplot(2,1,2)
ezplot(M2,[0 10000]),axis([0 10000 0 1.2]),title(),...
xlabel(\omega (rad/sec)),ylabel(M),gtext(R = 10 \Omega)
The plots are shown in the figure. For R = 1000 the filter is a broadband
filter; for R = 10
it is a narrow band filter. Both filters have a center frequency of 5/5 104 = 4472
radians/sec, but the peak is hard to identify for the broadband filter.

9-21

1.2
1

0.8
R = 1000 W

0.6
0.4
0.2
0

1000

2000

3000

4000

5000
6000
w (rad/sec)

7000

8000

9000

10000

8000

9000

10000

1.2
1
R = 10 W

0.8
0.6
0.4
0.2
0

1000

2000

3000

4000

5000
6000
w (rad/sec)

7000

Figure : for Problem 9.23b.


24. The area is given by

A=

50

10 cosh

x 20
10

syms x
A = double(10*int(cosh((x-20)/10),0,50))
A =
1.3645e+003
The answer is 1364.5 square feet.
25. The length is given by

L=

50

1+

where
y = 10 cosh
The required session is
syms x
9-22

dy
dx

2

x 20
10

dx

dx

y = 10*cosh((x-20)/10);
dydx = diff(y);
L = double(int(sqrt(1+dydx^2),0,50))
L = 136.4474
The length is 136.4474 feet.
26. The script file is
syms x
E1 = taylor(exp(i*x),10);
E2 = taylor(sin(x),10);
E3 = taylor(cos(x),10);
E4 = E3+i*E2;
E5 = simplify(E4-E1)
E5 =
0
The result is 0, so the expressions are the same.
27. The script file is
clear
syms x
E1 = taylor(exp(x),5);
E2 = taylor(sin(x),6);
E1E2 = collect(E1*E2)
E3 = collect(taylor(exp(x)*sin(x),6))
difference = simplify(E1E2-E3)
E1E2 =
1/2880*x^9+1/720*x^8-1/360*x^7-7/360*x^6-1/30*x^5+1/3*x^3+x^2+x
E3 =
x+x^2+1/3*x^3-1/30*x^5
difference =
1/2880*x^9+1/720*x^8-1/360*x^7-7/360*x^6
Thus the two expressions have been shown to be the same out to the x5 term.
28. (a) Note that some terms in the series are zero, so that the sixth (nonzero) term is given
by taylor(exp(-x^2),11) and the seventh (nonzero) term is given by taylor(exp(-x^2),13).
The session is
syms x
9-23

E = taylor(exp(-x^2),11);
F = double(int(E,0,1))
F =
0.7467
G = taylor(exp(-x^2),13);
H = double(int(G,0,1))
H =
0.7468
error = H-F
error =
1.0684e-004
Thus the error is 1.0684 104 .
(b) The session is
erf(1)*sqrt(pi)/2
ans =
0.7468
Thus the series with seven nonzero terms gives the correct value to four decimal places.
29. The session for parts (a), (b), and (c) is:
syms x
limit(2*x/(2*x-1),1)
ans =
2
limit((x^2-4)/(x^2+4),-2)
ans =
0
limit((x^4+2*x^2)/(x^3+x),0)
ans =
0

30. The session is


syms x
limit(x^x,x,0,0right0 )
ans =
1
limit(cos(x)^(1/tan(x)),x,0,0right0)
ans =
9-24

1
limit((1/(1-x))^(- 1/x^2),x,0,0right0 )
ans =
0
limit(sin(x^2)/x^3,x,0,0left0 )
ans =
-inf
limit((x^2-25)/(x^2- 10*x+25),x,5,0left0 )
ans =
-inf
limit((x^2-1)/sin(x- 1)^2,x,1,0right0 )
ans =
inf

31. The session is


syms x
limit((x+1)/x,inf)
ans =
1
limit((3*x^3-2*x)/(2*x^3+3),-inf)
ans =
3/2

32. The session is


syms r k n
symsum(r^k,k,0,n-1);
simplify(ans)
ans =
(r^n-1)/(r-1)

33. (a) Let h be the initial height and D be the total distance traveled by the ball. Then


D =h+2

1
1
1
h + 2 2h + 2 3h + ...
2
2
2

or
D = h + 2h

n1
X

n1
X 1
1
=
h
+
2h
2h
k
2
2k
k=1
k=0

9-25

The summation

n1
X

1
2k
k=0

can be evaluated as follows.


syms k n
symsum(2^(-k), k, 0, n-1);
simplify(ans)
ans =
2*(1-(1/2)^n)
Thus

n1
X

1
=2 1
2k
k=0

and
D = h + 2h

n1
X

1
= h + 4h 1
2k
k=1

 n 

1
2

 n 

1
2

2h = h 3

(b) With h = 10 and n = 8, the previous formula gives




1
D = 10 3 6
2

34. The session is


dsolve(00.2*Dy+y=100,0 y(0)=20)
ans =
10-8*exp(-5*t)
ezplot(ans),axis([0 1 0 12])
The plot is shown in the figure.

9-26

= 29.84

ft

1
2n2

108*exp(5*t)
12

10

0.1

0.2

0.3

0.4

0.5
t

0.6

0.7

Figure : for Problem 9.34.


35. (a) The session is
syms t
T = dsolve(010*DT+T=1700,0 T(0)=700)
T = 170-100*exp(-1/10*t)
solve(0 170-100*exp(-1/10*t)-1680,t)
ans =
10*log(50)
double(ans)
ans =
39.1202
Thus it will take about 39 seconds to reach 168 .
(c) Continue the above session as follows:
ezplot(T,0,50),axis([0 50 0 180])
The plot is shown in the figure.

9-27

0.8

0.9

170100*exp(1/10*t)
180

160

140

120

100

80

60

40

20

10

15

20

25
t

30

35

Figure : for Problem 9.35.

9-28

40

45

50

36. (a) The session is


dsolve(03*D2x+18*Dx+102*x = 00 ,0 x(0) = x00 ,0 Dx(0) = v00 )
ans =
(3/5*x0+1/5*v0)*exp(-3*t)*sin(5*t)+x0*exp(-3*t)*cos(5*t)
(b) The session is
dsolve(03*D2x+39*Dx+120*x = 00 ,0 x(0) = x00 ,0 Dx(0) = v00 )
ans =
exp(-5*t)*(8/3*x0+1/3*v0)+(-5/3*x0-1/3*v0)*exp(-8*t)

37. The session is


dsolve(00.2*Dy+y = 10*(2-exp(- t)*sin(5*pi*t))0,0 y(0) = 20 );
ezplot(ans),axis([0 5 0 25])
The plot is shown in the figure.
(320+500*pi^2+4000*pi* ~~~ xp(5*t))/(16+25*pi^2)
25

20

15

10

0.5

1.5

2.5
t

3.5

Figure : for Problem 9.37.

9-29

4.5

38. The session is


dsolve(0Dy+2*y/(10+2*t) = 40 ,0 y(0)=00 )
ans =
1/2*(40*t+4*t^2)/(5+t)
ezplot(ans,0,10),axis([0 10 0 30])
The plot is shown in the figure.
1/2*(40*t+4*t^2)/(5+t)
30

25

20

15

10

5
t

Figure : for Problem 9.38.

9-30

10

39. (a) The session is


dsolve(03*D2y+18*Dy+102*y = 100 ,0 y(0)=00,0 Dy(0) = 00 )
ans =
5/51-5/51*exp(-3*t)*cos(5*t)-1/17*exp(-3*t)*sin(5*t)
ezplot(ans,0,2),axis([0 2 0 .15])
The plot is shown in the figure.
5/511/17*exp(3*t)*si ~~~ /51*exp(3*t)*cos(5*t)
0.15

0.1

0.05

0.2

0.4

0.6

0.8

1
t

1.2

1.4

Figure : for Problem 9.39a.

9-31

1.6

1.8

(b) The session is


dsolve(03*D2y+18*Dy+102*y = 100 ,0 y(0)=00,0 Dy(0) = 100 )
ans =
5/51-5/51*exp(-3*t)*cos(5*t)+33/17*exp(-3*t)*sin(5*t)
ezplot(ans,0,2),axis([0 2 -.5 1])
The plot is shown in the figure.
5/51+33/17*exp(3*t)*sin(5*t)5/51*exp(3*t)*cos(5*t)
1

0.5

0.5

0.2

0.4

0.6

0.8

1
t

1.2

1.4

Figure : for Problem 9.39b.

9-32

1.6

1.8

40. (a) The session is


dsolve(03*D2y+39*Dy+120*y = 100 ,0 y(0)=00,0 Dy(0) = 00 )
ans =
1/12-2/9*exp(-5*t)+5/36*exp(-8*t)
ezplot(ans,0,1.2),axis([0 1.2 0 .1])
The plot is shown in the figure.
1/122/9*exp(5*t)+5/36*exp(8*t)
0.1

0.09

0.08

0.07

0.06

0.05

0.04

0.03

0.02

0.01

0.2

0.4

0.6
t

0.8

Figure : for Problem 9.40a.

9-33

1.2

(b) The session is


dsolve(03*D2y+39*Dy+120*y = 100 ,0 y(0)=00,0 Dy(0) = 100 )
ans =
1/12+28/9*exp(-5*t)-115/36*exp(-8*t)
ezplot(ans,0,1.2),axis([0 1.2 0 .8])
The plot is shown in the figure.
1/12+28/9*exp(5*t)115/36*exp(8*t)
0.8

0.7

0.6

0.5

0.4

0.3

0.2

0.1

0.2

0.4

0.6
t

0.8

Figure : for Problem 9.40b.

9-34

1.2

41. The script file is


clear
syms t
[current, speed] = dsolve(Dcurrent =(-.8*current- .05*speed+20)/.003,...
Dspeed = (.05*current)/8e-5,...
current(0) = 0,speed(0) = 0);
tp = [0:.0005:.1];
C = subs(current,t,tp);
S = subs(speed,t,tp);
subplot(2,1,1)
plot(tp,C),axis([0 .1 0 25]),title(),xlabel(Time (secs)),...
ylabel(Current (amps))
subplot(2,1,2)
plot(tp,S),axis([0 .1 0 500]),title(),xlabel(Time (secs)),...
ylabel(Speed (rad/sec))
current = vpa(current,4)
current =
-38.87*exp(-219.2*t)+38.87*exp(-47.50*t)
speed = vpa(speed,4)
speed =
400.2-511.2*exp(-47.50*t)+111.0*exp(-219.2*t)

The solutions are

i(t) = 38.87 e47.5t e219.2t

(t) = 400.2 511.2e47.5t + 111e219.2t


The solutions are plotted in the figure in the figure.
42. The script file is
clear
syms s R t
E = 1e-5*R*s/((5e-8*s^2+1e-5*R*s+1)*s);
E1 = subs(E,R,1000);
v1 = ilaplace(E1);
v1d = vpa(v1,5)
E2 = subs(E,R,10);
v2 = ilaplace(E2);
v2d = vpa(v2,5)
subplot(2,1,1)
tp1 = [0:.000001:.003];
9-35

25

Current (amps)

20
15
10
5
0

0.01

0.02

0.03

0.04

0.05
0.06
Time (secs)

0.07

0.08

0.09

0.1

0.01

0.02

0.03

0.04

0.05
0.06
Time (secs)

0.07

0.08

0.09

0.1

500

Speed (rad/sec)

400
300
200
100
0

Figure : for Problem 9.41.


v1p = subs(v1,t,tp1);
tp2=[0:.00001:.003];
v2p = subs(v2,t,tp2);
plot(tp1,v1p),xlabel(Time (secs)),...
ylabel(Output Voltage),gtext(R = 1000)
subplot(2,1,2)
plot(tp2,v2p),xlabel(Time (secs)),...
ylabel(Output Voltage),gtext(R = 10)
The displayed results to 5 digits are
5 t

v1 = 2.0021e10

sinh(99902t)

v2 = 0.45883e1000t sin 4359t


The case with R = 1000 is a stiff equation; the two characteristic roots are s = 100 and
s = 2 105 , and the ezplot function had trouble plotting the solution. Thus we had to
use the basic plot function. The plots are shown in the figure.

9-36

Output Voltage

0.8
0.6
R = 1000
0.4
0.2
0

0.5

1.5
Time (secs)

1.5
Time (secs)

2.5

3
3

x 10

0.5

Output Voltage

0.4
0.3

R = 10

0.2
0.1
0
0.1
0.2

0.5

2.5

Figure : for Problem 9.42.


43. The script file is
clear
syms s KP KI
V = (KP*s+KI)/(s*(s^2+(1+KP)*s+KI))
VA = subs(V,{KP,KI},{9,50});
va = ilaplace(VA)
VB = subs(V,{KP,KI},{9,25});
vb = ilaplace(VB)
VC = subs(V,{KP,KI},{54,250});
vc = ilaplace(VC)
subplot(3,1,1)
ezplot(va),axis([0 .7 0 1.5]),title(),xlabel(),...
ylabel(v),gtext(Case (a))
subplot(3,1,2)
ezplot(vb),axis([0 .7 0 1.5]),title(),xlabel(),...
ylabel(v),gtext(Case (b))
subplot(3,1,3)
ezplot(vc),axis([0 .7 0 1.5]),title(),xlabel(t),...
ylabel(v),gtext(Case (c))
9-37

3
3

x 10

The results are

4
va = 1 e5t cos 5t + e5t sin 5
5
vb = 1 + 4te5 e5t
vc = 1

49 50t
4
+ e5t
e
45
45

The plots are shown in the figure.


1.5
1

Case (a)
0.5
0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.4

0.5

0.6

0.7

0.4

0.5

0.6

0.7

1.5

1
0.5
0

Case (b)

0.1

0.2

0.3

1.5

1
0.5
0

Case (c)

0.1

0.2

0.3
t

Figure : for Problem 9.43.


44. The script file is
syms s KP KI KD
X = (KD*s^2+KP*s+KI)/(s*(s^3+(6+KD)*s^2+(11+KP)*s+6+KI))
XA = subs(X,{KP, KI, KD},{30,0,0});
XB = subs(X,{KP, KI, KD},{27,17.18,0});
XC = subs(X,{KP, KI, KD},{36,38.1,8.52});
xa = ilaplace(XA);
xb = ilaplace(XB);
xc = ilaplace(XC);
9-38

[x1, how1] = simple(vpa(xa,4))


[x2, how2] = simple(vpa(xb,4))
[x3, how3] = simple(vpa(xc,4))
subplot(3,1,1)
ezplot(x1),axis([0 1 0 1]),title(),xlabel(),...
ylabel(v),gtext(case (a))
subplot(3,1,2)
ezplot(x2),axis([0 1 0 1]),title(),xlabel(),...
ylabel(v),gtext(case (b))
subplot(3,1,3)
ezplot(x3),axis([0 1 0 1]),title(),xlabel(t),...
ylabel(v),gtext(case (c))

The results to 4 digits are


x1 = 0.7638e2.925t cos 5.619t 0.3774e2.925t sin 5.619 + 0.7638e0.1495t
x2 = 0.7412 0.7890e2.663t cos 5.227t 0.3958e2.663t sin 5.227t + 0.04780e0.67359951t
x3 = 0.8639 0.8065e10.41t 0.05743e2.053t cos 0.1362t + 0.02690e2.053t sin 0.1362t
The plots are shown in the figure.
45. (a) Applying the Laplace transform to the differential equation using zero initial conditions and Vd (s) = 1/s, we obtain
M (s) =

K 2s
1
K 2s
K2
V
(s)
=
=
d
4s2 + Ks + K 2
4s2 + Ks + K 2 s
4s2 + Ks + K 2

To find m(t), invert the transform as follows.


syms K s t
M = ilaplace(K^2/(4*s^2+4*K*s+K^2))
M =
1/4*K^2*t*exp(-1/2*K*t)

Thus
1
m(t) = K 2 teKt/2
4
(b) To find the peak torque, find where dm/dt = 0. Because m(t) has the form m(t) =
atebt , where a > 0 and b > 0, m(t) has a peak, and thus we need not check the second
derivative to verify that we have a maximum point. Continue the above session as follows:
9-39

0.5

case (a)

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

0.6

0.7

0.8

0.9

0.6

0.7

0.8

0.9

0.5

case (b)

0.1

0.2

0.3

0.4

0.5

0.5

case (b)

0.1

0.2

0.3

0.4

0.5
t

Figure : for Problem 9.44.


dmdt = diff(m,t);
tpeak = solve(dmdt,t)
tpeak = 2/K
mpeak = subs(m,t,tpeak)
mpeak =
1/2*K*exp(-1)
Thus the peak torque occurs at tpeak = 2/K and is mpeak = Ke1 /2 = K/5.4366. If the
maximum available torque is mmax , then the gain K should be selected so that mpeak
mmax ; that is, select K so that
K
mmax
5.4366
or
K 5.4366mmax
46. Let P = R1 R. If we can show that P = I, then R1 = R. The script file is
syms a
R = [cos(a), sin(a); -sin(a), cos(a)];
Rinv = inv(R);
9-40

P = Rinv*R;
[r, how] = simple(P);
r
The result gives r to be the (2 2) identity matrix. Thus P = I, and R1 = R.
47. Let D = R(a)1 R(a). If we can show that D = 0, then R(a)1 = R(a). The
script file is
syms a
R = [cos(a), sin(a); -sin(a), cos(a)];
Rinv = inv(R);
R1 = subs(R,a,-a):
D = Rinv - R1;
[r, how] = simple(D);
r
The result gives r to be a (2 2) matrix of zeros. Thus D = 0, and R(a)1 = R(a).
48. The poly function finds the polynomial; the eig function finds the roots. The session
is
syms k
A= [-6,2;3*k,-7]
A =
[ -6, 2]
[ 3*k, -7]
poly(A)
ans =
x^2+13*x+42-6*k
eig(A)
ans =
[ -13/2+1/2*(1+24*k)^(1/2)]
[ -13/2-1/2*(1+24*k)^(1/2)]
Thus the polynomial is x2 + 13x + 42 6k. The roots are

13 1 + 24k
x=
2

9-41

49. The session is


syms c
A = [4*c,5;3,-4];
B = [43;-22];
inv(A)*B
ans =
[ 62/(16*c+15)]
[ 129/(16*c+15)+88*c/(16*c+15)]
A\B
ans =
= [ 62/(16*c+15)]
[ (129+88*c)/(16*c+15)]
Thus

62
129 + 88c
y=
16c + 15
16c + 15
50. With the matrix inverse method, the session is
x=

syms R v1 v2
A = [2*R,-R,0;-R,3*R,-R;0,R,-2*R];
b = [v1;0;v2];
current = inv(A)*b
current =
[ 5/8/R*v1-1/8/R*v2]
[ 1/4/R*v1-1/4/R*v2]
[ 1/8/R*v1-5/8/R*v2]
Thus the currents are

5
1
v1
v2
8R
8R
1
1
i2 =
v1
v2
4R
4R
1
5
i1 =
v1
v2
8R
8R
To use the left division method, replace the line current = inv(A)*b with current = A\b.
(b) Continue the above session as follows:
i1 =

c = subs(current,{R,v1,v2},{1000,100,25})
c =
0.0594
0.0188]
9-42

-0.0031
c4 = c(1)-c(2)
c4 =
0.0406
c5=c(2)-c(3)
c5 =
0.0219
Thus i1 = 0.0594, i2 = 0.0188. i3 = 0.0031; i4 = 0.0406, and i5 = 0.0219 amperes. The
negative sign on i3 indicates that we assumed the wrong direction for i3 .
51. (a) The session is
syms c I Ke KT L R
A = [-R/L,-Ke/L;KT/I,-c/I];
b = [1/L;0];
poly(A)
ans =
(x^2*L*I+x*L*c+R*x*I+R*c+Ke*KT)/L/I
ans*L*I
ans =
x^2*L*I+x*L*c+R*x*I+R*c+Ke*KT
r = eig(A)
r =
[ 1/2/L/I*(-R*I- L*c+(R^2*I^2-2*R*I*L*c+L^2*c^2-4*L*I* Ke*KT)^(1/2))]
[ 1/2/L/I*(-R*I-L*c- (R^2*I^2-2*R*I*L*c+L^2*c^2-4*L*I*Ke*K T)^(1/2))]
Thus the characteristic polynomial is
LIx2 + (Lc + RI)x + Rc + Ke KT
The roots are
x=

(Lc + RI)

R2 I 2 2RILc + L2 c2 4LIKe KT
2LI

(b) Continue the above session as follows:


rc = subs(r,{R,L,KT,Ke,I},{.8,.003,.05,.05,.8e-5});
vpa(rc,5)
ans =
[ -133.33-62500.*c+.20833e8*(-.19904e-9-.38400e-7*c+.90000e-5*c^2)^(1/2)]
[ -133.33-62500.*c-.20833e8*(-.19904e-9-.38400e-7*c+.90000e-5*c^2)^(1/2)]
r1 = double(subs(rc,c,0))
9-43

r1 =
1.0e+002 *
-1.3333+ 2.9392i
-1.3333- 2.9392i
r2 = subs(rc,c,.01)
r2 =
1.0e+003 *
-0.3874
-1.1292
r3 = subs(rc,c,.1)
r3 =
1.0e+004 *
-0.0275
-1.2491
r4 = double(subs(rc,c,.2))
r4 =
1.0e+004 *
-0.0271
-2.4996
Thus, for c = 0 the roots are 133.33 293.92i. The speed will oscillate with a radian
frequency of 293.92 radians/second. It will take about 4(1/133.33) = 0.03 second to become
constant.
For c = 0.01 the roots are 387.4 and 129.4. The speed will not oscillate. It will take
about 4(1/129.4) = 0.03 second to become constant.
For c = 0.1 the roots are 275 and 12491. The speed will not oscillate. It will take
about 4(1/275) = 0.015 second to become constant.
For c = 0.2 the roots are 271 and 24996. The speed will not oscillate. It will take
about 4(1/271) = 0.015 second to become constant.

9-44

Vous aimerez peut-être aussi