Circle and spiral phase portaits












1












$begingroup$


I am having some trouble drawing these phase portraits
[![enter image description here][1]][1]



For 2.a when solving $[dot{y_1},dot{y_2}]^T = C * [y_1,y_2]^T$



You get
$dot{y_1} = -b*y_2$ and $dot{y_2} = b*y_1$
and thus can solve



$ddot{y_1} = -b^2y_1$ and $ddot{y_2} = -b^2y_2$
to find



$y_1 = C_1sin(bx) + C_2cos(bx)$ and $y_2 = C_3sin(bx) + C_4cos(bx)$



The only way I am able to plot it on matlab correctly is if i take $C_2 = C_3=0$ and $C_1 = C_4$ (otherwise ill get an ellipse)



I understand why $sinx,cosx$ gives you a circle but that is only a specific combination of coefficients. The phase diagram for C when plotted using y_1 = C_1sin(bx) + C_2cos(bx)$ and $y_2 = C_3sin(bx) + C_4cos(bx) gives me ellipses. How can we say that the phase diagram of C are circles if this is only true in specific cases and no boundary conditions have been given.



Also for 2.b I dont know how to solve that system so could someone please explain how it corresponds to a spiral so i can try it on matlab



I have attached my code and would be grateful is someone could show me the matlab code for the spiral



enter image description here



thanks










share|cite|improve this question











