General solution of ODE: why are there numbers as coefficients in the solution?












1












$begingroup$


I'm asked to solve the following ODE:



$y^{(4)}-2y^{(3)}+5y^{(2)}=0$



I solve as usual, and got
$$c_1+c_2x+e^x(c_3cos(2x)+c_4sin(2x))$$



But in the solution and in WolframAlpha, they have:



$$c_1+c_2x+frac{1}{25}(c_3(4cos(2x)+3sin(2x))+c_4(3cos(2x)-4sin(2x)))e^x$$



I don't see where this $frac{1}{25}$ and those 3 and 4 come from. I thought that 25 is maybe the norm squared of $3cos(2x)-4sin(2x)$ but then, why do we have to normalize and where do the 3 and 4 as coefficients come from ? I thought that it's maybe because there are two sines and cosines and thus they are from the same family, but in this case, shouldn't we multiply by x instead of just a number ? Because in this case, they remain in the same family ($3cos(2x)$ and $4cos(2x)$ still belong to the same family)



Thanks for your help.










share|cite|improve this question











$endgroup$








  • 3




    $begingroup$
    I'm not very familiar how wolfram alpha solves ode's. My explanation for that is if we let $u(x)=y''(x)$, then $u''(x)-2y'(x)+5u(x)=0$ has the solution $c_3e^xcos(2x)+c_4e^xsin (2x)$ which is $y''(x)$. I guess wolfram alpha searches now for the antiderivatives $y'(x)$ and $y(x)$.
    $endgroup$
    – Fakemistake
    Dec 2 '18 at 15:56












  • $begingroup$
    Okay, I checked and it seems to be that. Thanks a lot ! Just one question left: is what I did wrong or still correct ? Because I don’t see why it should be wrong given that I followed the “traditional” steps and the solution is almost the same, the only differences are numerical values.
    $endgroup$
    – Poujh
    Dec 2 '18 at 16:25








  • 1




    $begingroup$
    For the sake of correctness, the differential equation in my comment above after letting $u(x)=y''(x)$ is $u''(x)-2u'(x)+5u(x)=0$.
    $endgroup$
    – Fakemistake
    Dec 2 '18 at 19:01


















1












$begingroup$


I'm asked to solve the following ODE:



$y^{(4)}-2y^{(3)}+5y^{(2)}=0$



I solve as usual, and got
$$c_1+c_2x+e^x(c_3cos(2x)+c_4sin(2x))$$



But in the solution and in WolframAlpha, they have:



$$c_1+c_2x+frac{1}{25}(c_3(4cos(2x)+3sin(2x))+c_4(3cos(2x)-4sin(2x)))e^x$$



I don't see where this $frac{1}{25}$ and those 3 and 4 come from. I thought that 25 is maybe the norm squared of $3cos(2x)-4sin(2x)$ but then, why do we have to normalize and where do the 3 and 4 as coefficients come from ? I thought that it's maybe because there are two sines and cosines and thus they are from the same family, but in this case, shouldn't we multiply by x instead of just a number ? Because in this case, they remain in the same family ($3cos(2x)$ and $4cos(2x)$ still belong to the same family)



Thanks for your help.










share|cite|improve this question











$endgroup$








  • 3




    $begingroup$
    I'm not very familiar how wolfram alpha solves ode's. My explanation for that is if we let $u(x)=y''(x)$, then $u''(x)-2y'(x)+5u(x)=0$ has the solution $c_3e^xcos(2x)+c_4e^xsin (2x)$ which is $y''(x)$. I guess wolfram alpha searches now for the antiderivatives $y'(x)$ and $y(x)$.
    $endgroup$
    – Fakemistake
    Dec 2 '18 at 15:56












  • $begingroup$
    Okay, I checked and it seems to be that. Thanks a lot ! Just one question left: is what I did wrong or still correct ? Because I don’t see why it should be wrong given that I followed the “traditional” steps and the solution is almost the same, the only differences are numerical values.
    $endgroup$
    – Poujh
    Dec 2 '18 at 16:25








  • 1




    $begingroup$
    For the sake of correctness, the differential equation in my comment above after letting $u(x)=y''(x)$ is $u''(x)-2u'(x)+5u(x)=0$.
    $endgroup$
    – Fakemistake
    Dec 2 '18 at 19:01
















