Sie sind auf Seite 1von 8

JOURNAL OF SCIENCE AND EDUCATION PHYSICS ( JSPF)

Volume 11 Number 3, December 2015

ISSN 1858-330X

MATLAB SOFTWARE PROGRAM IMPLEMENTATION SOLVE THE CASE OF PHYSICS: DYNAMICS SYSTEM OF
MASS AND SPRING (VALUES AND PRINCIPLES EIGENVECTORS)

Muh. Said L
Department of Physics, Faculty of Science and Technology Makassar
Alauddin State Islamic University Campus 2 Samata

Abstract: Matlab Software Implementation Program in Physics Problem Solving: Mass Dynamics System and Spring
(Values ​and Eigen Vectors Principles). Matlab software was applied in resolving problems especially in physics calculation the
magnitude and eigen vector. Physics problem solved in this article was roomates motion oscillator consists of four mass and four
springs. The target of this program application was to Determine the spring deviation length, Thus the magnitude as well as the
eigen vector could be Obtained. The method applied in this study was using the problem magnitude and eigen vector to calculate
spring deviation in Matlab. For the case of oscillatory motion, determination of each mass of the system and the spring constants
have been specified According to the system. Equation of motion for the mass-spring system was deduced by Consider each point
of masses use the function ( )

qt • ae •
JTI
, the which is called as a function of anzats, then derived twice respect to time. by

using Matlab application, the result Obtained indicate that by Exploiting the eig (eigen) command in Matlab program, it was
Showed that the running of the Matlab program would result accurately calculation for value and eigen vector.

Keywords: Mathlab, dynamics, oscillators, and eigen vector magnitude

Abstract: Software Program Implementation Matlab in Solving Case of Physics: Mass and spring system Dynamics
(Principles of Values ​and Eigenvectors). Matlab applied in solving the case of physics using the calculation program
eigenvalues ​and eigenvectors. Case solved physics is an object that moves the oscillator consists of a system of four masses and
four springs. The purpose of this program is the application to determine how much the deviation of the spring, so that the value
(price) and eigenvectors can be obtained. The method used was to use the issue of values ​and eigenvectors to calculate the
deviation of the spring in Matlab program. In the case of motion of the oscillator, great determination each mass and spring
constant system established in accordance with the system. The equation of motion for the mass and spring system of each
reviewed every point mass and function used is ()

JTI
qt • ae • , called as a function anzats,

then didiferensialkan twice against time. By using Matlab program application the results obtained show that by using the
command eig (eigen) matlab program can show an accurate calculation of the results of running (execution) values ​and
eigenvectors ..

Keywords: Matlab, dynamics, oscillators, eigenvalues ​and eigenvectors

In everyday life, many mathematical problems that can be solved with the usual
the problems of the real phenomenon that can be explained arithmetic calculations or operations (plus, minus, times,
through model building and for).
mathematics. In general, the formulation of a mathematical In general, numerical methods do not prioritize
model in the form of a function. In many cases, not all of obtaining exact answer (right), but seek the formulation
these mathematical models can method that produces a different approach in charge of
solved easily by using methods responsible inexact at a value that is the error of the
analytic, so that method used. Nevertheless, the results of calculations
Numerical methods are used to find the solution.
Numerical method is a technique used to formulate

251
252 Journal of Science and Physical Education. Volume 11, Number 3, December 2015, p. 251-258

provide solutions to the problems faced. 1. Definition of Values ​and Eigenvectors

One application of this numerical method, namely One application of the matrix to the issue of physics,
the problem of eigenvalues ​and eigenvectors. Numerical can be found in the form of equation
methods provide an alternative method that is used to Ax •λx , With A = a ij is a square matrix of order (n) and λ
find the eigenvalues ​and eigenvectors of a matrix. The is a number (scalar). for solutions trivially x = 0 λ will
means used in this numerical method is unique because meet any price, and usually the solution is not of much
use in physics. for solutions
the settlement only required the usual algebraic
operations. However, in its calculations are not quite
done once but must be done repeatedly to find the value
nontrivial ie x • 0, price λ that satisfy the equation is called eigenvalues
converges to a value which is the value of the solution.
or the characteristic values ​of the matrix A and the
solution corresponding to the given equation

