When do you add $180$ to the directional angle?











up vote
0
down vote

favorite












When finding the direction angle with the formula $theta = tan^{-1} left(frac{y}{x}right )$, when do you add $180$ degrees to the answer? Is it whenever the $x$ is negative, when the angle is in the third or fourth quadrant (if this is the case, how would I know the angle is there?), or just in the third quadrant (if this is the case, how would I know the angle is there)? Or something else entirely?










share|cite|improve this question




















  • 1




    Did you try drawing a picture (one for each case)? In that picture (that you are going to draw), when is the angle $0$? When is it $180$?
    – megas
    Mar 10 '15 at 4:14












  • The issue is that ${y over x} = {-y over -x}$ so $arctan$ does not distinguish quadrants $Q_1, Q_3$ or $Q_2, Q_4$.
    – copper.hat
    Mar 10 '15 at 4:55















up vote
0
down vote

favorite












When finding the direction angle with the formula $theta = tan^{-1} left(frac{y}{x}right )$, when do you add $180$ degrees to the answer? Is it whenever the $x$ is negative, when the angle is in the third or fourth quadrant (if this is the case, how would I know the angle is there?), or just in the third quadrant (if this is the case, how would I know the angle is there)? Or something else entirely?










share|cite|improve this question




















  • 1




    Did you try drawing a picture (one for each case)? In that picture (that you are going to draw), when is the angle $0$? When is it $180$?
    – megas
    Mar 10 '15 at 4:14












  • The issue is that ${y over x} = {-y over -x}$ so $arctan$ does not distinguish quadrants $Q_1, Q_3$ or $Q_2, Q_4$.
    – copper.hat
    Mar 10 '15 at 4:55













up vote
0
down vote

favorite









up vote
0
down vote

favorite











When finding the direction angle with the formula $theta = tan^{-1} left(frac{y}{x}right )$, when do you add $180$ degrees to the answer? Is it whenever the $x$ is negative, when the angle is in the third or fourth quadrant (if this is the case, how would I know the angle is there?), or just in the third quadrant (if this is the case, how would I know the angle is there)? Or something else entirely?










share|cite|improve this question















When finding the direction angle with the formula $theta = tan^{-1} left(frac{y}{x}right )$, when do you add $180$ degrees to the answer? Is it whenever the $x$ is negative, when the angle is in the third or fourth quadrant (if this is the case, how would I know the angle is there?), or just in the third quadrant (if this is the case, how would I know the angle is there)? Or something else entirely?







vectors






share|cite|improve this question















share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








edited Mar 10 '15 at 4:30









Mnifldz

6,77311534




6,77311534










asked Mar 10 '15 at 4:10









gowiththecalculo

814




814








  • 1




    Did you try drawing a picture (one for each case)? In that picture (that you are going to draw), when is the angle $0$? When is it $180$?
    – megas
    Mar 10 '15 at 4:14












  • The issue is that ${y over x} = {-y over -x}$ so $arctan$ does not distinguish quadrants $Q_1, Q_3$ or $Q_2, Q_4$.
    – copper.hat
    Mar 10 '15 at 4:55














  • 1




    Did you try drawing a picture (one for each case)? In that picture (that you are going to draw), when is the angle $0$? When is it $180$?
    – megas
    Mar 10 '15 at 4:14












  • The issue is that ${y over x} = {-y over -x}$ so $arctan$ does not distinguish quadrants $Q_1, Q_3$ or $Q_2, Q_4$.
    – copper.hat
    Mar 10 '15 at 4:55








1




1




Did you try drawing a picture (one for each case)? In that picture (that you are going to draw), when is the angle $0$? When is it $180$?
– megas
Mar 10 '15 at 4:14






Did you try drawing a picture (one for each case)? In that picture (that you are going to draw), when is the angle $0$? When is it $180$?
– megas
Mar 10 '15 at 4:14














