Find the general solution to the ODE $xfrac{dy}{dx}=y-frac{1}{y}$











up vote
0
down vote

favorite
1












I have been working through an ODE finding the general solution and following the modulus through the equation has left me with four general solutions, as shown below. Online ODE solvers, however, have only calculated the two (positive and negative), on the right hand side of the page. Am I incorrect with my use of the modulus operator after I integrated each side then?



$$begin{align*}xfrac{dy}{dx}&=y-frac{1}{y}quadquad(-1<y<1)\
intfrac{1}{y-frac{1}{y}} dy&=intfrac{1}{x} dx\
intfrac{y}{y^2-1} dy&=intfrac{1}{x} dx\
frac{1}{2}ln{|y^2-1|}&=ln{|x|}+c\
sqrt{|y^2-1|}&=A|x| text{, where $A=e^c$}\
|y^2-1|&=A^2x^2\
implies y^2-1&=A^2x^2&1-y^2&=A^2x^2\
y^2&=A^2x^2+1&y^2&=1-A^2x^2\
\
therefore y&=pmsqrt{Kx^2+1}&y&=pmsqrt{1-Kx^2} text{, where $K=A^2$}\
end{align*}$$



Thanks :)










share|cite|improve this question




















  • 1




    If $-1<y<1$ then $|y^2-1|=1-y^2$.
    – Nosrati
    Nov 15 at 12:10










  • What do you mean by $-1lt ylt -1$
    – Digamma
    Nov 15 at 12:11








  • 1




    $-1 < y < 1$, therefore, $0> y^2 -1$ and you can forget the modulus simply multiplying by $-1$.
    – AlgebraicallyClosed
    Nov 15 at 12:12










  • @Nosrati Thanks, got it now. If y could take any value would my method have been correct?
    – Adam Bromiley
    Nov 15 at 12:19










  • your method is nice with some typo.
    – Nosrati
    Nov 15 at 12:19















up vote
0
down vote

favorite
1












I have been working through an ODE finding the general solution and following the modulus through the equation has left me with four general solutions, as shown below. Online ODE solvers, however, have only calculated the two (positive and negative), on the right hand side of the page. Am I incorrect with my use of the modulus operator after I integrated each side then?



$$begin{align*}xfrac{dy}{dx}&=y-frac{1}{y}quadquad(-1<y<1)\
intfrac{1}{y-frac{1}{y}} dy&=intfrac{1}{x} dx\
intfrac{y}{y^2-1} dy&=intfrac{1}{x} dx\
frac{1}{2}ln{|y^2-1|}&=ln{|x|}+c\
sqrt{|y^2-1|}&=A|x| text{, where $A=e^c$}\
|y^2-1|&=A^2x^2\
implies y^2-1&=A^2x^2&1-y^2&=A^2x^2\
y^2&=A^2x^2+1&y^2&=1-A^2x^2\
\
therefore y&=pmsqrt{Kx^2+1}&y&=pmsqrt{1-Kx^2} text{, where $K=A^2$}\
end{align*}$$



Thanks :)










share|cite|improve this question




















  • 1




    If $-1<y<1$ then $|y^2-1|=1-y^2$.
    – Nosrati
    Nov 15 at 12:10










  • What do you mean by $-1lt ylt -1$
    – Digamma
    Nov 15 at 12:11








  • 1




    $-1 < y < 1$, therefore, $0> y^2 -1$ and you can forget the modulus simply multiplying by $-1$.
    – AlgebraicallyClosed
    Nov 15 at 12:12










  • @Nosrati Thanks, got it now. If y could take any value would my method have been correct?
    – Adam Bromiley
    Nov 15 at 12:19










  • your method is nice with some typo.
    – Nosrati
    Nov 15 at 12:19













up vote
0
down vote

favorite
1









up vote
0
down vote

favorite
1






1





I have been working through an ODE finding the general solution and following the modulus through the equation has left me with four general solutions, as shown below. Online ODE solvers, however, have only calculated the two (positive and negative), on the right hand side of the page. Am I incorrect with my use of the modulus operator after I integrated each side then?



