Contact US

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Solving second order differential equation?

Solving second order differential equation?

Solving second order differential equation?

I would like to solve a second order differential equation that represents a spring mass damper system that has an external acceleration applied to it.

I need to know the displacement over time output curve x(t). The input acceleration curve Gz(t)is a data set from experiment.

I have attached a picture (Mathcad Function.jpg) of my Mathcad sheet with the function to solve and a plot of the input acceleration trace.

Is it possible to solve this equation for x(t)?

If so I am not that familiar with Mathcad to know exactly how to do this, any help would be appreciated.


RE: Solving second order differential equation?


Is it possible to solve this equation for x(t)?
It is not practical to get a symbolic or exact solution but you can use RK4 to find a numerical solution easily enough.  Look for the Pendulum example in the Mathcad help.  Help->Index->odesolve.

Peter Nachtwey
Delta Computer Systems


RE: Solving second order differential equation?

Hi Peter, I am only after a numerical solution as my input acceleration is numerical. I have followed the pendulum example in help with limited success.

If I use the solve block and instead of submitting Gz(t) as my input acceleration I just use a single value I can obtain a solution for x(t). However If I input the input acceleration as a variable Gz(t) as I need to I cannot obtain a solution.

Accorading to the pendulum help example I believe I need to enter the solve blaock in this fashion Odesolve([vector], x, b, [step]) for my solution to be calcualted by I do not know how to ue this despite my best efforts.

I am not sure what to do with the [vector] part and the help is not particulalry helpful in this regard.

Do you have any examples you may be able to guide me with?

Thanks Peter.

RE: Solving second order differential equation?

If you only need a numerical solution then this link will show you how to do it using state space methods but you can also use the Runge-Kutta method.

This example is a little more than what you asked for because I show how to control the mass on a spring.  All you are interested in is page 4/24 and this x=A*x+B*u

I made this example to show other how important the second derivative gain is for damping and controlling an under damped system.  I was comparing my PID solution with another persons best PI solution.

Peter Nachtwey
Delta Computer Systems


RE: Solving second order differential equation?

Hi Peter, thanks for this information. From your document I can see you have an extrememly good understanding of Mathcad, far greater than myself.
I have struggled to follow your advice relating to my problem. I believe my methodology is correct however I continually receive a Mathcad error message stating:

"the return value of this function must match the problem size"

I am not sure what this means and would be highly greatful if you could offer any further assistance. I have attached my Mathcad file to this post, I was wondering if you could take a quick look at it and give me any advice that you would kindly offer.

Thankyou again for your assistance.


Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members! Already a Member? Login


Low-Volume Rapid Injection Molding With 3D Printed Molds
Learn methods and guidelines for using stereolithography (SLA) 3D printed molds in the injection molding process to lower costs and lead time. Discover how this hybrid manufacturing process enables on-demand mold fabrication to quickly produce small batches of thermoplastic parts. Download Now
Design for Additive Manufacturing (DfAM)
Examine how the principles of DfAM upend many of the long-standing rules around manufacturability - allowing engineers and designers to place a part’s function at the center of their design considerations. Download Now
Taking Control of Engineering Documents
This ebook covers tips for creating and managing workflows, security best practices and protection of intellectual property, Cloud vs. on-premise software solutions, CAD file management, compliance, and more. Download Now

Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close