Runge-Kutta method for higher-order differential equations











up vote
1
down vote

favorite












I am studying Numerical Analysis with the book of Richard L.Burden.
A question which I'm struggling with right now is following.




Transform the second-order initial-value problem



$y'' - 2y' + 2y = e^{2t}sin t$ for $0 leq t leq 1, $ with $y(0) = -0.4, y'(0) = -0.6, h=0.1$



into a system of first order initial-value problems, and use the Runge-Kutta method ith h=0.1 to approximate the solution.




Then,
$$u_1(t) = y(t), u_2(t) = y'(t)$$
$$u_1'(t) = u_2(t)$$
$$u_2'(t) = e^{2t}sin t - 2u_1(t) + u_2(t)$$
$$u_1(0) = -0.4, u_2(0) = -0.6$$



This initial conditions give $w_{1,0} = -0.4, w_{2,0}=-0.6$



I can understand that $k_{1,1} = hf_1(t_0, w_{1,0}, w_{2,0}) = hw_{2,0}$



$f_1 = u_1'= u_2(t)$,
So $f_1(t_0, w_{1,0}, w_{2,0}) = u_2(t_0, w_{1,0}, w_{2,0}) = w_{2,0}$ (By definition of $w_{i,j}$)



However, I can't understand the following.
$$k_{2,1} = hf_1(t_0 + frac{h}{2}, w_{1,0} + frac{1}{2}k_{1,1}, w_{2,0} + frac{1}{2}k_{1,2}) = hleft[w_{2,0} + frac{1}{2}k_{1,2}right]$$



Why does $f_1(t_0 + frac{h}{2}, w_{1,0} + frac{1}{2}k_{1,1}, w_{2,0} + frac{1}{2}k_{1,2})$ equal to $w_{2,0} + frac{1}{2}k_{1,2}$? It seems that third argument in the function comes out, but there is no detailed explanation in this book.










