×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

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!
  • Students Click Here

*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

Jobs

solving ode without using ode solver

solving ode without using ode solver

solving ode without using ode solver

(OP)
is there any way to solve a second degree ordinary differential equation using matlab without using built-in ode solver such as ode45,ode23,rk4 etc?

RE: solving ode without using ode solver

Why?

RE: solving ode without using ode solver

(OP)
because i would like to solve the problem using two methods and compared the results to check for their accuracies

RE: solving ode without using ode solver

The very name rk45 is because that method itself uses two different methods and compares them internally to determine a sense of the accuracy.

You can write you own method that does not replace all of the very difficult MATLAB functionality if you only want to test accuracy.  Go ahead an write you own integrator and set the step size low and look for convergenceon a particular problem.  Then check the MATLAB ones.

RE: solving ode without using ode solver

your equation may have an analytical solution obtainable through the symbolic toolbox (dsolve command).

There are many many numerical methods you can program (although I agree you will have to do a lot of work to get nearly as accurate/efficient as ode45b).   The simplest (but not most accurate) is to set up the problem the same as you would for ode45:  dx/xt = f(x,t) where x is a state vector. Then start with an initial condition x0.  Then time step
x1 = x0 + delta-t * f(x0,t0)
x2 = x1 + delta-t * f(x1,t1)
etc

=====================================
Eng-tips forums: The best place on the web for engineering discussions.

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!


Resources