Why is (1-t)^2 == (t-1)^2 in SageMath?












-1












$begingroup$


This is really odd, not much to say about it.



┌────────────────────────────────────────────────────────────────────┐
│ SageMath version 8.5, Release Date: 2018-12-22 │
│ Using Python 2.7.15. Type "help()" for help. │
└────────────────────────────────────────────────────────────────────┘


-t










share|cite|improve this question









$endgroup$












  • $begingroup$
    Are you sure this question wouldn't be better answered in another SE?
    $endgroup$
    – Aniruddh Venkatesan
    Jan 19 at 4:06










  • $begingroup$
    @AniruddhVenkatesan Where would you recommend?
    $endgroup$
    – Louis Hong
    Jan 19 at 4:07












  • $begingroup$
    That depends on what type of answer you're looking for. If you're looking for a reason as to why Python respond and return this result, Stack Overflow might be a better choice. If you want a mathematical explanation, then I would suggest leaving the question on this site and trying to see if someone knows the answer
    $endgroup$
    – Aniruddh Venkatesan
    Jan 19 at 4:11






  • 3




    $begingroup$
    What is "odd" about this? Do you have reason to doubt the result? What result did you expect and why?
    $endgroup$
    – JMoravitz
    Jan 19 at 4:15
















-1












$begingroup$


This is really odd, not much to say about it.



┌────────────────────────────────────────────────────────────────────┐
│ SageMath version 8.5, Release Date: 2018-12-22 │
│ Using Python 2.7.15. Type "help()" for help. │
└────────────────────────────────────────────────────────────────────┘


-t










share|cite|improve this question









$endgroup$












  • $begingroup$
    Are you sure this question wouldn't be better answered in another SE?
    $endgroup$
    – Aniruddh Venkatesan
    Jan 19 at 4:06










  • $begingroup$
    @AniruddhVenkatesan Where would you recommend?
    $endgroup$
    – Louis Hong
    Jan 19 at 4:07












  • $begingroup$
    That depends on what type of answer you're looking for. If you're looking for a reason as to why Python respond and return this result, Stack Overflow might be a better choice. If you want a mathematical explanation, then I would suggest leaving the question on this site and trying to see if someone knows the answer
    $endgroup$
    – Aniruddh Venkatesan
    Jan 19 at 4:11






  • 3




    $begingroup$
    What is "odd" about this? Do you have reason to doubt the result? What result did you expect and why?
    $endgroup$
    – JMoravitz
    Jan 19 at 4:15














-1












-1








-1





$begingroup$


This is really odd, not much to say about it.



┌────────────────────────────────────────────────────────────────────┐
│ SageMath version 8.5, Release Date: 2018-12-22 │
│ Using Python 2.7.15. Type "help()" for help. │
└────────────────────────────────────────────────────────────────────┘


-t










share|cite|improve this question









$endgroup$




This is really odd, not much to say about it.



┌────────────────────────────────────────────────────────────────────┐
│ SageMath version 8.5, Release Date: 2018-12-22 │
│ Using Python 2.7.15. Type "help()" for help. │
└────────────────────────────────────────────────────────────────────┘


-t







sagemath






share|cite|improve this question













share|cite|improve this question











share|cite|improve this question




share|cite|improve this question










asked Jan 19 at 4:03









Louis HongLouis Hong

1197




1197












  • $begingroup$
    Are you sure this question wouldn't be better answered in another SE?
    $endgroup$
    – Aniruddh Venkatesan
    Jan 19 at 4:06










  • $begingroup$
    @AniruddhVenkatesan Where would you recommend?
    $endgroup$
    – Louis Hong
    Jan 19 at 4:07












  • $begingroup$
    That depends on what type of answer you're looking for. If you're looking for a reason as to why Python respond and return this result, Stack Overflow might be a better choice. If you want a mathematical explanation, then I would suggest leaving the question on this site and trying to see if someone knows the answer
    $endgroup$
    – Aniruddh Venkatesan
    Jan 19 at 4:11






  • 3




    $begingroup$
    What is "odd" about this? Do you have reason to doubt the result? What result did you expect and why?
    $endgroup$
    – JMoravitz
    Jan 19 at 4:15


















  • $begingroup$
    Are you sure this question wouldn't be better answered in another SE?
    $endgroup$
    – Aniruddh Venkatesan
    Jan 19 at 4:06










  • $begingroup$
    @AniruddhVenkatesan Where would you recommend?
    $endgroup$
    – Louis Hong
    Jan 19 at 4:07












  • $begingroup$
    That depends on what type of answer you're looking for. If you're looking for a reason as to why Python respond and return this result, Stack Overflow might be a better choice. If you want a mathematical explanation, then I would suggest leaving the question on this site and trying to see if someone knows the answer
    $endgroup$
    – Aniruddh Venkatesan
    Jan 19 at 4:11






  • 3




    $begingroup$
    What is "odd" about this? Do you have reason to doubt the result? What result did you expect and why?
    $endgroup$
    – JMoravitz
    Jan 19 at 4:15
















