$ int bigl| asin(x)+bcos(x) bigr| {rm d}x = ? $












1












$begingroup$



My friend evaluated this to be
$$
int bigl| asin(x)+bcos(x) bigr| {rm d}x \
= sqrt{a^2+b^2} left(
sin(x-phi)text{sign}(cos(x-phi))
+frac{2}{pi} bigl(x-arctan(tan(x-phi)) bigr)
right) + C
$$

where $phi = arctan left(frac{a}{b} right)$.




My answer instead is much shorter, by simply looking for the intervals of $x$ for which I need to multiply by $-1$, I got



$$
(bsin(x)-acos(x)) cdot text{sign}(asin(x)+bcos(x)) + C
$$



Why does my friend's solution look so big and complex and how did she even come up with the idea to do that?










share|cite|improve this question











$endgroup$








  • 1




    $begingroup$
    Try $b=1$, $a=0$, then you suggest $sin xcdottext{sign},cos x$ as the antiderivative, but it is not even continuous at some points.
    $endgroup$
    – A.Γ.
    Jan 2 at 16:23






  • 2




    $begingroup$
    What exactly is the point of the $frac{sqrt{cos^2(x-phi)}}{cos(x-phi)}$? It could be replaced by $text{sign}(cos(x-phi))$.
    $endgroup$
    – John Doe
    Jan 2 at 16:23












  • $begingroup$
    @A.Γ. The other solution actually also gives $sin x cdot text{sign} cos x$ in that case
    $endgroup$
    – John Doe
    Jan 2 at 16:27












  • $begingroup$
    @JohnDoe Not really, it has the extra term with $arctan$ that shifts the function in different intervals by a multiple of $2$ to make it continuous.
    $endgroup$
    – A.Γ.
    Jan 2 at 16:43












  • $begingroup$
    @A.Γ. Ah yes, you're right.
    $endgroup$
    – John Doe
    Jan 2 at 16:44
















1












$begingroup$



My friend evaluated this to be
$$
int bigl| asin(x)+bcos(x) bigr| {rm d}x \
= sqrt{a^2+b^2} left(
sin(x-phi)text{sign}(cos(x-phi))
+frac{2}{pi} bigl(x-arctan(tan(x-phi)) bigr)
right) + C
$$

where $phi = arctan left(frac{a}{b} right)$.




My answer instead is much shorter, by simply looking for the intervals of $x$ for which I need to multiply by $-1$, I got



$$
(bsin(x)-acos(x)) cdot text{sign}(asin(x)+bcos(x)) + C
$$



Why does my friend's solution look so big and complex and how did she even come up with the idea to do that?










share|cite|improve this question











$endgroup$








  • 1




    $begingroup$
    Try $b=1$, $a=0$, then you suggest $sin xcdottext{sign},cos x$ as the antiderivative, but it is not even continuous at some points.
    $endgroup$
    – A.Γ.
    Jan 2 at 16:23






  • 2




    $begingroup$
    What exactly is the point of the $frac{sqrt{cos^2(x-phi)}}{cos(x-phi)}$? It could be replaced by $text{sign}(cos(x-phi))$.
    $endgroup$
    – John Doe
    Jan 2 at 16:23












  • $begingroup$
    @A.Γ. The other solution actually also gives $sin x cdot text{sign} cos x$ in that case
    $endgroup$
    – John Doe
    Jan 2 at 16:27












  • $begingroup$
    @JohnDoe Not really, it has the extra term with $arctan$ that shifts the function in different intervals by a multiple of $2$ to make it continuous.
    $endgroup$
    – A.Γ.
    Jan 2 at 16:43












  • $begingroup$
    @A.Γ. Ah yes, you're right.
    $endgroup$
    – John Doe
    Jan 2 at 16:44














1












1








1





$begingroup$



My friend evaluated this to be
$$
int bigl| asin(x)+bcos(x) bigr| {rm d}x \
= sqrt{a^2+b^2} left(
sin(x-phi)text{sign}(cos(x-phi))
+frac{2}{pi} bigl(x-arctan(tan(x-phi)) bigr)
right) + C
$$

where $phi = arctan left(frac{a}{b} right)$.




My answer instead is much shorter, by simply looking for the intervals of $x$ for which I need to multiply by $-1$, I got



$$
(bsin(x)-acos(x)) cdot text{sign}(asin(x)+bcos(x)) + C
$$



Why does my friend's solution look so big and complex and how did she even come up with the idea to do that?










share|cite|improve this question











$endgroup$





My friend evaluated this to be
$$
int bigl| asin(x)+bcos(x) bigr| {rm d}x \
= sqrt{a^2+b^2} left(
sin(x-phi)text{sign}(cos(x-phi))
+frac{2}{pi} bigl(x-arctan(tan(x-phi)) bigr)
right) + C
$$

where $phi = arctan left(frac{a}{b} right)$.




My answer instead is much shorter, by simply looking for the intervals of $x$ for which I need to multiply by $-1$, I got



