ENGR 202: ENGINEERING ANALYSIS II
NUMERICAL INTEGRATION Name: XXXXXXXXXXApril 21, 2022
Consider an elastic pendulum shown in the below figure. The motion of the system is described by the
following two second-order differential equations:
2 + ?? cos ?? − ?? (?? − ??0)
??? = ?????
??
??? ??
??? = −2 ??? − sin ??
?? ?? where ??0 is the unstretched length of the pendulum. Assume ?? = 9.81 m/s2 , ?? = 5
kg, ??0 = 1 m, ?? = 500 N/m. The initial conditions are
??(0) = ??0 , ???(0) = 0, ??(0) = ?? , ???(0) = 2 rad
2 2 s
Do the following:
1) Part (1)
Solve the initial-value problem numerically using the Euler’s method and the time step ℎ = 0.01 second for
?? = 1,2, … ,10. Present the numerical values of ??, ???, ??, and ??? vs. ?? in a table.
2) Part (2)
Write a computer program to numerically solve the initial-value problem using the time step â„Ž = 0.01
second and the methods
Euler
second-order Runge-Kutta
Plot each of ??(??), ???(??), ??(??), and ???(??) from the two methods versus ?? for 10 seconds in the same graph.
General Rules
• Submit a report describing your solution step by step.
• The report can be hand-written or typed.
• Computer programs can only be included as supplements. No credit will be given if you submit only the
computer program.