Advanced Engineering Mathematics
Advanced Engineering Mathematics
10th Edition
ISBN: 9780470458365
Author: Erwin Kreyszig
Publisher: Wiley, John & Sons, Incorporated
Bartleby Related Questions Icon

Related questions

Question
**The Restoring Force of a Simple Pendulum**

The restoring force in the angular (\(\theta\)) direction for a simple pendulum is given by \(F_{\theta} = -mg \sin \theta\). The corresponding acceleration is \(a_{\theta} = -F_{\theta}/m = -g \sin \theta\). Dividing \(a_{\theta}\) by the pendulum length \(L\) yields the angular acceleration:

\[
\alpha = a_{\theta}/L = -\frac{g}{L} \sin \theta
\]

From rotational kinematics, we know that angular acceleration is the rate of change of angular velocity, i.e., \(\alpha = \frac{d \Omega}{dt} = \dot{\Omega}\), and the angular velocity is the rate of change of the angle \(\theta\), i.e.,

\[
\Omega = \frac{d \theta}{dt} = \dot{\theta}
\]

Thus, the differential equations of motion for the simple pendulum are:

\[
\frac{d \Omega}{dt} = -\frac{g}{L} \sin \theta
\]

\[
\frac{d \theta}{dt} = \Omega
\]

*Why do we use a capital Greek omega (\(\Omega\)) for angular velocity? Because the lowercase \(\omega\) is defined in the lab manual as the angular frequency of the pendulum, which is a different (constant) quantity:*

\[
\omega = \sqrt{\frac{g}{L}}
\]

---

**Iteration is King (again)! The Euler-Cromer Method of Numerical Integration**

To solve these differential equations, we use a method similar to the interactive Euler method as for the "free fall/air drag" experiment. First, let's define the initial values: We start the pendulum at time \(t_0\) from an angle \(\theta_0\) with zero angular velocity (\(\Omega_0 = 0\)).

For a sufficiently short time interval \(\Delta t\), the angular acceleration can be considered constant, allowing us to calculate the new angular velocity at time \(t_1 = t_0 + \Delta t\):