$$
(bsin(x)-acos(x)) cdot text{sign}(asin(x)+bcos(x)) + C
$$



Why does my friend's solution look so big and complex and how did she even come up with the idea to do that?







calculus integration indefinite-integrals absolute-value trigonometric-integrals






share|cite|improve this question















share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








edited Jan 4 at 14:29







Mint

















asked Jan 2 at 16:14









MintMint

5301417




5301417








  • 1




    $begingroup$
    Try $b=1$, $a=0$, then you suggest $sin xcdottext{sign},cos x$ as the antiderivative, but it is not even continuous at some points.
    $endgroup$
    – A.Γ.
    Jan 2 at 16:23






  • 2




    $begingroup$
    What exactly is the point of the $frac{sqrt{cos^2(x-phi)}}{cos(x-phi)}$? It could be replaced by $text{sign}(cos(x-phi))$.
    $endgroup$
    – John Doe
    Jan 2 at 16:23












  • $begingroup$
    @A.Γ. The other solution actually also gives $sin x cdot text{sign} cos x$ in that case
    $endgroup$
    – John Doe
    Jan 2 at 16:27












  • $begingroup$
    @JohnDoe Not really, it has the extra term with $arctan$ that shifts the function in different intervals by a multiple of $2$ to make it continuous.
    $endgroup$
    – A.Γ.
    Jan 2 at 16:43












  • $begingroup$
    @A.Γ. Ah yes, you're right.
    $endgroup$
    – John Doe
    Jan 2 at 16:44














  • 1




    $begingroup$
    Try $b=1$, $a=0$, then you suggest $sin xcdottext{sign},cos x$ as the antiderivative, but it is not even continuous at some points.
    $endgroup$
    – A.Γ.
    Jan 2 at 16:23






  • 2




    $begingroup$
    What exactly is the point of the $frac{sqrt{cos^2(x-phi)}}{cos(x-phi)}$? It could be replaced by $text{sign}(cos(x-phi))$.
    $endgroup$
    – John Doe
    Jan 2 at 16:23












  • $begingroup$
    @A.Γ. The other solution actually also gives $sin x cdot text{sign} cos x$ in that case
    $endgroup$
    – John Doe
    Jan 2 at 16:27












  • $begingroup$
    @JohnDoe Not really, it has the extra term with $arctan$ that shifts the function in different intervals by a multiple of $2$ to make it continuous.
    $endgroup$
    – A.Γ.
    Jan 2 at 16:43












  • $begingroup$
    @A.Γ. Ah yes, you're right.
    $endgroup$
    – John Doe
    Jan 2 at 16:44








1




1




$begingroup$
Try $b=1$, $a=0$, then you suggest $sin xcdottext{sign},cos x$ as the antiderivative, but it is not even continuous at some points.
$endgroup$
– A.Γ.
Jan 2 at 16:23




$begingroup$
Try $b=1$, $a=0$, then you suggest $sin xcdottext{sign},cos x$ as the antiderivative, but it is not even continuous at some points.
$endgroup$
– A.Γ.
Jan 2 at 16:23




2




2




$begingroup$
What exactly is the point of the $frac{sqrt{cos^2(x-phi)}}{cos(x-phi)}$? It could be replaced by $text{sign}(cos(x-phi))$.
$endgroup$
– John Doe
Jan 2 at 16:23






$begingroup$
What exactly is the point of the $frac{sqrt{cos^2(x-phi)}}{cos(x-phi)}$? It could be replaced by $text{sign}(cos(x-phi))$.
$endgroup$
– John Doe
Jan 2 at 16:23














$begingroup$
@A.Γ. The other solution actually also gives $sin x cdot text{sign} cos x$ in that case
$endgroup$
– John Doe
Jan 2 at 16:27






$begingroup$
@A.Γ. The other solution actually also gives $sin x cdot text{sign} cos x$ in that case
$endgroup$
– John Doe
Jan 2 at 16:27














$begingroup$
@JohnDoe Not really, it has the extra term with $arctan$ that shifts the function in different intervals by a multiple of $2$ to make it continuous.
$endgroup$
– A.Γ.
Jan 2 at 16:43






$begingroup$
@JohnDoe Not really, it has the extra term with $arctan$ that shifts the function in different intervals by a multiple of $2$ to make it continuous.
$endgroup$
– A.Γ.
Jan 2 at 16:43














$begingroup$
@A.Γ. Ah yes, you're right.
$endgroup$
– John Doe
Jan 2 at 16:44




$begingroup$
@A.Γ. Ah yes, you're right.
$endgroup$
– John Doe
Jan 2 at 16:44










1 Answer
1






active

oldest

votes


















3












$begingroup$

She is probably starting by replacing the $asin x + bcos x$ and rewriting in terms of a function with an amplitude and phase. One way to do this is to multiply by $1$ and draw a right triangle with angle $phi$, adjacent side length $b$, and opposite side length $a$. Then one has