The issue is that ${y over x} = {-y over -x}$ so $arctan$ does not distinguish quadrants $Q_1, Q_3$ or $Q_2, Q_4$.
– copper.hat
Mar 10 '15 at 4:55




The issue is that ${y over x} = {-y over -x}$ so $arctan$ does not distinguish quadrants $Q_1, Q_3$ or $Q_2, Q_4$.
– copper.hat
Mar 10 '15 at 4:55










3 Answers
3






active

oldest

votes

















up vote
2
down vote



accepted










If you look at this table in the Wikipedia article, you will see that in the arctangent row, the "range of usual principal value" is given as $-90^circ<y<90^circ$.



This means that if you give a number to the arctangent function, most calculators respond with an answer between $-90^circ$ and $90^circ$. This is the half-plane on the right, quadrants I and IV, so $x$ is assumed positive.



If $x$ is negative, the answer you want is $180^circ$ away.






share|cite|improve this answer




























    up vote
    0
    down vote













    Use the following formula and no worry to add something.



    f(x,y)=180-90*(1+sign(x))* (1-sign(y^2))-45*(2+sign(x))*sign(y)



      -180/pi()*sign(x*y)*atan((abs(x)-abs(y))/(abs(x)+abs(y)))





    share|cite|improve this answer




























      up vote
      0
      down vote













      Andrew Woods' answer is correct, but let me offer another way to compute $theta$.



      As shown in this answer,
      $$
      begin{align}
      tan(theta/2)
      &=frac{sin(theta)}{1+cos(theta)}\
      &=frac{frac yr}{1+frac xr}\[3pt]
      &=frac{y}{x+r}
      end{align}
      $$

      which leads to the formula
      $$
      bbox[5px,border:2px solid #C0A000]{theta=2arctanleft(vcenter{frac y{x+sqrt{x^2+y^2}}}right)}
      $$



      which is valid as long as $x+sqrt{x^2+y^2}ne0$; that is, $yne0$ or $xgt0$.





      Verification



      Since $tan(2x)=frac{2tan(x)}{1-tan^2(x)}$,
      $$
      begin{align}
      tan(theta)
      &=frac{2frac y{x+sqrt{x^2+y^2}}}{1-left(frac y{x+sqrt{x^2+y^2}}right)^2}\
      &=frac{2yleft(x+sqrt{x^2+y^2}right)}{2x^2+2xsqrt{x^2+y^2}}\[12pt]
      &=frac yx
      end{align}
      $$






      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%2f1183357%2fwhen-do-you-add-180-to-the-directional-angle%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
        2
        down vote



        accepted










        If you look at this table in the Wikipedia article, you will see that in the arctangent row, the "range of usual principal value" is given as $-90^circ<y<90^circ$.



        This means that if you give a number to the arctangent function, most calculators respond with an answer between $-90^circ$ and $90^circ$. This is the half-plane on the right, quadrants I and IV, so $x$ is assumed positive.



        If $x$ is negative, the answer you want is $180^circ$ away.






        share|cite|improve this answer

























          up vote
          2
          down vote



          accepted










          If you look at this table in the Wikipedia article, you will see that in the arctangent row, the "range of usual principal value" is given as $-90^circ<y<90^circ$.



          This means that if you give a number to the arctangent function, most calculators respond with an answer between $-90^circ$ and $90^circ$. This is the half-plane on the right, quadrants I and IV, so $x$ is assumed positive.



          If $x$ is negative, the answer you want is $180^circ$ away.






          share|cite|improve this answer























            up vote
            2
            down vote



            accepted







            up vote
            2
            down vote



            accepted






            If you look at this table in the Wikipedia article, you will see that in the arctangent row, the "range of usual principal value" is given as $-90^circ<y<90^circ$.



            This means that if you give a number to the arctangent function, most calculators respond with an answer between $-90^circ$ and $90^circ$. This is the half-plane on the right, quadrants I and IV, so $x$ is assumed positive.



            If $x$ is negative, the answer you want is $180^circ$ away.






            share|cite|improve this answer












            If you look at this table in the Wikipedia article, you will see that in the arctangent row, the "range of usual principal value" is given as $-90^circ<y<90^circ$.



            This means that if you give a number to the arctangent function, most calculators respond with an answer between $-90^circ$ and $90^circ$. This is the half-plane on the right, quadrants I and IV, so $x$ is assumed positive.



            If $x$ is negative, the answer you want is $180^circ$ away.







            share|cite|improve this answer












            share|cite|improve this answer



            share|cite|improve this answer










            answered Mar 10 '15 at 5:00









            Andrew Woods

            3,194513




            3,194513






















                up vote
                0
                down vote













                Use the following formula and no worry to add something.



                f(x,y)=180-90*(1+sign(x))* (1-sign(y^2))-45*(2+sign(x))*sign(y)



                  -180/pi()*sign(x*y)*atan((abs(x)-abs(y))/(abs(x)+abs(y)))





                share|cite|improve this answer

























                  up vote
                  0
                  down vote













                  Use the following formula and no worry to add something.



                  f(x,y)=180-90*(1+sign(x))* (1-sign(y^2))-45*(2+sign(x))*sign(y)



                    -180/pi()*sign(x*y)*atan((abs(x)-abs(y))/(abs(x)+abs(y)))





                  share|cite|improve this answer























                    up vote
                    0
                    down vote










                    up vote
                    0
                    down vote









                    Use the following formula and no worry to add something.



                    f(x,y)=180-90*(1+sign(x))* (1-sign(y^2))-45*(2+sign(x))*sign(y)



                      -180/pi()*sign(x*y)*atan((abs(x)-abs(y))/(abs(x)+abs(y)))





                    share|cite|improve this answer












                    Use the following formula and no worry to add something.



                    f(x,y)=180-90*(1+sign(x))* (1-sign(y^2))-45*(2+sign(x))*sign(y)



                      -180/pi()*sign(x*y)*atan((abs(x)-abs(y))/(abs(x)+abs(y)))






                    share|cite|improve this answer












                    share|cite|improve this answer



                    share|cite|improve this answer










                    answered Nov 18 at 6:18









                    theodore panagos

                    191




                    191






















                        up vote
                        0
                        down vote













                        Andrew Woods' answer is correct, but let me offer another way to compute $theta$.



                        As shown in this answer,
                        $$
                        begin{align}
                        tan(theta/2)
                        &=frac{sin(theta)}{1+cos(theta)}\
                        &=frac{frac yr}{1+frac xr}\[3pt]
                        &=frac{y}{x+r}
                        end{align}
                        $$

                        which leads to the formula
                        $$
                        bbox[5px,border:2px solid #C0A000]{theta=2arctanleft(vcenter{frac y{x+sqrt{x^2+y^2}}}right)}
                        $$



                        which is valid as long as $x+sqrt{x^2+y^2}ne0$; that is, $yne0$ or $xgt0$.





                        Verification



                        Since $tan(2x)=frac{2tan(x)}{1-tan^2(x)}$,
                        $$
                        begin{align}
                        tan(theta)
                        &=frac{2frac y{x+sqrt{x^2+y^2}}}{1-left(frac y{x+sqrt{x^2+y^2}}right)^2}\
                        &=frac{2yleft(x+sqrt{x^2+y^2}right)}{2x^2+2xsqrt{x^2+y^2}}\[12pt]
                        &=frac yx
                        end{align}
                        $$






                        share|cite|improve this answer

























                          up vote
                          0
                          down vote













                          Andrew Woods' answer is correct, but let me offer another way to compute $theta$.



                          As shown in this answer,
                          $$
                          begin{align}
                          tan(theta/2)
                          &=frac{sin(theta)}{1+cos(theta)}\
                          &=frac{frac yr}{1+frac xr}\[3pt]
                          &=frac{y}{x+r}
                          end{align}
                          $$

                          which leads to the formula
                          $$
                          bbox[5px,border:2px solid #C0A000]{theta=2arctanleft(vcenter{frac y{x+sqrt{x^2+y^2}}}right)}
                          $$



                          which is valid as long as $x+sqrt{x^2+y^2}ne0$; that is, $yne0$ or $xgt0$.





                          Verification



                          Since $tan(2x)=frac{2tan(x)}{1-tan^2(x)}$,
                          $$
                          begin{align}
                          tan(theta)
                          &=frac{2frac y{x+sqrt{x^2+y^2}}}{1-left(frac y{x+sqrt{x^2+y^2}}right)^2}\
                          &=frac{2yleft(x+sqrt{x^2+y^2}right)}{2x^2+2xsqrt{x^2+y^2}}\[12pt]
                          &=frac yx
                          end{align}
                          $$






                          share|cite|improve this answer























                            up vote
                            0
                            down vote










                            up vote
                            0
                            down vote









                            Andrew Woods' answer is correct, but let me offer another way to compute $theta$.



                            As shown in this answer,
                            $$
                            begin{align}
                            tan(theta/2)
                            &=frac{sin(theta)}{1+cos(theta)}\
                            &=frac{frac yr}{1+frac xr}\[3pt]
                            &=frac{y}{x+r}
                            end{align}
                            $$

                            which leads to the formula
                            $$
                            bbox[5px,border:2px solid #C0A000]{theta=2arctanleft(vcenter{frac y{x+sqrt{x^2+y^2}}}right)}
                            $$



                            which is valid as long as $x+sqrt{x^2+y^2}ne0$; that is, $yne0$ or $xgt0$.





                            Verification



                            Since $tan(2x)=frac{2tan(x)}{1-tan^2(x)}$,
                            $$
                            begin{align}
                            tan(theta)
                            &=frac{2frac y{x+sqrt{x^2+y^2}}}{1-left(frac y{x+sqrt{x^2+y^2}}right)^2}\
                            &=frac{2yleft(x+sqrt{x^2+y^2}right)}{2x^2+2xsqrt{x^2+y^2}}\[12pt]
                            &=frac yx
                            end{align}
                            $$






                            share|cite|improve this answer












                            Andrew Woods' answer is correct, but let me offer another way to compute $theta$.



                            As shown in this answer,
                            $$
                            begin{align}
                            tan(theta/2)
                            &=frac{sin(theta)}{1+cos(theta)}\
                            &=frac{frac yr}{1+frac xr}\[3pt]
                            &=frac{y}{x+r}
                            end{align}
                            $$

                            which leads to the formula
                            $$
                            bbox[5px,border:2px solid #C0A000]{theta=2arctanleft(vcenter{frac y{x+sqrt{x^2+y^2}}}right)}
                            $$



                            which is valid as long as $x+sqrt{x^2+y^2}ne0$; that is, $yne0$ or $xgt0$.





                            Verification



                            Since $tan(2x)=frac{2tan(x)}{1-tan^2(x)}$,
                            $$
                            begin{align}
                            tan(theta)
                            &=frac{2frac y{x+sqrt{x^2+y^2}}}{1-left(frac y{x+sqrt{x^2+y^2}}right)^2}\
                            &=frac{2yleft(x+sqrt{x^2+y^2}right)}{2x^2+2xsqrt{x^2+y^2}}\[12pt]
                            &=frac yx
                            end{align}
                            $$







                            share|cite|improve this answer












                            share|cite|improve this answer



                            share|cite|improve this answer










                            answered Nov 18 at 8:30









                            robjohn

                            263k27301622




                            263k27301622






























                                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%2f1183357%2fwhen-do-you-add-180-to-the-directional-angle%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

                                Index of /

                                Tribalistas

                                Listed building