$endgroup$

















    1












    $begingroup$


    I am having some trouble drawing these phase portraits
    [![enter image description here][1]][1]



    For 2.a when solving $[dot{y_1},dot{y_2}]^T = C * [y_1,y_2]^T$



    You get
    $dot{y_1} = -b*y_2$ and $dot{y_2} = b*y_1$
    and thus can solve



    $ddot{y_1} = -b^2y_1$ and $ddot{y_2} = -b^2y_2$
    to find



    $y_1 = C_1sin(bx) + C_2cos(bx)$ and $y_2 = C_3sin(bx) + C_4cos(bx)$



    The only way I am able to plot it on matlab correctly is if i take $C_2 = C_3=0$ and $C_1 = C_4$ (otherwise ill get an ellipse)



    I understand why $sinx,cosx$ gives you a circle but that is only a specific combination of coefficients. The phase diagram for C when plotted using y_1 = C_1sin(bx) + C_2cos(bx)$ and $y_2 = C_3sin(bx) + C_4cos(bx) gives me ellipses. How can we say that the phase diagram of C are circles if this is only true in specific cases and no boundary conditions have been given.



    Also for 2.b I dont know how to solve that system so could someone please explain how it corresponds to a spiral so i can try it on matlab



    I have attached my code and would be grateful is someone could show me the matlab code for the spiral



    enter image description here



    thanks










    share|cite|improve this question











    $endgroup$















      1












      1








      1





      $begingroup$


      I am having some trouble drawing these phase portraits
      [![enter image description here][1]][1]



      For 2.a when solving $[dot{y_1},dot{y_2}]^T = C * [y_1,y_2]^T$



      You get
      $dot{y_1} = -b*y_2$ and $dot{y_2} = b*y_1$
      and thus can solve



      $ddot{y_1} = -b^2y_1$ and $ddot{y_2} = -b^2y_2$
      to find



      $y_1 = C_1sin(bx) + C_2cos(bx)$ and $y_2 = C_3sin(bx) + C_4cos(bx)$



      The only way I am able to plot it on matlab correctly is if i take $C_2 = C_3=0$ and $C_1 = C_4$ (otherwise ill get an ellipse)



      I understand why $sinx,cosx$ gives you a circle but that is only a specific combination of coefficients. The phase diagram for C when plotted using y_1 = C_1sin(bx) + C_2cos(bx)$ and $y_2 = C_3sin(bx) + C_4cos(bx) gives me ellipses. How can we say that the phase diagram of C are circles if this is only true in specific cases and no boundary conditions have been given.



      Also for 2.b I dont know how to solve that system so could someone please explain how it corresponds to a spiral so i can try it on matlab



      I have attached my code and would be grateful is someone could show me the matlab code for the spiral



      enter image description here



      thanks










      share|cite|improve this question











      $endgroup$




      I am having some trouble drawing these phase portraits
      [![enter image description here][1]][1]



      For 2.a when solving $[dot{y_1},dot{y_2}]^T = C * [y_1,y_2]^T$



      You get
      $dot{y_1} = -b*y_2$ and $dot{y_2} = b*y_1$
      and thus can solve



      $ddot{y_1} = -b^2y_1$ and $ddot{y_2} = -b^2y_2$
      to find



      $y_1 = C_1sin(bx) + C_2cos(bx)$ and $y_2 = C_3sin(bx) + C_4cos(bx)$



      The only way I am able to plot it on matlab correctly is if i take $C_2 = C_3=0$ and $C_1 = C_4$ (otherwise ill get an ellipse)



      I understand why $sinx,cosx$ gives you a circle but that is only a specific combination of coefficients. The phase diagram for C when plotted using y_1 = C_1sin(bx) + C_2cos(bx)$ and $y_2 = C_3sin(bx) + C_4cos(bx) gives me ellipses. How can we say that the phase diagram of C are circles if this is only true in specific cases and no boundary conditions have been given.



      Also for 2.b I dont know how to solve that system so could someone please explain how it corresponds to a spiral so i can try it on matlab



      I have attached my code and would be grateful is someone could show me the matlab code for the spiral



      enter image description here



      thanks







      geometry matlab parametric nonlinear-system






      share|cite|improve this question















      share|cite|improve this question













      share|cite|improve this question




      share|cite|improve this question








      edited Jan 27 at 20:17







      pablo_mathscobar

















      asked Jan 24 at 16:06









      pablo_mathscobarpablo_mathscobar

      996




      996






















          1 Answer
          1






          active

          oldest

          votes


















          0












          $begingroup$


          2a




          I'm going to start where you left, but hopefully you will see that this can be done in fewer steps than you did



          begin{align}
          y_1(t) &= C_1 sin bt + C_2 cos b t \
          y_2(t) &= C_3 sin bt + C_4 cos b t tag{1}\
          end{align}



          As you say $dot{y}_1 = -b y_2$, which translates to



          $$
          bC_1 cos bt - bC_2 sin b t = -b(C_3 sin bt + C_4 cos b t) ~~~Rightarrow~~~ C_1 = -C_4, C_2 = C_3
          $$



          Replace that back in Eq. (1) and you get



          begin{align}
          y_1(t) &= C_1 sin bt + C_2 cos b t \
          y_2(t) &= C_2 sin bt - C_1 cos b t tag{2}\
          end{align}



          Now evaluate these equations at $t=0$,



          begin{align}
          y_1(0) &= C_2 \
          y_2(0) &= -C_1\
          end{align}



          Again, if you replace that in Eq. (2) you get



          begin{align}
          y_1(t) &= -y_2(0) sin bt + y_1(0) cos b t \
          y_2(t) &= y_1(0) sin bt + y_2(0) cos b t tag{3}\
          end{align}



          or in matrix form



          $$
          pmatrix{y_1(t) \ y_2(t)} = pmatrix{cos bt & -sin bt \ sin bt & cos bt} pmatrix{y_1(0) \ y_2 (0)} tag{4}
          $$



          Or more compact



          $$
          {bf y}(t) = A {bf y}(0)
          $$



          turns out the matrix $A$ is the exponential matrix of $C$: $A = e^{tC}$. Which is calculated very simply for this case as $A = U^{-1}{rm diag}(lambda_1 t, lambda_2 t) U$, where $U$ is the eigenvector matrix of $C$ and $lambda$ its eigenvalues.



          In any case, if you want to plot Eq. (4) you just need to select an initial point and multiply times a matrix.




          2b




          This is trivial if you calculate the matrix as before. But if you are not comfortable doing that, try with solutions of the form $ysim e^{pm lambda t}$, where $lambda$ are the eigenvalues of $C$






          share|cite|improve this answer









          $endgroup$













            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',
            autoActivateHeartbeat: false,
            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%2f3086043%2fcircle-and-spiral-phase-portaits%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









            0












            $begingroup$


            2a




            I'm going to start where you left, but hopefully you will see that this can be done in fewer steps than you did



            begin{align}
            y_1(t) &= C_1 sin bt + C_2 cos b t \
            y_2(t) &= C_3 sin bt + C_4 cos b t tag{1}\
            end{align}



            As you say $dot{y}_1 = -b y_2$, which translates to



            $$
            bC_1 cos bt - bC_2 sin b t = -b(C_3 sin bt + C_4 cos b t) ~~~Rightarrow~~~ C_1 = -C_4, C_2 = C_3
            $$



            Replace that back in Eq. (1) and you get



            begin{align}
            y_1(t) &= C_1 sin bt + C_2 cos b t \
            y_2(t) &= C_2 sin bt - C_1 cos b t tag{2}\
            end{align}



            Now evaluate these equations at $t=0$,



            begin{align}
            y_1(0) &= C_2 \
            y_2(0) &= -C_1\
            end{align}



            Again, if you replace that in Eq. (2) you get



            begin{align}
            y_1(t) &= -y_2(0) sin bt + y_1(0) cos b t \
            y_2(t) &= y_1(0) sin bt + y_2(0) cos b t tag{3}\
            end{align}



            or in matrix form



            $$
            pmatrix{y_1(t) \ y_2(t)} = pmatrix{cos bt & -sin bt \ sin bt & cos bt} pmatrix{y_1(0) \ y_2 (0)} tag{4}
            $$



            Or more compact



            $$
            {bf y}(t) = A {bf y}(0)
            $$



            turns out the matrix $A$ is the exponential matrix of $C$: $A = e^{tC}$. Which is calculated very simply for this case as $A = U^{-1}{rm diag}(lambda_1 t, lambda_2 t) U$, where $U$ is the eigenvector matrix of $C$ and $lambda$ its eigenvalues.



            In any case, if you want to plot Eq. (4) you just need to select an initial point and multiply times a matrix.




            2b




            This is trivial if you calculate the matrix as before. But if you are not comfortable doing that, try with solutions of the form $ysim e^{pm lambda t}$, where $lambda$ are the eigenvalues of $C$






            share|cite|improve this answer









            $endgroup$


















              0












              $begingroup$


              2a




              I'm going to start where you left, but hopefully you will see that this can be done in fewer steps than you did



              begin{align}
              y_1(t) &= C_1 sin bt + C_2 cos b t \
              y_2(t) &= C_3 sin bt + C_4 cos b t tag{1}\
              end{align}



              As you say $dot{y}_1 = -b y_2$, which translates to



              $$
              bC_1 cos bt - bC_2 sin b t = -b(C_3 sin bt + C_4 cos b t) ~~~Rightarrow~~~ C_1 = -C_4, C_2 = C_3
              $$



              Replace that back in Eq. (1) and you get



              begin{align}
              y_1(t) &= C_1 sin bt + C_2 cos b t \
              y_2(t) &= C_2 sin bt - C_1 cos b t tag{2}\
              end{align}



              Now evaluate these equations at $t=0$,



              begin{align}
              y_1(0) &= C_2 \
              y_2(0) &= -C_1\
              end{align}



              Again, if you replace that in Eq. (2) you get



              begin{align}
              y_1(t) &= -y_2(0) sin bt + y_1(0) cos b t \
              y_2(t) &= y_1(0) sin bt + y_2(0) cos b t tag{3}\
              end{align}



              or in matrix form



              $$
              pmatrix{y_1(t) \ y_2(t)} = pmatrix{cos bt & -sin bt \ sin bt & cos bt} pmatrix{y_1(0) \ y_2 (0)} tag{4}
              $$



              Or more compact



              $$
              {bf y}(t) = A {bf y}(0)
              $$



              turns out the matrix $A$ is the exponential matrix of $C$: $A = e^{tC}$. Which is calculated very simply for this case as $A = U^{-1}{rm diag}(lambda_1 t, lambda_2 t) U$, where $U$ is the eigenvector matrix of $C$ and $lambda$ its eigenvalues.



              In any case, if you want to plot Eq. (4) you just need to select an initial point and multiply times a matrix.




              2b




              This is trivial if you calculate the matrix as before. But if you are not comfortable doing that, try with solutions of the form $ysim e^{pm lambda t}$, where $lambda$ are the eigenvalues of $C$






              share|cite|improve this answer









              $endgroup$
















                0












                0








                0





                $begingroup$


                2a




                I'm going to start where you left, but hopefully you will see that this can be done in fewer steps than you did



                begin{align}
                y_1(t) &= C_1 sin bt + C_2 cos b t \
                y_2(t) &= C_3 sin bt + C_4 cos b t tag{1}\
                end{align}



                As you say $dot{y}_1 = -b y_2$, which translates to



                $$
                bC_1 cos bt - bC_2 sin b t = -b(C_3 sin bt + C_4 cos b t) ~~~Rightarrow~~~ C_1 = -C_4, C_2 = C_3
                $$



                Replace that back in Eq. (1) and you get



                begin{align}
                y_1(t) &= C_1 sin bt + C_2 cos b t \
                y_2(t) &= C_2 sin bt - C_1 cos b t tag{2}\
                end{align}



                Now evaluate these equations at $t=0$,



                begin{align}
                y_1(0) &= C_2 \
                y_2(0) &= -C_1\
                end{align}



                Again, if you replace that in Eq. (2) you get



                begin{align}
                y_1(t) &= -y_2(0) sin bt + y_1(0) cos b t \
                y_2(t) &= y_1(0) sin bt + y_2(0) cos b t tag{3}\
                end{align}



                or in matrix form



                $$
                pmatrix{y_1(t) \ y_2(t)} = pmatrix{cos bt & -sin bt \ sin bt & cos bt} pmatrix{y_1(0) \ y_2 (0)} tag{4}
                $$



                Or more compact



                $$
                {bf y}(t) = A {bf y}(0)
                $$



                turns out the matrix $A$ is the exponential matrix of $C$: $A = e^{tC}$. Which is calculated very simply for this case as $A = U^{-1}{rm diag}(lambda_1 t, lambda_2 t) U$, where $U$ is the eigenvector matrix of $C$ and $lambda$ its eigenvalues.



                In any case, if you want to plot Eq. (4) you just need to select an initial point and multiply times a matrix.




                2b




                This is trivial if you calculate the matrix as before. But if you are not comfortable doing that, try with solutions of the form $ysim e^{pm lambda t}$, where $lambda$ are the eigenvalues of $C$






                share|cite|improve this answer









                $endgroup$




                2a




                I'm going to start where you left, but hopefully you will see that this can be done in fewer steps than you did



                begin{align}
                y_1(t) &= C_1 sin bt + C_2 cos b t \
                y_2(t) &= C_3 sin bt + C_4 cos b t tag{1}\
                end{align}



                As you say $dot{y}_1 = -b y_2$, which translates to



                $$
                bC_1 cos bt - bC_2 sin b t = -b(C_3 sin bt + C_4 cos b t) ~~~Rightarrow~~~ C_1 = -C_4, C_2 = C_3
                $$



                Replace that back in Eq. (1) and you get



                begin{align}
                y_1(t) &= C_1 sin bt + C_2 cos b t \
                y_2(t) &= C_2 sin bt - C_1 cos b t tag{2}\
                end{align}



                Now evaluate these equations at $t=0$,



                begin{align}
                y_1(0) &= C_2 \
                y_2(0) &= -C_1\
                end{align}



                Again, if you replace that in Eq. (2) you get



                begin{align}
                y_1(t) &= -y_2(0) sin bt + y_1(0) cos b t \
                y_2(t) &= y_1(0) sin bt + y_2(0) cos b t tag{3}\
                end{align}



                or in matrix form



                $$
                pmatrix{y_1(t) \ y_2(t)} = pmatrix{cos bt & -sin bt \ sin bt & cos bt} pmatrix{y_1(0) \ y_2 (0)} tag{4}
                $$



                Or more compact



                $$
                {bf y}(t) = A {bf y}(0)
                $$



                turns out the matrix $A$ is the exponential matrix of $C$: $A = e^{tC}$. Which is calculated very simply for this case as $A = U^{-1}{rm diag}(lambda_1 t, lambda_2 t) U$, where $U$ is the eigenvector matrix of $C$ and $lambda$ its eigenvalues.



                In any case, if you want to plot Eq. (4) you just need to select an initial point and multiply times a matrix.




                2b




                This is trivial if you calculate the matrix as before. But if you are not comfortable doing that, try with solutions of the form $ysim e^{pm lambda t}$, where $lambda$ are the eigenvalues of $C$







                share|cite|improve this answer












                share|cite|improve this answer



                share|cite|improve this answer










                answered Jan 24 at 16:48









                caveraccaverac

                14.8k31130




                14.8k31130






























                    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.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3086043%2fcircle-and-spiral-phase-portaits%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

                    Mario Kart Wii

                    The Binding of Isaac: Rebirth/Afterbirth

                    What does “Dominus providebit” mean?