Problem Set 5
ENGR 12, Spring 2026.
| Due Date | Thu, Feb 26, 2026 |
| Turn in link | Gradescope |
| URL | emadmasroor.github.io/E12-S26/Homework/HW5 |
Points Distribution
Please note that each of the following grade items is a single rubric item. Each rubric item is scored on a four-level scale of 3-2-1-0. You may wish to take this into account when deciding how to allocate your efforts to each problem.
| Problem | Part | % Weightage |
|---|---|---|
| Problem 1 | 20 | |
| Problem 2 | 20 | |
| Problem 3 | 20 | |
| Problem 4 | 20 | |
| Problem 5 | 20 |
1 Trigonometric and Exponential Representations
We learn that a particular initial value problem has the following solution:
\[x(t) = 2 \cos \left( \omega t + \frac{\pi}{6} \right)\]
Write down this function in the following forms, in each case specifying the numerical value of any constants. For complex numbers, you must state their real and imaginary parts.
- \(A_1 \cos \omega t + A_2 \sin \omega t\), where \(A_1,A_2 \in \mathbb{R}\)
- \(A_3 \sin (\omega t + \phi_3)\), where \(A_3 \in \mathbb{R}\), \(\phi_3 \in [0,2\pi)\)
- \(P_1 e^{i \omega t} + P_2 e^{-i \omega t}\), where \(P_1,P_2 \in \mathbb{C}\)
- \(\mathrm{Re} \left[ A_4 e^{i(\omega t + \phi_4)}\right]\), where \(A_4 \in \mathbb{R}\), \(\phi_4 \in [0,2\pi)\)
- \(\mathrm{Im} \left[ A_5 e^{i(\omega t + \phi_5)}\right]\), where \(A_5 \in \mathbb{R}\), \(\phi_5 \in [0,2\pi)\)
You may wish to make use of the trigonometric identities for \(\cos\) and \(\sin\). While you are not required to memorize these identities, you should be familiar with them, and you can hunt for the right ones on Wikipedia.
2 Energy Considerations
A spring-mass system is released from rest, i.e., \(\dot{x}(0) = 0\) with position \(x(0) = x_0\), where \(x_0\) is some positive number. The governing equation is \[m \ddot{x} + k x = 0\] and its solution is already known to you.
Assume that \(x\) is defined such that when \(x=0\), the spring is unstretched and uncompressed; it is at its ‘rest length’ and exerts no force. Whenever \(x \neq 0\), the spring exerts a force in the appropriate direction according to Hooke’s Law. Also, whenever \(\dot{x} \neq 0\), the mass possesses a kinetic energy.
The elastic potential energy stored in a spring is \[\frac{1}{2} k x^2. \tag{1}\] The kinetic energy of a moving mass is \[\frac{1}{2} m \dot{x}^2. \tag{2}\]
Use this information to write down a mathematical expression for the elastic potential energy and of the kinetic energy in this spring-mass system, in terms of \(m\), \(k\), \(x_0\) and \(\omega\) that is applicable for any value of time \(t\). Your expression should involve sines and cosines, and not ‘square of sine’/‘square of cosine’.
We do not like expressions such as \(\cos^2 x\) and \(\sin^2 x\). Use appropriate trigonometric identities to transform such terms into simple sines and cosines.
Also fill in the following table by writing down expressions for each quantity at the respective time.
| Time | Potential Energy | Kinetic Energy |
|---|---|---|
| \(0\) | \(\displaystyle \frac{1}{2} k x_0^2\) | \(0\) |
| \(\displaystyle \frac{\pi}{4 \omega}\) | ||
| \(\displaystyle \frac{\pi}{2 \omega}\) | ||
| \(\displaystyle \frac{3 \pi}{4 \omega}\) | ||
| \(\displaystyle \frac{ \pi}{\omega}\) | ||
| \(\displaystyle \frac{5\pi}{4 \omega}\) | ||
| \(\displaystyle \frac{3\pi}{2\omega}\) | ||
| \(\displaystyle \frac{7 \pi}{4 \omega}\) | ||
| \(\displaystyle \frac{2 \pi}{\omega}\) |
- An expression for the K.E. and an expression for the P.E.
- The filled-in table.
3 Natural Frequency
3.1 Natural Frequency of a pendulum
A pendulum of length \(l\) hanging from a fixed support in Earth’s gravitational field experiences two forces: the force due to gravity and the tension force in the cable.
It is possible to show that the governing equations for the pendulum’s motion are \[l\frac{d^2 \theta}{dt^2} = - g \sin \theta,\] where \(\theta\) is the angle the pendulum makes with the vertical and can be positive or negative as the case may be.
When the pendulum moves a small amount from its equilibrium position of \(\theta = 0\), it has a natural freqency of oscillation that depends on \(g\) and \(l\). Write down a formula for the (angular) natural frequency \(\omega\)$ of a pendulum, and use your formula to calculate how long a pendlum would need to be for it to swing back and forth (i.e. complete one cycle of motion) in exactly 1 second. Give your answer in meters to 4 significant figures.
3.2 Natural Frequency of LC Circuits
An LC circuit with no sources but with some nonzero initial charge across the capacitor is known to have an inductance of \(100 \mathrm{mH}\) (that’s “milli Henry”). What value of capacitance would the capacitor in this circuit need to have such that the voltage across the capacitor changes with a period of \(0.5\) seconds?
4 Second-order systems in the frequency domain
4.1 Sines and Cosines and their Laplace Transforms
According to the table of Laplace Transforms, \[\mathcal{L}[\cos \omega t] = \frac{s}{s^2+\omega^2}, \quad \mathcal{L}[\sin \omega t] = \frac{\omega}{s^2+\omega^2}.\]
Your task in this question is to show how the above equations are true. Do not use the table of Laplace transforms. Instead, start from the fact that the initial value problem \[ \begin{aligned} \ddot{x} + \omega^2 x &= 0 \\ x(0) &= x_0 \\ \dot{x}(0) &= v_0 \end{aligned} \]
has the solution \[x(t) = x_0 \cos \omega t + \frac{v_0}{\omega} \sin \omega t. \tag{3}\]
This was demonstrated in lecture 9; you do not need to solve an initial value problem to answer this question.
4.2 Step Response of second-order system
Use Laplace Transforms to determine the response of the second-order system \[\ddot{x} + \omega^2 x = f(t)\] to the forcing function \(f(t) = u_s(t)\), the unit step function. Write down the response as a function of \(s\) and as a function of \(t\). Use the table of Laplace Transforms as needed.
5 Simulink
The Simulink model from Lecture 10 can be used to model the behavior of the system \[ m \ddot{x} + k x = f(t),\] with \(f\) taking on many forms. When \(f=0\), Simulink and MATLAB can be used together to generate the following plot.