\[
\Omega_1 = \Omega_0 + \frac{d \Omega}{dt} \Delta t = \Omega_0 - \frac{g}{L
expand button
Transcribed Image Text:**The Restoring Force of a Simple Pendulum** The restoring force in the angular (\(\theta\)) direction for a simple pendulum is given by \(F_{\theta} = -mg \sin \theta\). The corresponding acceleration is \(a_{\theta} = -F_{\theta}/m = -g \sin \theta\). Dividing \(a_{\theta}\) by the pendulum length \(L\) yields the angular acceleration: \[ \alpha = a_{\theta}/L = -\frac{g}{L} \sin \theta \] From rotational kinematics, we know that angular acceleration is the rate of change of angular velocity, i.e., \(\alpha = \frac{d \Omega}{dt} = \dot{\Omega}\), and the angular velocity is the rate of change of the angle \(\theta\), i.e., \[ \Omega = \frac{d \theta}{dt} = \dot{\theta} \] Thus, the differential equations of motion for the simple pendulum are: \[ \frac{d \Omega}{dt} = -\frac{g}{L} \sin \theta \] \[ \frac{d \theta}{dt} = \Omega \] *Why do we use a capital Greek omega (\(\Omega\)) for angular velocity? Because the lowercase \(\omega\) is defined in the lab manual as the angular frequency of the pendulum, which is a different (constant) quantity:* \[ \omega = \sqrt{\frac{g}{L}} \] --- **Iteration is King (again)! The Euler-Cromer Method of Numerical Integration** To solve these differential equations, we use a method similar to the interactive Euler method as for the "free fall/air drag" experiment. First, let's define the initial values: We start the pendulum at time \(t_0\) from an angle \(\theta_0\) with zero angular velocity (\(\Omega_0 = 0\)). For a sufficiently short time interval \(\Delta t\), the angular acceleration can be considered constant, allowing us to calculate the new angular velocity at time \(t_1 = t_0 + \Delta t\): \[ \Omega_1 = \Omega_0 + \frac{d \Omega}{dt} \Delta t = \Omega_0 - \frac{g}{L
**Exercise 1: Complete the Euler-Cromer Loop Code Below**

Write the code for calculating \( t_i \), \( \Omega_i \), and \( \theta_i \) based on the equations above. As before, we use a `for` loop for the repetitive (iterative) calculations. Remember that only indented lines become part of the loop, and all those lines must have the same indentation.

- The `sin` function comes from the `numpy` library, so call it as `np.sin()`.
- For the time step, use the variable `dt` defined earlier.
- The \( i \)-th elements of time, angle, and angular velocity can be accessed as `t[i]`, `theta[i]`, and `Omega[i]`, respectively. For element number \( i - 1 \), replace \( i \) with \( i-1 \).

```python
# Initial conditions. Vector numbering in Python starts at 0.
time[0] = 0          # initial time
theta[0] = np.deg2rad(5.0)  # initial angle, converted to radians.
Omega[0] = 0         # initial angular velocity (pendulum starts at rest)

# Main loop: Euler algorithm and evaluation of exact solutions for v and y
#
# Your code should look like this (without the # signs, of course):

# for i in range(1, t_steps):
#     time[i] = ....
#     Omega[i] = ....
#     theta[i] = ....

# YOUR CODE HERE
raise NotImplementedError()
```

**Explanation:**
This code snippet outlines the initial setup and structure for implementing the Euler-Cromer method to simulate a physical system, such as a pendulum. The initial conditions are provided, and users are instructed to fill in the iterative loop for calculating the time, angular velocity, and angular position at each step.
expand button
Transcribed Image Text:**Exercise 1: Complete the Euler-Cromer Loop Code Below** Write the code for calculating \( t_i \), \( \Omega_i \), and \( \theta_i \) based on the equations above. As before, we use a `for` loop for the repetitive (iterative) calculations. Remember that only indented lines become part of the loop, and all those lines must have the same indentation. - The `sin` function comes from the `numpy` library, so call it as `np.sin()`. - For the time step, use the variable `dt` defined earlier. - The \( i \)-th elements of time, angle, and angular velocity can be accessed as `t[i]`, `theta[i]`, and `Omega[i]`, respectively. For element number \( i - 1 \), replace \( i \) with \( i-1 \). ```python # Initial conditions. Vector numbering in Python starts at 0. time[0] = 0 # initial time theta[0] = np.deg2rad(5.0) # initial angle, converted to radians. Omega[0] = 0 # initial angular velocity (pendulum starts at rest) # Main loop: Euler algorithm and evaluation of exact solutions for v and y # # Your code should look like this (without the # signs, of course): # for i in range(1, t_steps): # time[i] = .... # Omega[i] = .... # theta[i] = .... # YOUR CODE HERE raise NotImplementedError() ``` **Explanation:** This code snippet outlines the initial setup and structure for implementing the Euler-Cromer method to simulate a physical system, such as a pendulum. The initial conditions are provided, and users are instructed to fill in the iterative loop for calculating the time, angular velocity, and angular position at each step.
Expert Solution
Check Mark
Knowledge Booster
Background pattern image
Recommended textbooks for you
Text book image
Advanced Engineering Mathematics
Advanced Math
ISBN:9780470458365
Author:Erwin Kreyszig
Publisher:Wiley, John & Sons, Incorporated
Text book image
Numerical Methods for Engineers
Advanced Math
ISBN:9780073397924
Author:Steven C. Chapra Dr., Raymond P. Canale
Publisher:McGraw-Hill Education
Text book image
Introductory Mathematics for Engineering Applicat...
Advanced Math
ISBN:9781118141809
Author:Nathan Klingbeil
Publisher:WILEY
Text book image
Mathematics For Machine Technology
Advanced Math
ISBN:9781337798310
Author:Peterson, John.
Publisher:Cengage Learning,
Text book image
Basic Technical Mathematics
Advanced Math
ISBN:9780134437705
Author:Washington
Publisher:PEARSON
Text book image
Topology
Advanced Math
ISBN:9780134689517
Author:Munkres, James R.
Publisher:Pearson,