# Thread: MATLAB Second order nonlinear differential equation

1. ## 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?

2. 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.

3. Originally Posted by math112 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

#### Search Tags

differential, equation, matlab, nonlinear, order 