تم الحل ✓
categoryالهندسة الميكانيكية
schoolبكالوريوس
event_available2026-07-16
السؤال
Transcribed Image Text:
F2+0.707F10, F3-0.707 F₁-2000 = 0
-F2+ 0.659F5+ F6 = 0
F3-0.659 F + F = 0
-F6+0.659F9 + F10 = 0
0.7071 F₁ +F4+6229 = 0,
-F4-0.753 F-600 = 0,
0.753 F + F = 0,
-F8-0.753F9-800 = 0,
+
0.753F9 F12-2429 = 0,
-F12-0.7071F13-600 = 0
-F,-0.659F9+ F11 = 0
-F10+ 0.707 F13 = 0
8 m
1800 N
600 N
800 N
600 N
8m
++
m
+
m
8 m
2000 N
0 3 8-5-16 x1
34
3 12-4 8 5 -2
800 10-3 7 3
31000 04
2
20
45
XA
36
004-6 02
2 5
60
3050
3 0 5 0 0 -6 x6
28
Example 4-3: MATLAB user-defined function for solving a system of equations using
Gauss elimination with pivoting.
Write a user-defined MATLAB function for solving a system of linear
equations [a][x] [b] using the Gauss elimination method with piv-
oting. Name the function x Gauss Pivot (a,b), where a is the
matrix of coefficients, b is the right-hand-side column vector of con-
stants, and x is a column vector of the solution. Use the function to
determine the forces in the loaded eight-member truss that is shown
in the figure (same as in Fig. 4-2).
SOLUTION
4000 N
12m
5m
12m
20m
The forces in the eight truss members are determined from the set of
eight equations, Eqs. (4.2). The equations are derived by drawing free
body diagrams of pins A, B, C, and D and applying equations of equilibrium. The equations are
rewritten here in a matrix form (intentionally, the equations are written in an order that requires piv-
oting):
0 0.9231
0
00
0
0 0
FAC
-1-0.38461
0
00
0
0
0
[1690]
3625
0 0
0 01
0
0.8575 0
Fac
0
1
0
-0.7809 0 0
0
0
0
Fa
0
(4.17)
0 -0.3846-0.7809 0-1 0.3846
0
0 FCD
0
0 0.9231 0.6247 0 0 -0.9231
0 0 0.6247 -10
0
0 Fer
0
0 0
F
DE
-0.5145-1
L000100
The function Gauss Pivot is created by modifying the function Gauss listed in the solution of
Example 4-2.
Program 4-2: User-defined function. Gauss elimination with pivoting.
function x Gauss Pivot (a,b)
The function solves a system of linear equations ax = b using the Gauss
elimination method with pivoting.
Input variables:
8 a The matrix of coefficients.
b Right-hand-side column vector of constants.
Output variable:
** A column vector with the solution.
ab = [a,b];
[R, C]
size (ab);
for j = 1:R-1
Pivoting section starts.
if ab(j,j) == 0
Check if the pivot element is zero.
for k = j + 1:R
if ab(k, j)
abTemp
= 0
ab (j,);
ab (j,)
ab (k,)
ab(k, :);
abTemp;
break
end
end
end
If pivoting is required, search in the rows
below for a row with nonzero pivot element.
Switch the row that has a zero pivot element
with the row that has a nonzero pivot element.
Stop searching for a row with a nonzero pivot element.
Pivoting section ends
for ij+1:R
end
ab (i,j:C) ab (i, j:C) ab (i, j)/ab(j,j)*ab (j,j:C);
end
x
x (R)
zeros (R,1);
ab (R,C)/ab (R,R);
for i R 1:-1:1
end
x(i) = (ab(i,C) ab (i,i +1:R)*x(i + 1:R))/ab(i,i);
The user-defined function GaussPivot is next used in a script file program to solve the system of
equations Eq. (4.17).
Example 4-3
a=[0 0.9231 0 0 0 0 0 0; -1 -0.3846 0 0 0 0 0 0; 0 0 0 0 1 0 0.8575 0; 10 -0.7809 000 00
0 -0.3846 -0.7809 0-1 0.3846 0 0; 0 0.9231 0.6247 0 0 -0.9231 0 0
0 0 0.6247 -1 0 0 0 0 0 0 0 1 0 0 -0.5145 -1];
b- [1690;3625;0,0,0,0,0,0]:
Forces GaussPivot(a,b)
When the script file is executed, the following solution is displayed in the Command Window.
Forces =
-4.3291e+003
1.8308e+003
-5.5438e+003
-3.4632e+003
FBD
2.8862e+003
FCD
-1.9209e+003
FCE
-3.3659e+003
FDE
-1.7315e+003
FDF
>>
-1690
0.9231 FAC
FAB-0.7809F
BC
FCD+0.8575 F DE
0
-FAB-0.3846F AC = 3625
0.6247FBC-FBD = 0
FBD-0.5145 F DE-FDF
=0
0.3846 FCE-0.3846F AC-0.7809FBC-FCD
0.9231 FAC+0.6247 FBC-0.9231 FCE = 0
T
12m
4000 N
25°
5m
C
12m
F
-20m
E
Example 4-2: MATLAB user-defined function for solving a system of equations using
Gauss elimination.
Write a user-defined MATLAB function for solving a system of linear equations, [a][x]-[b], using
the Gauss elimination method. For function name and arguments, use x Gauss (a, b), where a is
the matrix of coefficients, b is the right-hand-side column vector of constants, and x is a column
vector of the solution.
Use the user-defined function Gauss to
(a) Solve the system of equations of Example 4-1.
(b) Solve the system of Eqs. (4.1).
SOLUTION
The following user-defined MATLAB function solves a system of linear equations. The program
starts by appending the column vector [b] to the matrix [a]. The new augmented matrix, named in
the program ab, has the form:
[13
aaa
an
...az by
31 32 33
...age by
[ant an a3 an b
Next, the Gauss elimination procedure is applied (forward elimination). The matrix is changed such
that all the elements below the diagonal of a are zero:
0 22 23
www.
0
ain by
a b
0 ---
000
www
ann b
At the end of the program, back substitution is used to solve for the unknowns, and the results are
assigned to the column vector x.
Program 4-1: User-defined function. Gauss elimination.
function x Gauss (a,b)
The function solves a system of linear equations [a] [x] = [b] using the Gauss
elimination method.
Input variables:
a
The matrix of coefficients.
b Right-hand-side column vector of constants.
Output variable:
× A column vector with the solution.
ab = [a,b];
[R, C] size (ab);
for j = 1:R-1
end
for i
end
+1:R
Append the column vector [b] to the matrix [a].
Pivot element
ab(i,j:C) ab (i,j:C)- ab(i, j)/ab (j,j)*ab (j,j:C);
x = zeros (R,1);
x (R)
The multiplier
ab (R,C)/ab (R, R):
Pivot equation
Gauss elimination
procedure (forward
elimination).
for i = R - 1:-1:1
end
x(i) = (ab(i,C) ab (i,i +1:R)*x(i + 1:R))/ab(i, 1);
Back substitution.
The user-defined function Gauss is next used in the Command Window, first to solve the system of
equations of Example 4-1, and then to solve the system of Eqs. (4.1).
>>14 -2 -3 6: -6 7 6.5 -6; 1 7.5 6.25 5.5; -12 22 15.5 -1];
>> B=[12; -6.5; 16; 17];
>> sola Gauss (A, B)
sola
2.0000
4.0000
-3.0000
0.5000
Solution for part (a)
>>> C = [9 -4 -2 0; -4 17 -6 -3; -2 -6 14 -6; 0 -3 -6 11];
>>> D= [24; -16; 0; 18];
>>solb Gauss (C, D)
solb
4.0343
1.6545
2.8452
3.6395
Solution for part (b)
911-412-213 24
-4i₁+17i2-613-314
-16
-2i₁-6i2 +1413-614
-312-613+1114
0
18
Example 4-1: Solving a set of four equations using Gauss elimination.
Solve the following system of four equations using the Gauss elimination method.
4x-2x-3x+6x4 - 12
SOLUTION
-6x, +7x, +6.5x,-6x=-6.5
x+7.5x+6.25x+5.5x
16
-12x+22x+15.5x-x-17
The solution follows the steps presented in the previous pages.
Step 1: The first equation is the pivot equation, and 4 is the pivot coefficient.
Multiply the pivot equation by m-(-6)/4-1.5 and subtract it from the second equation:
6x+7x+ 6.5x-6x4--6.5
(-1.5)(4x-2x-3x+6x4) (-6/4) 12
0x+4x+2x+3x=11.5
Multiply the pivot equation by my, (1/4)-0.25 and subtract it from the third equation:
x+7.5x+6.25x,+5.5x4-16
(0.25)(4x-2x-3x+6x4) (1/4)-12
Ox, +8x, +7x, +4x-13
Multiply the pivot equation by m-(-12)/4-3 and subtract it from the fourth equation:
12x, +22x,+ 15.5x,-x-17
(-3)(4x-2x-3x+6x4)-3-12
0x +16x+6.5x+17x4
53
At the end of Step 1, the four equations have the form:
4x,-2x-3x+6x-12
4x+2x+3x-11.5
8x+7x+4x-13
16x+6.5x+17x-53
Step 2: The second equation is the pivot equation, and 4 is the pivot coefficient.
Multiply the pivot equation by my 8/4-2 and subtract it from the third equation:
8x2+7x+4x-13
2(4x+2x+3x)-2-11.5
0x +3x-2x-10
Multiply the pivot equation by m-16/4-4 and subtract it from the fourth equation:
16x+6.5x+17x-53
4(4x+2x+3x4)-4-11.5
0x-1.5x+5x-7
At the end of Step 2, the four equations have the form:
4x1-2x-3x+6x=12
4x2+2x+3x4 11.5
3x-2x--10
Step 3: The third equation is the pivot equation, and 3 is the pivot coefficient.
Multiply the pivot equation by mas-(-1.5)/3-0.5 and subtract it from the fourth equation:
-0.5(3x,-2x) 0.5--10
0x,+4x-2
At the end of Step 3, the four equations have the form:
4x-2x-3x+6x4-12
4x+2xy + 3x 11.5
3x,-2x--10
4x4-2
Once the equations are in this form, the solution can be determined by back substitution. The value
of x is determined by solving the fourth equation:
x-2/4-0.5
Next, x, is substituted in the third equation, which is solved for x3:
-10+2x-10+2.05
-3
Next, x, and x, are substituted in the second equation, which is solved for x,:
11.5-2-3x
11.5-(2-3)-(3.0.5)
4
4
Lastly, x, x and x, are substituted in the first equation, which is solved for x,:
12+2x+3x-6x 12+2-4+3-3-(6-0.5) 2
4
check_circle الجواب — حل مفصل خطوة بخطوة
hourglass_top
🔒
الحل الكامل متاح للمشتركين
اشترك في أرشيف الأسئلة لعرض هذا الحل وآلاف الحلول المفصلة خطوة بخطوة من معلمين معتمدين.