Results 1 to 8 of 8

Math Help - Calculate spring constant - Euler's Method

  1. #1
    Junior Member
    Joined
    Feb 2010
    Posts
    28

    Calculate spring constant - Euler's Method

    Can anyone solve this?

    A physical system composed of a mass connected by a spring to a fixed point and moving without friction on a horizontal line can be described by the following differential equation:

    m\,\frac{d^2x}{dt^2} + c\, \frac{dx}{dt} + k\, x = 0

    This equation was integrated numerically by Euler's method, using the following values:

    t0 m c dx/dt (initial)
    0 20 1 1

    The results are presented in the graph of position (x) versus time (t), where each point is the result of an iteration.




    Any help is greatly appreciated. I can tell you that the answer is K = 40, but I don't know how to get there...

    My failed attempt at this:

    Using maxima:
    > 20*'diff('diff(x, t), t) + 'diff(x, t) + K*x;
    > ode2(%, x, t);
    > ic2(res, t=0, x=1, 'diff(x,t)=1);
    > solve(%, K);

    But this yields something that doen't make sense...
    Last edited by nunos; February 9th 2010 at 01:28 PM.
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Senior Member
    Joined
    Nov 2009
    Posts
    277
    Thanks
    2
    You have simple harmonic motion. The damping term (proportional to dx/dt) only affects the amplitude.

    Look at the period. The peak is roughly at 0.5, and again at 5, leading to a period of 5-0.5=4.5.

    The period of simple harmonic motion is 2*pi*sqrt(m/k). You know m=20 from the given. So:

    4.5 = 2*pi * sqrt(m/k), solve for k gives close to 40.
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Junior Member
    Joined
    Feb 2010
    Posts
    28
    Quote Originally Posted by qmech View Post
    You have simple harmonic motion. The damping term (proportional to dx/dt) only affects the amplitude.

    Look at the period. The peak is roughly at 0.5, and again at 5, leading to a period of 5-0.5=4.5.

    The period of simple harmonic motion is 2*pi*sqrt(m/k). You know m=20 from the given. So:

    4.5 = 2*pi * sqrt(m/k), solve for k gives close to 40.
    gmech thanks a lot for your answer. I really appreciate it . That certainly does work. However, this problem is from a Numerical Methods subject so, even though your thought process doesn't require fancy physics knowledge, I am pretty sure that's not how it's suppose to go about it.
    Therefore, if someone could come up with a solution 'more numerical methods way', that would great.

    Thanks.
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Member
    Joined
    Aug 2009
    Posts
    170
    Thanks
    8
    Just some thoughts ... I don't know maxima, I'm assuming the x and t points were taken from the graph, how about the derivatives though? How does it compute those values? Is it built-in? Or do you need to define it?

    Ofcourse, if you want to make it simpler, you could take advantage of the information given by qmech, by getting the t values when dx/dt = 0, getting the average difference between consecutive values. Then divide this value by pie, square it, divide by m, and invert it .... or something similar (maybe you could get the t values when x is maximum/minimum)
    Last edited by Bingk; February 10th 2010 at 07:20 AM. Reason: added stuff
    Follow Math Help Forum on Facebook and Google+

  5. #5
    Junior Member
    Joined
    Feb 2010
    Posts
    28
    Quote Originally Posted by Bingk View Post
    Just some thoughts ... I don't know maxima, I'm assuming the x and t points were taken from the graph, how about the derivatives though? How does it compute those values? Is it built-in? Or do you need to define it?

    Ofcourse, if you want to make it simpler, you could take advantage of the information given by qmech, by getting the t values when dx/dt = 0, getting the average difference between consecutive values. Then divide this value by pie, square it, divide by m, and invert it .... or something similar (maybe you could get the t values when x is maximum/minimum)
    Thanks for your reply Bingk, but I am afraid I didn't understand what you meant.

    As I mentioned in my previous post, qmech is a very valid and intelligent way to solve the problem, but I am pretty sure there's a more "numerical methods" way to do it, and that's what I am asking if anyone knows how?

    I am not sure if you did or did not present another way to solve the problem (sorry, I am not a native speaker and my english is not that good...), by all means, if you did, please explain it in a different way, perhaps I will understand it.

    This might be a approach to the problem: sometimes when a 2nd order ODE is given it makes sense to reduce it two 1st order ODE, but I am not sure how to do that and if this is the case.

    Anyone with more thoughts on this?

    Btw, any moderator reading this: I noticed the thread was moved to "differential equations" section. Even though the problem consists of a ODE I still think the appropriate section would be Number Theory or Advanced Applied Math, since it regards a non-analytical way to solve the problem, but more using a CAS.
    Follow Math Help Forum on Facebook and Google+

  6. #6
    Member
    Joined
    Aug 2009
    Posts
    170
    Thanks
    8
    Definitely not Number theory ... number theory deals more on integers, not numerical methods

    I was asking how you defined "'diff(x,t)" ... I know it's supposed to be the derivative at (x,t), but does maxima calculate it for you automatically? If so, how? If not, then how did you define the function?

    As for the other way, what you can do is find the points when diff(x,t)=0, those will be your maximum/minimum points. Then use those values to calculate an average value for the period. Once you have that period, use the formula presented by qmech ... and to be clear, I mean write the code to do this ... don't do it "by hand"
    Follow Math Help Forum on Facebook and Google+

  7. #7
    Junior Member
    Joined
    Feb 2010
    Posts
    28
    Quote Originally Posted by Bingk View Post
    Definitely not Number theory ... number theory deals more on integers, not numerical methods

    I was asking how you defined "'diff(x,t)" ... I know it's supposed to be the derivative at (x,t), but does maxima calculate it for you automatically? If so, how? If not, then how did you define the function?

    As for the other way, what you can do is find the points when diff(x,t)=0, those will be your maximum/minimum points. Then use those values to calculate an average value for the period. Once you have that period, use the formula presented by qmech ... and to be clear, I mean write the code to do this ... don't do it "by hand"
    Thanks for another reply Bingk. That does make sense, but the "foundation" for that would still be knowing that "formula" qmech mentioned. As I mentioned before, that's a pretty valid thought process, but I am sure, even though that's not that hard to know that, that there is another way around it.

    Sorry if I seem to be very "picky". Still looking for another solution...
    Follow Math Help Forum on Facebook and Google+

  8. #8
    Junior Member
    Joined
    Feb 2010
    Posts
    28
    Anyone?
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Euler's constant.
    Posted in the Differential Geometry Forum
    Replies: 2
    Last Post: May 23rd 2011, 05:41 AM
  2. About Euler's constant (4)...
    Posted in the Math Challenge Problems Forum
    Replies: 4
    Last Post: November 16th 2009, 07:37 AM
  3. About Euler's constant (3)...
    Posted in the Math Challenge Problems Forum
    Replies: 1
    Last Post: November 11th 2009, 07:02 AM
  4. spring constant
    Posted in the Math Topics Forum
    Replies: 2
    Last Post: September 25th 2009, 02:44 PM
  5. Spring Constant
    Posted in the Math Topics Forum
    Replies: 7
    Last Post: April 13th 2008, 12:21 PM

Search Tags


/mathhelpforum @mathhelpforum