1












1








1





$begingroup$


I'm asked to solve the following ODE:



$y^{(4)}-2y^{(3)}+5y^{(2)}=0$



I solve as usual, and got
$$c_1+c_2x+e^x(c_3cos(2x)+c_4sin(2x))$$



But in the solution and in WolframAlpha, they have:



$$c_1+c_2x+frac{1}{25}(c_3(4cos(2x)+3sin(2x))+c_4(3cos(2x)-4sin(2x)))e^x$$



I don't see where this $frac{1}{25}$ and those 3 and 4 come from. I thought that 25 is maybe the norm squared of $3cos(2x)-4sin(2x)$ but then, why do we have to normalize and where do the 3 and 4 as coefficients come from ? I thought that it's maybe because there are two sines and cosines and thus they are from the same family, but in this case, shouldn't we multiply by x instead of just a number ? Because in this case, they remain in the same family ($3cos(2x)$ and $4cos(2x)$ still belong to the same family)



Thanks for your help.










share|cite|improve this question











$endgroup$




I'm asked to solve the following ODE:



$y^{(4)}-2y^{(3)}+5y^{(2)}=0$



I solve as usual, and got
$$c_1+c_2x+e^x(c_3cos(2x)+c_4sin(2x))$$



But in the solution and in WolframAlpha, they have:



$$c_1+c_2x+frac{1}{25}(c_3(4cos(2x)+3sin(2x))+c_4(3cos(2x)-4sin(2x)))e^x$$



I don't see where this $frac{1}{25}$ and those 3 and 4 come from. I thought that 25 is maybe the norm squared of $3cos(2x)-4sin(2x)$ but then, why do we have to normalize and where do the 3 and 4 as coefficients come from ? I thought that it's maybe because there are two sines and cosines and thus they are from the same family, but in this case, shouldn't we multiply by x instead of just a number ? Because in this case, they remain in the same family ($3cos(2x)$ and $4cos(2x)$ still belong to the same family)



Thanks for your help.







ordinary-differential-equations






share|cite|improve this question















share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








edited Dec 2 '18 at 15:49







Poujh

















asked Dec 2 '18 at 15:38









PoujhPoujh

611516




611516








  • 3




    $begingroup$
    I'm not very familiar how wolfram alpha solves ode's. My explanation for that is if we let $u(x)=y''(x)$, then $u''(x)-2y'(x)+5u(x)=0$ has the solution $c_3e^xcos(2x)+c_4e^xsin (2x)$ which is $y''(x)$. I guess wolfram alpha searches now for the antiderivatives $y'(x)$ and $y(x)$.
    $endgroup$
    – Fakemistake
    Dec 2 '18 at 15:56












  • $begingroup$
    Okay, I checked and it seems to be that. Thanks a lot ! Just one question left: is what I did wrong or still correct ? Because I don’t see why it should be wrong given that I followed the “traditional” steps and the solution is almost the same, the only differences are numerical values.
    $endgroup$
    – Poujh
    Dec 2 '18 at 16:25








  • 1




    $begingroup$
    For the sake of correctness, the differential equation in my comment above after letting $u(x)=y''(x)$ is $u''(x)-2u'(x)+5u(x)=0$.
    $endgroup$
    – Fakemistake
    Dec 2 '18 at 19:01
















  • 3




    $begingroup$
    I'm not very familiar how wolfram alpha solves ode's. My explanation for that is if we let $u(x)=y''(x)$, then $u''(x)-2y'(x)+5u(x)=0$ has the solution $c_3e^xcos(2x)+c_4e^xsin (2x)$ which is $y''(x)$. I guess wolfram alpha searches now for the antiderivatives $y'(x)$ and $y(x)$.
    $endgroup$
    – Fakemistake
    Dec 2 '18 at 15:56












  • $begingroup$
    Okay, I checked and it seems to be that. Thanks a lot ! Just one question left: is what I did wrong or still correct ? Because I don’t see why it should be wrong given that I followed the “traditional” steps and the solution is almost the same, the only differences are numerical values.
    $endgroup$
    – Poujh
    Dec 2 '18 at 16:25








  • 1




    $begingroup$
    For the sake of correctness, the differential equation in my comment above after letting $u(x)=y''(x)$ is $u''(x)-2u'(x)+5u(x)=0$.
    $endgroup$
    – Fakemistake
    Dec 2 '18 at 19:01










