How to solve this ode $xy''-(1+x)y'+y=x^2$?












4














Find the general solution of $xy''-(1+x)y'+y=x^2$ knowing that the homogeneous equation has the following solution: $e^{ax}$, where $a$ is a parameter you have to find.



I have found that $a=1$ or $a=1/x$.










share|cite|improve this question









New contributor




Gloria Guerrero is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
















  • 1




    The parameter cannot depend on $x$.
    – dmtri
    2 days ago
















4














Find the general solution of $xy''-(1+x)y'+y=x^2$ knowing that the homogeneous equation has the following solution: $e^{ax}$, where $a$ is a parameter you have to find.



I have found that $a=1$ or $a=1/x$.










share|cite|improve this question









New contributor




Gloria Guerrero is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
















  • 1




    The parameter cannot depend on $x$.
    – dmtri
    2 days ago














4












4








4


2





Find the general solution of $xy''-(1+x)y'+y=x^2$ knowing that the homogeneous equation has the following solution: $e^{ax}$, where $a$ is a parameter you have to find.



I have found that $a=1$ or $a=1/x$.










share|cite|improve this question









New contributor




Gloria Guerrero is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











Find the general solution of $xy''-(1+x)y'+y=x^2$ knowing that the homogeneous equation has the following solution: $e^{ax}$, where $a$ is a parameter you have to find.



I have found that $a=1$ or $a=1/x$.







differential-equations






share|cite|improve this question









New contributor




Gloria Guerrero is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|cite|improve this question









New contributor




Gloria Guerrero is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|cite|improve this question




share|cite|improve this question








edited 2 days ago









dmtri

1,4321521




1,4321521






New contributor




Gloria Guerrero is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked 2 days ago









Gloria Guerrero

211




211




New contributor




Gloria Guerrero is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





Gloria Guerrero is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






Gloria Guerrero is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.








  • 1




    The parameter cannot depend on $x$.
    – dmtri
    2 days ago














  • 1




    The parameter cannot depend on $x$.
    – dmtri
    2 days ago








1




1




The parameter cannot depend on $x$.
– dmtri
2 days ago




The parameter cannot depend on $x$.
– dmtri
2 days ago










3 Answers
3






active

oldest

votes


















1














Hint. You are correct, the homogeneous case of the given linear ODE has $e^x$ as a solution (the parameter $a$ is supposed to be a constant real number). Note that $y=-x^2$ is a particular solution. Is there any other polynomial solution? Substitute $y(x)=Ax^2+Bx+C$ into the ODE, then
$$x(2A)-(1+x)(2Ax+B)+(Ax^2+Bx+C)=x^2$$
What may we conclude?






