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

Click For Summary
SUMMARY

The forum discussion focuses on solving a 2nd Order Differential Equation, specifically a Mass-Spring-Damper equation, using the Improved Euler Method, also known as Heun's method. The user successfully converts the second-order equation into a system of first-order equations and outlines both the forward Euler and Improved Euler solutions. The consensus confirms that the last force term in the Improved Euler solution should indeed be F_{n+1}, validating the user's approach to the problem.

PREREQUISITES
  • Understanding of 2nd Order Differential Equations
  • Familiarity with the Mass-Spring-Damper system
  • Knowledge of numerical methods, specifically the Improved Euler Method
  • Basic skills in converting higher-order ODEs to first-order systems
NEXT STEPS
  • Study the derivation and application of the Improved Euler Method (Heun's method)
  • Explore numerical solutions for second-order differential equations
  • Learn about stability and accuracy in numerical methods for ODEs
  • Investigate the implementation of the Mass-Spring-Damper model in simulation software
USEFUL FOR

Students and professionals in engineering, physics, and applied mathematics who are working with differential equations and numerical methods for dynamic systems.

Fluidman117
Messages
34
Reaction score
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:

m\ddot{x} + b\dot{x}+kx = F


The Attempt at a Solution



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

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

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

And the Improved Euler solution would be:
x_{n+1}=x_{n}+dt*u_{n}
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]

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

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

Similar threads

  • · Replies 21 ·
Replies
21
Views
2K
  • · Replies 11 ·
Replies
11
Views
3K
  • · Replies 7 ·
Replies
7
Views
2K
Replies
0
Views
991
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 5 ·
Replies
5
Views
1K
Replies
8
Views
1K
  • · Replies 2 ·
Replies
2
Views
1K
Replies
3
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K