Results 1 to 3 of 3

Math Help - MATLAB Second order nonlinear differential equation

  1. #1
    Newbie
    Joined
    Dec 2008
    Posts
    1

    Talking MATLAB Second order nonlinear differential equation

    d2θ/dt2 + c/(mL)dθ/dt + (g/L)sin(θ) = 0

    c/(mL)=.5
    (g/L)=2

    Initial Conditions:
    θ(0)=pi/2
    θ'(0)=pi/2

    How can this be solved in MATLAB. I am new to it and still not very good. Would ode solvers work? What other possible functions can I use? What does the code look like?
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Senior Member
    Joined
    Dec 2007
    From
    Melbourne
    Posts
    428
    Matlab's ode solvers can only be used if you want to evaluate the solution at a specific point or a number of specific points. If you want an equation for the solution, you should take a look at the dsolve function.
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Grand Panjandrum
    Joined
    Nov 2005
    From
    someplace
    Posts
    14,972
    Thanks
    4
    Quote Originally Posted by math112 View Post
    d2θ/dt2 + c/(mL)dθ/dt + (g/L)sin(θ) = 0

    c/(mL)=.5
    (g/L)=2

    Initial Conditions:
    θ(0)=pi/2
    θ'(0)=pi/2

    How can this be solved in MATLAB. I am new to it and still not very good. Would ode solvers work? What other possible functions can I use? What does the code look like?
    The ode solvers will give a numerical solution once you convert this into a first order system. See this thread.

    CB
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Second order nonlinear nonhomogeneous differential equation
    Posted in the Differential Equations Forum
    Replies: 2
    Last Post: November 7th 2011, 04:51 AM
  2. First-order nonlinear ordinary differential equation
    Posted in the Differential Equations Forum
    Replies: 1
    Last Post: September 12th 2011, 09:20 PM
  3. Solving a first-order nonlinear ordinary differential equation
    Posted in the Differential Equations Forum
    Replies: 7
    Last Post: May 8th 2011, 03:13 PM
  4. problem with first-order nonlinear ordinary differential equation
    Posted in the Differential Equations Forum
    Replies: 2
    Last Post: January 23rd 2010, 08:07 AM
  5. Nonlinear differential equation MATLAB
    Posted in the Advanced Applied Math Forum
    Replies: 1
    Last Post: December 30th 2008, 07:27 AM

Search Tags


/mathhelpforum @mathhelpforum