Please help me to work out this Mathematica pendulum problem Thanks

In summary, the conversation discusses the process of creating a plot of the period of a simple pendulum vs. its amplitude using Mathematica. The built-in function NDSolve is suggested to solve the differential equation of the pendulum, and the parameters of gravity and length are given. The use of Euler's method to solve the equation without NDSolve is also mentioned, with the suggestion to use small time increments to identify when theta(t) is near zero. A list of points is suggested to be created at different amplitudes, and the final plot shows the two plots together using the Show function.
  • #1
Volant
2
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
  • #3
Yes, really do not know how to solve it in Mathematica.
 

Related to Please help me to work out this Mathematica pendulum problem Thanks

What is the Mathematica pendulum problem?

The Mathematica pendulum problem is a physics problem that involves using the software Mathematica to solve equations related to the motion of a pendulum.

What information is needed to work out the Mathematica pendulum problem?

To solve the Mathematica pendulum problem, you will need to know the length of the pendulum, the mass of the object attached to the end of the pendulum, the initial angle of the pendulum, and any other relevant variables such as gravitational acceleration.

How does Mathematica help in solving the pendulum problem?

Mathematica is a powerful software that can perform complex mathematical calculations and solve equations. It can help in solving the pendulum problem by providing accurate numerical solutions, graphical representations, and even symbolic solutions.

What are the common mistakes to avoid when solving the Mathematica pendulum problem?

Some common mistakes to avoid when solving the Mathematica pendulum problem include incorrect input of variables, forgetting to specify units, and not considering all the forces acting on the pendulum. It is important to double-check all inputs and equations to ensure accuracy.

Are there any limitations to using Mathematica to solve the pendulum problem?

While Mathematica is a powerful tool for solving the pendulum problem, it is important to note that it is only as accurate as the input provided. If the initial conditions or variables are incorrect, the solution will also be inaccurate. Additionally, Mathematica may not be able to solve extremely complex or non-linear pendulum problems.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
2K
Replies
2
Views
723
Replies
1
Views
447
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
606
Replies
8
Views
1K
Replies
3
Views
5K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
6
Views
4K
  • Introductory Physics Homework Help
Replies
7
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
2K
Back
Top