Question: New to C/C++ programming and need detailed help getting to the solution. Thank you. dt 4. Nonlinear pendulum problem. The equation of motion for a

 New to C/C++ programming and need detailed help getting to the

New to C/C++ programming and need detailed help getting to the solution. Thank you.

dt 4. Nonlinear pendulum problem. The equation of motion for a simple, nonlinear pendulum is given by: det sin = 0 0 = 40,-7 = 0, for t = 0 where R is the length of the pendulum, g is the acceleration of gravity, and is the angle from the vertical. To solve this equation numerically, recast it as two first-order equations: dui = -9 sin uz duz dt = u u(0) = 0, u2(0) = po For this problem, take po = 1,.= 1, and integrate numerically out to t = 10. Use the following first order integration scheme: u(t + At) = u(t) + 24 At. Do the integration out with At = 100, 101, 102, ..., 10-8; that is, with ten steps up to one billion steps. Using your best solution as a reference, plot the error (uz(10) - U2,ref(10) versus At on a log-log plot. What is the slope of the error curve? Write your program in C, C++, or Fortran! dt 4. Nonlinear pendulum problem. The equation of motion for a simple, nonlinear pendulum is given by: det sin = 0 0 = 40,-7 = 0, for t = 0 where R is the length of the pendulum, g is the acceleration of gravity, and is the angle from the vertical. To solve this equation numerically, recast it as two first-order equations: dui = -9 sin uz duz dt = u u(0) = 0, u2(0) = po For this problem, take po = 1,.= 1, and integrate numerically out to t = 10. Use the following first order integration scheme: u(t + At) = u(t) + 24 At. Do the integration out with At = 100, 101, 102, ..., 10-8; that is, with ten steps up to one billion steps. Using your best solution as a reference, plot the error (uz(10) - U2,ref(10) versus At on a log-log plot. What is the slope of the error curve? Write your program in C, C++, or Fortran

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!