Results 1 to 4 of 4

Thread: Solving a system of differential equations using central difference approximations

  1. #1
    Newbie
    Joined
    Jul 2011
    Posts
    4

    Solving a system of differential equations using central difference approximations

    Good day,

    I am having a bit a trouble solving this system:

    $\displaystyle y^{'} = v$

    $\displaystyle v^{'} = \lambda y$

    Incorporating the following central difference approximations:

    $\displaystyle v_{i} =\frac{y_{i+1}-y_{i-1}}{2\Delta x}$



    $\displaystyle \lambda y_{i} = \frac{v_{i+1}-v_{i-1}}{2\Delta x}$

    I've made an attempt to solve this using a method I use when I encounter linear de's rather than a system. I don't know if its valid in a system case...

    First thing, I shifted the indices for $\displaystyle v_{i}$

    ie. $\displaystyle v_{i+1} =\frac{y_{i+2}-y_{i}}{2\Delta x}$
    $\displaystyle v_{i-1} =\frac{y_{i}-y_{i-2}}{2\Delta x}$

    Substituting these into the $\displaystyle \lambda y_{i}$:

    $\displaystyle y_{i+2}+y_{i}\alpha+y_{i-2}=0$
    Where, $\displaystyle \alpha = -2-4(\Delta x)^{2}\lambda$

    From here I let $\displaystyle y_{i}=n^{i}$, sub it into the equation and basically solve for n.

    I get a solution for $\displaystyle y_{i}$ that contains like 6 constants.

    I use this to solve for $\displaystyle v_{i}$ which results in a long solution with many square roots.

    As I mentioned I'm highly doubtful if this is actually how you do it... Any help would be greatly appreciated.

    Thanks
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Grand Panjandrum
    Joined
    Nov 2005
    From
    someplace
    Posts
    14,972
    Thanks
    5

    Re: Solving a system of differential equations using central difference approximation

    Quote Originally Posted by MrPhil View Post
    Good day,

    I am having a bit a trouble solving this system:

    $\displaystyle y^{'} = v$

    $\displaystyle v^{'} = \lambda y$

    Incorporating the following central difference approximations:

    $\displaystyle v_{i} =\frac{y_{i+1}-y_{i-1}}{2\Delta x}$



    $\displaystyle \lambda y_{i} = \frac{v_{i+1}-v_{i-1}}{2\Delta x}$

    I've made an attempt to solve this using a method I use when I encounter linear de's rather than a system. I don't know if its valid in a system case...

    First thing, I shifted the indices for $\displaystyle v_{i}$

    ie. $\displaystyle v_{i+1} =\frac{y_{i+2}-y_{i}}{2\Delta x}$
    $\displaystyle v_{i-1} =\frac{y_{i}-y_{i-2}}{2\Delta x}$

    Substituting these into the $\displaystyle \lambda y_{i}$:

    $\displaystyle y_{i+2}+y_{i}\alpha+y_{i-2}=0$
    Where, $\displaystyle \alpha = -2-4(\Delta x)^{2}\lambda$

    From here I let $\displaystyle y_{i}=n^{i}$, sub it into the equation and basically solve for n.

    I get a solution for $\displaystyle y_{i}$ that contains like 6 constants.

    I use this to solve for $\displaystyle v_{i}$ which results in a long solution with many square roots.

    As I mentioned I'm highly doubtful if this is actually how you do it... Any help would be greatly appreciated.

    Thanks
    Seems like a lot of work, who said to use central differences?

    CB
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Newbie
    Joined
    Jul 2011
    Posts
    4

    Re: Solving a system of differential equations using central difference approximation

    Quote Originally Posted by CaptainBlack View Post
    Seems like a lot of work, who said to use central differences?

    CB
    In a lecture, we had two examples(that weren't systems) and solved them using finite difference methods. We were left to attempt this question along with the two central difference approximations. I would have used Adam's Method to solve something like this.
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Grand Panjandrum
    Joined
    Nov 2005
    From
    someplace
    Posts
    14,972
    Thanks
    5

    Re: Solving a system of differential equations using central difference approximation

    Quote Originally Posted by MrPhil View Post
    In a lecture, we had two examples(that weren't systems) and solved them using finite difference methods. We were left to attempt this question along with the two central difference approximations. I would have used Adam's Method to solve something like this.
    Write your system as a vector first order ODE:

    $\displaystyle {\bf{X}}'=f(t,{\bf{X}})={\bf{AX}}$

    where $\displaystyle {\bf{X}}=(y,v)^T$ and $\displaystyle {\bf{A}}=\left[\begin{array}{cc}0&1\\\lambda&0 \end{array}\right]$

    Now just write your method out in terms of vector $\displaystyle \bf{X}$ and everything should work as in the scalar case.

    But I still always use Euler's method or a (possibly iterated) first order predictor corrector method for these things, but I know that I am in a small minority.

    CB
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Replies: 2
    Last Post: Mar 12th 2012, 01:25 AM
  2. Solving a System of First Order Differential Equations
    Posted in the Differential Equations Forum
    Replies: 1
    Last Post: Nov 16th 2010, 10:08 PM
  3. Replies: 0
    Last Post: Feb 24th 2010, 01:48 AM
  4. Replies: 1
    Last Post: Jan 7th 2010, 08:50 AM
  5. system of differential equations
    Posted in the Calculus Forum
    Replies: 1
    Last Post: May 14th 2008, 08:40 AM

/mathhelpforum @mathhelpforum