how to solve this first order nonlinear differential equation












2












$begingroup$


I'm reading nonlinear control systems book. The author provides this example
$$
dot{x} = r + x^2, quad r < 0.
$$

I would like to compute the analytical solution for the proceeding ODE. My attempt is



$$
begin{align}
frac{dx}{dt} &= r + x^2 \
frac{dx}{r+x^2} &= dt \
int^{x(t)}_{x_0} frac{1}{r+x^2} dx &= int^{t}_{t_0} dtau \
frac{tan^{-1}left(frac{x}{sqrt{r}}right)}{sqrt{r}} Big|^{x(t)}_{x_0} &= (t-t_0)
end{align}
$$



Now the problem with the assumption that $r<0$, how I can handle the substitution for the left side? I need to reach the final step where $x(t)$ is solely in the left side.










share|cite|improve this question









$endgroup$








  • 1




    $begingroup$
    Substitute $u = frac{x}{sqrt{-r}}$. You'll get an inverse hyperbolic tangent.
    $endgroup$
    – Christoph
    Jan 30 at 6:16






  • 1




    $begingroup$
    So it is $x^2 - a^2$ at the bottom. Could use partial fractions.
    $endgroup$
    – Arctic Char
    Jan 30 at 6:16










  • $begingroup$
    @Christoph, why did you put the minus ? Also, how to handle the square root of negative number?
    $endgroup$
    – CroCo
    Jan 30 at 6:21






  • 1




    $begingroup$
    If $r<0$ you have $-r>0$, so you can take the square root of that.
    $endgroup$
    – Christoph
    Jan 30 at 6:22






  • 1




    $begingroup$
    $-a^2=r$, so $a$ is the square root of the positive number $-r$.
    $endgroup$
    – Hans Lundmark
    Jan 30 at 6:23
















2












$begingroup$


I'm reading nonlinear control systems book. The author provides this example
$$
dot{x} = r + x^2, quad r < 0.
$$

I would like to compute the analytical solution for the proceeding ODE. My attempt is



$$
begin{align}
frac{dx}{dt} &= r + x^2 \
frac{dx}{r+x^2} &= dt \
int^{x(t)}_{x_0} frac{1}{r+x^2} dx &= int^{t}_{t_0} dtau \
frac{tan^{-1}left(frac{x}{sqrt{r}}right)}{sqrt{r}} Big|^{x(t)}_{x_0} &= (t-t_0)
end{align}
$$



Now the problem with the assumption that $r<0$, how I can handle the substitution for the left side? I need to reach the final step where $x(t)$ is solely in the left side.










share|cite|improve this question









$endgroup$








  • 1




    $begingroup$
    Substitute $u = frac{x}{sqrt{-r}}$. You'll get an inverse hyperbolic tangent.
    $endgroup$
    – Christoph
    Jan 30 at 6:16






  • 1




    $begingroup$
    So it is $x^2 - a^2$ at the bottom. Could use partial fractions.
    $endgroup$
    – Arctic Char
    Jan 30 at 6:16










  • $begingroup$
    @Christoph, why did you put the minus ? Also, how to handle the square root of negative number?
    $endgroup$
    – CroCo
    Jan 30 at 6:21






  • 1




    $begingroup$
    If $r<0$ you have $-r>0$, so you can take the square root of that.
    $endgroup$
    – Christoph
    Jan 30 at 6:22






  • 1




    $begingroup$
    $-a^2=r$, so $a$ is the square root of the positive number $-r$.
    $endgroup$
    – Hans Lundmark
    Jan 30 at 6:23














2












2








2





$begingroup$


I'm reading nonlinear control systems book. The author provides this example
$$
dot{x} = r + x^2, quad r < 0.
$$

I would like to compute the analytical solution for the proceeding ODE. My attempt is



$$
begin{align}
frac{dx}{dt} &= r + x^2 \
frac{dx}{r+x^2} &= dt \
int^{x(t)}_{x_0} frac{1}{r+x^2} dx &= int^{t}_{t_0} dtau \
frac{tan^{-1}left(frac{x}{sqrt{r}}right)}{sqrt{r}} Big|^{x(t)}_{x_0} &= (t-t_0)
end{align}
$$



Now the problem with the assumption that $r<0$, how I can handle the substitution for the left side? I need to reach the final step where $x(t)$ is solely in the left side.










share|cite|improve this question









$endgroup$




