



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




ME2016D, Fall 2008, Dr. Ferri Homework Assignment 4 Due Wednesday, September 24, 2008
Problem 1. Given the system of equations
(a) Use Matlab to plot the two lines and to solve graphically for x 1 and x 2. (b) On the basis of the graphical solution, what do you expect regarding the condition of the system? (c) Solve by hand, using Gaussian-Elimination.
(a and b) The slope of the 1st line is -0.77, while the slope of the 2nd line is -1.2/1.7 = -0.7059. With the slopes being so close, there is the potential of ill-conditioning. Looking at the plot below, the suspicion is confirmed. The lines can be plotted using the following lines of Matlab: » x1=0:0.5:100;» x2_1 = 14.25 - 0.77x1; x2_2 = (20-1.2x1)/1.7; » plot(x1,x2_1,x1,x2_2,'--')» xlabel('x_1'); ylabel('x_2'); » legend('0.77x_1 + x_2 = 14.25','1.2x_1 + 1.7x_2 = 20')*
-70 0 10 20 30 40 50 60 70 80 90 100
0
10
20
x (^1)
x^2
0.77x 1 + x 2 = 14. 1.2x 1 + 1.7*x 2 = 20
(c) Without pivoting, we can subtract f 21 =1.2/0.77 times equation 1 from equation 2. The second equation changes to:
⎭⎬
x
x 0 0.
2
1
Back-substitution: x 2 =− 02. 14156.^20779 =-15.
x 1 =(^14.^25 −( 0 -. 77 15.59633))= 38.
Problem 4. The electrical circuit below can be described by the following system of equations:
5
4
3
2
1 2 3
1 4
1 5 3 E
i
i
i
i
i R R
The physical variables are R 1 = 1 Ohm, R 2 = 2 Ohm, R 3 = 2 Ohm, R 4 = 1 Ohm, R 5 = 1 Ohm, E = 10 volts.
(a) Use Gaussian elimination to solve for the currents i 1 through i 5. Use partial pivoting as necessary. (b) What is the voltage drop across R 5 , if the voltage drop is equal to the resistance times the current?
Solution: Substitute numerical values for resistances and voltages:
5
4
3
2
1
i
i
i
i
i
Step k = 3 : Use factors f 43 =1/2; f 53 = -1/2;
5
4
3
2
1
i
i
i
i
i
Step k = 4 : Use factor f 54 =-1/3;
5
4
3
2
1
i
i
i
i
i
End of the elimination phase. Begin back-substitution phase:
i 5 =−− 1025 // 33 = 2. 5
i 4 = (^5 1 +. 5 i^5 )= 17 .. 55 = 5
i 3 = (^ −^10 +− i^42 +^2 i^5 )=(−^10 −+ 25 +^5 )= 0
i 2 = (^10 − 22 i^5 )=(^102 −^5 )= 2. 5
i 1 = (^10 − i^31 −^2 i^5 )=(^10 − 10 −^5 )= 5
i Part (b): Voltage drop across resistor R5 is zero since i3=0.