Can I make a line with both a slant asymptote and a horizontal.











up vote
1
down vote

favorite












Why can’t you create an equation of a line that gets closer to a line as it heads to $infty,$ such as $y=x$ or $y=2x+4$ and a horizontal asymptote that approaches something like $-2$ as it goes towards $-infty.$ Can somebody please help me build an equation for this line. (https://i.stack.imgur.com/kYaVS.jpg)










share|cite|improve this question
























  • Of course one can do that with a complicated enough function. The question is which functions are allowed. E.g. a rational function could not fulfill this, because if it has a horizontal asymptote towards $-infty$ it must have the same h.a. towards $+infty$.
    – Torsten Schoeneberg
    Nov 27 at 20:44










  • But maybe you want to take a look at the graph of $xcdot(arctan(x)+frac{pi}{2})$, and adjust by stretching and shifting.
    – Torsten Schoeneberg
    Nov 27 at 20:52















up vote
1
down vote

favorite












Why can’t you create an equation of a line that gets closer to a line as it heads to $infty,$ such as $y=x$ or $y=2x+4$ and a horizontal asymptote that approaches something like $-2$ as it goes towards $-infty.$ Can somebody please help me build an equation for this line. (https://i.stack.imgur.com/kYaVS.jpg)










share|cite|improve this question
























  • Of course one can do that with a complicated enough function. The question is which functions are allowed. E.g. a rational function could not fulfill this, because if it has a horizontal asymptote towards $-infty$ it must have the same h.a. towards $+infty$.
    – Torsten Schoeneberg
    Nov 27 at 20:44










  • But maybe you want to take a look at the graph of $xcdot(arctan(x)+frac{pi}{2})$, and adjust by stretching and shifting.
    – Torsten Schoeneberg
    Nov 27 at 20:52













up vote
1
down vote

favorite









up vote
1
down vote

favorite











Why can’t you create an equation of a line that gets closer to a line as it heads to $infty,$ such as $y=x$ or $y=2x+4$ and a horizontal asymptote that approaches something like $-2$ as it goes towards $-infty.$ Can somebody please help me build an equation for this line. (https://i.stack.imgur.com/kYaVS.jpg)










share|cite|improve this question















Why can’t you create an equation of a line that gets closer to a line as it heads to $infty,$ such as $y=x$ or $y=2x+4$ and a horizontal asymptote that approaches something like $-2$ as it goes towards $-infty.$ Can somebody please help me build an equation for this line. (https://i.stack.imgur.com/kYaVS.jpg)







calculus limits asymptotics






share|cite|improve this question















share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








edited Nov 27 at 20:59









user376343

2,7782822




2,7782822










asked Nov 27 at 20:33









Kody Bates

61




61












  • Of course one can do that with a complicated enough function. The question is which functions are allowed. E.g. a rational function could not fulfill this, because if it has a horizontal asymptote towards $-infty$ it must have the same h.a. towards $+infty$.
    – Torsten Schoeneberg
    Nov 27 at 20:44










  • But maybe you want to take a look at the graph of $xcdot(arctan(x)+frac{pi}{2})$, and adjust by stretching and shifting.
    – Torsten Schoeneberg
    Nov 27 at 20:52


















  • Of course one can do that with a complicated enough function. The question is which functions are allowed. E.g. a rational function could not fulfill this, because if it has a horizontal asymptote towards $-infty$ it must have the same h.a. towards $+infty$.
    – Torsten Schoeneberg
    Nov 27 at 20:44










  • But maybe you want to take a look at the graph of $xcdot(arctan(x)+frac{pi}{2})$, and adjust by stretching and shifting.
    – Torsten Schoeneberg
    Nov 27 at 20:52
















Of course one can do that with a complicated enough function. The question is which functions are allowed. E.g. a rational function could not fulfill this, because if it has a horizontal asymptote towards $-infty$ it must have the same h.a. towards $+infty$.
– Torsten Schoeneberg
Nov 27 at 20:44




Of course one can do that with a complicated enough function. The question is which functions are allowed. E.g. a rational function could not fulfill this, because if it has a horizontal asymptote towards $-infty$ it must have the same h.a. towards $+infty$.
– Torsten Schoeneberg
Nov 27 at 20:44












But maybe you want to take a look at the graph of $xcdot(arctan(x)+frac{pi}{2})$, and adjust by stretching and shifting.
– Torsten Schoeneberg
Nov 27 at 20:52




But maybe you want to take a look at the graph of $xcdot(arctan(x)+frac{pi}{2})$, and adjust by stretching and shifting.
– Torsten Schoeneberg
Nov 27 at 20:52










3 Answers
3






active

oldest

votes

















up vote
4
down vote













As said by @Torsten Schoeneberg there are many ways to obtain such curves. However, (branches of) hyperbolas rank among the most natural ones.



Thus I propose the following general solution among the hyperbola family : for any real parameter $a>0$



$$y=dfrac12left(x-2+sqrt{(x+2)^2+4a}right)$$



enter image description here



Fig. Different branches for $a=0.5, 1, 1.5, ...4$.



How did I find this general equation ?



I have first considered the curve reduced to its asymptotes, i.e., with equation



$$(y+2)(y-x)=0 tag{1}$$



(the product of equations $y+2=0$ and $y-x=0$). Then I pertubated a little this equation by taking instead of it :



$$(y+2)(y-x)-a=0 tag{2}$$



Now expand it as a quadratic in variable $y$ :



$$y^2+y(2-x)-(2x+a)=0 tag{3}$$



and use the classical formula for the roots of a quadratic considering $x$ as a parameter.






share|cite|improve this answer






























    up vote
    0
    down vote













    An example of a function with asymptotes $;y=-2;$ as $;xto -infty;$ and $;y=x-2;$ as $xto infty;$ is $$f(x)=frac{sqrt{x^2+1}+x}{2}-2$$ (picture by WolframAlpha






    share|cite|improve this answer























    • The slant asymptote of this is $y = x-2$.
      – Torsten Schoeneberg
      Nov 27 at 21:15










    • Right, thanks. Going to fix it.
      – user376343
      Nov 27 at 21:16


















    up vote
    0
    down vote













    To amend my second comment, for what it's worth, here is my thought process how to get a function as demanded, and what I experienced when doing that "shifting and stretching".



    So to start, I looked for a function with two different horizontal asymptotes for $x to -infty$ versus $x to infty$. Well, the $arctan$ came to my mind. Now first I wanted to turn that in the general shape "0 on the left, but positive (so I can make it increasing) on the right". So I moved it up by $pi/2$, whence it would go from $0$ at $-infty$ to $pi$ (or whatever positive value) at $infty$.



    $arctan(x)+frac{pi}{2}$:



    enter image description here



    This, multiplied with $frac{x}{pi}$, will give something that will behave like $0$ to the left, but like $x$ on the right (so I thought):



    $displaystyle frac{x}{pi} cdot left(arctan(x) + frac{pi}{2}right)$:



    enter image description here



    Now shift it down by $2$. That will make $lim_{xto -infty} =-2$, I thought. It also moves the slant asymptote down to $y=x-2$. To make good for that, I thought I move the graph to the left by $2$, which transforms the slant asymptote back to $y=x$ and does not change the horizontal one.



    $displaystyle frac{x+2}{pi} cdot left(arctan(x) + frac{pi}{2}right) -2$:



    enter image description here



    But now I noticed that ever since the second step I was off by a vertical shift of $1/pi$. See, both asymptotes are a bit too low. Where does that come from? Well I realised that even though arctan goes to $pmpi/2$ (and my shifted version in the first step to $0$ resp. $pi$), I multiply it with a linear term; which means that I have to find out how well the $arctan$ approaches its limit up to a term of order $frac1x$. And indeed, an expansion of $arctan$ "around $pm infty$" is given by



    $$displaystyle arctan(x) = frac{pi}{2} - frac{1}{x} + frac{1}{3x^{3}} - frac{1}{5x^{5}} + ...$$ (for $x >1$) resp.



    $$displaystyle arctan(x) = -frac{pi}{2} - frac{1}{x} + frac{1}{3x^{3}} - frac{1}{5x^{5}} + ...$$ (for $x < -1$).



    whose $-1/x$-term, by multiplication with $x/pi$, indeed explained that constant $-1/pi$ term. But then that's that, one just removes it by hand, giving:




    $$f(x) = displaystyle frac{x+2}{pi} cdot left(arctan(x) + frac{pi}{2}right) -2 +frac{1}{pi}$$




    Voilà:



    enter image description here





    Fun fact I learned on the way when deriving the "expansion around $infty$": the derivative of $arctan(1/x)$ is $(-1)cdot$ the derivative of $arctan(x)$; which abstractly implies that $arctan(x)= C - arctan(1/x)$ for some constant depending on the connected component of the graph we are on. And indeed e.g. for $x>0$, we have $arctan(x) = pi/2 - arctan(1/x)$.






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


      }
      });














      draft saved

      draft discarded


















      StackExchange.ready(
      function () {
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3016269%2fcan-i-make-a-line-with-both-a-slant-asymptote-and-a-horizontal%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
      4
      down vote













      As said by @Torsten Schoeneberg there are many ways to obtain such curves. However, (branches of) hyperbolas rank among the most natural ones.



      Thus I propose the following general solution among the hyperbola family : for any real parameter $a>0$



      $$y=dfrac12left(x-2+sqrt{(x+2)^2+4a}right)$$



      enter image description here



      Fig. Different branches for $a=0.5, 1, 1.5, ...4$.



      How did I find this general equation ?



      I have first considered the curve reduced to its asymptotes, i.e., with equation



      $$(y+2)(y-x)=0 tag{1}$$



      (the product of equations $y+2=0$ and $y-x=0$). Then I pertubated a little this equation by taking instead of it :



      $$(y+2)(y-x)-a=0 tag{2}$$



      Now expand it as a quadratic in variable $y$ :



      $$y^2+y(2-x)-(2x+a)=0 tag{3}$$



      and use the classical formula for the roots of a quadratic considering $x$ as a parameter.






      share|cite|improve this answer



























        up vote
        4
        down vote













        As said by @Torsten Schoeneberg there are many ways to obtain such curves. However, (branches of) hyperbolas rank among the most natural ones.



        Thus I propose the following general solution among the hyperbola family : for any real parameter $a>0$



        $$y=dfrac12left(x-2+sqrt{(x+2)^2+4a}right)$$



        enter image description here



        Fig. Different branches for $a=0.5, 1, 1.5, ...4$.



        How did I find this general equation ?



        I have first considered the curve reduced to its asymptotes, i.e., with equation



        $$(y+2)(y-x)=0 tag{1}$$



        (the product of equations $y+2=0$ and $y-x=0$). Then I pertubated a little this equation by taking instead of it :



        $$(y+2)(y-x)-a=0 tag{2}$$



        Now expand it as a quadratic in variable $y$ :



        $$y^2+y(2-x)-(2x+a)=0 tag{3}$$



        and use the classical formula for the roots of a quadratic considering $x$ as a parameter.






        share|cite|improve this answer

























          up vote
          4
          down vote










          up vote
          4
          down vote









          As said by @Torsten Schoeneberg there are many ways to obtain such curves. However, (branches of) hyperbolas rank among the most natural ones.



          Thus I propose the following general solution among the hyperbola family : for any real parameter $a>0$



          $$y=dfrac12left(x-2+sqrt{(x+2)^2+4a}right)$$



          enter image description here



          Fig. Different branches for $a=0.5, 1, 1.5, ...4$.



          How did I find this general equation ?



          I have first considered the curve reduced to its asymptotes, i.e., with equation



          $$(y+2)(y-x)=0 tag{1}$$



          (the product of equations $y+2=0$ and $y-x=0$). Then I pertubated a little this equation by taking instead of it :



          $$(y+2)(y-x)-a=0 tag{2}$$



          Now expand it as a quadratic in variable $y$ :



          $$y^2+y(2-x)-(2x+a)=0 tag{3}$$



          and use the classical formula for the roots of a quadratic considering $x$ as a parameter.






          share|cite|improve this answer














          As said by @Torsten Schoeneberg there are many ways to obtain such curves. However, (branches of) hyperbolas rank among the most natural ones.



          Thus I propose the following general solution among the hyperbola family : for any real parameter $a>0$



          $$y=dfrac12left(x-2+sqrt{(x+2)^2+4a}right)$$



          enter image description here



          Fig. Different branches for $a=0.5, 1, 1.5, ...4$.



          How did I find this general equation ?



          I have first considered the curve reduced to its asymptotes, i.e., with equation



          $$(y+2)(y-x)=0 tag{1}$$



          (the product of equations $y+2=0$ and $y-x=0$). Then I pertubated a little this equation by taking instead of it :



          $$(y+2)(y-x)-a=0 tag{2}$$



          Now expand it as a quadratic in variable $y$ :



          $$y^2+y(2-x)-(2x+a)=0 tag{3}$$



          and use the classical formula for the roots of a quadratic considering $x$ as a parameter.







          share|cite|improve this answer














          share|cite|improve this answer



          share|cite|improve this answer








          edited Nov 27 at 21:40

























          answered Nov 27 at 21:19









          Jean Marie

          28.7k41849




          28.7k41849






















              up vote
              0
              down vote













              An example of a function with asymptotes $;y=-2;$ as $;xto -infty;$ and $;y=x-2;$ as $xto infty;$ is $$f(x)=frac{sqrt{x^2+1}+x}{2}-2$$ (picture by WolframAlpha






              share|cite|improve this answer























              • The slant asymptote of this is $y = x-2$.
                – Torsten Schoeneberg
                Nov 27 at 21:15










              • Right, thanks. Going to fix it.
                – user376343
                Nov 27 at 21:16















              up vote
              0
              down vote













              An example of a function with asymptotes $;y=-2;$ as $;xto -infty;$ and $;y=x-2;$ as $xto infty;$ is $$f(x)=frac{sqrt{x^2+1}+x}{2}-2$$ (picture by WolframAlpha






              share|cite|improve this answer























              • The slant asymptote of this is $y = x-2$.
                – Torsten Schoeneberg
                Nov 27 at 21:15










              • Right, thanks. Going to fix it.
                – user376343
                Nov 27 at 21:16













              up vote
              0
              down vote










              up vote
              0
              down vote









              An example of a function with asymptotes $;y=-2;$ as $;xto -infty;$ and $;y=x-2;$ as $xto infty;$ is $$f(x)=frac{sqrt{x^2+1}+x}{2}-2$$ (picture by WolframAlpha






              share|cite|improve this answer














              An example of a function with asymptotes $;y=-2;$ as $;xto -infty;$ and $;y=x-2;$ as $xto infty;$ is $$f(x)=frac{sqrt{x^2+1}+x}{2}-2$$ (picture by WolframAlpha







              share|cite|improve this answer














              share|cite|improve this answer



              share|cite|improve this answer








              edited Nov 27 at 21:17

























              answered Nov 27 at 20:58









              user376343

              2,7782822




              2,7782822












              • The slant asymptote of this is $y = x-2$.
                – Torsten Schoeneberg
                Nov 27 at 21:15










              • Right, thanks. Going to fix it.
                – user376343
                Nov 27 at 21:16


















              • The slant asymptote of this is $y = x-2$.
                – Torsten Schoeneberg
                Nov 27 at 21:15










              • Right, thanks. Going to fix it.
                – user376343
                Nov 27 at 21:16
















              The slant asymptote of this is $y = x-2$.
              – Torsten Schoeneberg
              Nov 27 at 21:15




              The slant asymptote of this is $y = x-2$.
              – Torsten Schoeneberg
              Nov 27 at 21:15












              Right, thanks. Going to fix it.
              – user376343
              Nov 27 at 21:16




              Right, thanks. Going to fix it.
              – user376343
              Nov 27 at 21:16










              up vote
              0
              down vote













              To amend my second comment, for what it's worth, here is my thought process how to get a function as demanded, and what I experienced when doing that "shifting and stretching".



              So to start, I looked for a function with two different horizontal asymptotes for $x to -infty$ versus $x to infty$. Well, the $arctan$ came to my mind. Now first I wanted to turn that in the general shape "0 on the left, but positive (so I can make it increasing) on the right". So I moved it up by $pi/2$, whence it would go from $0$ at $-infty$ to $pi$ (or whatever positive value) at $infty$.



              $arctan(x)+frac{pi}{2}$:



              enter image description here



              This, multiplied with $frac{x}{pi}$, will give something that will behave like $0$ to the left, but like $x$ on the right (so I thought):



              $displaystyle frac{x}{pi} cdot left(arctan(x) + frac{pi}{2}right)$:



              enter image description here



              Now shift it down by $2$. That will make $lim_{xto -infty} =-2$, I thought. It also moves the slant asymptote down to $y=x-2$. To make good for that, I thought I move the graph to the left by $2$, which transforms the slant asymptote back to $y=x$ and does not change the horizontal one.



              $displaystyle frac{x+2}{pi} cdot left(arctan(x) + frac{pi}{2}right) -2$:



              enter image description here



              But now I noticed that ever since the second step I was off by a vertical shift of $1/pi$. See, both asymptotes are a bit too low. Where does that come from? Well I realised that even though arctan goes to $pmpi/2$ (and my shifted version in the first step to $0$ resp. $pi$), I multiply it with a linear term; which means that I have to find out how well the $arctan$ approaches its limit up to a term of order $frac1x$. And indeed, an expansion of $arctan$ "around $pm infty$" is given by



              $$displaystyle arctan(x) = frac{pi}{2} - frac{1}{x} + frac{1}{3x^{3}} - frac{1}{5x^{5}} + ...$$ (for $x >1$) resp.



              $$displaystyle arctan(x) = -frac{pi}{2} - frac{1}{x} + frac{1}{3x^{3}} - frac{1}{5x^{5}} + ...$$ (for $x < -1$).



              whose $-1/x$-term, by multiplication with $x/pi$, indeed explained that constant $-1/pi$ term. But then that's that, one just removes it by hand, giving:




              $$f(x) = displaystyle frac{x+2}{pi} cdot left(arctan(x) + frac{pi}{2}right) -2 +frac{1}{pi}$$




              Voilà:



              enter image description here





              Fun fact I learned on the way when deriving the "expansion around $infty$": the derivative of $arctan(1/x)$ is $(-1)cdot$ the derivative of $arctan(x)$; which abstractly implies that $arctan(x)= C - arctan(1/x)$ for some constant depending on the connected component of the graph we are on. And indeed e.g. for $x>0$, we have $arctan(x) = pi/2 - arctan(1/x)$.






              share|cite|improve this answer



























                up vote
                0
                down vote













                To amend my second comment, for what it's worth, here is my thought process how to get a function as demanded, and what I experienced when doing that "shifting and stretching".



                So to start, I looked for a function with two different horizontal asymptotes for $x to -infty$ versus $x to infty$. Well, the $arctan$ came to my mind. Now first I wanted to turn that in the general shape "0 on the left, but positive (so I can make it increasing) on the right". So I moved it up by $pi/2$, whence it would go from $0$ at $-infty$ to $pi$ (or whatever positive value) at $infty$.



                $arctan(x)+frac{pi}{2}$:



                enter image description here



                This, multiplied with $frac{x}{pi}$, will give something that will behave like $0$ to the left, but like $x$ on the right (so I thought):



                $displaystyle frac{x}{pi} cdot left(arctan(x) + frac{pi}{2}right)$:



                enter image description here



                Now shift it down by $2$. That will make $lim_{xto -infty} =-2$, I thought. It also moves the slant asymptote down to $y=x-2$. To make good for that, I thought I move the graph to the left by $2$, which transforms the slant asymptote back to $y=x$ and does not change the horizontal one.



                $displaystyle frac{x+2}{pi} cdot left(arctan(x) + frac{pi}{2}right) -2$:



                enter image description here



                But now I noticed that ever since the second step I was off by a vertical shift of $1/pi$. See, both asymptotes are a bit too low. Where does that come from? Well I realised that even though arctan goes to $pmpi/2$ (and my shifted version in the first step to $0$ resp. $pi$), I multiply it with a linear term; which means that I have to find out how well the $arctan$ approaches its limit up to a term of order $frac1x$. And indeed, an expansion of $arctan$ "around $pm infty$" is given by



                $$displaystyle arctan(x) = frac{pi}{2} - frac{1}{x} + frac{1}{3x^{3}} - frac{1}{5x^{5}} + ...$$ (for $x >1$) resp.



                $$displaystyle arctan(x) = -frac{pi}{2} - frac{1}{x} + frac{1}{3x^{3}} - frac{1}{5x^{5}} + ...$$ (for $x < -1$).



                whose $-1/x$-term, by multiplication with $x/pi$, indeed explained that constant $-1/pi$ term. But then that's that, one just removes it by hand, giving:




                $$f(x) = displaystyle frac{x+2}{pi} cdot left(arctan(x) + frac{pi}{2}right) -2 +frac{1}{pi}$$




                Voilà:



                enter image description here





                Fun fact I learned on the way when deriving the "expansion around $infty$": the derivative of $arctan(1/x)$ is $(-1)cdot$ the derivative of $arctan(x)$; which abstractly implies that $arctan(x)= C - arctan(1/x)$ for some constant depending on the connected component of the graph we are on. And indeed e.g. for $x>0$, we have $arctan(x) = pi/2 - arctan(1/x)$.






                share|cite|improve this answer

























                  up vote
                  0
                  down vote










                  up vote
                  0
                  down vote









                  To amend my second comment, for what it's worth, here is my thought process how to get a function as demanded, and what I experienced when doing that "shifting and stretching".



                  So to start, I looked for a function with two different horizontal asymptotes for $x to -infty$ versus $x to infty$. Well, the $arctan$ came to my mind. Now first I wanted to turn that in the general shape "0 on the left, but positive (so I can make it increasing) on the right". So I moved it up by $pi/2$, whence it would go from $0$ at $-infty$ to $pi$ (or whatever positive value) at $infty$.



                  $arctan(x)+frac{pi}{2}$:



                  enter image description here



                  This, multiplied with $frac{x}{pi}$, will give something that will behave like $0$ to the left, but like $x$ on the right (so I thought):



                  $displaystyle frac{x}{pi} cdot left(arctan(x) + frac{pi}{2}right)$:



                  enter image description here



                  Now shift it down by $2$. That will make $lim_{xto -infty} =-2$, I thought. It also moves the slant asymptote down to $y=x-2$. To make good for that, I thought I move the graph to the left by $2$, which transforms the slant asymptote back to $y=x$ and does not change the horizontal one.



                  $displaystyle frac{x+2}{pi} cdot left(arctan(x) + frac{pi}{2}right) -2$:



                  enter image description here



                  But now I noticed that ever since the second step I was off by a vertical shift of $1/pi$. See, both asymptotes are a bit too low. Where does that come from? Well I realised that even though arctan goes to $pmpi/2$ (and my shifted version in the first step to $0$ resp. $pi$), I multiply it with a linear term; which means that I have to find out how well the $arctan$ approaches its limit up to a term of order $frac1x$. And indeed, an expansion of $arctan$ "around $pm infty$" is given by



                  $$displaystyle arctan(x) = frac{pi}{2} - frac{1}{x} + frac{1}{3x^{3}} - frac{1}{5x^{5}} + ...$$ (for $x >1$) resp.



                  $$displaystyle arctan(x) = -frac{pi}{2} - frac{1}{x} + frac{1}{3x^{3}} - frac{1}{5x^{5}} + ...$$ (for $x < -1$).



                  whose $-1/x$-term, by multiplication with $x/pi$, indeed explained that constant $-1/pi$ term. But then that's that, one just removes it by hand, giving:




                  $$f(x) = displaystyle frac{x+2}{pi} cdot left(arctan(x) + frac{pi}{2}right) -2 +frac{1}{pi}$$




                  Voilà:



                  enter image description here





                  Fun fact I learned on the way when deriving the "expansion around $infty$": the derivative of $arctan(1/x)$ is $(-1)cdot$ the derivative of $arctan(x)$; which abstractly implies that $arctan(x)= C - arctan(1/x)$ for some constant depending on the connected component of the graph we are on. And indeed e.g. for $x>0$, we have $arctan(x) = pi/2 - arctan(1/x)$.






                  share|cite|improve this answer














                  To amend my second comment, for what it's worth, here is my thought process how to get a function as demanded, and what I experienced when doing that "shifting and stretching".



                  So to start, I looked for a function with two different horizontal asymptotes for $x to -infty$ versus $x to infty$. Well, the $arctan$ came to my mind. Now first I wanted to turn that in the general shape "0 on the left, but positive (so I can make it increasing) on the right". So I moved it up by $pi/2$, whence it would go from $0$ at $-infty$ to $pi$ (or whatever positive value) at $infty$.



                  $arctan(x)+frac{pi}{2}$:



                  enter image description here



                  This, multiplied with $frac{x}{pi}$, will give something that will behave like $0$ to the left, but like $x$ on the right (so I thought):



                  $displaystyle frac{x}{pi} cdot left(arctan(x) + frac{pi}{2}right)$:



                  enter image description here



                  Now shift it down by $2$. That will make $lim_{xto -infty} =-2$, I thought. It also moves the slant asymptote down to $y=x-2$. To make good for that, I thought I move the graph to the left by $2$, which transforms the slant asymptote back to $y=x$ and does not change the horizontal one.



                  $displaystyle frac{x+2}{pi} cdot left(arctan(x) + frac{pi}{2}right) -2$:



                  enter image description here



                  But now I noticed that ever since the second step I was off by a vertical shift of $1/pi$. See, both asymptotes are a bit too low. Where does that come from? Well I realised that even though arctan goes to $pmpi/2$ (and my shifted version in the first step to $0$ resp. $pi$), I multiply it with a linear term; which means that I have to find out how well the $arctan$ approaches its limit up to a term of order $frac1x$. And indeed, an expansion of $arctan$ "around $pm infty$" is given by



                  $$displaystyle arctan(x) = frac{pi}{2} - frac{1}{x} + frac{1}{3x^{3}} - frac{1}{5x^{5}} + ...$$ (for $x >1$) resp.



                  $$displaystyle arctan(x) = -frac{pi}{2} - frac{1}{x} + frac{1}{3x^{3}} - frac{1}{5x^{5}} + ...$$ (for $x < -1$).



                  whose $-1/x$-term, by multiplication with $x/pi$, indeed explained that constant $-1/pi$ term. But then that's that, one just removes it by hand, giving:




                  $$f(x) = displaystyle frac{x+2}{pi} cdot left(arctan(x) + frac{pi}{2}right) -2 +frac{1}{pi}$$




                  Voilà:



                  enter image description here





                  Fun fact I learned on the way when deriving the "expansion around $infty$": the derivative of $arctan(1/x)$ is $(-1)cdot$ the derivative of $arctan(x)$; which abstractly implies that $arctan(x)= C - arctan(1/x)$ for some constant depending on the connected component of the graph we are on. And indeed e.g. for $x>0$, we have $arctan(x) = pi/2 - arctan(1/x)$.







                  share|cite|improve this answer














                  share|cite|improve this answer



                  share|cite|improve this answer








                  edited Nov 28 at 21:10

























                  answered Nov 28 at 4:11









                  Torsten Schoeneberg

                  3,6562832




                  3,6562832






























                      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.





                      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%2f3016269%2fcan-i-make-a-line-with-both-a-slant-asymptote-and-a-horizontal%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

                      Wiesbaden

                      Marschland

                      Dieringhausen