$$begin{align*}xfrac{dy}{dx}&=y-frac{1}{y}quadquad(-1<y<1)\
intfrac{1}{y-frac{1}{y}} dy&=intfrac{1}{x} dx\
intfrac{y}{y^2-1} dy&=intfrac{1}{x} dx\
frac{1}{2}ln{|y^2-1|}&=ln{|x|}+c\
sqrt{|y^2-1|}&=A|x| text{, where $A=e^c$}\
|y^2-1|&=A^2x^2\
implies y^2-1&=A^2x^2&1-y^2&=A^2x^2\
y^2&=A^2x^2+1&y^2&=1-A^2x^2\
\
therefore y&=pmsqrt{Kx^2+1}&y&=pmsqrt{1-Kx^2} text{, where $K=A^2$}\
end{align*}$$



Thanks :)










share|cite|improve this question















I have been working through an ODE finding the general solution and following the modulus through the equation has left me with four general solutions, as shown below. Online ODE solvers, however, have only calculated the two (positive and negative), on the right hand side of the page. Am I incorrect with my use of the modulus operator after I integrated each side then?



$$begin{align*}xfrac{dy}{dx}&=y-frac{1}{y}quadquad(-1<y<1)\
intfrac{1}{y-frac{1}{y}} dy&=intfrac{1}{x} dx\
intfrac{y}{y^2-1} dy&=intfrac{1}{x} dx\
frac{1}{2}ln{|y^2-1|}&=ln{|x|}+c\
sqrt{|y^2-1|}&=A|x| text{, where $A=e^c$}\
|y^2-1|&=A^2x^2\
implies y^2-1&=A^2x^2&1-y^2&=A^2x^2\
y^2&=A^2x^2+1&y^2&=1-A^2x^2\
\
therefore y&=pmsqrt{Kx^2+1}&y&=pmsqrt{1-Kx^2} text{, where $K=A^2$}\
end{align*}$$



Thanks :)







calculus integration differential-equations absolute-value






share|cite|improve this question















share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








edited Nov 15 at 14:26









LutzL

53.6k41953




53.6k41953










asked Nov 15 at 12:05









Adam Bromiley

26218




26218








  • 1




    If $-1<y<1$ then $|y^2-1|=1-y^2$.
    – Nosrati
    Nov 15 at 12:10










  • What do you mean by $-1lt ylt -1$
    – Digamma
    Nov 15 at 12:11








  • 1




    $-1 < y < 1$, therefore, $0> y^2 -1$ and you can forget the modulus simply multiplying by $-1$.
    – AlgebraicallyClosed
    Nov 15 at 12:12










  • @Nosrati Thanks, got it now. If y could take any value would my method have been correct?
    – Adam Bromiley
    Nov 15 at 12:19










  • your method is nice with some typo.
    – Nosrati
    Nov 15 at 12:19














  • 1




    If $-1<y<1$ then $|y^2-1|=1-y^2$.
    – Nosrati
    Nov 15 at 12:10










  • What do you mean by $-1lt ylt -1$
    – Digamma
    Nov 15 at 12:11








  • 1




    $-1 < y < 1$, therefore, $0> y^2 -1$ and you can forget the modulus simply multiplying by $-1$.
    – AlgebraicallyClosed
    Nov 15 at 12:12










  • @Nosrati Thanks, got it now. If y could take any value would my method have been correct?
    – Adam Bromiley
    Nov 15 at 12:19










  • your method is nice with some typo.
    – Nosrati
    Nov 15 at 12:19








1




1




If $-1<y<1$ then $|y^2-1|=1-y^2$.
– Nosrati
Nov 15 at 12:10




If $-1<y<1$ then $|y^2-1|=1-y^2$.
– Nosrati
Nov 15 at 12:10












What do you mean by $-1lt ylt -1$
– Digamma
Nov 15 at 12:11






What do you mean by $-1lt ylt -1$
– Digamma
Nov 15 at 12:11






1




1




$-1 < y < 1$, therefore, $0> y^2 -1$ and you can forget the modulus simply multiplying by $-1$.
– AlgebraicallyClosed
Nov 15 at 12:12




