Concerning the origin of four terms in DSolve's hyperbolic solution to an ODE












4












$begingroup$


Typing



DSolve[{g''[y] - k^2/Gy g[y] == 0}, g[y], y]


where $k$ and $G_y$ are constants gives
$$left{left{g(y)to C_1 expleft(frac{k y}{sqrt{G_y}}right)+C_2 expleft(-frac{k y}{sqrt{G_y}}right)right}right}$$
This anwer can be expressed in terms of hyperbolic functions
$$g(y)=C_1coshleft(frac{k y}{sqrt{G_y}}right)+C_2sinhleft(frac{k y}{sqrt{G_y}}right)$$
where $C_1$ and $C_2$ are not technically the same as the constants for the exponential form but for the purposes of this question it doesn't matter. When I type ExpToTrig[DSolve[{ g''[y] - k^2/Gy g[y] == 0}, g[y], y]] I get
$$left{left{g(y)to C_1 sinh left(frac{k y}{sqrt{G_y}}right)-C_2 sinh left(frac{k y}{sqrt{G_y}}right)+C_1 cosh left(frac{k y}{sqrt{G_y}}right)+C_2 cosh left(frac{k y}{sqrt{G_y}}right)right}right}$$



How come Mathematica creates four terms instead of two? Doesn't this make finding solutions more difficult?










share|improve this question











$endgroup$








  • 1




    $begingroup$
    Mathematica does not know that C1 and C2 are arbitrary constants, but you do, and you can write C1*Sinh+C2*Cosh. There is no mistake here.
    $endgroup$
    – Vsevolod A.
    Mar 18 at 7:37












  • $begingroup$
    You have a type in your M code, you typed G_y for Gy
    $endgroup$
    – Nasser
    Mar 18 at 7:47










  • $begingroup$
    @Nasser corrected
    $endgroup$
    – enea19
    Mar 18 at 8:47
















4












$begingroup$


Typing



DSolve[{g''[y] - k^2/Gy g[y] == 0}, g[y], y]


where $k$ and $G_y$ are constants gives
$$left{left{g(y)to C_1 expleft(frac{k y}{sqrt{G_y}}right)+C_2 expleft(-frac{k y}{sqrt{G_y}}right)right}right}$$
This anwer can be expressed in terms of hyperbolic functions
$$g(y)=C_1coshleft(frac{k y}{sqrt{G_y}}right)+C_2sinhleft(frac{k y}{sqrt{G_y}}right)$$
where $C_1$ and $C_2$ are not technically the same as the constants for the exponential form but for the purposes of this question it doesn't matter. When I type ExpToTrig[DSolve[{ g''[y] - k^2/Gy g[y] == 0}, g[y], y]] I get
$$left{left{g(y)to C_1 sinh left(frac{k y}{sqrt{G_y}}right)-C_2 sinh left(frac{k y}{sqrt{G_y}}right)+C_1 cosh left(frac{k y}{sqrt{G_y}}right)+C_2 cosh left(frac{k y}{sqrt{G_y}}right)right}right}$$



How come Mathematica creates four terms instead of two? Doesn't this make finding solutions more difficult?










share|improve this question











$endgroup$








  • 1




    $begingroup$
    Mathematica does not know that C1 and C2 are arbitrary constants, but you do, and you can write C1*Sinh+C2*Cosh. There is no mistake here.
    $endgroup$
    – Vsevolod A.
    Mar 18 at 7:37












  • $begingroup$
    You have a type in your M code, you typed G_y for Gy
    $endgroup$
    – Nasser
    Mar 18 at 7:47










  • $begingroup$
    @Nasser corrected
    $endgroup$
    – enea19
    Mar 18 at 8:47














4












4








4





$begingroup$


Typing



DSolve[{g''[y] - k^2/Gy g[y] == 0}, g[y], y]


