Can Heun's Method Accurately Predict Small Oscillations of a Nitrogen Atom?

In summary, the conversation discusses using the Heun method to compute the period of small oscillations about the equilibrium position of a nitrogen atom. The relevant equations and values are provided, and there is a question about the accuracy of a graph that was generated using a velocity vs. time graph. It is suggested to simplify the original expression for U(x) before taking the derivative and to check the derivative using a tool like Wolfram Alpha.
  • #1
akaPaul
2
0

Homework Statement


Use the Heun method to compute the period of small oscillations about the equilibrium position of a nitrogen atom.
xi = 1.1
Um = 7.37
x0 = 1.2
alpha = 2.287
m = 2.325e-26

Homework Equations


[/B]
U(x) = Um((1-e^(-alpha(x-x0)))^2 - 1)

The Attempt at a Solution



I was told to take the derivative of dU/dx and got (-1/m)*(2*Um*alpha*(1-e**(-alpha*(x-x0)))*(e**(-alpha*(x-x0)))) and used that to calculate my heun step with a time step of 0.5e-15. With this I get a graph that looks like this:
1XxRKQK.jpg
which is a velocity vs. time graph. I'm wondering if this graph looks correct and if so why? I thought it would turn out to be something more like:
DampedSine.png



 
Physics news on Phys.org
  • #2
akaPaul said:

Homework Statement


Use the Heun method to compute the period of small oscillations about the equilibrium position of a nitrogen atom.
xi = 1.1
Um = 7.37
x0 = 1.2
alpha = 2.287
m = 2.325e-26

Homework Equations


[/B]
U(x) = Um((1-e^(-alpha(x-x0)))^2 - 1)

The Attempt at a Solution



I was told to take the derivative of dU/dx and got (-1/m)*(2*Um*alpha*(1-e**(-alpha*(x-x0)))*(e**(-alpha*(x-x0)))) and used that to calculate my heun step with a time step of 0.5e-15. With this I get a graph that looks like this:
1XxRKQK.jpg
which is a velocity vs. time graph. I'm wondering if this graph looks correct and if so why? I thought it would turn out to be something more like:
DampedSine.png


If ##U(x) = U_m((1-e^{(-alpha(x-x0)))^2 - 1)}##, it's not clear how you calculated

$$U'(x) = (-1/m)*(2*Um*alpha*(1-e^{(-alpha*(x-x0)))}*(e^{(-alpha*(x-x0)))}))$$

I'm assuming that ##U_m## is a constant and not ##U ⋅ m##.

You might want to use some substitutions in the original expression for U(x) to simplify its form before taking the derivative. I would check the derivative using a tool like Wolfram Alpha before writing code with it.
 
  • #3
SteamKing said:
If ##U(x) = U_m((1-e^{(-alpha(x-x0)))^2 - 1)}##, it's not clear how you calculated

$$U'(x) = (-1/m)*(2*Um*alpha*(1-e^{(-alpha*(x-x0)))}*(e^{(-alpha*(x-x0)))}))$$

I'm assuming that ##U_m## is a constant and not ##U ⋅ m##.

You might want to use some substitutions in the original expression for U(x) to simplify its form before taking the derivative. I would check the derivative using a tool like Wolfram Alpha before writing code with it.
Yea sorry about my bad formatting you're right it is a constant and I used python to compute the derivative.
 
  • #4
akaPaul said:
Yea sorry about my bad formatting you're right it is a constant and I used python to compute the derivative.
I'm not sure how you do that, but I would check the derivative which Python gave against a pencil and paper derivative or Wolfram Alpha.
 

Related to Can Heun's Method Accurately Predict Small Oscillations of a Nitrogen Atom?

1. What is Heun's Method and how does it work?

Heun's Method is a numerical method used to approximate the solution of a differential equation. It works by using the slope at the beginning of a small time interval to predict the value of the solution at the end of the interval, and then using this predicted value to calculate a more accurate slope for the next interval.

2. What are some common problems with Heun's Method?

One common problem with Heun's Method is that it can sometimes give inaccurate results when used to solve stiff differential equations. This is because the method relies on using a small time interval, but for stiff equations, a much smaller interval is needed to accurately capture the behavior of the solution.

3. How is Heun's Method different from other numerical methods?

Heun's Method is a second-order method, meaning that the error in each step is proportional to the square of the interval size. This is an improvement over first-order methods such as Euler's Method, which have errors that are only proportional to the interval size. Additionally, Heun's Method uses two function evaluations per step, while other methods may use more or less.

4. Can Heun's Method be used for all types of differential equations?

No, Heun's Method is most commonly used for solving non-stiff ordinary differential equations. For stiff equations, other methods such as the Runge-Kutta family of methods may be more appropriate.

5. How can I determine the accuracy of Heun's Method?

The accuracy of Heun's Method can be determined by comparing the results to the exact solution of the differential equation, if it is known. Additionally, the error can be estimated by using a smaller interval size and comparing the results to those obtained with a larger interval size.

Similar threads

  • Calculus and Beyond Homework Help
Replies
2
Views
1K
  • Advanced Physics Homework Help
Replies
16
Views
3K
  • Advanced Physics Homework Help
Replies
16
Views
3K
  • Introductory Physics Homework Help
Replies
1
Views
17K
  • Science and Math Textbooks
Replies
7
Views
6K
  • Introductory Physics Homework Help
Replies
11
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
7
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
9
Views
2K
  • Science and Math Textbooks
Replies
19
Views
17K
Back
Top