$-1 < y < 1$, therefore, $0> y^2 -1$ and you can forget the modulus simply multiplying by $-1$.
– AlgebraicallyClosed
Nov 15 at 12:12












@Nosrati Thanks, got it now. If y could take any value would my method have been correct?
– Adam Bromiley
Nov 15 at 12:19




@Nosrati Thanks, got it now. If y could take any value would my method have been correct?
– Adam Bromiley
Nov 15 at 12:19












your method is nice with some typo.
– Nosrati
Nov 15 at 12:19




your method is nice with some typo.
– Nosrati
Nov 15 at 12:19










3 Answers
3






active

oldest

votes

















up vote
1
down vote



accepted










If $-1<y<1$ then $|y^2-1|=1-y^2$.



Another approach: Write the equation as
$$dfrac{x dy-y dx}{x^2}=dfrac{-1}{x^2y} dx$$
or
$$left(dfrac{y}{x}right)dleft(dfrac{y}{x}right)=dfrac{-1}{x^3} dx$$
and
$$left(dfrac{y}{x}right)^2=dfrac{1}{x^2}+C$$






share|cite|improve this answer





















  • Does this answer the question ?
    – Yves Daoust
    Nov 15 at 16:20










  • I should have addressed this comment to the OP. He was worried by his four solutions and usage of the modulus...
    – Yves Daoust
    Nov 15 at 16:23










  • So here you are :)
    – Nosrati
    Nov 15 at 16:24


















up vote
0
down vote