where $k$ and $G_y$ are constants gives
$$left{left{g(y)to C_1 expleft(frac{k y}{sqrt{G_y}}right)+C_2 expleft(-frac{k y}{sqrt{G_y}}right)right}right}$$
This anwer can be expressed in terms of hyperbolic functions
$$g(y)=C_1coshleft(frac{k y}{sqrt{G_y}}right)+C_2sinhleft(frac{k y}{sqrt{G_y}}right)$$
where $C_1$ and $C_2$ are not technically the same as the constants for the exponential form but for the purposes of this question it doesn't matter. When I type ExpToTrig[DSolve[{ g''[y] - k^2/Gy g[y] == 0}, g[y], y]] I get
$$left{left{g(y)to C_1 sinh left(frac{k y}{sqrt{G_y}}right)-C_2 sinh left(frac{k y}{sqrt{G_y}}right)+C_1 cosh left(frac{k y}{sqrt{G_y}}right)+C_2 cosh left(frac{k y}{sqrt{G_y}}right)right}right}$$



How come Mathematica creates four terms instead of two? Doesn't this make finding solutions more difficult?










share|improve this question











$endgroup$




Typing



DSolve[{g''[y] - k^2/Gy g[y] == 0}, g[y], y]


where $k$ and $G_y$ are constants gives
$$left{left{g(y)to C_1 expleft(frac{k y}{sqrt{G_y}}right)+C_2 expleft(-frac{k y}{sqrt{G_y}}right)right}right}$$
This anwer can be expressed in terms of hyperbolic functions
$$g(y)=C_1coshleft(frac{k y}{sqrt{G_y}}right)+C_2sinhleft(frac{k y}{sqrt{G_y}}right)$$
where $C_1$ and $C_2$ are not technically the same as the constants for the exponential form but for the purposes of this question it doesn't matter. When I type ExpToTrig[DSolve[{ g''[y] - k^2/Gy g[y] == 0}, g[y], y]] I get
$$left{left{g(y)to C_1 sinh left(frac{k y}{sqrt{G_y}}right)-C_2 sinh left(frac{k y}{sqrt{G_y}}right)+C_1 cosh left(frac{k y}{sqrt{G_y}}right)+C_2 cosh left(frac{k y}{sqrt{G_y}}right)right}right}$$



How come Mathematica creates four terms instead of two? Doesn't this make finding solutions more difficult?







differential-equations calculus-and-analysis






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 18 at 9:56









m_goldberg

87.9k872198




87.9k872198










asked Mar 18 at 7:11









enea19enea19

877




877








  • 1




    $begingroup$
    Mathematica does not know that C1 and C2 are arbitrary constants, but you do, and you can write C1*Sinh+C2*Cosh. There is no mistake here.
    $endgroup$
    – Vsevolod A.
    Mar 18 at 7:37












  • $begingroup$
    You have a type in your M code, you typed G_y for Gy
    $endgroup$
    – Nasser
    Mar 18 at 7:47










  • $begingroup$
    @Nasser corrected
    $endgroup$
    – enea19
    Mar 18 at 8:47














  • 1




    $begingroup$
    Mathematica does not know that C1 and C2 are arbitrary constants, but you do, and you can write C1*Sinh+C2*Cosh. There is no mistake here.
    $endgroup$
    – Vsevolod A.
    Mar 18 at 7:37












  • $begingroup$
    You have a type in your M code, you typed G_y for Gy
    $endgroup$
    – Nasser
    Mar 18 at 7:47










  • $begingroup$
    @Nasser corrected
    $endgroup$
    – enea19
    Mar 18 at 8:47








1




1




$begingroup$
Mathematica does not know that C1 and C2 are arbitrary constants, but you do, and you can write C1*Sinh+C2*Cosh. There is no mistake here.
$endgroup$
– Vsevolod A.
Mar 18 at 7:37






$begingroup$
Mathematica does not know that C1 and C2 are arbitrary constants, but you do, and you can write C1*Sinh+C2*Cosh. There is no mistake here.
$endgroup$
– Vsevolod A.
Mar 18 at 7:37














$begingroup$
You have a type in your M code, you typed G_y for Gy
$endgroup$
– Nasser
Mar 18 at 7:47




$begingroup$
You have a type in your M code, you typed G_y for Gy
$endgroup$
– Nasser
Mar 18 at 7:47












$begingroup$
@Nasser corrected
$endgroup$
– enea19
Mar 18 at 8:47




$begingroup$
@Nasser corrected
$endgroup$
– enea19
Mar 18 at 8:47










1 Answer
1






active

oldest

votes


















4












$begingroup$

Mathematica always did this, and I do not know of an option or assumption to avoid this. But I always did something like this for this case