The code to do so is included below.
% Run Model in Simulink and obtain "out" in Workspace.
out = sim("secondorder1.slx");
figure(1); clf;
plot(out.position,"LineWidth",2);
hold on;
plot(out.velocity,"LineWidth",2);
yline(0,"Color","Black");
legend(["Position","Velocity","Average position"])
title("External Force = 0")
ylabel("")
saveas(gcf,"filename.png")Generate a plot similar to the above for each of the following cases using MATLAB. The plot should show position, velocity, and a horizontal line for the average position. It should go from \(t=0\) to \(t=30\) and the time-step should be sufficiently small to produce smooth graphs. For each case, turn in the following three items:
- The plot as an image
- Syntax-highlighted MATLAB code showing how you produced it.
- A screenshot of the Simulink model
- For the system \[m \ddot{x} + k x = f(t), \quad x(0) = 1, \dot{x}(0) = 0\] set \(m=3.5\), \(k=1.2\) and \(f(t) = 5.0\), i.e., a forcing function that is constant.
- For the system \[m \ddot{x} + k x = f(t), \quad x(0) = 1, \dot{x}(0) = 0\] set \(m=3.5\), \(k=1.2\) and \(f(t) = sin(3t)\), i.e., a forcing function in which the amplitude is 1 and the angular frequency is 3.