$begingroup$
Are you sure this question wouldn't be better answered in another SE?
$endgroup$
– Aniruddh Venkatesan
Jan 19 at 4:06




$begingroup$
Are you sure this question wouldn't be better answered in another SE?
$endgroup$
– Aniruddh Venkatesan
Jan 19 at 4:06












$begingroup$
@AniruddhVenkatesan Where would you recommend?
$endgroup$
– Louis Hong
Jan 19 at 4:07






$begingroup$
@AniruddhVenkatesan Where would you recommend?
$endgroup$
– Louis Hong
Jan 19 at 4:07














$begingroup$
That depends on what type of answer you're looking for. If you're looking for a reason as to why Python respond and return this result, Stack Overflow might be a better choice. If you want a mathematical explanation, then I would suggest leaving the question on this site and trying to see if someone knows the answer
$endgroup$
– Aniruddh Venkatesan
Jan 19 at 4:11




$begingroup$
That depends on what type of answer you're looking for. If you're looking for a reason as to why Python respond and return this result, Stack Overflow might be a better choice. If you want a mathematical explanation, then I would suggest leaving the question on this site and trying to see if someone knows the answer
$endgroup$
– Aniruddh Venkatesan
Jan 19 at 4:11




3




3




$begingroup$
What is "odd" about this? Do you have reason to doubt the result? What result did you expect and why?
$endgroup$
– JMoravitz
Jan 19 at 4:15




$begingroup$
What is "odd" about this? Do you have reason to doubt the result? What result did you expect and why?
$endgroup$
– JMoravitz
Jan 19 at 4:15










2 Answers
2






active

oldest

votes


















2












$begingroup$

This is just basic algebra, namely laws of exponents:



$(t-1)^2 = (-1(1-t))^2= (-1)^2(1-t)^2 = (1-t)^2$






share|cite|improve this answer









$endgroup$









  • 2




    $begingroup$
    should have paid attention in elementary school
    $endgroup$
    – Louis Hong
    Jan 19 at 4:16








  • 1




    $begingroup$
    To really see it, let $t=3$. This says $2^2= (-2)^2$. Well, yeah.
    $endgroup$
    – Randall
    Jan 19 at 4:16



















1












$begingroup$

Forget $1-t$. Instead, think $T$. Is it so surprising/odd that $$(T)^2 = (-T)^2$$
?



Alternatively we can expand them:



$$(1-t)(1-t)=(1)(1) +(2)(1)(-t)+(-t)(-t)=1-2t+t^2$$