Ax •λx called eigenvector or characteristic vector of

Value eigen widely used to obtain solutions to
A.
various fields. Because of the problems value
If the equation is expressed in the form of system of
eigen quite important
equations separate,
usefulness, the various methods used to find the
for example:
eigenvalues ​becomes important to learn. Numerical
methods provide an alternative method that is used to • 12 11
aaa
13
,,, a 1N1 • • • • 1 •
1
• •• • • •
find the eigenvalues ​and eigenvectors of a matrix, one of aaa ,, , a 2N2 • xx xx
• 22 21 23
• • • •
which is the power method. •, • •, • •, •
• •• 2 • • λ• 2 •
•, • •, • •, •
• •• • •, •
, ,
In search of eigenvalues ​and eigenvectors using • •• • • •
• aaa ,,, a nn • •• x n •• •• x n ••
the power method, would require a process • n2 n3 n1 •

iterating very long to find results that approach or

real value. The more iterations are performed, the better
the results obtained. • •
13 2 12 1 11 3
• ,,, •
xaxaxa • λx
xan 1n 1

• •
23 2 22 1 21
• , ,, •
xaxaxa
3
xa n •2n λx 2

• •
33 2 32 1 31
• ,, , •
xaxaxa
3
xa n •3n λx 3

The problems of this study are: How to resolve the ,

question of values ​and eigenvectors by using the ,
application programming language Matlab? ,

• •
1 n1 n2 n3 2
• , ,, •
xaxaxa
3
xa nn• λx nn
How much value and eigenvectors in the process of
solving the case of dynamic (motion oscillator) mass and
If the right side is moved to the left side, then the
spring system by using the application programming
equation becomes:
language Matlab?
Muh. Said L, Mathlab Software Implementation Program in Physics Problem Solving ... 253