I'm reading nonlinear control systems book. The author provides this example
$$
dot{x} = r + x^2, quad r < 0.
$$

I would like to compute the analytical solution for the proceeding ODE. My attempt is



$$
begin{align}
frac{dx}{dt} &= r + x^2 \
frac{dx}{r+x^2} &= dt \
int^{x(t)}_{x_0} frac{1}{r+x^2} dx &= int^{t}_{t_0} dtau \
frac{tan^{-1}left(frac{x}{sqrt{r}}right)}{sqrt{r}} Big|^{x(t)}_{x_0} &= (t-t_0)
end{align}
$$



Now the problem with the assumption that $r<0$, how I can handle the substitution for the left side? I need to reach the final step where $x(t)$ is solely in the left side.







ordinary-differential-equations nonlinear-system






share|cite|improve this question













share|cite|improve this question











share|cite|improve this question




share|cite|improve this question










asked Jan 30 at 6:07









CroCoCroCo

271221




271221








  • 1




    $begingroup$
    Substitute $u = frac{x}{sqrt{-r}}$. You'll get an inverse hyperbolic tangent.
    $endgroup$
    – Christoph
    Jan 30 at 6:16






  • 1




    $begingroup$
    So it is $x^2 - a^2$ at the bottom. Could use partial fractions.
    $endgroup$
    – Arctic Char
    Jan 30 at 6:16










  • $begingroup$
    @Christoph, why did you put the minus ? Also, how to handle the square root of negative number?
    $endgroup$
    – CroCo
    Jan 30 at 6:21






  • 1




    $begingroup$
    If $r<0$ you have $-r>0$, so you can take the square root of that.
    $endgroup$
    – Christoph
    Jan 30 at 6:22






  • 1




    $begingroup$
    $-a^2=r$, so $a$ is the square root of the positive number $-r$.
    $endgroup$
    – Hans Lundmark
    Jan 30 at 6:23














  • 1




    $begingroup$
    Substitute $u = frac{x}{sqrt{-r}}$. You'll get an inverse hyperbolic tangent.
    $endgroup$
    – Christoph
    Jan 30 at 6:16






  • 1




    $begingroup$
    So it is $x^2 - a^2$ at the bottom. Could use partial fractions.
    $endgroup$
    – Arctic Char
    Jan 30 at 6:16










  • $begingroup$
    @Christoph, why did you put the minus ? Also, how to handle the square root of negative number?
    $endgroup$
    – CroCo
    Jan 30 at 6:21






  • 1




    $begingroup$
    If $r<0$ you have $-r>0$, so you can take the square root of that.
    $endgroup$
    – Christoph
    Jan 30 at 6:22






  • 1




    $begingroup$
    $-a^2=r$, so $a$ is the square root of the positive number $-r$.
    $endgroup$
    – Hans Lundmark
    Jan 30 at 6:23








1




1




$begingroup$
Substitute $u = frac{x}{sqrt{-r}}$. You'll get an inverse hyperbolic tangent.
$endgroup$
– Christoph
Jan 30 at 6:16




$begingroup$
Substitute $u = frac{x}{sqrt{-r}}$. You'll get an inverse hyperbolic tangent.
$endgroup$
– Christoph
Jan 30 at 6:16




1




1




$begingroup$
So it is $x^2 - a^2$ at the bottom. Could use partial fractions.
$endgroup$
– Arctic Char
Jan 30 at 6:16




$begingroup$
So it is $x^2 - a^2$ at the bottom. Could use partial fractions.
$endgroup$
– Arctic Char
Jan 30 at 6:16












$begingroup$
@Christoph, why did you put the minus ? Also, how to handle the square root of negative number?
$endgroup$
– CroCo
Jan 30 at 6:21




$begingroup$
@Christoph, why did you put the minus ? Also, how to handle the square root of negative number?
$endgroup$
– CroCo
Jan 30 at 6:21




1




1




$begingroup$
If $r<0$ you have $-r>0$, so you can take the square root of that.
$endgroup$
– Christoph
Jan 30 at 6:22




$begingroup$
If $r<0$ you have $-r>0$, so you can take the square root of that.
$endgroup$
– Christoph
Jan 30 at 6:22




1




1




$begingroup$
$-a^2=r$, so $a$ is the square root of the positive number $-r$.
$endgroup$
– Hans Lundmark
Jan 30 at 6:23