3




3




$begingroup$
I'm not very familiar how wolfram alpha solves ode's. My explanation for that is if we let $u(x)=y''(x)$, then $u''(x)-2y'(x)+5u(x)=0$ has the solution $c_3e^xcos(2x)+c_4e^xsin (2x)$ which is $y''(x)$. I guess wolfram alpha searches now for the antiderivatives $y'(x)$ and $y(x)$.
$endgroup$
– Fakemistake
Dec 2 '18 at 15:56






$begingroup$
I'm not very familiar how wolfram alpha solves ode's. My explanation for that is if we let $u(x)=y''(x)$, then $u''(x)-2y'(x)+5u(x)=0$ has the solution $c_3e^xcos(2x)+c_4e^xsin (2x)$ which is $y''(x)$. I guess wolfram alpha searches now for the antiderivatives $y'(x)$ and $y(x)$.
$endgroup$
– Fakemistake
Dec 2 '18 at 15:56














$begingroup$
Okay, I checked and it seems to be that. Thanks a lot ! Just one question left: is what I did wrong or still correct ? Because I don’t see why it should be wrong given that I followed the “traditional” steps and the solution is almost the same, the only differences are numerical values.
$endgroup$
– Poujh
Dec 2 '18 at 16:25






$begingroup$
Okay, I checked and it seems to be that. Thanks a lot ! Just one question left: is what I did wrong or still correct ? Because I don’t see why it should be wrong given that I followed the “traditional” steps and the solution is almost the same, the only differences are numerical values.
$endgroup$
– Poujh
Dec 2 '18 at 16:25






1




1




$begingroup$
For the sake of correctness, the differential equation in my comment above after letting $u(x)=y''(x)$ is $u''(x)-2u'(x)+5u(x)=0$.
$endgroup$
– Fakemistake
Dec 2 '18 at 19:01






$begingroup$
For the sake of correctness, the differential equation in my comment above after letting $u(x)=y''(x)$ is $u''(x)-2u'(x)+5u(x)=0$.
$endgroup$
– Fakemistake
Dec 2 '18 at 19:01












1 Answer
1






active

oldest

votes


















2












$begingroup$

Ultimately, it should be clear that they are equivalent. Let me rewrite yours as $$y=a_1+a_2x+e^xbigl(a_3cos(2x)+a_4sin(2x)bigr).$$ Setting $c_1=a_1,$ $c_2=a_2,$ $c_3=4a_3+3a_4,$ and $c_4=3a_3-4a_4,$ we then have $$y=c_1+c_2x+frac1{25}Bigl(c_3bigl(4cos(2x)+3sin(2x)bigr)+c_4bigl(3cos(2x)-4sin(2x)bigr)Bigr)e^x.$$ On the other hand, starting with WA's solution, we set $a_1=c_1,$ $a_2=c_2,$ $a_3=frac{4c_3+3c_4}{25},$ and $a_4=frac{3c_3-4c_4}{25},$ yielding your solution.





I can't say for sure how WA obtained that solution or why they left it as they did, but here's an idea of an approach similar to that which it may have taken. Consider the ODE $$z''-2z'+5z=0tag{$star$}.$$ If $z(x)$ is a solution to $(star),$ then any $y(x)$ satisfying $y''=z$ will satisfy the given ODE. On the other hand, if $y(x)$ is a solution to the given ODE, then $z=y''$ will be a solution to $(star).$ Thus, it may be that WA began by considering $(star),$ instead. The characteristic equation of $(star)$ is $$lambda^2-2lambda+5=0,$$ which readily has solutions $lambda=1pm2i.$ Thus, the general solution to $(star)$ is of one of the following equivalent forms: $$z(x)=b_1e^{(1+2i)x}+b_2e^{(1-2i)x}\ z(x)=b_1e^{x+2xi}+b_2e^{x-2xi}\ z(x)=left(b_1e^{2xi}+b_2e^{-2xi}right)e^x\ z(x)=left(b_1bigl(cos(2x)+isin(2x)bigr)+b_2bigl(cos(2x)-isin(2x)bigr)right)e^x\ z(x)=left(bigl(b_1+b_2)cos(2x)+(b_1-b_2)isin(2x)right)e^x.$$ There's no real reason to leave it this way, of course, so at this point, WA may have replaced it with $$z(x)=bigl(ccos(2x)+dsin(2x))e^x,$$ or may have simply skipped right to this form.



