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 ]

 Page 1 of 1 [ 1 post ]
 Print view Previous topic | Next topic
Author Message
 Post subject: help solving ODE problem using C ProgramPosted: Mon, 29 Mar 2010 16:00:41 UTC
 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.

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

 Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending
 Page 1 of 1 [ 1 post ]

 All times are UTC [ DST ]

Who is online

Users browsing this forum: emekapa

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

Search for:
 Jump to:  Select a forum ------------------ High School and College Mathematics    Algebra    Geometry and Trigonometry    Calculus    Matrix Algebra    Differential Equations    Probability and Statistics    Proposed Problems Applications    Physics, Chemistry, Engineering, etc.    Computer Science    Math for Business and Economics Advanced Mathematics    Foundations    Algebra and Number Theory    Analysis and Topology    Applied Mathematics    Other Topics in Advanced Mathematics Other Topics    Administrator Announcements    Comments and Suggestions for S.O.S. Math    Posting Math Formulas with LaTeX    Miscellaneous