$begingroup$
$-a^2=r$, so $a$ is the square root of the positive number $-r$.
$endgroup$
– Hans Lundmark
Jan 30 at 6:23










4 Answers
4






active

oldest

votes


















2












$begingroup$

Let $r=-a^2$. Then
$$intfrac{dx}{x^2-a^2}=int dt$$
$$-frac{log{left( x+aright) }-log{left( x-aright) }}{2 a}=t+c$$
Take $c=frac{log C}{2a}$.
$$log{left( frac{x-a}{C, left( x+aright) }right) }=2 a t,$$
$$frac{x-a}{x+a}=C, {{e}^{2 a t}}.$$
General solution is
$$x=frac{a(1+Ce^{2at})}{1-Ce^{2at}}.$$






share|cite|improve this answer









$endgroup$





















    5












    $begingroup$

    Let us consider



    $$dot x=x^2-1$$ for convenience.



    When $|x|<1$, we solve the separable equation with



    $$frac{dx}{1-x^2}=-dt$$ and



    $$text{artanh }x-text{artanh }x_0=t_0-t,$$



    i.e.



    $$x=tanh(t_0-t+text{artanh }x_0).$$



    When $|x|>1$, we solve with



    $$text{arcoth }x-text{arcoth }x_0=t_0-t,$$



    i.e.



    $$x=coth(t_0-t+text{arcoth }x_0).$$



    Notice that this solution has a vertical asymptote at $t=t_0+text{arcoth }x_0$.



    Finally, $x=pm1$ are two valid solutions.



    enter image description here






    share|cite|improve this answer











    $endgroup$





















      3












      $begingroup$

      Solve it as Riccati equation by setting $x=-frac{u'}{u}$. Then
      $$
      u''-a^2u=0
      $$

      has the solution $u(t)=Ce^{at}+De^{-at}$ and thus
      $$
      y(x)=-afrac{Ce^{at}-De^{-at}}{Ce^{at}+De^{-at}}
      $$

      with some redundancy in the parameter pair $(C,D)$.






      share|cite|improve this answer









      $endgroup$





















        0












        $begingroup$

        We use separation of variables to solve the ODE $dot{x} = r + x^2$, $r < 0$:




        1. We first find the constant solutions $x equiv pm sqrt{-r}$. In the following steps we shall assume $r+x^2 not equiv 0$.


        2. We use the Leibniz notation and we separate the variables: $frac{dx}{dt} = r + x^2$, $frac{1}{r+x^2} dx = dt$.


        3. We integrate on both sides: $int frac{1}{r+x^2} , mathrm{d}x = int 1 , mathrm{d}t$.


        4. We solve the integral on the left-hand side using the substitution $x = sqrt{-r} u$, $dx = sqrt{-r} du$:
          begin{eqnarray}
          int frac{1}{r+x^2} , mathrm{d}x &=& int frac{1}{r-ru^2} sqrt{-r} , mathrm{d}u = frac{sqrt{-r}}{r} int frac{1}{1-u^2} , mathrm{d}u = frac{sqrt{-r}}{r} left{ begin{array}{ll}
          operatorname{artanh}(u) + tilde{C}, & |u| < 1\
          operatorname{arcoth}(u) + tilde{C}, & |u| > 1
          end{array}
          right.\
          &=& frac{sqrt{-r}}{r} left{ begin{array}{ll}
          operatorname{artanh}left(frac{x}{sqrt{-r}}right) + tilde{C}, & |x| < sqrt{-r}\
          operatorname{arcoth}left(frac{x}{sqrt{-r}}right) + tilde{C}, & |x| > sqrt{-r}
          end{array}
          right., quad tilde{C} in mathbb{R}.
          end{eqnarray}



        Thus we now obtain the nonlinear equations
        begin{eqnarray}
        operatorname{artanh}left(frac{x}{sqrt{-r}}right) = C -sqrt{-r} t, quad |x| < sqrt{-r},\
        operatorname{arcoth}left(frac{x}{sqrt{-r}}right) = C -sqrt{-r} t, quad |x| > sqrt{-r},
        end{eqnarray}

        with a constant $C in mathbb{R}$.



        Finally, we obtain 4 possible solutions of the ODE, depending on the initial value $x(t_0) = x_0 in mathbb{R}$:
        begin{eqnarray}
        x(t) &=& sqrt{-r} cothleft(operatorname{arcoth}left(frac{x_0}{sqrt{-r}}right)-sqrt{-r}(t-t_0)right), quad |x_0| > sqrt{-r},\
        x(t) &=& -sqrt{-r}, quad x_0 = -sqrt{-r},\
        x(t) &=& sqrt{-r}, quad x_0 = sqrt{-r},\
        x(t) &=& sqrt{-r} tanhleft(operatorname{artanh}left(frac{x_0}{sqrt{-r}}right)-sqrt{-r}(t-t_0) right), quad |x_0| < sqrt{-r}.
        end{eqnarray}






        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%2f3093160%2fhow-to-solve-this-first-order-nonlinear-differential-equation%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          4 Answers
          4






          active

          oldest

          votes








          4 Answers
          4






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          2












          $begingroup$

          Let $r=-a^2$. Then
          $$intfrac{dx}{x^2-a^2}=int dt$$
          $$-frac{log{left( x+aright) }-log{left( x-aright) }}{2 a}=t+c$$
          Take $c=frac{log C}{2a}$.
          $$log{left( frac{x-a}{C, left( x+aright) }right) }=2 a t,$$
          $$frac{x-a}{x+a}=C, {{e}^{2 a t}}.$$
          General solution is
          $$x=frac{a(1+Ce^{2at})}{1-Ce^{2at}}.$$






          share|cite|improve this answer









          $endgroup$


















            2












            $begingroup$

            Let $r=-a^2$. Then
            $$intfrac{dx}{x^2-a^2}=int dt$$
            $$-frac{log{left( x+aright) }-log{left( x-aright) }}{2 a}=t+c$$
            Take $c=frac{log C}{2a}$.
            $$log{left( frac{x-a}{C, left( x+aright) }right) }=2 a t,$$
            $$frac{x-a}{x+a}=C, {{e}^{2 a t}}.$$
            General solution is
            $$x=frac{a(1+Ce^{2at})}{1-Ce^{2at}}.$$






            share|cite|improve this answer









            $endgroup$
















              2












              2








              2





              $begingroup$

              Let $r=-a^2$. Then
              $$intfrac{dx}{x^2-a^2}=int dt$$
              $$-frac{log{left( x+aright) }-log{left( x-aright) }}{2 a}=t+c$$
              Take $c=frac{log C}{2a}$.
              $$log{left( frac{x-a}{C, left( x+aright) }right) }=2 a t,$$
              $$frac{x-a}{x+a}=C, {{e}^{2 a t}}.$$
              General solution is
              $$x=frac{a(1+Ce^{2at})}{1-Ce^{2at}}.$$






              share|cite|improve this answer









              $endgroup$



              Let $r=-a^2$. Then
              $$intfrac{dx}{x^2-a^2}=int dt$$
              $$-frac{log{left( x+aright) }-log{left( x-aright) }}{2 a}=t+c$$
              Take $c=frac{log C}{2a}$.
              $$log{left( frac{x-a}{C, left( x+aright) }right) }=2 a t,$$
              $$frac{x-a}{x+a}=C, {{e}^{2 a t}}.$$
              General solution is
              $$x=frac{a(1+Ce^{2at})}{1-Ce^{2at}}.$$







              share|cite|improve this answer












              share|cite|improve this answer



              share|cite|improve this answer










              answered Jan 30 at 6:41









              Aleksas DomarkasAleksas Domarkas

              1,62317




              1,62317























                  5












                  $begingroup$

                  Let us consider



                  $$dot x=x^2-1$$ for convenience.



                  When $|x|<1$, we solve the separable equation with



                  $$frac{dx}{1-x^2}=-dt$$ and



                  $$text{artanh }x-text{artanh }x_0=t_0-t,$$



                  i.e.



                  $$x=tanh(t_0-t+text{artanh }x_0).$$



                  When $|x|>1$, we solve with



                  $$text{arcoth }x-text{arcoth }x_0=t_0-t,$$



                  i.e.



                  $$x=coth(t_0-t+text{arcoth }x_0).$$



                  Notice that this solution has a vertical asymptote at $t=t_0+text{arcoth }x_0$.



                  Finally, $x=pm1$ are two valid solutions.



                  enter image description here






                  share|cite|improve this answer











                  $endgroup$


















                    5












                    $begingroup$

                    Let us consider



                    $$dot x=x^2-1$$ for convenience.



                    When $|x|<1$, we solve the separable equation with



                    $$frac{dx}{1-x^2}=-dt$$ and



                    $$text{artanh }x-text{artanh }x_0=t_0-t,$$



                    i.e.



                    $$x=tanh(t_0-t+text{artanh }x_0).$$



                    When $|x|>1$, we solve with



                    $$text{arcoth }x-text{arcoth }x_0=t_0-t,$$



                    i.e.



                    $$x=coth(t_0-t+text{arcoth }x_0).$$



                    Notice that this solution has a vertical asymptote at $t=t_0+text{arcoth }x_0$.



                    Finally, $x=pm1$ are two valid solutions.



                    enter image description here






                    share|cite|improve this answer











                    $endgroup$
















                      5












                      5








                      5





                      $begingroup$

                      Let us consider



                      $$dot x=x^2-1$$ for convenience.



                      When $|x|<1$, we solve the separable equation with



                      $$frac{dx}{1-x^2}=-dt$$ and



                      $$text{artanh }x-text{artanh }x_0=t_0-t,$$



                      i.e.



                      $$x=tanh(t_0-t+text{artanh }x_0).$$



                      When $|x|>1$, we solve with



                      $$text{arcoth }x-text{arcoth }x_0=t_0-t,$$



                      i.e.



                      $$x=coth(t_0-t+text{arcoth }x_0).$$



                      Notice that this solution has a vertical asymptote at $t=t_0+text{arcoth }x_0$.



                      Finally, $x=pm1$ are two valid solutions.



                      enter image description here






                      share|cite|improve this answer











                      $endgroup$



                      Let us consider



                      $$dot x=x^2-1$$ for convenience.



                      When $|x|<1$, we solve the separable equation with



                      $$frac{dx}{1-x^2}=-dt$$ and



                      $$text{artanh }x-text{artanh }x_0=t_0-t,$$



                      i.e.



                      $$x=tanh(t_0-t+text{artanh }x_0).$$



                      When $|x|>1$, we solve with



                      $$text{arcoth }x-text{arcoth }x_0=t_0-t,$$



                      i.e.



                      $$x=coth(t_0-t+text{arcoth }x_0).$$



                      Notice that this solution has a vertical asymptote at $t=t_0+text{arcoth }x_0$.



                      Finally, $x=pm1$ are two valid solutions.



                      enter image description here







                      share|cite|improve this answer














                      share|cite|improve this answer



                      share|cite|improve this answer








                      edited Jan 30 at 10:14

























                      answered Jan 30 at 10:03









                      Yves DaoustYves Daoust

                      132k676229




                      132k676229























                          3












                          $begingroup$

                          Solve it as Riccati equation by setting $x=-frac{u'}{u}$. Then
                          $$
                          u''-a^2u=0
                          $$

                          has the solution $u(t)=Ce^{at}+De^{-at}$ and thus
                          $$
                          y(x)=-afrac{Ce^{at}-De^{-at}}{Ce^{at}+De^{-at}}
                          $$

                          with some redundancy in the parameter pair $(C,D)$.






                          share|cite|improve this answer









                          $endgroup$


















                            3












                            $begingroup$

                            Solve it as Riccati equation by setting $x=-frac{u'}{u}$. Then
                            $$
                            u''-a^2u=0
                            $$

                            has the solution $u(t)=Ce^{at}+De^{-at}$ and thus
                            $$
                            y(x)=-afrac{Ce^{at}-De^{-at}}{Ce^{at}+De^{-at}}
                            $$

                            with some redundancy in the parameter pair $(C,D)$.






                            share|cite|improve this answer









                            $endgroup$
















                              3












                              3








                              3





                              $begingroup$

                              Solve it as Riccati equation by setting $x=-frac{u'}{u}$. Then
                              $$
                              u''-a^2u=0
                              $$

                              has the solution $u(t)=Ce^{at}+De^{-at}$ and thus
                              $$
                              y(x)=-afrac{Ce^{at}-De^{-at}}{Ce^{at}+De^{-at}}
                              $$

                              with some redundancy in the parameter pair $(C,D)$.






                              share|cite|improve this answer









                              $endgroup$



                              Solve it as Riccati equation by setting $x=-frac{u'}{u}$. Then
                              $$
                              u''-a^2u=0
                              $$

                              has the solution $u(t)=Ce^{at}+De^{-at}$ and thus
                              $$
                              y(x)=-afrac{Ce^{at}-De^{-at}}{Ce^{at}+De^{-at}}
                              $$

                              with some redundancy in the parameter pair $(C,D)$.







                              share|cite|improve this answer












                              share|cite|improve this answer



                              share|cite|improve this answer










                              answered Jan 30 at 8:09









                              LutzLLutzL

                              60.2k42057




                              60.2k42057























                                  0












                                  $begingroup$

                                  We use separation of variables to solve the ODE $dot{x} = r + x^2$, $r < 0$:




                                  1. We first find the constant solutions $x equiv pm sqrt{-r}$. In the following steps we shall assume $r+x^2 not equiv 0$.


                                  2. We use the Leibniz notation and we separate the variables: $frac{dx}{dt} = r + x^2$, $frac{1}{r+x^2} dx = dt$.


                                  3. We integrate on both sides: $int frac{1}{r+x^2} , mathrm{d}x = int 1 , mathrm{d}t$.


                                  4. We solve the integral on the left-hand side using the substitution $x = sqrt{-r} u$, $dx = sqrt{-r} du$:
                                    begin{eqnarray}
                                    int frac{1}{r+x^2} , mathrm{d}x &=& int frac{1}{r-ru^2} sqrt{-r} , mathrm{d}u = frac{sqrt{-r}}{r} int frac{1}{1-u^2} , mathrm{d}u = frac{sqrt{-r}}{r} left{ begin{array}{ll}
                                    operatorname{artanh}(u) + tilde{C}, & |u| < 1\
                                    operatorname{arcoth}(u) + tilde{C}, & |u| > 1
                                    end{array}
                                    right.\
                                    &=& frac{sqrt{-r}}{r} left{ begin{array}{ll}
                                    operatorname{artanh}left(frac{x}{sqrt{-r}}right) + tilde{C}, & |x| < sqrt{-r}\
                                    operatorname{arcoth}left(frac{x}{sqrt{-r}}right) + tilde{C}, & |x| > sqrt{-r}
                                    end{array}
                                    right., quad tilde{C} in mathbb{R}.
                                    end{eqnarray}



                                  Thus we now obtain the nonlinear equations
                                  begin{eqnarray}
                                  operatorname{artanh}left(frac{x}{sqrt{-r}}right) = C -sqrt{-r} t, quad |x| < sqrt{-r},\
                                  operatorname{arcoth}left(frac{x}{sqrt{-r}}right) = C -sqrt{-r} t, quad |x| > sqrt{-r},
                                  end{eqnarray}

                                  with a constant $C in mathbb{R}$.



                                  Finally, we obtain 4 possible solutions of the ODE, depending on the initial value $x(t_0) = x_0 in mathbb{R}$:
                                  begin{eqnarray}
                                  x(t) &=& sqrt{-r} cothleft(operatorname{arcoth}left(frac{x_0}{sqrt{-r}}right)-sqrt{-r}(t-t_0)right), quad |x_0| > sqrt{-r},\
                                  x(t) &=& -sqrt{-r}, quad x_0 = -sqrt{-r},\
                                  x(t) &=& sqrt{-r}, quad x_0 = sqrt{-r},\
                                  x(t) &=& sqrt{-r} tanhleft(operatorname{artanh}left(frac{x_0}{sqrt{-r}}right)-sqrt{-r}(t-t_0) right), quad |x_0| < sqrt{-r}.
                                  end{eqnarray}






                                  share|cite|improve this answer









                                  $endgroup$


















                                    0












                                    $begingroup$

                                    We use separation of variables to solve the ODE $dot{x} = r + x^2$, $r < 0$:




                                    1. We first find the constant solutions $x equiv pm sqrt{-r}$. In the following steps we shall assume $r+x^2 not equiv 0$.


                                    2. We use the Leibniz notation and we separate the variables: $frac{dx}{dt} = r + x^2$, $frac{1}{r+x^2} dx = dt$.


                                    3. We integrate on both sides: $int frac{1}{r+x^2} , mathrm{d}x = int 1 , mathrm{d}t$.


                                    4. We solve the integral on the left-hand side using the substitution $x = sqrt{-r} u$, $dx = sqrt{-r} du$:
                                      begin{eqnarray}
                                      int frac{1}{r+x^2} , mathrm{d}x &=& int frac{1}{r-ru^2} sqrt{-r} , mathrm{d}u = frac{sqrt{-r}}{r} int frac{1}{1-u^2} , mathrm{d}u = frac{sqrt{-r}}{r} left{ begin{array}{ll}
                                      operatorname{artanh}(u) + tilde{C}, & |u| < 1\
                                      operatorname{arcoth}(u) + tilde{C}, & |u| > 1
                                      end{array}
                                      right.\
                                      &=& frac{sqrt{-r}}{r} left{ begin{array}{ll}
                                      operatorname{artanh}left(frac{x}{sqrt{-r}}right) + tilde{C}, & |x| < sqrt{-r}\
                                      operatorname{arcoth}left(frac{x}{sqrt{-r}}right) + tilde{C}, & |x| > sqrt{-r}
                                      end{array}
                                      right., quad tilde{C} in mathbb{R}.
                                      end{eqnarray}



                                    Thus we now obtain the nonlinear equations
                                    begin{eqnarray}
                                    operatorname{artanh}left(frac{x}{sqrt{-r}}right) = C -sqrt{-r} t, quad |x| < sqrt{-r},\
                                    operatorname{arcoth}left(frac{x}{sqrt{-r}}right) = C -sqrt{-r} t, quad |x| > sqrt{-r},
                                    end{eqnarray}

                                    with a constant $C in mathbb{R}$.



                                    Finally, we obtain 4 possible solutions of the ODE, depending on the initial value $x(t_0) = x_0 in mathbb{R}$:
                                    begin{eqnarray}
                                    x(t) &=& sqrt{-r} cothleft(operatorname{arcoth}left(frac{x_0}{sqrt{-r}}right)-sqrt{-r}(t-t_0)right), quad |x_0| > sqrt{-r},\
                                    x(t) &=& -sqrt{-r}, quad x_0 = -sqrt{-r},\
                                    x(t) &=& sqrt{-r}, quad x_0 = sqrt{-r},\
                                    x(t) &=& sqrt{-r} tanhleft(operatorname{artanh}left(frac{x_0}{sqrt{-r}}right)-sqrt{-r}(t-t_0) right), quad |x_0| < sqrt{-r}.
                                    end{eqnarray}






                                    share|cite|improve this answer









                                    $endgroup$
















                                      0












                                      0








                                      0





                                      $begingroup$

                                      We use separation of variables to solve the ODE $dot{x} = r + x^2$, $r < 0$:




                                      1. We first find the constant solutions $x equiv pm sqrt{-r}$. In the following steps we shall assume $r+x^2 not equiv 0$.


                                      2. We use the Leibniz notation and we separate the variables: $frac{dx}{dt} = r + x^2$, $frac{1}{r+x^2} dx = dt$.


                                      3. We integrate on both sides: $int frac{1}{r+x^2} , mathrm{d}x = int 1 , mathrm{d}t$.


                                      4. We solve the integral on the left-hand side using the substitution $x = sqrt{-r} u$, $dx = sqrt{-r} du$:
                                        begin{eqnarray}
                                        int frac{1}{r+x^2} , mathrm{d}x &=& int frac{1}{r-ru^2} sqrt{-r} , mathrm{d}u = frac{sqrt{-r}}{r} int frac{1}{1-u^2} , mathrm{d}u = frac{sqrt{-r}}{r} left{ begin{array}{ll}
                                        operatorname{artanh}(u) + tilde{C}, & |u| < 1\
                                        operatorname{arcoth}(u) + tilde{C}, & |u| > 1
                                        end{array}
                                        right.\
                                        &=& frac{sqrt{-r}}{r} left{ begin{array}{ll}
                                        operatorname{artanh}left(frac{x}{sqrt{-r}}right) + tilde{C}, & |x| < sqrt{-r}\
                                        operatorname{arcoth}left(frac{x}{sqrt{-r}}right) + tilde{C}, & |x| > sqrt{-r}
                                        end{array}
                                        right., quad tilde{C} in mathbb{R}.
                                        end{eqnarray}



                                      Thus we now obtain the nonlinear equations
                                      begin{eqnarray}
                                      operatorname{artanh}left(frac{x}{sqrt{-r}}right) = C -sqrt{-r} t, quad |x| < sqrt{-r},\
                                      operatorname{arcoth}left(frac{x}{sqrt{-r}}right) = C -sqrt{-r} t, quad |x| > sqrt{-r},
                                      end{eqnarray}

                                      with a constant $C in mathbb{R}$.



                                      Finally, we obtain 4 possible solutions of the ODE, depending on the initial value $x(t_0) = x_0 in mathbb{R}$:
                                      begin{eqnarray}
                                      x(t) &=& sqrt{-r} cothleft(operatorname{arcoth}left(frac{x_0}{sqrt{-r}}right)-sqrt{-r}(t-t_0)right), quad |x_0| > sqrt{-r},\
                                      x(t) &=& -sqrt{-r}, quad x_0 = -sqrt{-r},\
                                      x(t) &=& sqrt{-r}, quad x_0 = sqrt{-r},\
                                      x(t) &=& sqrt{-r} tanhleft(operatorname{artanh}left(frac{x_0}{sqrt{-r}}right)-sqrt{-r}(t-t_0) right), quad |x_0| < sqrt{-r}.
                                      end{eqnarray}






                                      share|cite|improve this answer









                                      $endgroup$



                                      We use separation of variables to solve the ODE $dot{x} = r + x^2$, $r < 0$:




                                      1. We first find the constant solutions $x equiv pm sqrt{-r}$. In the following steps we shall assume $r+x^2 not equiv 0$.


                                      2. We use the Leibniz notation and we separate the variables: $frac{dx}{dt} = r + x^2$, $frac{1}{r+x^2} dx = dt$.


                                      3. We integrate on both sides: $int frac{1}{r+x^2} , mathrm{d}x = int 1 , mathrm{d}t$.


                                      4. We solve the integral on the left-hand side using the substitution $x = sqrt{-r} u$, $dx = sqrt{-r} du$:
                                        begin{eqnarray}
                                        int frac{1}{r+x^2} , mathrm{d}x &=& int frac{1}{r-ru^2} sqrt{-r} , mathrm{d}u = frac{sqrt{-r}}{r} int frac{1}{1-u^2} , mathrm{d}u = frac{sqrt{-r}}{r} left{ begin{array}{ll}
                                        operatorname{artanh}(u) + tilde{C}, & |u| < 1\
                                        operatorname{arcoth}(u) + tilde{C}, & |u| > 1
                                        end{array}
                                        right.\
                                        &=& frac{sqrt{-r}}{r} left{ begin{array}{ll}
                                        operatorname{artanh}left(frac{x}{sqrt{-r}}right) + tilde{C}, & |x| < sqrt{-r}\
                                        operatorname{arcoth}left(frac{x}{sqrt{-r}}right) + tilde{C}, & |x| > sqrt{-r}
                                        end{array}
                                        right., quad tilde{C} in mathbb{R}.
                                        end{eqnarray}



                                      Thus we now obtain the nonlinear equations
                                      begin{eqnarray}
                                      operatorname{artanh}left(frac{x}{sqrt{-r}}right) = C -sqrt{-r} t, quad |x| < sqrt{-r},\
                                      operatorname{arcoth}left(frac{x}{sqrt{-r}}right) = C -sqrt{-r} t, quad |x| > sqrt{-r},
                                      end{eqnarray}

                                      with a constant $C in mathbb{R}$.



                                      Finally, we obtain 4 possible solutions of the ODE, depending on the initial value $x(t_0) = x_0 in mathbb{R}$:
                                      begin{eqnarray}
                                      x(t) &=& sqrt{-r} cothleft(operatorname{arcoth}left(frac{x_0}{sqrt{-r}}right)-sqrt{-r}(t-t_0)right), quad |x_0| > sqrt{-r},\
                                      x(t) &=& -sqrt{-r}, quad x_0 = -sqrt{-r},\
                                      x(t) &=& sqrt{-r}, quad x_0 = sqrt{-r},\
                                      x(t) &=& sqrt{-r} tanhleft(operatorname{artanh}left(frac{x_0}{sqrt{-r}}right)-sqrt{-r}(t-t_0) right), quad |x_0| < sqrt{-r}.
                                      end{eqnarray}







                                      share|cite|improve this answer












                                      share|cite|improve this answer



                                      share|cite|improve this answer










                                      answered Jan 30 at 9:39









                                      ChristophChristoph

                                      59616




                                      59616






























                                          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%2f3093160%2fhow-to-solve-this-first-order-nonlinear-differential-equation%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

                                          MongoDB - Not Authorized To Execute Command

                                          How to fix TextFormField cause rebuild widget in Flutter

                                          in spring boot 2.1 many test slices are not allowed anymore due to multiple @BootstrapWith