2nd Order Differential Equation with Improved Euler Method (Heun's)

In summary, the conversation discusses solving a 2nd order differential equation using the Improved Euler Method for a Mass-Spring-Damper equation. The solution is converted to a pair of first order differential equations and both the forward Euler and Improved Euler solutions are presented. The question is also raised about the use of F_{n+1} in the Improved Euler solution. The expert confirms that this is correct.
  • #1
Fluidman117
34
0

Homework Statement


I would like to solve a 2nd Order Differential Equation using the Improved Euler Method. The 2nd ODE is a Mass-Spring-Damper equation. I tried coming up with an solution for the Improved Euler Method, but not entirely sure. Can you help me and have a look if this is correct?
This solution assumes that inital conditions for x and u are known.

Homework Equations


Forced Mass-Spring-Damper equation:

[itex]m\ddot{x} + b\dot{x}+kx = F[/itex]


The Attempt at a Solution



Converting the equation to a pair of first order differential equations:
[itex]u=\dot{x}[/itex]
[itex]\dot{u}=\ddot{x}[/itex]

And thus we have:
[itex]\dot{u}=\frac{1}{m}\left[F-bu-kx\right][/itex]

The forward Euler solution would result in:
[itex]x_{n+1}=x_{n}+dt*u_{n}[/itex]
[itex]u_{n+1}=u_{n}+dt*\dot{u_{n}}=u_{n}+dt*\frac{1}{m}\left[F_{n}-bu_{n}-kx_{n}\right][/itex]

And the Improved Euler solution would be:
[itex]x_{n+1}=x_{n}+dt*u_{n}[/itex]
[itex]u_{n+1}=u_{n}+dt*\dot{u_{n}}=u_{n}+\frac{dt}{2} \left[ \frac{1}{m} \left[F_{n}-bu_{n}-kx_{n}\right]+\frac{1}{m}\left[F_{n+1}-bu_{n+1}-kx_{n+1}\right] \right][/itex]

In the last equation, does the last [itex]F[/itex] needs to be [itex]F_{n+1}[/itex] like I have it?

Thanks a bunch, if you have time to have a look at it!
 
Physics news on Phys.org
  • #2
Your improved Euler solution looks fine to me. You indeed want the 'n+1'.
 
  • Like
Likes 1 person

Related to 2nd Order Differential Equation with Improved Euler Method (Heun's)

1. What is the purpose of using the Improved Euler Method (Heun's) for 2nd order differential equations?

The Improved Euler Method, also known as Heun's method, is used to approximate the solution of a 2nd order differential equation. It is an improvement over the basic Euler method as it provides a more accurate estimation of the solution by taking into account the curvature of the curve at intermediate points.

2. How does the Improved Euler Method (Heun's) work?

The Improved Euler Method works by dividing the interval of the independent variable into smaller subintervals and approximating the solution at each subinterval. It involves using the slope at the beginning and end of the subinterval to estimate the solution at the midpoint of the subinterval, which is then used to calculate a more accurate slope. This process is repeated until the desired level of accuracy is achieved.

3. What are the advantages of using the Improved Euler Method (Heun's) over other numerical methods?

Compared to the basic Euler method, the Improved Euler Method provides a more accurate estimation of the solution. It is also more efficient and requires fewer function evaluations, making it a popular choice for solving 2nd order differential equations. Additionally, it is a relatively simple method to implement and does not require advanced mathematical knowledge.

4. What are the limitations of using the Improved Euler Method (Heun's)?

While the Improved Euler Method is more accurate than the basic Euler method, it still has limitations. It can only be used for equations with continuous first and second derivatives, and it may produce inaccurate results if the step size is too large. In some cases, it may also be more computationally expensive than other numerical methods.

5. In what situations is the Improved Euler Method (Heun's) commonly used?

The Improved Euler Method is commonly used in situations where the exact solution of a 2nd order differential equation is difficult or impossible to obtain. It is also useful when a relatively accurate estimation of the solution is needed, but higher-order methods may be too complex or time-consuming. Additionally, it can be applied to a wide range of problems in various fields such as physics, engineering, and economics.

Similar threads

  • Calculus and Beyond Homework Help
Replies
21
Views
874
  • Calculus and Beyond Homework Help
Replies
0
Views
192
  • Calculus and Beyond Homework Help
Replies
7
Views
335
  • Calculus and Beyond Homework Help
Replies
3
Views
587
  • Calculus and Beyond Homework Help
Replies
5
Views
550
  • Calculus and Beyond Homework Help
Replies
8
Views
280
  • Calculus and Beyond Homework Help
Replies
2
Views
180
  • Calculus and Beyond Homework Help
Replies
5
Views
938
  • Advanced Physics Homework Help
Replies
6
Views
367
  • Calculus and Beyond Homework Help
Replies
18
Views
1K
Back
Top