• • λ) x2 (a • xaxa • ,,, • xa • 0 3. Case Physics: Motion Oscillator System Four

12 1 11 13 3 1n n

Massa and Lima Pegas

21 1
• λ) x• (AXA •
23 2 22
xa3 • ,,, • xa
2n n
• 0

31 1
• (axaxa
32 2
• • λ) x 3
33
• ,,, • xa
3n n
• 0 Here's a case to solve the equations of the
, dynamics of the mass and spring system as Figure 1
, below.
,

• • xaxaxa • ,,, • • nnλ) x n(a• 0 m1 k4 m3 m4

n1 1 n2 2 n3 3

k5
k1
2. Jacobi method m2
k2 k3
One method to solve the problem of eigenvalues
​and eigenvectors is the method
Jacobi. This method is a method diagnolisasi form of a
matrix by using the coordinate system. Eg
two-dimensional coordinates defined as follows: Picture 1. Review of systems of mass four and five springs.

Overview on any point of the mass, obtained by:

•1 1
cosθ x• A 2
sinθ x
(1)
•2 1
• 2x A x
sinθ cosθ •• • •Qkk (kqm
• ) • •
5343422142111
• Qkk•(kqkqk
• ) 4
• 0

•• • • (kqkqm
QK • )5 3 3 3 2•3 2 1 2 2 2 • QK•(kqk ) 4
• 0
The above equation can be expressed in the form of a •• • • •5 3 4 3 2 3 1 4•3 3
QK (kqkqkqm ) • QK • 0
4

matrix: •• • 5qkqm
44 4
• 0

• • cosθ
• AA • sinθ • • 1 •
1 Anzats functions used are:
• • • • •• • (2)
• 2 • • cosθ•sinθ
• xx2 •
• eatq ,
• TJI
1
() (5)
or can be expressed in the form of the general
equation is: with i = 1, 2, 3; and j = complex number

worth • 1 , ω is the deflection of the spring. If

A •Tx (3)
This function didiferensialkan twice against the time it is
• T • • sinθ obtained:
Matrix •cosθ
• • have
• sinθ cosθ •
• • eatq

••1 () • , ,
TJI
(6)
matrix transpose:

Masukkaan differential results to the respective

• TT
cosθ •
sinθ
• • • (4) insights every point masses so formed into:
•• sinθ cosθ •

At the T matrix equation (2) and T T

• • • (kam
Akk • ω) • • • Akk•(brother
• ) • 0
equation (4) it can be shown that so-called matrix 53434221421112 4

• • Ak• (ω kakam
• 5 3 )3 3 2 3 2•1 2 2 2 2 • Ak•(kak ) • 0
multiplication properties diagonal.Matriks matrix can be 4

used for eigen equation. • • • •

Ak (ω5kakakam •
3432314332
) • ak
4
• 0

T •
• 5442• ω
akam • 0
, • TT • or I • TT
T T 1 4
TT
254 Journal of Science and Physical Education. Volume 11, Number 3, December 2015, p. 251-258

In the case of a mass and spring system above, will hard. The process of testing performed on a PC with Intel
be determined each spring and spring constant values (R) atoms (TM) N270 CPU @ 1.60 GHz 798 MHz with
​used are: 0.99 GB of memory. The operating system used is
Microsoft Windows XP Professional SP2 version 2002
m 1 = 10 kg; m 2 = 20 kg; m 3 = 30 kg; m 4 = 40 kg; k 1 = 10 kg.N / m; k 2 = k
and the programming language that has been used is the
20 kg.N / m; k 4 = 25 kg.N / m and k 5 = 15 kg.N / m
application of methods that MATLAB 6.5
3=

Each value above substituted kepersamaan review

B. Research variable
each point masses:
Data necessary parameters consist of several
• • • • 20a 55a3 10a
• ω •
2

1 1
60a 25a
2 4
0 variables:
a. The independent variable mass values ​and constants
• • • 35a 20a• 40a 20a 20a
32122 • ω 4
• 0
spring, these two parameters is indispensable for
• • • 15a 45a• 20a 25a 30a
32132 • ω • 0
4
modeling processes in motion a review of the system
• • 40a ω4
15a
42 • 0 oscillator with a mass four and five springs in
accordance with the specified cases such as in Figure
Of four of its review, it can be expressed in the
1.
form:
b. The dependent variable: the determination of the value and vector

• Ba
• Aa ω•2 0 eigen application using Matlab program.

With
c. Control variables: function used
• 0 0 10 0 • in solving this case is a function anzats case
• •
0 20 0 0 oscillator motion with four-mass system and five
AA • • •
• 30 0 0 0 • springs that determined and focused using the
• • programming language Matlab.
• 000 40 •

and
C. Research procedure
• • • 55
25 20 60 •
In this research, the following steps:
• •
• 20•40 20 35
Ba • • •
•• • 45 0 2 25 • 15 •
a. Creating a model case of motion oscillator
• •
• 000 15 • four-mass system and five spring as in Figure 1
above, then assign each mass and the constant
To determine the value of deviation spring, can be
value (values ​can not use random data but need to
calculated by using the issue of values ​and eigenvectors.
be taken into account in accordance with the level of
Value • are eigenvectors.
accuracy of the data)

METHOD b. Reviewing each mass and modeling

A. Software and K eras are in the form of a second order differential equation.
be used

• eatq ,

c. using function anzats
TJI
In the test process computer programming 1
()

do in research this as function solving cases and

using software and devices differentiating twice with respect to time.
Muh. Said L, Mathlab Software Implementation Program in Physics Problem Solving ... 255

d. Furthermore, the results of differential to the in the form of motion oscillator with four-mass system and five

each equation each mass (point b), then substituting springs, so that the result of execution of its value. The

the value of the spring constant mass and then phase of the programming language

calculate and model matrix as the last step before computing in Matlab software program consists of several
entry into the programming process. steps, namely:

1. Prepare the room for the matrix A:

e. Of the programs that have made it disp ( 'Prepare the space for the matrix A')

The next Me- running The program with the input of all 2. Enter the number of rows and columns of the matrix A:
the elements of the matrix, and the next steps to
m = input ( 'Enter the number of rows ='); n = input ( 'Enter the
print both the matrix that ultimately eigenvalues ​and number of columns ='); M = zeros (m, n);
eigenvectors obtained.
disp ( ' ')

3. Input elements of the matrix A:

D. The algorithm Program

Steps to create applications Matlab program in disp ( '## INPUT ELEMENT MATRIX A ##') for i = 1: m

determining the value (price) and eigenvectors on the for j = 1: n

system four and five spring mass is shown in Figure 2 at disp ([ 'A'num2str (i)', 'num2str (j)'])
A (i, j) = input ( ' = ');
the end of this article. end end
disp ( '
')
RESULTS AND DISCUSSION disp ( 'The matrix A') disp ( '
')
A. Results Programming with Computing disp ( 'A =') disp
(A)
before the process manufacture language
disp ( ' ')
programming, first describe the form of a matrix to be
inputted. Following the results of the matrix are: 4. Prepare the room for the matrix B:

• 0 0 10 0 • 5. Enter the number of rows and columns of the matrix B:

• •
0 20 0 0 x = input ( 'Enter the number of rows ='); y = input ( 'Enter the
A • • •
• • number of columns ='); B = zeros (x, y);
30 0 0 0
• •
• 000 40 • disp ( ' ')

6. Input elements of the matrix B:

• • • 55
25 20 60 •
• • disp ( '## INPUT ELEMENT MATRIX B ##') for i = 1: x
• 20•40 20 35
B • • •
•• • 45 0 2 25 • 15 • for j = 1: y
• • disp ([ 'B' num2str (i) ',' num2str (j) '])
• 000 15 •
B (i, j) = input ( ' = ');
end end
By looking at the program algorithm scheme as in disp ( '
figure 2, then made the next one computing programs ')
disp ( 'Matrix B') disp ( '
using a programming language for the purpose of
')
determining the eigenvalues ​and eigenvectors based on disp ( 'B =') disp
(B)
the case of physics
disp ( ' ')
256 Journal of Science and Physical Education. Volume 11, Number 3, December 2015, p. 251-258

7. Determining eigenvalues, lambda = eig (A): =0

A4,2
disp ( '============================') disp ( '==== =0
Eigenvalues ==== ')
A4,3
disp ( '============================') disp ( '
=0
')
lambda = eig (M, K) '
A4,4
8. Determine vector eigen, omega = = 40

disp ( ' ') A=

disp ( '============================') disp ( '==== 10 0 0 0
Eigenvalues ==== ') 0 20 0 0
disp ( '============================') disp ( ' 0 0 30 0
') 0 0 0 40
omega = sqrt (ones (1, y) ./ lambda) Prepare the room for the matrix B Enter the
number of rows = 4 Enter the number of columns =
4
Here are the results running program can
is displayed in the window command window # # INPUT ELEMENT MATRIX B ##

after pressed F5 as follows: B1,1

= 55
B1,2
++++++++++++++++++++++++++++++++
= -20 B1,3
VALUE PROBLEMS AND VECTOR
================================
= -25 B1,4
++++++++++++++++++++++++++++++++
Prepare the room for the matrix A Enter the
= 60
number of rows = 4 Enter the number of columns =
B2,1
4
= -20 B2,2
# # INPUT ELEMENT MATRIX A ## A1,1
= 40
= 10 B2,3
A1,2 = -20 B2,4
=0
A1,3 = 35
=0 B3,1
A1,4 = -25 B3,2
=0
A2,1 = -20 B3,3
=0
A2,2 = 45
= 20 B3,4
A2,3 = -15 B4,1
=0
A2,4 =0
=0 B4,2
A3,1 =0
=0 B4,3
A3,2 =0
=0 B4,4
A3,3 = 15
= 30
Matrix B =
A3,4
=0
55 -20 -25 60
A4,1
Muh. Said L, Mathlab Software Implementation Program in Physics Problem Solving ... 257

- 20 40 -20 35 with applications language

- 25 -20 45 -15
Matlab programming acquired large eigenvalues ​=
0 0 0 15
================================ ==== 0.0129; 0.0002; 0.0004; Eigenvector 0.0027 and
Eigenvalues ==== 8.7902; 76.3876; 50.8691;
================================ 19.3649.
lambda = algorithm program
6.9542 0.1596 0.3862 2.6667 START

================================= ==== Prepare the room for the matrix A

eigenvectors ====
=================================
Enter the number of rows and columns
omega =
matirk A
0.3792 2.5034 1.6091 0.6124
Not
Input elements of the
From the result of the determination by using the matrix A

application program can be seen that the eigenvalues ​( lambda) 0.0129

Yes
is obtained; 0.0002; 0.0004;

8.7902; 76.3876; 50.8691; 19.3649.

So it can be confirmed that the eigenvalues ​is Prepare the room for the matrix B
lambda price that meets the characteristics of
mathematics-physics is Enter the number of rows and columns
Ax •λx , while eigenvector is matrix B

solutions x which corresponds to the price of λ.

Input elements of the Not
Determination of eigenvalues ​and eigenvectors is
matrix B
one way of solving systems of linear equations in the
case of physics, so it can be clearly concluded that the Yes

Matlab software program can resolve cases related Print matrix B

solutions to the mass and spring system dynamics in
mathematical physics computing concept.
Determining eigenvalues
Lambda = eig (A)

CONCLUSION

a. To resolve the question of the value and Eigenvector, Omega =

sqrt (ones (1, n) ./
eigenvector using Matlab programming language lambda)

applications can be done by using the command eig

Not
ie lambda = eig (A, B) to determine the eigenvalues
​and omega = sqrt (ones (1, y) ./ lambda) to
Print results and value
determine the eigenvector. eigenvector

(Motion oscillator) mass and spring system finished

258 Journal of Science and Physical Education. Volume 11, Number 3, December 2015, p. 251-258

REFERENCES Schroeder, DV, & Moore, TA 1993. A

Computer-Simulated Stern-Gerlach Laboratory. American
Aminuddin, Jamrud. 2008. Fundamentals of Physics
Journal of Physics.
Computing Using MATLAB.
61, 798-805.
Yogyakarta: Gava Media ..
Wylie, CR, Jr. 1961. Advanced Engineering
Arfken, G., 1985. Mathematical metods for
Mathematics. McGraw-Hill, New York.
Phisicists. 3 rd ed., Academic Press.

Boas, Mary, L. 1983. Mathematical Methods in

The Phisical Sciences. Secon Edition. John
Wiley.

Crosby, ME, & iding, MK 1997. The

Influence og a Multimedia Physics Tutor and User
Diffrenceson the Development of Scientific
Knowledge. ( pp.25-40). Computer & Education. 29,
127-136.

Etter, DM 1993. Engineering Problem Solving

with MATLAB. Prentice Hall. Englewood Cliff. New
Jersey 07 632.

Giancolli, Douglas C ,. 2001. Physics. Volume 1. Ed.

5. Erland. Jakarta.

Gunaidi, AA ,. 2006. MATLAB Programming.

Bandung: Informatics.

Halliday, David and Robert Resnick. 1990. Physics

Volumes 1 and 2 ( Translation: pantur silaban and
Erwin Sucipto), 3rd Edition. Jakarta: Erland.

Jimoyiannis, A.Mikropoulus, TA & Ravanis, K.

2000. Students' Performance Towards Computer
Simulations on Kinematics
(Themes In Education), 1 (4) (in press).

Supriyanto Suparno, 2009, computing

Science and Engineering. Issue 3. Jakarta: Department of
Physics-Mathematics and Natural Sciences, University of
Indonesia.

Tao, PK 1997. confronting Student's Alternative

Conceptions in Mechanics with the Force and
Motion Microworld. Computer in Physics 11 (2),
199-207.

Roswati Mudjiarto, et al. 2004. Mathematics

Physics 1. Indonesian Education University:
Department of Physics Education Faculty of
Mathematics and Natural Sciences.