ClearAll[g, y, k, Gy];
sol = DSolve[{g''[y] - k^2/Gy g[y] == 0}, g[y], y];
sol = Simplify[ExpToTrig[sol]];
sol /. {C[1] + C[2] -> C[3], C[1] - C[2] -> C[4]}


Mathematica graphics



btw, Maple also does similar thing here.



ode:=diff(g(y),y$2)-k^2/Gy*g(y)=0;
sol:=dsolve(ode,g(y));
convert(sol,trig);
simplify(%);


Mathematica graphics



Sometimes you have to manipulate the CAS output a little.






share|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: "387"
    };
    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: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    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
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f193473%2fconcerning-the-origin-of-four-terms-in-dsolves-hyperbolic-solution-to-an-ode%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









    4












    $begingroup$

    Mathematica always did this, and I do not know of an option or assumption to avoid this. But I always did something like this for this case



    ClearAll[g, y, k, Gy];
    sol = DSolve[{g''[y] - k^2/Gy g[y] == 0}, g[y], y];
    sol = Simplify[ExpToTrig[sol]];
    sol /. {C[1] + C[2] -> C[3], C[1] - C[2] -> C[4]}


    Mathematica graphics



    btw, Maple also does similar thing here.



    ode:=diff(g(y),y$2)-k^2/Gy*g(y)=0;
    sol:=dsolve(ode,g(y));
    convert(sol,trig);
    simplify(%);


    Mathematica graphics



    Sometimes you have to manipulate the CAS output a little.






    share|improve this answer











    $endgroup$


















      4












      $begingroup$

      Mathematica always did this, and I do not know of an option or assumption to avoid this. But I always did something like this for this case



      ClearAll[g, y, k, Gy];
      sol = DSolve[{g''[y] - k^2/Gy g[y] == 0}, g[y], y];
      sol = Simplify[ExpToTrig[sol]];
      sol /. {C[1] + C[2] -> C[3], C[1] - C[2] -> C[4]}


      Mathematica graphics



      btw, Maple also does similar thing here.



      ode:=diff(g(y),y$2)-k^2/Gy*g(y)=0;
      sol:=dsolve(ode,g(y));
      convert(sol,trig);
      simplify(%);


      Mathematica graphics



      Sometimes you have to manipulate the CAS output a little.






      share|improve this answer











      $endgroup$
















        4












        4








        4





        $begingroup$

        Mathematica always did this, and I do not know of an option or assumption to avoid this. But I always did something like this for this case



        ClearAll[g, y, k, Gy];
        sol = DSolve[{g''[y] - k^2/Gy g[y] == 0}, g[y], y];
        sol = Simplify[ExpToTrig[sol]];
        sol /. {C[1] + C[2] -> C[3], C[1] - C[2] -> C[4]}


        Mathematica graphics



        btw, Maple also does similar thing here.



        ode:=diff(g(y),y$2)-k^2/Gy*g(y)=0;
        sol:=dsolve(ode,g(y));
        convert(sol,trig);
        simplify(%);


        Mathematica graphics



        Sometimes you have to manipulate the CAS output a little.






        share|improve this answer











        $endgroup$



        Mathematica always did this, and I do not know of an option or assumption to avoid this. But I always did something like this for this case



        ClearAll[g, y, k, Gy];
        sol = DSolve[{g''[y] - k^2/Gy g[y] == 0}, g[y], y];
        sol = Simplify[ExpToTrig[sol]];
        sol /. {C[1] + C[2] -> C[3], C[1] - C[2] -> C[4]}


        Mathematica graphics



        btw, Maple also does similar thing here.



        ode:=diff(g(y),y$2)-k^2/Gy*g(y)=0;
        sol:=dsolve(ode,g(y));
        convert(sol,trig);
        simplify(%);


        Mathematica graphics



        Sometimes you have to manipulate the CAS output a little.







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Mar 18 at 7:57

























        answered Mar 18 at 7:46









        NasserNasser

        58.6k489206




        58.6k489206






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Mathematica 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%2fmathematica.stackexchange.com%2fquestions%2f193473%2fconcerning-the-origin-of-four-terms-in-dsolves-hyperbolic-solution-to-an-ode%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

            Biblatex bibliography style without URLs when DOI exists (in Overleaf with Zotero bibliography)

            ComboBox Display Member on multiple fields

            Is it possible to collect Nectar points via Trainline?