share|cite|improve this answer































    1














    The equation $xy''-(1+x)y'+y=x^2$ can be rewritten as $(xy''-y')+(y-xy')=x^2.$ After division by $x^2$ we have
    $$
    frac{xy''-y'}{x^2} + frac{y-xy'}{x^2} = 1,
    $$

    which can be rewritten as
    $$
    Big( frac{y'}{x} Big)' - Big( frac{y}{x} Big)' = 1.
    $$



    Taking the antiderivative gives
    $$
    frac{y'}{x} - frac{y}{x} = x + C,
    $$

    which after multiplication with $x$ gives
    $$y' - y = x^2+ Cx.$$



    Now we multiply with the integrating factor $e^{-x}$:
    $$e^{-x} y' - e^{-x} y = x^2 e^{-x} + Cx e^{-x}.$$



    The left hand side can be rewritten as a derivative:
    $$( e^{-x} y )' = x^2 e^{-x} + Cx e^{-x}.$$



    Taking the antiderivative gives
    $$e^{-x} y = -(x^2+2x+2) e^{-x} - C(x+1) e^{-x} + D.$$



    Thus, all solutions to the original differential equation are given by
    $$y = -(x^2+2x+2) - C(x+1) + D e^x,$$
    where $C$ and $D$ are two constants.






    share|cite|improve this answer





























      0














      Substitute $$y(x)=(-x-1)v(x)$$ then we get
      $$-xfrac{d^2v(x)}{dx^2(x+1)}+frac{dv(x)}{dx}(x^2+1)=x^2$$
      let $$frac{dv(x)}{dx}=u(x)$$ then we get
      $$frac{du(x)}{dx}+frac{-x^2-1)u(x)}{x(x+1)}=-frac{x}{x+1}$$
      with $$mu(x)=e^{intfrac{-x^2-1}{x(x+1)}dx}=frac{e^{-x}(x+1)^2}{x}$$ we get
      $$frac{e^{-x}(x+1)^2}{x}frac{du(x)}{dx}+frac{d}{dx}left(frac{e^{-x}(x+1)^2}{x}right)u(x)=-e^{-x}(x+1)$$ and this is
      $$intfrac{d}{dx}left(frac{e^{-x}(x+1)^2u(x)}{x}right)=int-e^{-x}(x+1)dx$$
      Can you finish?






      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',
        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
        });


        }
        });






        Gloria Guerrero is a new contributor. Be nice, and check out our Code of Conduct.










        draft saved

        draft discarded


















        StackExchange.ready(
        function () {
        StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3060774%2fhow-to-solve-this-ode-xy-1xyy-x2%23new-answer', 'question_page');
        }
        );

        Post as a guest















        Required, but never shown

























        3 Answers
        3






        active

        oldest

        votes








        3 Answers
        3






        active

        oldest

        votes









        active

        oldest

        votes






        active

        oldest

        votes









        1














        Hint. You are correct, the homogeneous case of the given linear ODE has $e^x$ as a solution (the parameter $a$ is supposed to be a constant real number). Note that $y=-x^2$ is a particular solution. Is there any other polynomial solution? Substitute $y(x)=Ax^2+Bx+C$ into the ODE, then
        $$x(2A)-(1+x)(2Ax+B)+(Ax^2+Bx+C)=x^2$$
        What may we conclude?






        share|cite|improve this answer




























          1














          Hint. You are correct, the homogeneous case of the given linear ODE has $e^x$ as a solution (the parameter $a$ is supposed to be a constant real number). Note that $y=-x^2$ is a particular solution. Is there any other polynomial solution? Substitute $y(x)=Ax^2+Bx+C$ into the ODE, then
          $$x(2A)-(1+x)(2Ax+B)+(Ax^2+Bx+C)=x^2$$
          What may we conclude?






          share|cite|improve this answer


























            1












            1








            1






            Hint. You are correct, the homogeneous case of the given linear ODE has $e^x$ as a solution (the parameter $a$ is supposed to be a constant real number). Note that $y=-x^2$ is a particular solution. Is there any other polynomial solution? Substitute $y(x)=Ax^2+Bx+C$ into the ODE, then
            $$x(2A)-(1+x)(2Ax+B)+(Ax^2+Bx+C)=x^2$$
            What may we conclude?






            share|cite|improve this answer














            Hint. You are correct, the homogeneous case of the given linear ODE has $e^x$ as a solution (the parameter $a$ is supposed to be a constant real number). Note that $y=-x^2$ is a particular solution. Is there any other polynomial solution? Substitute $y(x)=Ax^2+Bx+C$ into the ODE, then
            $$x(2A)-(1+x)(2Ax+B)+(Ax^2+Bx+C)=x^2$$
            What may we conclude?







            share|cite|improve this answer














            share|cite|improve this answer



            share|cite|improve this answer








            edited 2 days ago

























            answered 2 days ago









            Robert Z

            93.5k1061132




            93.5k1061132























                1














                The equation $xy''-(1+x)y'+y=x^2$ can be rewritten as $(xy''-y')+(y-xy')=x^2.$ After division by $x^2$ we have
                $$
                frac{xy''-y'}{x^2} + frac{y-xy'}{x^2} = 1,
                $$

                which can be rewritten as
                $$
                Big( frac{y'}{x} Big)' - Big( frac{y}{x} Big)' = 1.
                $$



                Taking the antiderivative gives
                $$
                frac{y'}{x} - frac{y}{x} = x + C,
                $$

                which after multiplication with $x$ gives
                $$y' - y = x^2+ Cx.$$



                Now we multiply with the integrating factor $e^{-x}$:
                $$e^{-x} y' - e^{-x} y = x^2 e^{-x} + Cx e^{-x}.$$



                The left hand side can be rewritten as a derivative:
                $$( e^{-x} y )' = x^2 e^{-x} + Cx e^{-x}.$$



                Taking the antiderivative gives
                $$e^{-x} y = -(x^2+2x+2) e^{-x} - C(x+1) e^{-x} + D.$$



                Thus, all solutions to the original differential equation are given by
                $$y = -(x^2+2x+2) - C(x+1) + D e^x,$$
                where $C$ and $D$ are two constants.






                share|cite|improve this answer


























                  1














                  The equation $xy''-(1+x)y'+y=x^2$ can be rewritten as $(xy''-y')+(y-xy')=x^2.$ After division by $x^2$ we have
                  $$
                  frac{xy''-y'}{x^2} + frac{y-xy'}{x^2} = 1,
                  $$

                  which can be rewritten as
                  $$
                  Big( frac{y'}{x} Big)' - Big( frac{y}{x} Big)' = 1.
                  $$



                  Taking the antiderivative gives
                  $$
                  frac{y'}{x} - frac{y}{x} = x + C,
                  $$

                  which after multiplication with $x$ gives
                  $$y' - y = x^2+ Cx.$$



                  Now we multiply with the integrating factor $e^{-x}$:
                  $$e^{-x} y' - e^{-x} y = x^2 e^{-x} + Cx e^{-x}.$$



                  The left hand side can be rewritten as a derivative:
                  $$( e^{-x} y )' = x^2 e^{-x} + Cx e^{-x}.$$



                  Taking the antiderivative gives
                  $$e^{-x} y = -(x^2+2x+2) e^{-x} - C(x+1) e^{-x} + D.$$



                  Thus, all solutions to the original differential equation are given by
                  $$y = -(x^2+2x+2) - C(x+1) + D e^x,$$
                  where $C$ and $D$ are two constants.






                  share|cite|improve this answer
























                    1












                    1








                    1






                    The equation $xy''-(1+x)y'+y=x^2$ can be rewritten as $(xy''-y')+(y-xy')=x^2.$ After division by $x^2$ we have
                    $$
                    frac{xy''-y'}{x^2} + frac{y-xy'}{x^2} = 1,
                    $$

                    which can be rewritten as
                    $$
                    Big( frac{y'}{x} Big)' - Big( frac{y}{x} Big)' = 1.
                    $$



                    Taking the antiderivative gives
                    $$
                    frac{y'}{x} - frac{y}{x} = x + C,
                    $$

                    which after multiplication with $x$ gives
                    $$y' - y = x^2+ Cx.$$



                    Now we multiply with the integrating factor $e^{-x}$:
                    $$e^{-x} y' - e^{-x} y = x^2 e^{-x} + Cx e^{-x}.$$



                    The left hand side can be rewritten as a derivative:
                    $$( e^{-x} y )' = x^2 e^{-x} + Cx e^{-x}.$$



                    Taking the antiderivative gives
                    $$e^{-x} y = -(x^2+2x+2) e^{-x} - C(x+1) e^{-x} + D.$$



                    Thus, all solutions to the original differential equation are given by
                    $$y = -(x^2+2x+2) - C(x+1) + D e^x,$$
                    where $C$ and $D$ are two constants.






                    share|cite|improve this answer












                    The equation $xy''-(1+x)y'+y=x^2$ can be rewritten as $(xy''-y')+(y-xy')=x^2.$ After division by $x^2$ we have
                    $$
                    frac{xy''-y'}{x^2} + frac{y-xy'}{x^2} = 1,
                    $$

                    which can be rewritten as
                    $$
                    Big( frac{y'}{x} Big)' - Big( frac{y}{x} Big)' = 1.
                    $$



                    Taking the antiderivative gives
                    $$
                    frac{y'}{x} - frac{y}{x} = x + C,
                    $$

                    which after multiplication with $x$ gives
                    $$y' - y = x^2+ Cx.$$



                    Now we multiply with the integrating factor $e^{-x}$:
                    $$e^{-x} y' - e^{-x} y = x^2 e^{-x} + Cx e^{-x}.$$



                    The left hand side can be rewritten as a derivative:
                    $$( e^{-x} y )' = x^2 e^{-x} + Cx e^{-x}.$$



                    Taking the antiderivative gives
                    $$e^{-x} y = -(x^2+2x+2) e^{-x} - C(x+1) e^{-x} + D.$$



                    Thus, all solutions to the original differential equation are given by
                    $$y = -(x^2+2x+2) - C(x+1) + D e^x,$$
                    where $C$ and $D$ are two constants.







                    share|cite|improve this answer












                    share|cite|improve this answer



                    share|cite|improve this answer










                    answered 2 days ago









                    md2perpe

                    7,71111028




                    7,71111028























                        0














                        Substitute $$y(x)=(-x-1)v(x)$$ then we get
                        $$-xfrac{d^2v(x)}{dx^2(x+1)}+frac{dv(x)}{dx}(x^2+1)=x^2$$
                        let $$frac{dv(x)}{dx}=u(x)$$ then we get
                        $$frac{du(x)}{dx}+frac{-x^2-1)u(x)}{x(x+1)}=-frac{x}{x+1}$$
                        with $$mu(x)=e^{intfrac{-x^2-1}{x(x+1)}dx}=frac{e^{-x}(x+1)^2}{x}$$ we get
                        $$frac{e^{-x}(x+1)^2}{x}frac{du(x)}{dx}+frac{d}{dx}left(frac{e^{-x}(x+1)^2}{x}right)u(x)=-e^{-x}(x+1)$$ and this is
                        $$intfrac{d}{dx}left(frac{e^{-x}(x+1)^2u(x)}{x}right)=int-e^{-x}(x+1)dx$$
                        Can you finish?






                        share|cite|improve this answer


























                          0














                          Substitute $$y(x)=(-x-1)v(x)$$ then we get
                          $$-xfrac{d^2v(x)}{dx^2(x+1)}+frac{dv(x)}{dx}(x^2+1)=x^2$$
                          let $$frac{dv(x)}{dx}=u(x)$$ then we get
                          $$frac{du(x)}{dx}+frac{-x^2-1)u(x)}{x(x+1)}=-frac{x}{x+1}$$
                          with $$mu(x)=e^{intfrac{-x^2-1}{x(x+1)}dx}=frac{e^{-x}(x+1)^2}{x}$$ we get
                          $$frac{e^{-x}(x+1)^2}{x}frac{du(x)}{dx}+frac{d}{dx}left(frac{e^{-x}(x+1)^2}{x}right)u(x)=-e^{-x}(x+1)$$ and this is
                          $$intfrac{d}{dx}left(frac{e^{-x}(x+1)^2u(x)}{x}right)=int-e^{-x}(x+1)dx$$
                          Can you finish?






                          share|cite|improve this answer
























                            0












                            0








                            0






                            Substitute $$y(x)=(-x-1)v(x)$$ then we get
                            $$-xfrac{d^2v(x)}{dx^2(x+1)}+frac{dv(x)}{dx}(x^2+1)=x^2$$
                            let $$frac{dv(x)}{dx}=u(x)$$ then we get
                            $$frac{du(x)}{dx}+frac{-x^2-1)u(x)}{x(x+1)}=-frac{x}{x+1}$$
                            with $$mu(x)=e^{intfrac{-x^2-1}{x(x+1)}dx}=frac{e^{-x}(x+1)^2}{x}$$ we get
                            $$frac{e^{-x}(x+1)^2}{x}frac{du(x)}{dx}+frac{d}{dx}left(frac{e^{-x}(x+1)^2}{x}right)u(x)=-e^{-x}(x+1)$$ and this is
                            $$intfrac{d}{dx}left(frac{e^{-x}(x+1)^2u(x)}{x}right)=int-e^{-x}(x+1)dx$$
                            Can you finish?






                            share|cite|improve this answer












                            Substitute $$y(x)=(-x-1)v(x)$$ then we get
                            $$-xfrac{d^2v(x)}{dx^2(x+1)}+frac{dv(x)}{dx}(x^2+1)=x^2$$
                            let $$frac{dv(x)}{dx}=u(x)$$ then we get
                            $$frac{du(x)}{dx}+frac{-x^2-1)u(x)}{x(x+1)}=-frac{x}{x+1}$$
                            with $$mu(x)=e^{intfrac{-x^2-1}{x(x+1)}dx}=frac{e^{-x}(x+1)^2}{x}$$ we get
                            $$frac{e^{-x}(x+1)^2}{x}frac{du(x)}{dx}+frac{d}{dx}left(frac{e^{-x}(x+1)^2}{x}right)u(x)=-e^{-x}(x+1)$$ and this is
                            $$intfrac{d}{dx}left(frac{e^{-x}(x+1)^2u(x)}{x}right)=int-e^{-x}(x+1)dx$$
                            Can you finish?







                            share|cite|improve this answer












                            share|cite|improve this answer



                            share|cite|improve this answer










                            answered 2 days ago









                            Dr. Sonnhard Graubner

                            73.3k42865




                            73.3k42865






















                                Gloria Guerrero is a new contributor. Be nice, and check out our Code of Conduct.










                                draft saved

                                draft discarded


















                                Gloria Guerrero is a new contributor. Be nice, and check out our Code of Conduct.













                                Gloria Guerrero is a new contributor. Be nice, and check out our Code of Conduct.












                                Gloria Guerrero is a new contributor. Be nice, and check out our Code of Conduct.
















                                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%2f3060774%2fhow-to-solve-this-ode-xy-1xyy-x2%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

                                1300-talet

                                1300-talet

                                Display a custom attribute below product name in the front-end Magento 1.9.3.8