"Linear Model" of a Pendulum via Euler's Method

In summary, the conversation discusses the use of linear modal and Euler's method to approximate a sinusoidal function. The linear modal, defined as the first term in the series expansion of sin(x), is used to create a system of equations for x' and y'. However, when using Euler's method with initial conditions, the resulting plot does not match the expected circular shape. It is suggested to check if the x values exceed 10 degrees in radians and to hand calculate to identify any errors. Additionally, it is proposed to modify the formula for V to potentially achieve a circular shape.
  • #1
Euler2718
90
3
In my problem the linear modal is defined as the first term in the series expansion of [itex]\sin(x)[/itex] so:

[tex] \sin(x) = x - \frac{x^{3}}{3!}+\dots [/tex]

[itex]\sin(x) = x[/itex] is the linear modal.

So with this, I then have to write [itex] \frac{d^{2}x}{dt^{2}} = -\sin(x) [/itex] as a system of [itex]x^{\prime}[/itex] and [itex]y^{\prime}[/itex], so:
[tex] x^{\prime} = y [/tex]
[tex] y^{\prime} = \sin(x) [/tex]

I tried the linear modal in Euler's method, with initial conditions X(1) = 1 and V(1)=0 :

Code:
for i = 1:1000
    V(i+1) = V(i)-(1.*s) ;
    X(i+1) = V(i); 
end

Where s is the step size. But apparently I'm supposed to get a circle when I plot V with respect to X which makes sense, but all I get is a straight line.

If I change it to:

Code:
for i = 1:1000
    V(i+1) = V(i)-(X(i).*s) ;
    X(i+1) = V(i); 
end

With s=0.8 I get a spiral, which looks like a development but I'm no closer to the circular shape that I am expecting. I think I just need a fresh pair of eyes to see where perhaps an obvious error lies.
 
Physics news on Phys.org
  • #2
In your example the sin(x) = x approximation has the understanding that x is in radians and that its true for small angles <10 degrees or so.

https://en.wikipedia.org/wiki/Small-angle_approximation

Is your x values exceeding that 10 degree in radians limit?

Also I'd try to hand calculate things or better yet have the computer print out x(i) and v(i) so you can see where it goes wrong.

EDIT:

I looked at your example, and it does produce a line by hand calculation the V goes 0.0 to -0.1 to -0.2 ... while the X values do the same but more abruptly 1, 0.0, -0.1, -0.2 ...

To get a circle, wouldn't V have to be something like ##V(i+1) = sqrt(1.0 - x(i)*x(i))##
and then it wouldn't work when x(i) > 10 degrees?
 
Last edited:

1. What is the "Linear Model" of a Pendulum?

The Linear Model of a Pendulum is a mathematical representation of the motion of a pendulum using a linear approximation. It assumes that the pendulum follows a straight line when in reality, the motion is circular. This model is based on Euler's Method, which is a numerical method for solving differential equations.

2. How does Euler's Method work in the Linear Model of a Pendulum?

Euler's Method uses a series of linear approximations to approximate the solution to a differential equation. In the Linear Model of a Pendulum, this method is used to calculate the position and velocity of the pendulum at different time intervals. By using a small enough time interval, the accuracy of the approximation can be improved.

3. What are the limitations of the Linear Model of a Pendulum?

The Linear Model of a Pendulum has some limitations. It assumes that the pendulum is massless, the string is inextensible, and there is no air resistance. In reality, these assumptions are not true, and they can affect the accuracy of the model. Additionally, the model only works for small angles of oscillation.

4. How is the Linear Model of a Pendulum used in real-life applications?

The Linear Model of a Pendulum is used in various fields, including physics, engineering, and mathematics. It can be used to analyze the motion of pendulum clocks, swinging bridges, and other mechanical systems that involve pendulums. The model is also used in the study of chaotic systems and in the development of numerical methods for solving differential equations.

5. How can the accuracy of the Linear Model of a Pendulum be improved?

The accuracy of the Linear Model of a Pendulum can be improved by using a smaller time interval in Euler's Method, as well as by considering more realistic factors such as air resistance and the mass of the pendulum. Additionally, more advanced numerical methods can be used, such as the Runge-Kutta method, which can provide a more accurate solution to the differential equation.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
127
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
961
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
575
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • Advanced Physics Homework Help
Replies
6
Views
317
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
Replies
7
Views
2K
Back
Top