$$(t-1)(t-1)=(t)(t)+2(-1)(t)+(-1)(-1)=t^2-2t+1$$






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%2f3079007%2fwhy-is-1-t2-t-12-in-sagemath%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    2












    $begingroup$

    This is just basic algebra, namely laws of exponents:



    $(t-1)^2 = (-1(1-t))^2= (-1)^2(1-t)^2 = (1-t)^2$






    share|cite|improve this answer









    $endgroup$









    • 2




      $begingroup$
      should have paid attention in elementary school
      $endgroup$
      – Louis Hong
      Jan 19 at 4:16








    • 1




      $begingroup$
      To really see it, let $t=3$. This says $2^2= (-2)^2$. Well, yeah.
      $endgroup$
      – Randall
      Jan 19 at 4:16
















    2












    $begingroup$

    This is just basic algebra, namely laws of exponents:



    $(t-1)^2 = (-1(1-t))^2= (-1)^2(1-t)^2 = (1-t)^2$






    share|cite|improve this answer









    $endgroup$









    • 2




      $begingroup$
      should have paid attention in elementary school
      $endgroup$
      – Louis Hong
      Jan 19 at 4:16








    • 1




      $begingroup$
      To really see it, let $t=3$. This says $2^2= (-2)^2$. Well, yeah.
      $endgroup$
      – Randall
      Jan 19 at 4:16














    2












    2








    2





    $begingroup$

    This is just basic algebra, namely laws of exponents:



    $(t-1)^2 = (-1(1-t))^2= (-1)^2(1-t)^2 = (1-t)^2$






    share|cite|improve this answer









    $endgroup$



    This is just basic algebra, namely laws of exponents:



    $(t-1)^2 = (-1(1-t))^2= (-1)^2(1-t)^2 = (1-t)^2$







    share|cite|improve this answer












    share|cite|improve this answer



    share|cite|improve this answer










    answered Jan 19 at 4:11









    RandallRandall

    10.1k11230




    10.1k11230








    • 2




      $begingroup$
      should have paid attention in elementary school
      $endgroup$
      – Louis Hong
      Jan 19 at 4:16








    • 1




      $begingroup$
      To really see it, let $t=3$. This says $2^2= (-2)^2$. Well, yeah.
      $endgroup$
      – Randall
      Jan 19 at 4:16














    • 2




      $begingroup$
      should have paid attention in elementary school
      $endgroup$
      – Louis Hong
      Jan 19 at 4:16








    • 1




      $begingroup$
      To really see it, let $t=3$. This says $2^2= (-2)^2$. Well, yeah.
      $endgroup$
      – Randall
      Jan 19 at 4:16








    2




    2




    $begingroup$
    should have paid attention in elementary school
    $endgroup$
    – Louis Hong
    Jan 19 at 4:16






    $begingroup$
    should have paid attention in elementary school
    $endgroup$
    – Louis Hong
    Jan 19 at 4:16






    1




    1




    $begingroup$
    To really see it, let $t=3$. This says $2^2= (-2)^2$. Well, yeah.
    $endgroup$
    – Randall
    Jan 19 at 4:16




    $begingroup$
    To really see it, let $t=3$. This says $2^2= (-2)^2$. Well, yeah.
    $endgroup$
    – Randall
    Jan 19 at 4:16











    1












    $begingroup$

    Forget $1-t$. Instead, think $T$. Is it so surprising/odd that $$(T)^2 = (-T)^2$$
    ?



    Alternatively we can expand them:



    $$(1-t)(1-t)=(1)(1) +(2)(1)(-t)+(-t)(-t)=1-2t+t^2$$



    $$(t-1)(t-1)=(t)(t)+2(-1)(t)+(-1)(-1)=t^2-2t+1$$






    share|cite|improve this answer









    $endgroup$


















      1












      $begingroup$

      Forget $1-t$. Instead, think $T$. Is it so surprising/odd that $$(T)^2 = (-T)^2$$
      ?



      Alternatively we can expand them:



      $$(1-t)(1-t)=(1)(1) +(2)(1)(-t)+(-t)(-t)=1-2t+t^2$$



      $$(t-1)(t-1)=(t)(t)+2(-1)(t)+(-1)(-1)=t^2-2t+1$$






      share|cite|improve this answer









      $endgroup$
















        1












        1








        1





        $begingroup$

        Forget $1-t$. Instead, think $T$. Is it so surprising/odd that $$(T)^2 = (-T)^2$$
        ?



        Alternatively we can expand them:



        $$(1-t)(1-t)=(1)(1) +(2)(1)(-t)+(-t)(-t)=1-2t+t^2$$



        $$(t-1)(t-1)=(t)(t)+2(-1)(t)+(-1)(-1)=t^2-2t+1$$






        share|cite|improve this answer









        $endgroup$



        Forget $1-t$. Instead, think $T$. Is it so surprising/odd that $$(T)^2 = (-T)^2$$
        ?



        Alternatively we can expand them:



        $$(1-t)(1-t)=(1)(1) +(2)(1)(-t)+(-t)(-t)=1-2t+t^2$$



        $$(t-1)(t-1)=(t)(t)+2(-1)(t)+(-1)(-1)=t^2-2t+1$$







        share|cite|improve this answer












        share|cite|improve this answer



        share|cite|improve this answer










        answered Jan 19 at 4:40









        Rhys HughesRhys Hughes

        6,9441530




        6,9441530






























            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%2f3079007%2fwhy-is-1-t2-t-12-in-sagemath%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

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

            How to fix TextFormField cause rebuild widget in Flutter