from manim import *
import numpy as np
config.media_embed = True
config.verbosity = "WARNING"
Electric Potential Energy¶
Let's first recall the basic expressions for work and energy. We note that work is the energy inputted into an object when a force is applied to the object over a distance. The work-kinetic energy theorem is
\begin{equation} \Delta \text{K.E.} = \int_A^B \vec{F} \cdot d \vec{s} \end{equation}
If the force is conservative, the work is independent of path. Therefore, the work can be computed by evaluating a potential energy function at the endpoints of the path \begin{equation} \Delta U = - W. \end{equation}
The potential energy is related to the force (one-dimensional version) via the gradient relationship \begin{equation} F = - \frac{dU}{ds}. \end{equation}
Problem 1¶
The plot below shows the potential energy of particle, $U(x)$. Use the plot to answer the following.
At which position ($x = 3$, $x = 6$, or $x = 8$) does the particle experience the strongest force pointing in the negative x-direction?
Click to see the answer and explanation
The correct position is $x = 6$.
To solve this, we apply the relationship $F(x) = -\frac{dU}{dx}$. This equation provides two key pieces of information:
- Direction: For the force to point in the negative x-direction ($F > 0$), the slope of the graph ($\frac{dU}{dx}$) must be positive.
- Magnitude: The steeper the slope, the stronger the force.
import numpy as np
import matplotlib.pyplot as plt
x = np.linspace(0, 10, 500)
# A simple potential energy function: U(x) = sin(x) + 0.1*x^2
u_x = np.sin(x) + 0.1 * x**2
plt.figure(figsize=(8, 4))
plt.plot(x, u_x, 'b-', linewidth=2)
plt.title("Potential Energy $U(x)$")
plt.xlabel("Position $x$", size=20)
plt.ylabel("Potential Energy $U$", size=20)
plt.grid(True)
plt.show()
from energy_scences import EPotentialEnergy
from manim import *
config.media_embed = True
config.verbosity = "WARNING"
%manim -qm EPotentialEnergy
Manim Community v0.19.0