Results 1 to 5 of 5

Math Help - Ode with variable in trig function

  1. #1
    Newbie
    Joined
    Feb 2011
    Posts
    15

    Ode with variable in trig function

    What method would I use to solve ode that look like

    x'' + sin(x)=0. And

    x' + sin(x)=0?

    They are different problems so not a system. On a side not, is there a quick way to numerically solve with Matlab?
    Any help appreciated.
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Senior Member
    Joined
    Nov 2011
    From
    Crna Gora
    Posts
    420
    Thanks
    64

    Re: Ode with variable in trig function

    WA
    Follow Math Help Forum on Facebook and Google+

  3. #3
    MHF Contributor
    Prove It's Avatar
    Joined
    Aug 2008
    Posts
    11,404
    Thanks
    1293

    Re: Ode with variable in trig function

    Quote Originally Posted by Dagger2006 View Post
    What method would I use to solve ode that look like

    x'' + sin(x)=0. And

    x' + sin(x)=0?

    They are different problems so not a system. On a side not, is there a quick way to numerically solve with Matlab?
    Any help appreciated.
    \displaystyle \begin{align*} \frac{dx}{dt} + \sin{x} &= 0 \\ \frac{dx}{dt} &= -\sin{x} \\ -\frac{1}{\sin{x}}\,\frac{dx}{dt} &= 1 \\ -\frac{\sin{x}}{\sin^2{x}}\,\frac{dx}{dt} &= 1 \\ -\frac{\sin{x}}{1 - \cos^2{x}}\,\frac{dx}{dt} &= 1 \\ \int{-\frac{\sin{x}}{1 - \cos^2{x}}\,\frac{dx}{dt}\,dt} &= \int{1\,dt} \\ \int{-\frac{\sin{x}}{1 - \cos^2{x}}\,dx} &= t + C_1 \\ \int{\frac{1}{1 - u^2}\,du} &= t + C_1 \textrm{ if we let } u = \cos{x} \implies du = -\sin{x}\,dx \\ \int{\frac{1}{(1 - u)(1 + u)}\,du} &= t + C_1 \\ \int{\frac{1}{2(1 - u)} + \frac{1}{2(1 + u)}\,du} &= t + C_1 \\ -\frac{1}{2}\ln{|1 - u|} + \frac{1}{2}\ln{|1 + u|} + C_2 &= t + C_1 \\ \frac{1}{2}\ln{\left|\frac{1 + u}{1 - u}\right|} &= t + C_1 - C_2 \\ \ln{\left|\frac{1 + u}{1 - u}\right|} &= 2t + C \textrm{ where } C = 2C_1 - 2C_2 \\ \ln{\left|\frac{2}{1 - u} - 1\right|} &= 2t + C \\ \left|\frac{2}{1 - u} - 1\right| &= e^{2t + C} \\ \frac{2}{1 - u} - 1 &= A\,e^{2t}\textrm{ where }A = \pm e^C\end{align*}

    \displaystyle \begin{align*}  \frac{2}{1 - u} &= A\,e^{2t} + 1 \\ \frac{1 - u}{2} &= \frac{1}{A\,e^{2t} + 1} \\ 1 - u &= \frac{2}{A\,e^{2t} + 1} \\ u &= 1 - \frac{2}{A\,e^{2t} + 1} \\ u &= \frac{A\,e^{2t} + 1 - 2}{A\,e^{2t} + 1} \\ u &= \frac{A\,e^{2t} - 1}{A\,e^{2t} + 1} \\ \cos{x} &= \frac{A\,e^{2t} - 1}{A\,e^{2t} + 1} \\ x &= \arccos{\left(\frac{A\,e^{2t} - 1}{A\,e^{2t} + 1}\right)}  \end{align*}
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Newbie
    Joined
    Feb 2011
    Posts
    15

    Re: Ode with variable in trig function

    Thanks for the result. That's around the direction i was thinking with the 1st order on. Would I solve the 2nd order ODE the same way, or is there another method I should try? Thanks!
    Follow Math Help Forum on Facebook and Google+

  5. #5
    Super Member

    Joined
    May 2006
    From
    Lexington, MA (USA)
    Posts
    11,682
    Thanks
    614

    Re: Ode with variable in trig function

    Hello, Dagger2006!

    \frac{dx}{dt} + \sin x \:=\:0

    \frac{dx}{dt} \:=\:-\sin x \quad\Rightarrow\quad \csc x\,\frac{dx}{dt} \:=\:-1

    \text{Integrate: }\:\int \csc x\,dx \;=\;-\int dt

    . . . . \ln|\csc x - \cot x| \;=\;-t + C

    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Isolate variable in trig equation
    Posted in the Trigonometry Forum
    Replies: 7
    Last Post: April 28th 2011, 10:56 AM
  2. Replies: 5
    Last Post: April 26th 2011, 05:08 AM
  3. Distribution function for a function of random variable
    Posted in the Advanced Statistics Forum
    Replies: 3
    Last Post: April 8th 2010, 12:14 PM
  4. Help with a trig question - Solving for variable
    Posted in the Pre-Calculus Forum
    Replies: 9
    Last Post: June 22nd 2009, 08:53 PM
  5. Solving 3 Different Trig Equations (find variable)
    Posted in the Trigonometry Forum
    Replies: 3
    Last Post: December 18th 2006, 03:05 PM

Search Tags


/mathhelpforum @mathhelpforum