$$begin{aligned} left|asin x + bcos xright| &= sqrt{a^{2}+b^{2}}left|frac{a}{sqrt{a^{2}+b^{2}}},sin x + frac{b}{sqrt{a^{2}+b^{2}}},cos xright| \
&= sqrt{a^{2}+b^{2}}left|sinphisin x + cosphicos xright| \
&= sqrt{a^{2}+b^{2}}left|cos(x-phi)right|.end{aligned}$$



This procedure is motivated in physics/engineering as a more elegant way of writing solutions to the harmonic oscillator equation, as amplitude and phase both have physical interpretations and are often easier to determine given initial conditions.






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%2f3059660%2fint-bigl-a-sinxb-cosx-bigr-rm-dx%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    3












    $begingroup$

    She is probably starting by replacing the $asin x + bcos x$ and rewriting in terms of a function with an amplitude and phase. One way to do this is to multiply by $1$ and draw a right triangle with angle $phi$, adjacent side length $b$, and opposite side length $a$. Then one has



    $$begin{aligned} left|asin x + bcos xright| &= sqrt{a^{2}+b^{2}}left|frac{a}{sqrt{a^{2}+b^{2}}},sin x + frac{b}{sqrt{a^{2}+b^{2}}},cos xright| \
    &= sqrt{a^{2}+b^{2}}left|sinphisin x + cosphicos xright| \
    &= sqrt{a^{2}+b^{2}}left|cos(x-phi)right|.end{aligned}$$



    This procedure is motivated in physics/engineering as a more elegant way of writing solutions to the harmonic oscillator equation, as amplitude and phase both have physical interpretations and are often easier to determine given initial conditions.






    share|cite|improve this answer









    $endgroup$


















      3












      $begingroup$

      She is probably starting by replacing the $asin x + bcos x$ and rewriting in terms of a function with an amplitude and phase. One way to do this is to multiply by $1$ and draw a right triangle with angle $phi$, adjacent side length $b$, and opposite side length $a$. Then one has



      $$begin{aligned} left|asin x + bcos xright| &= sqrt{a^{2}+b^{2}}left|frac{a}{sqrt{a^{2}+b^{2}}},sin x + frac{b}{sqrt{a^{2}+b^{2}}},cos xright| \
      &= sqrt{a^{2}+b^{2}}left|sinphisin x + cosphicos xright| \
      &= sqrt{a^{2}+b^{2}}left|cos(x-phi)right|.end{aligned}$$



      This procedure is motivated in physics/engineering as a more elegant way of writing solutions to the harmonic oscillator equation, as amplitude and phase both have physical interpretations and are often easier to determine given initial conditions.






      share|cite|improve this answer









      $endgroup$
















        3












        3








        3





        $begingroup$

        She is probably starting by replacing the $asin x + bcos x$ and rewriting in terms of a function with an amplitude and phase. One way to do this is to multiply by $1$ and draw a right triangle with angle $phi$, adjacent side length $b$, and opposite side length $a$. Then one has



        $$begin{aligned} left|asin x + bcos xright| &= sqrt{a^{2}+b^{2}}left|frac{a}{sqrt{a^{2}+b^{2}}},sin x + frac{b}{sqrt{a^{2}+b^{2}}},cos xright| \
        &= sqrt{a^{2}+b^{2}}left|sinphisin x + cosphicos xright| \
        &= sqrt{a^{2}+b^{2}}left|cos(x-phi)right|.end{aligned}$$



        This procedure is motivated in physics/engineering as a more elegant way of writing solutions to the harmonic oscillator equation, as amplitude and phase both have physical interpretations and are often easier to determine given initial conditions.






        share|cite|improve this answer









        $endgroup$



        She is probably starting by replacing the $asin x + bcos x$ and rewriting in terms of a function with an amplitude and phase. One way to do this is to multiply by $1$ and draw a right triangle with angle $phi$, adjacent side length $b$, and opposite side length $a$. Then one has



        $$begin{aligned} left|asin x + bcos xright| &= sqrt{a^{2}+b^{2}}left|frac{a}{sqrt{a^{2}+b^{2}}},sin x + frac{b}{sqrt{a^{2}+b^{2}}},cos xright| \
        &= sqrt{a^{2}+b^{2}}left|sinphisin x + cosphicos xright| \
        &= sqrt{a^{2}+b^{2}}left|cos(x-phi)right|.end{aligned}$$



        This procedure is motivated in physics/engineering as a more elegant way of writing solutions to the harmonic oscillator equation, as amplitude and phase both have physical interpretations and are often easier to determine given initial conditions.







        share|cite|improve this answer












        share|cite|improve this answer



        share|cite|improve this answer










        answered Jan 2 at 18:33









        IninterrompueIninterrompue

        63519




        63519






























            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%2f3059660%2fint-bigl-a-sinxb-cosx-bigr-rm-dx%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

            Can a sorcerer learn a 5th-level spell early by creating spell slots using the Font of Magic feature?

            Does disintegrating a polymorphed enemy still kill it after the 2018 errata?

            A Topological Invariant for $pi_3(U(n))$