At this point, having found $z(x),$ it may have found the general antiderivative (which would correspond to $y'$), then found the general antiderivative yet again. As I discuss in this answer, iterated integration by parts gives us the general formula $$int e^{ax}sin(bx),dx=e^{ax}left(frac{a}{a^2+b^2}sin(bx)-frac{b}{a^2+b^2}cos(bx)right)+C.$$ A similar approach yields $$int e^{ax}cos(bx),dx=e^{ax}left(frac{a}{a^2+b^2}cos(bx)+frac{b}{a^2+b^2}sin(bx)right)+C.$$ In our particular case, this means that $$int e^xcos(2x),dx=e^xleft(frac15cos(2x)+frac25sin(2x)right)+C=frac15left(cos(2x)+2sin(2x)right)e^x+C,$$ and similarly, $$int e^xsin(2x),dx=frac15left(sin(2x)-2cos(2x)right)e^x+C.$$



Thus, $$y'(x)=frac15Bigl(cbigl(cos(2x)+2sin(2x)bigr)+dcdotbigl(sin(2x)-2cos(2x)bigr)Bigr)e^x+c_2,$$ or $$y'(x)=frac15Bigl((c-2dbigr)cos(2x)+bigl(2c+dbigr)sin(2x)Bigr)e^x+c_2.$$ Repeating this process again yields $$y(x)=frac1{25}Bigl(bigl(c-2dbigr)bigl(cos(2x)+2sin(2x)bigr)+bigl(2c+dbigr)cdotbigl(sin(2x)-2cos(2x)bigr)Bigr)e^x+c_2x+c_1,$$ or $$y(x)=c_1+c_2x+frac1{25}Bigl(cbigl(4sin(2x)-3cos(2x)bigr)-dbigl(4cos(2x)+3sin(2x)bigr)Bigr)e^x.$$ At this point, we can let $c_3=-d$ and $c_4=-c,$ whence $$y(x)=c_1+c_2x+frac1{25}Bigl(c_3bigl(4cos(2x)+3sin(2x)bigr)+c_4bigl(3cos(2x)-4sin(2x)bigr)Bigr)e^x.$$ I can't really see any reason for this final substitution, though, so I suspect WA didn't go about it in exactly this way.






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%2f3022775%2fgeneral-solution-of-ode-why-are-there-numbers-as-coefficients-in-the-solution%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









    2












    $begingroup$

    Ultimately, it should be clear that they are equivalent. Let me rewrite yours as $$y=a_1+a_2x+e^xbigl(a_3cos(2x)+a_4sin(2x)bigr).$$ Setting $c_1=a_1,$ $c_2=a_2,$ $c_3=4a_3+3a_4,$ and $c_4=3a_3-4a_4,$ we then have $$y=c_1+c_2x+frac1{25}Bigl(c_3bigl(4cos(2x)+3sin(2x)bigr)+c_4bigl(3cos(2x)-4sin(2x)bigr)Bigr)e^x.$$ On the other hand, starting with WA's solution, we set $a_1=c_1,$ $a_2=c_2,$ $a_3=frac{4c_3+3c_4}{25},$ and $a_4=frac{3c_3-4c_4}{25},$ yielding your solution.





    I can't say for sure how WA obtained that solution or why they left it as they did, but here's an idea of an approach similar to that which it may have taken. Consider the ODE $$z''-2z'+5z=0tag{$star$}.$$ If $z(x)$ is a solution to $(star),$ then any $y(x)$ satisfying $y''=z$ will satisfy the given ODE. On the other hand, if $y(x)$ is a solution to the given ODE, then $z=y''$ will be a solution to $(star).$ Thus, it may be that WA began by considering $(star),$ instead. The characteristic equation of $(star)$ is $$lambda^2-2lambda+5=0,$$ which readily has solutions $lambda=1pm2i.$ Thus, the general solution to $(star)$ is of one of the following equivalent forms: $$z(x)=b_1e^{(1+2i)x}+b_2e^{(1-2i)x}\ z(x)=b_1e^{x+2xi}+b_2e^{x-2xi}\ z(x)=left(b_1e^{2xi}+b_2e^{-2xi}right)e^x\ z(x)=left(b_1bigl(cos(2x)+isin(2x)bigr)+b_2bigl(cos(2x)-isin(2x)bigr)right)e^x\ z(x)=left(bigl(b_1+b_2)cos(2x)+(b_1-b_2)isin(2x)right)e^x.$$ There's no real reason to leave it this way, of course, so at this point, WA may have replaced it with $$z(x)=bigl(ccos(2x)+dsin(2x))e^x,$$ or may have simply skipped right to this form.



    At this point, having found $z(x),$ it may have found the general antiderivative (which would correspond to $y'$), then found the general antiderivative yet again. As I discuss in this answer, iterated integration by parts gives us the general formula $$int e^{ax}sin(bx),dx=e^{ax}left(frac{a}{a^2+b^2}sin(bx)-frac{b}{a^2+b^2}cos(bx)right)+C.$$ A similar approach yields $$int e^{ax}cos(bx),dx=e^{ax}left(frac{a}{a^2+b^2}cos(bx)+frac{b}{a^2+b^2}sin(bx)right)+C.$$ In our particular case, this means that $$int e^xcos(2x),dx=e^xleft(frac15cos(2x)+frac25sin(2x)right)+C=frac15left(cos(2x)+2sin(2x)right)e^x+C,$$ and similarly, $$int e^xsin(2x),dx=frac15left(sin(2x)-2cos(2x)right)e^x+C.$$



    Thus, $$y'(x)=frac15Bigl(cbigl(cos(2x)+2sin(2x)bigr)+dcdotbigl(sin(2x)-2cos(2x)bigr)Bigr)e^x+c_2,$$ or $$y'(x)=frac15Bigl((c-2dbigr)cos(2x)+bigl(2c+dbigr)sin(2x)Bigr)e^x+c_2.$$ Repeating this process again yields $$y(x)=frac1{25}Bigl(bigl(c-2dbigr)bigl(cos(2x)+2sin(2x)bigr)+bigl(2c+dbigr)cdotbigl(sin(2x)-2cos(2x)bigr)Bigr)e^x+c_2x+c_1,$$ or $$y(x)=c_1+c_2x+frac1{25}Bigl(cbigl(4sin(2x)-3cos(2x)bigr)-dbigl(4cos(2x)+3sin(2x)bigr)Bigr)e^x.$$ At this point, we can let $c_3=-d$ and $c_4=-c,$ whence $$y(x)=c_1+c_2x+frac1{25}Bigl(c_3bigl(4cos(2x)+3sin(2x)bigr)+c_4bigl(3cos(2x)-4sin(2x)bigr)Bigr)e^x.$$ I can't really see any reason for this final substitution, though, so I suspect WA didn't go about it in exactly this way.






    share|cite|improve this answer









    $endgroup$


















      2












      $begingroup$

      Ultimately, it should be clear that they are equivalent. Let me rewrite yours as $$y=a_1+a_2x+e^xbigl(a_3cos(2x)+a_4sin(2x)bigr).$$ Setting $c_1=a_1,$ $c_2=a_2,$ $c_3=4a_3+3a_4,$ and $c_4=3a_3-4a_4,$ we then have $$y=c_1+c_2x+frac1{25}Bigl(c_3bigl(4cos(2x)+3sin(2x)bigr)+c_4bigl(3cos(2x)-4sin(2x)bigr)Bigr)e^x.$$ On the other hand, starting with WA's solution, we set $a_1=c_1,$ $a_2=c_2,$ $a_3=frac{4c_3+3c_4}{25},$ and $a_4=frac{3c_3-4c_4}{25},$ yielding your solution.





      I can't say for sure how WA obtained that solution or why they left it as they did, but here's an idea of an approach similar to that which it may have taken. Consider the ODE $$z''-2z'+5z=0tag{$star$}.$$ If $z(x)$ is a solution to $(star),$ then any $y(x)$ satisfying $y''=z$ will satisfy the given ODE. On the other hand, if $y(x)$ is a solution to the given ODE, then $z=y''$ will be a solution to $(star).$ Thus, it may be that WA began by considering $(star),$ instead. The characteristic equation of $(star)$ is $$lambda^2-2lambda+5=0,$$ which readily has solutions $lambda=1pm2i.$ Thus, the general solution to $(star)$ is of one of the following equivalent forms: $$z(x)=b_1e^{(1+2i)x}+b_2e^{(1-2i)x}\ z(x)=b_1e^{x+2xi}+b_2e^{x-2xi}\ z(x)=left(b_1e^{2xi}+b_2e^{-2xi}right)e^x\ z(x)=left(b_1bigl(cos(2x)+isin(2x)bigr)+b_2bigl(cos(2x)-isin(2x)bigr)right)e^x\ z(x)=left(bigl(b_1+b_2)cos(2x)+(b_1-b_2)isin(2x)right)e^x.$$ There's no real reason to leave it this way, of course, so at this point, WA may have replaced it with $$z(x)=bigl(ccos(2x)+dsin(2x))e^x,$$ or may have simply skipped right to this form.



      At this point, having found $z(x),$ it may have found the general antiderivative (which would correspond to $y'$), then found the general antiderivative yet again. As I discuss in this answer, iterated integration by parts gives us the general formula $$int e^{ax}sin(bx),dx=e^{ax}left(frac{a}{a^2+b^2}sin(bx)-frac{b}{a^2+b^2}cos(bx)right)+C.$$ A similar approach yields $$int e^{ax}cos(bx),dx=e^{ax}left(frac{a}{a^2+b^2}cos(bx)+frac{b}{a^2+b^2}sin(bx)right)+C.$$ In our particular case, this means that $$int e^xcos(2x),dx=e^xleft(frac15cos(2x)+frac25sin(2x)right)+C=frac15left(cos(2x)+2sin(2x)right)e^x+C,$$ and similarly, $$int e^xsin(2x),dx=frac15left(sin(2x)-2cos(2x)right)e^x+C.$$



      Thus, $$y'(x)=frac15Bigl(cbigl(cos(2x)+2sin(2x)bigr)+dcdotbigl(sin(2x)-2cos(2x)bigr)Bigr)e^x+c_2,$$ or $$y'(x)=frac15Bigl((c-2dbigr)cos(2x)+bigl(2c+dbigr)sin(2x)Bigr)e^x+c_2.$$ Repeating this process again yields $$y(x)=frac1{25}Bigl(bigl(c-2dbigr)bigl(cos(2x)+2sin(2x)bigr)+bigl(2c+dbigr)cdotbigl(sin(2x)-2cos(2x)bigr)Bigr)e^x+c_2x+c_1,$$ or $$y(x)=c_1+c_2x+frac1{25}Bigl(cbigl(4sin(2x)-3cos(2x)bigr)-dbigl(4cos(2x)+3sin(2x)bigr)Bigr)e^x.$$ At this point, we can let $c_3=-d$ and $c_4=-c,$ whence $$y(x)=c_1+c_2x+frac1{25}Bigl(c_3bigl(4cos(2x)+3sin(2x)bigr)+c_4bigl(3cos(2x)-4sin(2x)bigr)Bigr)e^x.$$ I can't really see any reason for this final substitution, though, so I suspect WA didn't go about it in exactly this way.






      share|cite|improve this answer









      $endgroup$
















        2












        2








        2





        $begingroup$

        Ultimately, it should be clear that they are equivalent. Let me rewrite yours as $$y=a_1+a_2x+e^xbigl(a_3cos(2x)+a_4sin(2x)bigr).$$ Setting $c_1=a_1,$ $c_2=a_2,$ $c_3=4a_3+3a_4,$ and $c_4=3a_3-4a_4,$ we then have $$y=c_1+c_2x+frac1{25}Bigl(c_3bigl(4cos(2x)+3sin(2x)bigr)+c_4bigl(3cos(2x)-4sin(2x)bigr)Bigr)e^x.$$ On the other hand, starting with WA's solution, we set $a_1=c_1,$ $a_2=c_2,$ $a_3=frac{4c_3+3c_4}{25},$ and $a_4=frac{3c_3-4c_4}{25},$ yielding your solution.





        I can't say for sure how WA obtained that solution or why they left it as they did, but here's an idea of an approach similar to that which it may have taken. Consider the ODE $$z''-2z'+5z=0tag{$star$}.$$ If $z(x)$ is a solution to $(star),$ then any $y(x)$ satisfying $y''=z$ will satisfy the given ODE. On the other hand, if $y(x)$ is a solution to the given ODE, then $z=y''$ will be a solution to $(star).$ Thus, it may be that WA began by considering $(star),$ instead. The characteristic equation of $(star)$ is $$lambda^2-2lambda+5=0,$$ which readily has solutions $lambda=1pm2i.$ Thus, the general solution to $(star)$ is of one of the following equivalent forms: $$z(x)=b_1e^{(1+2i)x}+b_2e^{(1-2i)x}\ z(x)=b_1e^{x+2xi}+b_2e^{x-2xi}\ z(x)=left(b_1e^{2xi}+b_2e^{-2xi}right)e^x\ z(x)=left(b_1bigl(cos(2x)+isin(2x)bigr)+b_2bigl(cos(2x)-isin(2x)bigr)right)e^x\ z(x)=left(bigl(b_1+b_2)cos(2x)+(b_1-b_2)isin(2x)right)e^x.$$ There's no real reason to leave it this way, of course, so at this point, WA may have replaced it with $$z(x)=bigl(ccos(2x)+dsin(2x))e^x,$$ or may have simply skipped right to this form.



        At this point, having found $z(x),$ it may have found the general antiderivative (which would correspond to $y'$), then found the general antiderivative yet again. As I discuss in this answer, iterated integration by parts gives us the general formula $$int e^{ax}sin(bx),dx=e^{ax}left(frac{a}{a^2+b^2}sin(bx)-frac{b}{a^2+b^2}cos(bx)right)+C.$$ A similar approach yields $$int e^{ax}cos(bx),dx=e^{ax}left(frac{a}{a^2+b^2}cos(bx)+frac{b}{a^2+b^2}sin(bx)right)+C.$$ In our particular case, this means that $$int e^xcos(2x),dx=e^xleft(frac15cos(2x)+frac25sin(2x)right)+C=frac15left(cos(2x)+2sin(2x)right)e^x+C,$$ and similarly, $$int e^xsin(2x),dx=frac15left(sin(2x)-2cos(2x)right)e^x+C.$$



        Thus, $$y'(x)=frac15Bigl(cbigl(cos(2x)+2sin(2x)bigr)+dcdotbigl(sin(2x)-2cos(2x)bigr)Bigr)e^x+c_2,$$ or $$y'(x)=frac15Bigl((c-2dbigr)cos(2x)+bigl(2c+dbigr)sin(2x)Bigr)e^x+c_2.$$ Repeating this process again yields $$y(x)=frac1{25}Bigl(bigl(c-2dbigr)bigl(cos(2x)+2sin(2x)bigr)+bigl(2c+dbigr)cdotbigl(sin(2x)-2cos(2x)bigr)Bigr)e^x+c_2x+c_1,$$ or $$y(x)=c_1+c_2x+frac1{25}Bigl(cbigl(4sin(2x)-3cos(2x)bigr)-dbigl(4cos(2x)+3sin(2x)bigr)Bigr)e^x.$$ At this point, we can let $c_3=-d$ and $c_4=-c,$ whence $$y(x)=c_1+c_2x+frac1{25}Bigl(c_3bigl(4cos(2x)+3sin(2x)bigr)+c_4bigl(3cos(2x)-4sin(2x)bigr)Bigr)e^x.$$ I can't really see any reason for this final substitution, though, so I suspect WA didn't go about it in exactly this way.






        share|cite|improve this answer









        $endgroup$



        Ultimately, it should be clear that they are equivalent. Let me rewrite yours as $$y=a_1+a_2x+e^xbigl(a_3cos(2x)+a_4sin(2x)bigr).$$ Setting $c_1=a_1,$ $c_2=a_2,$ $c_3=4a_3+3a_4,$ and $c_4=3a_3-4a_4,$ we then have $$y=c_1+c_2x+frac1{25}Bigl(c_3bigl(4cos(2x)+3sin(2x)bigr)+c_4bigl(3cos(2x)-4sin(2x)bigr)Bigr)e^x.$$ On the other hand, starting with WA's solution, we set $a_1=c_1,$ $a_2=c_2,$ $a_3=frac{4c_3+3c_4}{25},$ and $a_4=frac{3c_3-4c_4}{25},$ yielding your solution.





        I can't say for sure how WA obtained that solution or why they left it as they did, but here's an idea of an approach similar to that which it may have taken. Consider the ODE $$z''-2z'+5z=0tag{$star$}.$$ If $z(x)$ is a solution to $(star),$ then any $y(x)$ satisfying $y''=z$ will satisfy the given ODE. On the other hand, if $y(x)$ is a solution to the given ODE, then $z=y''$ will be a solution to $(star).$ Thus, it may be that WA began by considering $(star),$ instead. The characteristic equation of $(star)$ is $$lambda^2-2lambda+5=0,$$ which readily has solutions $lambda=1pm2i.$ Thus, the general solution to $(star)$ is of one of the following equivalent forms: $$z(x)=b_1e^{(1+2i)x}+b_2e^{(1-2i)x}\ z(x)=b_1e^{x+2xi}+b_2e^{x-2xi}\ z(x)=left(b_1e^{2xi}+b_2e^{-2xi}right)e^x\ z(x)=left(b_1bigl(cos(2x)+isin(2x)bigr)+b_2bigl(cos(2x)-isin(2x)bigr)right)e^x\ z(x)=left(bigl(b_1+b_2)cos(2x)+(b_1-b_2)isin(2x)right)e^x.$$ There's no real reason to leave it this way, of course, so at this point, WA may have replaced it with $$z(x)=bigl(ccos(2x)+dsin(2x))e^x,$$ or may have simply skipped right to this form.



        At this point, having found $z(x),$ it may have found the general antiderivative (which would correspond to $y'$), then found the general antiderivative yet again. As I discuss in this answer, iterated integration by parts gives us the general formula $$int e^{ax}sin(bx),dx=e^{ax}left(frac{a}{a^2+b^2}sin(bx)-frac{b}{a^2+b^2}cos(bx)right)+C.$$ A similar approach yields $$int e^{ax}cos(bx),dx=e^{ax}left(frac{a}{a^2+b^2}cos(bx)+frac{b}{a^2+b^2}sin(bx)right)+C.$$ In our particular case, this means that $$int e^xcos(2x),dx=e^xleft(frac15cos(2x)+frac25sin(2x)right)+C=frac15left(cos(2x)+2sin(2x)right)e^x+C,$$ and similarly, $$int e^xsin(2x),dx=frac15left(sin(2x)-2cos(2x)right)e^x+C.$$



        Thus, $$y'(x)=frac15Bigl(cbigl(cos(2x)+2sin(2x)bigr)+dcdotbigl(sin(2x)-2cos(2x)bigr)Bigr)e^x+c_2,$$ or $$y'(x)=frac15Bigl((c-2dbigr)cos(2x)+bigl(2c+dbigr)sin(2x)Bigr)e^x+c_2.$$ Repeating this process again yields $$y(x)=frac1{25}Bigl(bigl(c-2dbigr)bigl(cos(2x)+2sin(2x)bigr)+bigl(2c+dbigr)cdotbigl(sin(2x)-2cos(2x)bigr)Bigr)e^x+c_2x+c_1,$$ or $$y(x)=c_1+c_2x+frac1{25}Bigl(cbigl(4sin(2x)-3cos(2x)bigr)-dbigl(4cos(2x)+3sin(2x)bigr)Bigr)e^x.$$ At this point, we can let $c_3=-d$ and $c_4=-c,$ whence $$y(x)=c_1+c_2x+frac1{25}Bigl(c_3bigl(4cos(2x)+3sin(2x)bigr)+c_4bigl(3cos(2x)-4sin(2x)bigr)Bigr)e^x.$$ I can't really see any reason for this final substitution, though, so I suspect WA didn't go about it in exactly this way.







        share|cite|improve this answer












        share|cite|improve this answer



        share|cite|improve this answer










        answered Dec 2 '18 at 17:34









        Cameron BuieCameron Buie

        85.3k772156




        85.3k772156






























            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%2f3022775%2fgeneral-solution-of-ode-why-are-there-numbers-as-coefficients-in-the-solution%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 send String Array data to Server using php in android

            Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents

            Is anime1.com a legal site for watching anime?