Another approach is this. Rewrite the DE as
$$
frac{yy'}{y^2-1}=frac 1x
$$

Which is the same as
$$
frac 12 frac{d}{dx}ln(y^2-1)=frac 1x
$$

Upon integration, one gets
$$
lndfrac{y^2(x)-1}{y^2(x_0)-1}=2lnfrac{x}{x_0}
$$

Hence, one obtains
$$
y^2(x)=1+[y^2(x_0)-1]left(frac{x}{x_0}right)^2
$$






share|cite|improve this answer




























    up vote
    0
    down vote













    Your solutions are $pmsqrt{1pm Kx^2}$, where $K$ is positive. But this does not differ from $pmsqrt{1+Kx^2}$ where $K$ is unconstrained.





    From



    $$frac12log|y^2-1|=log|x|+C$$ you draw



    $$log|y^2-1|=log(e^Cx^2)$$ and



    $$|y^2-1|=e^Cx.$$



    Then



    $$y^2=1pm e^Cx^2$$ which you can very well rewrite as



    $$y^2=1+Dx^2.$$






    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: 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%2f2999612%2ffind-the-general-solution-to-the-ode-x-fracdydx-y-frac1y%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








      up vote
      1
      down vote



      accepted










      If $-1<y<1$ then $|y^2-1|=1-y^2$.



      Another approach: Write the equation as
      $$dfrac{x dy-y dx}{x^2}=dfrac{-1}{x^2y} dx$$
      or
      $$left(dfrac{y}{x}right)dleft(dfrac{y}{x}right)=dfrac{-1}{x^3} dx$$
      and
      $$left(dfrac{y}{x}right)^2=dfrac{1}{x^2}+C$$






      share|cite|improve this answer





















      • Does this answer the question ?
        – Yves Daoust
        Nov 15 at 16:20










      • I should have addressed this comment to the OP. He was worried by his four solutions and usage of the modulus...
        – Yves Daoust
        Nov 15 at 16:23










      • So here you are :)
        – Nosrati
        Nov 15 at 16:24















      up vote
      1
      down vote



      accepted










      If $-1<y<1$ then $|y^2-1|=1-y^2$.



      Another approach: Write the equation as
      $$dfrac{x dy-y dx}{x^2}=dfrac{-1}{x^2y} dx$$
      or
      $$left(dfrac{y}{x}right)dleft(dfrac{y}{x}right)=dfrac{-1}{x^3} dx$$
      and
      $$left(dfrac{y}{x}right)^2=dfrac{1}{x^2}+C$$






      share|cite|improve this answer





















      • Does this answer the question ?
        – Yves Daoust
        Nov 15 at 16:20










      • I should have addressed this comment to the OP. He was worried by his four solutions and usage of the modulus...
        – Yves Daoust
        Nov 15 at 16:23










      • So here you are :)
        – Nosrati
        Nov 15 at 16:24













      up vote
      1
      down vote



      accepted







      up vote
      1
      down vote



      accepted






      If $-1<y<1$ then $|y^2-1|=1-y^2$.



      Another approach: Write the equation as
      $$dfrac{x dy-y dx}{x^2}=dfrac{-1}{x^2y} dx$$
      or
      $$left(dfrac{y}{x}right)dleft(dfrac{y}{x}right)=dfrac{-1}{x^3} dx$$
      and
      $$left(dfrac{y}{x}right)^2=dfrac{1}{x^2}+C$$






      share|cite|improve this answer












      If $-1<y<1$ then $|y^2-1|=1-y^2$.



      Another approach: Write the equation as
      $$dfrac{x dy-y dx}{x^2}=dfrac{-1}{x^2y} dx$$
      or
      $$left(dfrac{y}{x}right)dleft(dfrac{y}{x}right)=dfrac{-1}{x^3} dx$$
      and
      $$left(dfrac{y}{x}right)^2=dfrac{1}{x^2}+C$$







      share|cite|improve this answer












      share|cite|improve this answer



      share|cite|improve this answer










      answered Nov 15 at 12:19









      Nosrati

      26k62352




      26k62352












      • Does this answer the question ?
        – Yves Daoust
        Nov 15 at 16:20










      • I should have addressed this comment to the OP. He was worried by his four solutions and usage of the modulus...
        – Yves Daoust
        Nov 15 at 16:23










      • So here you are :)
        – Nosrati
        Nov 15 at 16:24


















      • Does this answer the question ?
        – Yves Daoust
        Nov 15 at 16:20










      • I should have addressed this comment to the OP. He was worried by his four solutions and usage of the modulus...
        – Yves Daoust
        Nov 15 at 16:23










      • So here you are :)
        – Nosrati
        Nov 15 at 16:24
















      Does this answer the question ?
      – Yves Daoust
      Nov 15 at 16:20




      Does this answer the question ?
      – Yves Daoust
      Nov 15 at 16:20












      I should have addressed this comment to the OP. He was worried by his four solutions and usage of the modulus...
      – Yves Daoust
      Nov 15 at 16:23




      I should have addressed this comment to the OP. He was worried by his four solutions and usage of the modulus...
      – Yves Daoust
      Nov 15 at 16:23












      So here you are :)
      – Nosrati
      Nov 15 at 16:24




      So here you are :)
      – Nosrati
      Nov 15 at 16:24










      up vote
      0
      down vote













      Another approach is this. Rewrite the DE as
      $$
      frac{yy'}{y^2-1}=frac 1x
      $$

      Which is the same as
      $$
      frac 12 frac{d}{dx}ln(y^2-1)=frac 1x
      $$

      Upon integration, one gets
      $$
      lndfrac{y^2(x)-1}{y^2(x_0)-1}=2lnfrac{x}{x_0}
      $$

      Hence, one obtains
      $$
      y^2(x)=1+[y^2(x_0)-1]left(frac{x}{x_0}right)^2
      $$






      share|cite|improve this answer

























        up vote
        0
        down vote













        Another approach is this. Rewrite the DE as
        $$
        frac{yy'}{y^2-1}=frac 1x
        $$

        Which is the same as
        $$
        frac 12 frac{d}{dx}ln(y^2-1)=frac 1x
        $$

        Upon integration, one gets
        $$
        lndfrac{y^2(x)-1}{y^2(x_0)-1}=2lnfrac{x}{x_0}
        $$

        Hence, one obtains
        $$
        y^2(x)=1+[y^2(x_0)-1]left(frac{x}{x_0}right)^2
        $$






        share|cite|improve this answer























          up vote
          0
          down vote










          up vote
          0
          down vote









          Another approach is this. Rewrite the DE as
          $$
          frac{yy'}{y^2-1}=frac 1x
          $$

          Which is the same as
          $$
          frac 12 frac{d}{dx}ln(y^2-1)=frac 1x
          $$

          Upon integration, one gets
          $$
          lndfrac{y^2(x)-1}{y^2(x_0)-1}=2lnfrac{x}{x_0}
          $$

          Hence, one obtains
          $$
          y^2(x)=1+[y^2(x_0)-1]left(frac{x}{x_0}right)^2
          $$






          share|cite|improve this answer












          Another approach is this. Rewrite the DE as
          $$
          frac{yy'}{y^2-1}=frac 1x
          $$

          Which is the same as
          $$
          frac 12 frac{d}{dx}ln(y^2-1)=frac 1x
          $$

          Upon integration, one gets
          $$
          lndfrac{y^2(x)-1}{y^2(x_0)-1}=2lnfrac{x}{x_0}
          $$

          Hence, one obtains
          $$
          y^2(x)=1+[y^2(x_0)-1]left(frac{x}{x_0}right)^2
          $$







          share|cite|improve this answer












          share|cite|improve this answer



          share|cite|improve this answer










          answered Nov 15 at 16:13









          minimax

          48518




          48518






















              up vote
              0
              down vote













              Your solutions are $pmsqrt{1pm Kx^2}$, where $K$ is positive. But this does not differ from $pmsqrt{1+Kx^2}$ where $K$ is unconstrained.





              From



              $$frac12log|y^2-1|=log|x|+C$$ you draw



              $$log|y^2-1|=log(e^Cx^2)$$ and



              $$|y^2-1|=e^Cx.$$



              Then



              $$y^2=1pm e^Cx^2$$ which you can very well rewrite as



              $$y^2=1+Dx^2.$$






              share|cite|improve this answer



























                up vote
                0
                down vote













                Your solutions are $pmsqrt{1pm Kx^2}$, where $K$ is positive. But this does not differ from $pmsqrt{1+Kx^2}$ where $K$ is unconstrained.





                From



                $$frac12log|y^2-1|=log|x|+C$$ you draw



                $$log|y^2-1|=log(e^Cx^2)$$ and



                $$|y^2-1|=e^Cx.$$



                Then



                $$y^2=1pm e^Cx^2$$ which you can very well rewrite as



                $$y^2=1+Dx^2.$$






                share|cite|improve this answer

























                  up vote
                  0
                  down vote










                  up vote
                  0
                  down vote









                  Your solutions are $pmsqrt{1pm Kx^2}$, where $K$ is positive. But this does not differ from $pmsqrt{1+Kx^2}$ where $K$ is unconstrained.





                  From



                  $$frac12log|y^2-1|=log|x|+C$$ you draw



                  $$log|y^2-1|=log(e^Cx^2)$$ and



                  $$|y^2-1|=e^Cx.$$



                  Then



                  $$y^2=1pm e^Cx^2$$ which you can very well rewrite as



                  $$y^2=1+Dx^2.$$






                  share|cite|improve this answer














                  Your solutions are $pmsqrt{1pm Kx^2}$, where $K$ is positive. But this does not differ from $pmsqrt{1+Kx^2}$ where $K$ is unconstrained.





                  From



                  $$frac12log|y^2-1|=log|x|+C$$ you draw



                  $$log|y^2-1|=log(e^Cx^2)$$ and



                  $$|y^2-1|=e^Cx.$$



                  Then



                  $$y^2=1pm e^Cx^2$$ which you can very well rewrite as



                  $$y^2=1+Dx^2.$$







                  share|cite|improve this answer














                  share|cite|improve this answer



                  share|cite|improve this answer








                  edited Nov 15 at 16:31

























                  answered Nov 15 at 16:21









                  Yves Daoust

                  121k668216




                  121k668216






























                       

                      draft saved


                      draft discarded



















































                       


                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function () {
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2999612%2ffind-the-general-solution-to-the-ode-x-fracdydx-y-frac1y%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

                      AnyDesk - Fatal Program Failure

                      How to calibrate 16:9 built-in touch-screen to a 4:3 resolution?

                      QoS: MAC-Priority for clients behind a repeater