1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Using Euler Approximation

Tags:
  1. Sep 22, 2015 #1
    1. The problem statement, all variables and given/known data
    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).

    2. Relevant 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]


    3. 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.
     
  2. jcsd
  3. Sep 22, 2015 #2

    BvU

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    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 ?
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted



Similar Discussions: Using Euler Approximation
  1. Euler Buckling (Replies: 1)

  2. Euler's Method (Replies: 0)

  3. Fortran : Using arrays (Replies: 18)

Loading...