share|cite|improve this question




























    up vote
    1
    down vote

    favorite












    I am studying Numerical Analysis with the book of Richard L.Burden.
    A question which I'm struggling with right now is following.




    Transform the second-order initial-value problem



    $y'' - 2y' + 2y = e^{2t}sin t$ for $0 leq t leq 1, $ with $y(0) = -0.4, y'(0) = -0.6, h=0.1$



    into a system of first order initial-value problems, and use the Runge-Kutta method ith h=0.1 to approximate the solution.




    Then,
    $$u_1(t) = y(t), u_2(t) = y'(t)$$
    $$u_1'(t) = u_2(t)$$
    $$u_2'(t) = e^{2t}sin t - 2u_1(t) + u_2(t)$$
    $$u_1(0) = -0.4, u_2(0) = -0.6$$



    This initial conditions give $w_{1,0} = -0.4, w_{2,0}=-0.6$



    I can understand that $k_{1,1} = hf_1(t_0, w_{1,0}, w_{2,0}) = hw_{2,0}$



    $f_1 = u_1'= u_2(t)$,
    So $f_1(t_0, w_{1,0}, w_{2,0}) = u_2(t_0, w_{1,0}, w_{2,0}) = w_{2,0}$ (By definition of $w_{i,j}$)



    However, I can't understand the following.
    $$k_{2,1} = hf_1(t_0 + frac{h}{2}, w_{1,0} + frac{1}{2}k_{1,1}, w_{2,0} + frac{1}{2}k_{1,2}) = hleft[w_{2,0} + frac{1}{2}k_{1,2}right]$$



    Why does $f_1(t_0 + frac{h}{2}, w_{1,0} + frac{1}{2}k_{1,1}, w_{2,0} + frac{1}{2}k_{1,2})$ equal to $w_{2,0} + frac{1}{2}k_{1,2}$? It seems that third argument in the function comes out, but there is no detailed explanation in this book.










    share|cite|improve this question


























      up vote
      1
      down vote

      favorite









      up vote
      1
      down vote

      favorite











      I am studying Numerical Analysis with the book of Richard L.Burden.
      A question which I'm struggling with right now is following.




      Transform the second-order initial-value problem



      $y'' - 2y' + 2y = e^{2t}sin t$ for $0 leq t leq 1, $ with $y(0) = -0.4, y'(0) = -0.6, h=0.1$



      into a system of first order initial-value problems, and use the Runge-Kutta method ith h=0.1 to approximate the solution.




      Then,
      $$u_1(t) = y(t), u_2(t) = y'(t)$$
      $$u_1'(t) = u_2(t)$$
      $$u_2'(t) = e^{2t}sin t - 2u_1(t) + u_2(t)$$
      $$u_1(0) = -0.4, u_2(0) = -0.6$$



      This initial conditions give $w_{1,0} = -0.4, w_{2,0}=-0.6$



      I can understand that $k_{1,1} = hf_1(t_0, w_{1,0}, w_{2,0}) = hw_{2,0}$



      $f_1 = u_1'= u_2(t)$,
      So $f_1(t_0, w_{1,0}, w_{2,0}) = u_2(t_0, w_{1,0}, w_{2,0}) = w_{2,0}$ (By definition of $w_{i,j}$)



      However, I can't understand the following.
      $$k_{2,1} = hf_1(t_0 + frac{h}{2}, w_{1,0} + frac{1}{2}k_{1,1}, w_{2,0} + frac{1}{2}k_{1,2}) = hleft[w_{2,0} + frac{1}{2}k_{1,2}right]$$



      Why does $f_1(t_0 + frac{h}{2}, w_{1,0} + frac{1}{2}k_{1,1}, w_{2,0} + frac{1}{2}k_{1,2})$ equal to $w_{2,0} + frac{1}{2}k_{1,2}$? It seems that third argument in the function comes out, but there is no detailed explanation in this book.










      share|cite|improve this question















      I am studying Numerical Analysis with the book of Richard L.Burden.
      A question which I'm struggling with right now is following.




      Transform the second-order initial-value problem



      $y'' - 2y' + 2y = e^{2t}sin t$ for $0 leq t leq 1, $ with $y(0) = -0.4, y'(0) = -0.6, h=0.1$



      into a system of first order initial-value problems, and use the Runge-Kutta method ith h=0.1 to approximate the solution.




      Then,
      $$u_1(t) = y(t), u_2(t) = y'(t)$$
      $$u_1'(t) = u_2(t)$$
      $$u_2'(t) = e^{2t}sin t - 2u_1(t) + u_2(t)$$
      $$u_1(0) = -0.4, u_2(0) = -0.6$$



      This initial conditions give $w_{1,0} = -0.4, w_{2,0}=-0.6$



      I can understand that $k_{1,1} = hf_1(t_0, w_{1,0}, w_{2,0}) = hw_{2,0}$



      $f_1 = u_1'= u_2(t)$,
      So $f_1(t_0, w_{1,0}, w_{2,0}) = u_2(t_0, w_{1,0}, w_{2,0}) = w_{2,0}$ (By definition of $w_{i,j}$)



      However, I can't understand the following.
      $$k_{2,1} = hf_1(t_0 + frac{h}{2}, w_{1,0} + frac{1}{2}k_{1,1}, w_{2,0} + frac{1}{2}k_{1,2}) = hleft[w_{2,0} + frac{1}{2}k_{1,2}right]$$



      Why does $f_1(t_0 + frac{h}{2}, w_{1,0} + frac{1}{2}k_{1,1}, w_{2,0} + frac{1}{2}k_{1,2})$ equal to $w_{2,0} + frac{1}{2}k_{1,2}$? It seems that third argument in the function comes out, but there is no detailed explanation in this book.







      runge-kutta-methods






      share|cite|improve this question















      share|cite|improve this question













      share|cite|improve this question




      share|cite|improve this question








      edited Nov 19 at 18:18









      LutzL

      54.7k42053




      54.7k42053










      asked Nov 19 at 7:34









      James

      82




      82






















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          0
          down vote



          accepted










          In this problem, I think what you might be confusing is that we have



          $$begin{align} u_1'(t) &= u_2(t) = f_1(t, u_1, u_2) \ u_2'(t) &= e^{2t} sin t - 2 u_1(t) + 2 u_2(t) = f_2(t, u_1, u_2) end{align}$$



          From this, we can see that for all the iterations of $j$ on $f_1$, we have



          $$f_1(t, u_1, u_2) = f_1(u_2) = w_{2,j} tag{1}$$



          That is, $f_1$ will only ever have $u_2$ terms, which do not depend on $t$ explicitly or $u_1$, thus the iteration formula reduces to



          $$k_{2,1} = hf_1left(t_0 + frac{h}{2}, w_{1,0} + frac{1}{2}k_{1,1}, w_{2,0} + frac{1}{2}k_{1,2}right) = hf_1left(w_{2,0} + frac{1}{2}k_{1,2}right)$$






          share|cite|improve this answer























          • Why does f_1 depend only on u_2? Does the formula u_2(t) = f_1(t, u_1, u_2) mean that f_1 depends only on u_2?
            – James
            Nov 20 at 0:48












          • Yes, because $f_1 = u_2$, there is nothing like $f_1 = e^t(u_1 + u_2)$, for example, in which case $f_1$ would depend on all three, namely $t, u_1 ~ text{and}~ u_2$. In this problem, we have $f_1 = u_2$ only - it is how it was setup in the very beginning. Clear?
            – Moo
            Nov 20 at 1:12








          • 1




            I got it. Thanks for answering
            – James
            Nov 20 at 2:15











          Your Answer





          StackExchange.ifUsing("editor", function () {
          return StackExchange.using("mathjaxEditing", function () {
          StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
          StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
          });
          });
          }, "mathjax-editing");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "69"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          noCode: true, onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3004621%2frunge-kutta-method-for-higher-order-differential-equations%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          0
          down vote



          accepted










          In this problem, I think what you might be confusing is that we have



          $$begin{align} u_1'(t) &= u_2(t) = f_1(t, u_1, u_2) \ u_2'(t) &= e^{2t} sin t - 2 u_1(t) + 2 u_2(t) = f_2(t, u_1, u_2) end{align}$$



          From this, we can see that for all the iterations of $j$ on $f_1$, we have



          $$f_1(t, u_1, u_2) = f_1(u_2) = w_{2,j} tag{1}$$



          That is, $f_1$ will only ever have $u_2$ terms, which do not depend on $t$ explicitly or $u_1$, thus the iteration formula reduces to



          $$k_{2,1} = hf_1left(t_0 + frac{h}{2}, w_{1,0} + frac{1}{2}k_{1,1}, w_{2,0} + frac{1}{2}k_{1,2}right) = hf_1left(w_{2,0} + frac{1}{2}k_{1,2}right)$$






          share|cite|improve this answer























          • Why does f_1 depend only on u_2? Does the formula u_2(t) = f_1(t, u_1, u_2) mean that f_1 depends only on u_2?
            – James
            Nov 20 at 0:48












          • Yes, because $f_1 = u_2$, there is nothing like $f_1 = e^t(u_1 + u_2)$, for example, in which case $f_1$ would depend on all three, namely $t, u_1 ~ text{and}~ u_2$. In this problem, we have $f_1 = u_2$ only - it is how it was setup in the very beginning. Clear?
            – Moo
            Nov 20 at 1:12








          • 1




            I got it. Thanks for answering
            – James
            Nov 20 at 2:15















          up vote
          0
          down vote



          accepted










          In this problem, I think what you might be confusing is that we have



          $$begin{align} u_1'(t) &= u_2(t) = f_1(t, u_1, u_2) \ u_2'(t) &= e^{2t} sin t - 2 u_1(t) + 2 u_2(t) = f_2(t, u_1, u_2) end{align}$$



          From this, we can see that for all the iterations of $j$ on $f_1$, we have



          $$f_1(t, u_1, u_2) = f_1(u_2) = w_{2,j} tag{1}$$



          That is, $f_1$ will only ever have $u_2$ terms, which do not depend on $t$ explicitly or $u_1$, thus the iteration formula reduces to



          $$k_{2,1} = hf_1left(t_0 + frac{h}{2}, w_{1,0} + frac{1}{2}k_{1,1}, w_{2,0} + frac{1}{2}k_{1,2}right) = hf_1left(w_{2,0} + frac{1}{2}k_{1,2}right)$$






          share|cite|improve this answer























          • Why does f_1 depend only on u_2? Does the formula u_2(t) = f_1(t, u_1, u_2) mean that f_1 depends only on u_2?
            – James
            Nov 20 at 0:48












          • Yes, because $f_1 = u_2$, there is nothing like $f_1 = e^t(u_1 + u_2)$, for example, in which case $f_1$ would depend on all three, namely $t, u_1 ~ text{and}~ u_2$. In this problem, we have $f_1 = u_2$ only - it is how it was setup in the very beginning. Clear?
            – Moo
            Nov 20 at 1:12








          • 1




            I got it. Thanks for answering
            – James
            Nov 20 at 2:15













          up vote
          0
          down vote



          accepted







          up vote
          0
          down vote



          accepted






          In this problem, I think what you might be confusing is that we have



          $$begin{align} u_1'(t) &= u_2(t) = f_1(t, u_1, u_2) \ u_2'(t) &= e^{2t} sin t - 2 u_1(t) + 2 u_2(t) = f_2(t, u_1, u_2) end{align}$$



          From this, we can see that for all the iterations of $j$ on $f_1$, we have



          $$f_1(t, u_1, u_2) = f_1(u_2) = w_{2,j} tag{1}$$



          That is, $f_1$ will only ever have $u_2$ terms, which do not depend on $t$ explicitly or $u_1$, thus the iteration formula reduces to



          $$k_{2,1} = hf_1left(t_0 + frac{h}{2}, w_{1,0} + frac{1}{2}k_{1,1}, w_{2,0} + frac{1}{2}k_{1,2}right) = hf_1left(w_{2,0} + frac{1}{2}k_{1,2}right)$$






          share|cite|improve this answer














          In this problem, I think what you might be confusing is that we have



          $$begin{align} u_1'(t) &= u_2(t) = f_1(t, u_1, u_2) \ u_2'(t) &= e^{2t} sin t - 2 u_1(t) + 2 u_2(t) = f_2(t, u_1, u_2) end{align}$$



          From this, we can see that for all the iterations of $j$ on $f_1$, we have



          $$f_1(t, u_1, u_2) = f_1(u_2) = w_{2,j} tag{1}$$



          That is, $f_1$ will only ever have $u_2$ terms, which do not depend on $t$ explicitly or $u_1$, thus the iteration formula reduces to



          $$k_{2,1} = hf_1left(t_0 + frac{h}{2}, w_{1,0} + frac{1}{2}k_{1,1}, w_{2,0} + frac{1}{2}k_{1,2}right) = hf_1left(w_{2,0} + frac{1}{2}k_{1,2}right)$$







          share|cite|improve this answer














          share|cite|improve this answer



          share|cite|improve this answer








          edited Nov 19 at 18:16

























          answered Nov 19 at 16:41









          Moo

          5,46131020




          5,46131020












          • Why does f_1 depend only on u_2? Does the formula u_2(t) = f_1(t, u_1, u_2) mean that f_1 depends only on u_2?
            – James
            Nov 20 at 0:48












          • Yes, because $f_1 = u_2$, there is nothing like $f_1 = e^t(u_1 + u_2)$, for example, in which case $f_1$ would depend on all three, namely $t, u_1 ~ text{and}~ u_2$. In this problem, we have $f_1 = u_2$ only - it is how it was setup in the very beginning. Clear?
            – Moo
            Nov 20 at 1:12








          • 1




            I got it. Thanks for answering
            – James
            Nov 20 at 2:15


















          • Why does f_1 depend only on u_2? Does the formula u_2(t) = f_1(t, u_1, u_2) mean that f_1 depends only on u_2?
            – James
            Nov 20 at 0:48












          • Yes, because $f_1 = u_2$, there is nothing like $f_1 = e^t(u_1 + u_2)$, for example, in which case $f_1$ would depend on all three, namely $t, u_1 ~ text{and}~ u_2$. In this problem, we have $f_1 = u_2$ only - it is how it was setup in the very beginning. Clear?
            – Moo
            Nov 20 at 1:12








          • 1




            I got it. Thanks for answering
            – James
            Nov 20 at 2:15
















          Why does f_1 depend only on u_2? Does the formula u_2(t) = f_1(t, u_1, u_2) mean that f_1 depends only on u_2?
          – James
          Nov 20 at 0:48






          Why does f_1 depend only on u_2? Does the formula u_2(t) = f_1(t, u_1, u_2) mean that f_1 depends only on u_2?
          – James
          Nov 20 at 0:48














          Yes, because $f_1 = u_2$, there is nothing like $f_1 = e^t(u_1 + u_2)$, for example, in which case $f_1$ would depend on all three, namely $t, u_1 ~ text{and}~ u_2$. In this problem, we have $f_1 = u_2$ only - it is how it was setup in the very beginning. Clear?
          – Moo
          Nov 20 at 1:12






          Yes, because $f_1 = u_2$, there is nothing like $f_1 = e^t(u_1 + u_2)$, for example, in which case $f_1$ would depend on all three, namely $t, u_1 ~ text{and}~ u_2$. In this problem, we have $f_1 = u_2$ only - it is how it was setup in the very beginning. Clear?
          – Moo
          Nov 20 at 1:12






          1




          1




          I got it. Thanks for answering
          – James
          Nov 20 at 2:15




          I got it. Thanks for answering
          – James
          Nov 20 at 2:15


















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Mathematics Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          Use MathJax to format equations. MathJax reference.


          To learn more, see our tips on writing great answers.





          Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


          Please pay close attention to the following guidance:


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3004621%2frunge-kutta-method-for-higher-order-differential-equations%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          How to change which sound is reproduced for terminal bell?

          Can I use Tabulator js library in my java Spring + Thymeleaf project?

          Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents