solve an Isoperimetric problem in calculus of variation using Maxima open source.

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












Kind help to solve the below problem via maxima program



Find the extremal of the functional $int_0^1((y^')^2 + x^2)dx$ under the constraint $int_0^1 y^2 dx,=,2$ and having $y(0),=,0$ and
$y(1),=,1.$ Using Maxima programming.



I tried Like the below code kind help not coming



kill(all)$
ratprint: false$
depends(f,[x,y])$
depends(g,[x,y])$
depends(y,x)$
declare(P,real)$
assume(P>0)$ (As positive or negative or zero error was giving)
z: diff(y,x);
f:z^2+x^2;
g:y^2;
h:f+P*g;
h1:diff(h,y);
h2:diff(h,z);
h3:h1-diff(h2,x);
h4:ode2(h3,y,x);
h5: bc2(h4,x=0,y=0,x=1,y=1);
hr: trigrat(h5);
h6:integrate((rhs(hr))^2,x,0,1);
h7:solve(trigrat(h6)=2,P);
trigrat(rhs(h7[1]));


Need help



Answer expected from maxima



y= %k1*%e^(sqrt(l)*x)+%k2*%e^(-sqrt(l)*x)






share|cite|improve this question

























    up vote
    0
    down vote

    favorite












    Kind help to solve the below problem via maxima program



    Find the extremal of the functional $int_0^1((y^')^2 + x^2)dx$ under the constraint $int_0^1 y^2 dx,=,2$ and having $y(0),=,0$ and
    $y(1),=,1.$ Using Maxima programming.



    I tried Like the below code kind help not coming



    kill(all)$
    ratprint: false$
    depends(f,[x,y])$
    depends(g,[x,y])$
    depends(y,x)$
    declare(P,real)$
    assume(P>0)$ (As positive or negative or zero error was giving)
    z: diff(y,x);
    f:z^2+x^2;
    g:y^2;
    h:f+P*g;
    h1:diff(h,y);
    h2:diff(h,z);
    h3:h1-diff(h2,x);
    h4:ode2(h3,y,x);
    h5: bc2(h4,x=0,y=0,x=1,y=1);
    hr: trigrat(h5);
    h6:integrate((rhs(hr))^2,x,0,1);
    h7:solve(trigrat(h6)=2,P);
    trigrat(rhs(h7[1]));


    Need help



    Answer expected from maxima



    y= %k1*%e^(sqrt(l)*x)+%k2*%e^(-sqrt(l)*x)






    share|cite|improve this question























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      Kind help to solve the below problem via maxima program



      Find the extremal of the functional $int_0^1((y^')^2 + x^2)dx$ under the constraint $int_0^1 y^2 dx,=,2$ and having $y(0),=,0$ and
      $y(1),=,1.$ Using Maxima programming.



      I tried Like the below code kind help not coming



      kill(all)$
      ratprint: false$
      depends(f,[x,y])$
      depends(g,[x,y])$
      depends(y,x)$
      declare(P,real)$
      assume(P>0)$ (As positive or negative or zero error was giving)
      z: diff(y,x);
      f:z^2+x^2;
      g:y^2;
      h:f+P*g;
      h1:diff(h,y);
      h2:diff(h,z);
      h3:h1-diff(h2,x);
      h4:ode2(h3,y,x);
      h5: bc2(h4,x=0,y=0,x=1,y=1);
      hr: trigrat(h5);
      h6:integrate((rhs(hr))^2,x,0,1);
      h7:solve(trigrat(h6)=2,P);
      trigrat(rhs(h7[1]));


      Need help



      Answer expected from maxima



      y= %k1*%e^(sqrt(l)*x)+%k2*%e^(-sqrt(l)*x)






      share|cite|improve this question













      Kind help to solve the below problem via maxima program



      Find the extremal of the functional $int_0^1((y^')^2 + x^2)dx$ under the constraint $int_0^1 y^2 dx,=,2$ and having $y(0),=,0$ and
      $y(1),=,1.$ Using Maxima programming.



      I tried Like the below code kind help not coming



      kill(all)$
      ratprint: false$
      depends(f,[x,y])$
      depends(g,[x,y])$
      depends(y,x)$
      declare(P,real)$
      assume(P>0)$ (As positive or negative or zero error was giving)
      z: diff(y,x);
      f:z^2+x^2;
      g:y^2;
      h:f+P*g;
      h1:diff(h,y);
      h2:diff(h,z);
      h3:h1-diff(h2,x);
      h4:ode2(h3,y,x);
      h5: bc2(h4,x=0,y=0,x=1,y=1);
      hr: trigrat(h5);
      h6:integrate((rhs(hr))^2,x,0,1);
      h7:solve(trigrat(h6)=2,P);
      trigrat(rhs(h7[1]));


      Need help



      Answer expected from maxima



      y= %k1*%e^(sqrt(l)*x)+%k2*%e^(-sqrt(l)*x)








      share|cite|improve this question












      share|cite|improve this question




      share|cite|improve this question








      edited Jul 20 at 15:02









      Daniel Fischer♦

      171k16154274




      171k16154274









      asked Jul 20 at 14:49









      sriram

      43




      43




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          0
          down vote













          This problem can be handled easily without the help of a symbolic processor so calling



          $$
          f(x,y,y',lambda) = (y')^2+x^2+lambda y^2
          $$



          we have



          $$
          f_y-left(f_y'right)'=y''-lambda y = 0
          $$



          and after solving the ODE we have



          $$
          y = c_1 e^sqrt lambda x+c_2 e^-sqrtlambda x
          $$



          with the boundary and integral conditions we need to solve



          $$
          beginarrayrcl
          c_1+c_2 & = & 0\
          c_1 e^sqrt lambda+c_2 e^-sqrtlambda & = & 1\
          frace^-sqrtlambda left(e^sqrtlambda -1right) left(c_1 e^sqrtlambda +c_2right)sqrtlambda & = & 2
          endarray
          $$



          thus obtaining the constants $c_1, c_2, lambda$ Here making the substitution $c_2 =-c_1$ we have



          $$
          beginarrayrcl
          c_1 & = & -c_2\2 c_1 cosh left(sqrtlambda right) & = & 1\
          frac2 c_1 left(cosh left(sqrtlambda right)-1right)sqrtlambda & = & 2
          endarray
          $$



          This last step should be concluded using an iterative process which is not explicit in the MAXIMA script.



          I hope this helps.






          share|cite|improve this answer























            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: false,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            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%2f2857713%2fsolve-an-isoperimetric-problem-in-calculus-of-variation-using-maxima-open-source%23new-answer', 'question_page');

            );

            Post as a guest






























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            0
            down vote













            This problem can be handled easily without the help of a symbolic processor so calling



            $$
            f(x,y,y',lambda) = (y')^2+x^2+lambda y^2
            $$



            we have



            $$
            f_y-left(f_y'right)'=y''-lambda y = 0
            $$



            and after solving the ODE we have



            $$
            y = c_1 e^sqrt lambda x+c_2 e^-sqrtlambda x
            $$



            with the boundary and integral conditions we need to solve



            $$
            beginarrayrcl
            c_1+c_2 & = & 0\
            c_1 e^sqrt lambda+c_2 e^-sqrtlambda & = & 1\
            frace^-sqrtlambda left(e^sqrtlambda -1right) left(c_1 e^sqrtlambda +c_2right)sqrtlambda & = & 2
            endarray
            $$



            thus obtaining the constants $c_1, c_2, lambda$ Here making the substitution $c_2 =-c_1$ we have



            $$
            beginarrayrcl
            c_1 & = & -c_2\2 c_1 cosh left(sqrtlambda right) & = & 1\
            frac2 c_1 left(cosh left(sqrtlambda right)-1right)sqrtlambda & = & 2
            endarray
            $$



            This last step should be concluded using an iterative process which is not explicit in the MAXIMA script.



            I hope this helps.






            share|cite|improve this answer



























              up vote
              0
              down vote













              This problem can be handled easily without the help of a symbolic processor so calling



              $$
              f(x,y,y',lambda) = (y')^2+x^2+lambda y^2
              $$



              we have



              $$
              f_y-left(f_y'right)'=y''-lambda y = 0
              $$



              and after solving the ODE we have



              $$
              y = c_1 e^sqrt lambda x+c_2 e^-sqrtlambda x
              $$



              with the boundary and integral conditions we need to solve



              $$
              beginarrayrcl
              c_1+c_2 & = & 0\
              c_1 e^sqrt lambda+c_2 e^-sqrtlambda & = & 1\
              frace^-sqrtlambda left(e^sqrtlambda -1right) left(c_1 e^sqrtlambda +c_2right)sqrtlambda & = & 2
              endarray
              $$



              thus obtaining the constants $c_1, c_2, lambda$ Here making the substitution $c_2 =-c_1$ we have



              $$
              beginarrayrcl
              c_1 & = & -c_2\2 c_1 cosh left(sqrtlambda right) & = & 1\
              frac2 c_1 left(cosh left(sqrtlambda right)-1right)sqrtlambda & = & 2
              endarray
              $$



              This last step should be concluded using an iterative process which is not explicit in the MAXIMA script.



              I hope this helps.






              share|cite|improve this answer

























                up vote
                0
                down vote










                up vote
                0
                down vote









                This problem can be handled easily without the help of a symbolic processor so calling



                $$
                f(x,y,y',lambda) = (y')^2+x^2+lambda y^2
                $$



                we have



                $$
                f_y-left(f_y'right)'=y''-lambda y = 0
                $$



                and after solving the ODE we have



                $$
                y = c_1 e^sqrt lambda x+c_2 e^-sqrtlambda x
                $$



                with the boundary and integral conditions we need to solve



                $$
                beginarrayrcl
                c_1+c_2 & = & 0\
                c_1 e^sqrt lambda+c_2 e^-sqrtlambda & = & 1\
                frace^-sqrtlambda left(e^sqrtlambda -1right) left(c_1 e^sqrtlambda +c_2right)sqrtlambda & = & 2
                endarray
                $$



                thus obtaining the constants $c_1, c_2, lambda$ Here making the substitution $c_2 =-c_1$ we have



                $$
                beginarrayrcl
                c_1 & = & -c_2\2 c_1 cosh left(sqrtlambda right) & = & 1\
                frac2 c_1 left(cosh left(sqrtlambda right)-1right)sqrtlambda & = & 2
                endarray
                $$



                This last step should be concluded using an iterative process which is not explicit in the MAXIMA script.



                I hope this helps.






                share|cite|improve this answer















                This problem can be handled easily without the help of a symbolic processor so calling



                $$
                f(x,y,y',lambda) = (y')^2+x^2+lambda y^2
                $$



                we have



                $$
                f_y-left(f_y'right)'=y''-lambda y = 0
                $$



                and after solving the ODE we have



                $$
                y = c_1 e^sqrt lambda x+c_2 e^-sqrtlambda x
                $$



                with the boundary and integral conditions we need to solve



                $$
                beginarrayrcl
                c_1+c_2 & = & 0\
                c_1 e^sqrt lambda+c_2 e^-sqrtlambda & = & 1\
                frace^-sqrtlambda left(e^sqrtlambda -1right) left(c_1 e^sqrtlambda +c_2right)sqrtlambda & = & 2
                endarray
                $$



                thus obtaining the constants $c_1, c_2, lambda$ Here making the substitution $c_2 =-c_1$ we have



                $$
                beginarrayrcl
                c_1 & = & -c_2\2 c_1 cosh left(sqrtlambda right) & = & 1\
                frac2 c_1 left(cosh left(sqrtlambda right)-1right)sqrtlambda & = & 2
                endarray
                $$



                This last step should be concluded using an iterative process which is not explicit in the MAXIMA script.



                I hope this helps.







                share|cite|improve this answer















                share|cite|improve this answer



                share|cite|improve this answer








                edited Jul 20 at 18:45


























                answered Jul 20 at 16:13









                Cesareo

                5,7432412




                5,7432412






















                     

                    draft saved


                    draft discarded


























                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2857713%2fsolve-an-isoperimetric-problem-in-calculus-of-variation-using-maxima-open-source%23new-answer', 'question_page');

                    );

                    Post as a guest













































































                    Comments

                    Popular posts from this blog

                    Color the edges and diagonals of a regular polygon

                    Relationship between determinant of matrix and determinant of adjoint?

                    What is the equation of a 3D cone with generalised tilt?