Optimizing Euler Method for Differential Equations with Large Coefficients

In summary, the conversation discusses using Euler's Method to approximate a solution to a differential equation involving forces, velocity, and position. The person asking the question is having trouble with their results and is seeking clarification on their approach. The other person suggests checking the coefficients and performing the necessary calculations.
  • #1
BeeKay
16
0

Homework Statement


Hello,

I have a question about using Eulers Method to approximate a solution to a differential equation. The problem lists forces that would be applied on an object and influences its velocity and therefore its position. I believe I am doing the Euler method correct to approximate what the "new velocity" would be, but based on somewhat wonky results I want to confirm if I am making an error using the Euler Method ( or in the Fortran code, but I feel like that is fine).

Homework Equations


[itex] m \frac{d^ {2}y}{dt^2} + b \frac{dy} {dt} + ky = F_{o} sin(νt), y(0) = y_{o}, \frac{dy} {dt} = ˙y_{o}. [/itex] when t=0

[itex] \frac{dy} {dt} = v, y(0) = y_{o}, [/itex]

[itex] \frac{dv} {dt} = \frac{− k} {m} y − \frac {b} {m} v + \frac {F_{o}} {m} sin(νt), v(0) = ˙y_{o} [/itex]

[itex] \frac {y_{n+1} − y_{n}} {∆t} = v_{n}, [/itex]

[itex] \frac{v_{n+1} − v_{n}} {∆t} = \frac {− k }{m} y_{n} − \frac {b} {m} v_{n} + \frac {Fo} {m} sin(νt_{n}), [/itex]

[itex] t_{n+1} = t_{n + ∆t} [/itex]

The Attempt at a Solution


The way I interpreted it was to first find [itex] \frac{v_{n+1} − v_{n}} {∆t} [/itex] by find it at the initial values. If I use 0.02 as the timestep, I solved by substituting in the initial given y value and v value. Some other parameters were given, but they would not be changing. I multiplied this entire solution by the time step to find how much the velocity changed in that time. I then added this change to the original velocity. From there, I am a little confused as to how it applies to the position estimation. If [itex] \frac {y_{n+1} − y_{n}} {∆t} = v_{n}, [/itex], then shouldn't I just take the solution to [itex] \frac{v_{n+1} − v_{n}} {∆t} = \frac {− k }{m} y_{n} − \frac {b} {m} v_{n} + \frac {Fo} {m} sin(νt_{n}), [/itex] multiply it by the timestep, and then add it to the previous y value? Thanks in advance and sorry if I messed up LaTeX. If you need more information about the problem or my process, let me know.
 
Physics news on Phys.org
  • #2
Hello BK,

You have a second order differential equation and have worked it around to two expressions for ##v_{n+1}## and ##y_{n+1}## in terms of the known ##v_n## and ##y_n##. I think that's correct. So "do the step"!

If the results are wonky, perhaps the coefficients are a bit big for the time step ?
 

1. What is Euler approximation?

Euler approximation is a numerical method used to approximate the solution of a differential equation. It involves using small time steps to calculate the values of a function at different points along its curve.

2. When is Euler approximation used?

Euler approximation is commonly used when it is difficult or impossible to find an exact analytical solution to a differential equation. It is also used when the differential equation involves complex or non-linear functions.

3. How accurate is Euler approximation?

Euler approximation is generally not as accurate as other numerical methods such as Runge-Kutta or Adams-Bashforth. The error in the approximation increases as the step size decreases, and it may not accurately capture the behavior of the function at certain points.

4. What are the advantages of using Euler approximation?

Euler approximation is a simple and easy-to-implement method for approximating the solution of a differential equation. It also provides a good visualization of the behavior of the function over time, as it calculates the values at multiple points along the curve.

5. Are there any limitations to using Euler approximation?

Yes, there are limitations to using Euler approximation. It is not suitable for problems with high accuracy requirements, as the error in the approximation can be significant. It also cannot handle stiff equations or systems of differential equations, as it may lead to unstable solutions.

Similar threads

  • Engineering and Comp Sci Homework Help
Replies
0
Views
524
  • Introductory Physics Homework Help
Replies
5
Views
1K
Replies
2
Views
765
  • Engineering and Comp Sci Homework Help
Replies
9
Views
2K
  • Calculus and Beyond Homework Help
Replies
18
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
5
Views
1K
  • Advanced Physics Homework Help
Replies
6
Views
317
Replies
7
Views
2K
  • Differential Equations
Replies
3
Views
1K
  • Calculus and Beyond Homework Help
Replies
2
Views
204
Back
Top