Please help me to work out this Mathematica pendulum problem Thanks

Click For Summary
SUMMARY

This discussion focuses on creating a Mathematica program to plot the period of a simple pendulum against its amplitude, with the amplitude ranging from theta = 0 to theta = Pi/2. The exact differential equation, theta'' = -w^2 * Sin(theta), is solved using the built-in function NDSolve, where w = Sqrt(g/L), g = 9.80 m/s², and L = 1.00 m. The period is determined by finding successive times when theta(t) = 0, utilizing the FindRoot function. Additionally, the problem is approached using Euler's method for numerical integration, allowing for direct calculation of the period without NDSolve.

PREREQUISITES
  • Understanding of differential equations, specifically the simple pendulum equation.
  • Familiarity with Mathematica programming, including functions like NDSolve and ListPlot.
  • Knowledge of numerical methods, particularly Euler's method for solving differential equations.
  • Basic concepts of plotting and data visualization in Mathematica.
NEXT STEPS
  • Learn how to implement NDSolve in Mathematica for solving differential equations.
  • Study Euler's method in detail to understand its application in numerical integration.
  • Explore the ListPlot function in Mathematica for effective data visualization.
  • Investigate the use of FindRoot for locating zeros of functions in Mathematica.
USEFUL FOR

This discussion is beneficial for students and educators in physics and mathematics, Mathematica users interested in numerical methods, and anyone looking to understand the dynamics of pendulum motion through computational modeling.

Volant
Messages
2
Reaction score
0
Write a program in Mathematica that makes a plot of the period of a simple pendulum vs. its amplitude, as the amplitude (the initial angle from which the pendulum is released from rest) ranges from theta = 0 to theta = Pi/2. Use the built-in function NDSolve to solve the exact differential equation of the pendulum, which is theta''=-w^2*Sin(theta) where w=Sqrt(g/L) . Take the acceleration due to gravity g to be 9.80 m/s2 and the pendulum's length L to be 1.00 m. One way to find the period is to locate two successive times when theta(t) = 0 and subtract; the built-in function FindRoot is helpful for finding the zeros of a function.

Next, repeat the calculation without using the built-in function NDSolve, but instead solve the differential equation of the pendulum using Euler's method. In this case you won't even need to use FindRoot to identify the times when theta(t) = 0 since you will be stepping theta(t) along with small time increments (so it will be easy to note when theta(t) is near zero). Make the calculation of period vs. amplitude at 20 or so different amplitudes between theta = 0 to theta = Pi/2 and store the results as a list of points to plot {{theta1, T1}, {theta2, T2}, ...} – you can plot your list of points using the ListPlot function.

Then make one final plot showing the two plots you have made together, so you can see if they agree. The code I used for this is:
Show[plot1, ListPlot[plotlist, PlotMarkers->{Automatic,10}]]
where the instruction about the PlotMarkers makes the points on the ListPlot easy to see.
 
Physics news on Phys.org
Yes, really do not know how to solve it in Mathematica.
 

Similar threads

Replies
11
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 4 ·
Replies
4
Views
4K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 9 ·
Replies
9
Views
3K
  • · Replies 3 ·
Replies
3
Views
8K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 23 ·
Replies
23
Views
2K