S.O.S. Mathematics CyberBoard

Your Resource for mathematics help on the web!
It is currently Wed, 19 Jun 2013 11:16:51 UTC

All times are UTC [ DST ]




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: help solving ODE problem using C Program
PostPosted: Mon, 29 Mar 2010 16:00:41 UTC 
Offline
S.O.S. Newbie

Joined: Mon, 29 Mar 2010 15:13:38 UTC
Posts: 1
here's the situation:

the motion of a forced spring-mass-damper system, in which the spring constant has linear term 'a' and non-linear term 'b', is governed by the differential equation:

m*f'' + c*f' + a*x + b*x^3 = P cos(wt)

where:
f'' = second order differentiation of t (d^2x/dt^2)
f' = first order differentiation of t (dx/dt)
x = displacement from equilibrium position in metre unit
t = time in seconds unit
m = 1 kg mass
c = 0.4 Ns/m
a = 1 N/m
b = 0.5 N/m^3
P = 0.5 N
angular velocity/omega(written above as 'w') = 0.5 s^-1
initial displacement, x = 0 m
initial velocity, v = dx/dt = 0 m/s

so, the question is:
using at least 2 different numerical methods (euler's, heun's, range-kutta) to solve the above equation for displacement, x and velocity, v as a function of time, t in C coding.

also the additional problems:
1) the effect of time step size on the accuracy of the results for each numerical method. Plot (x and v versus t) obtained using different time steps over the time period 0<<t<<100 on the same figure.

2) the effect of different numerical methods on the accuracy of the results. PLot the results obtained from different method (x and v versus t) over the time period 0<<t<<100 on the same figure with the same time step size for each numerical method.

the main concern is actually the main question which is to solve the equation for displacement, x and velocity, v as a function of time, t by using different numerical method (euler's, heun's, range-kutta) in C coding, meaning each method has to be 1 coding solution.

thanks a million...


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: emekapa


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Contact Us | S.O.S. Mathematics Homepage
Privacy Statement | Search the "old" CyberBoard

users online during the last hour
Powered by phpBB © 2001, 2005-2011 phpBB Group.
Copyright © 1999-2013 MathMedics, LLC. All rights reserved.
Math Medics, LLC. - P.O. Box 12395 - El Paso TX 79913 - USA