Solving Cauchy's problem with a discontinuous function












0














I have the Cauchy problem: $$begin{cases} f'=g(t)+2(f-5) \ f(0)=2end{cases}$$



Now $g(t)$ is a periodic function: $$g(t)=begin{cases} 0,tin(24k,24k+8)\
2,tnotin(24k,24k+8) end{cases}$$



for $k=1,2,3...$
How can I solve this Cauchy Problem? Since $g$ is not continuous I don't know what to do.



I am using sagemath to solve it.










share|cite|improve this question


















  • 1




    Use Laplace transform.
    – Jacky Chong
    Nov 24 at 0:47
















0














I have the Cauchy problem: $$begin{cases} f'=g(t)+2(f-5) \ f(0)=2end{cases}$$



Now $g(t)$ is a periodic function: $$g(t)=begin{cases} 0,tin(24k,24k+8)\
2,tnotin(24k,24k+8) end{cases}$$



for $k=1,2,3...$
How can I solve this Cauchy Problem? Since $g$ is not continuous I don't know what to do.



I am using sagemath to solve it.










share|cite|improve this question


















  • 1




    Use Laplace transform.
    – Jacky Chong
    Nov 24 at 0:47














0












0








0







I have the Cauchy problem: $$begin{cases} f'=g(t)+2(f-5) \ f(0)=2end{cases}$$



Now $g(t)$ is a periodic function: $$g(t)=begin{cases} 0,tin(24k,24k+8)\
2,tnotin(24k,24k+8) end{cases}$$



for $k=1,2,3...$
How can I solve this Cauchy Problem? Since $g$ is not continuous I don't know what to do.



I am using sagemath to solve it.










share|cite|improve this question













I have the Cauchy problem: $$begin{cases} f'=g(t)+2(f-5) \ f(0)=2end{cases}$$



Now $g(t)$ is a periodic function: $$g(t)=begin{cases} 0,tin(24k,24k+8)\
2,tnotin(24k,24k+8) end{cases}$$



for $k=1,2,3...$
How can I solve this Cauchy Problem? Since $g$ is not continuous I don't know what to do.



I am using sagemath to solve it.







differential-equations initial-value-problems sagemath cauchy-problem






share|cite|improve this question













share|cite|improve this question











share|cite|improve this question




share|cite|improve this question










asked Nov 24 at 0:44









John Keeper

540313




540313








  • 1




    Use Laplace transform.
    – Jacky Chong
    Nov 24 at 0:47














  • 1




    Use Laplace transform.
    – Jacky Chong
    Nov 24 at 0:47








1




1




Use Laplace transform.
– Jacky Chong
Nov 24 at 0:47




Use Laplace transform.
– Jacky Chong
Nov 24 at 0:47










1 Answer
1






active

oldest

votes


















0














Rewrite as



$$ f' - 2f = g - 10 $$



A Fourier method is appropriate here. Since $g$ has a period of $24$, we can assume a series solution of similar periodicity



$$ f(t) = f_0 + sum_{n=1}^infty left[f_ncosleft(frac{npi}{12}tright) + f_n^*sinleft(frac{npi}{12}tright) right]$$



Next, decompose $g$ to its Fourier series



$$ g(t) = g_0 + sum_{n=1}^infty left[g_ncosleft(frac{npi}{12}tright) + g_n^*sinleft(frac{npi}{12}tright) right] $$



From the usual definitions:



$$ g_0 = frac{1}{24}int_0^{24} g(t) dt = int_8^{24} 2 dt = frac{4}{3} $$
$$ g_n = frac{1}{12}int_ 8^{24} 2cosleft(frac{npi}{12}tright) dt = -frac{2}{npi}sin frac{2npi}{3} $$
$$ g_n^* = frac{1}{12}int_8^{24} 2sinleft(frac{npi}{12}tright)dt = -frac{2}{npi}left[1-cos frac{2npi}{3} right] $$



Plug in the 2 series and compare coefficients, we get:



$$ -2f_0 = g_0 - 10 $$
$$ -2f_n + frac{npi}{12}f_n^* = g_n $$
$$ -2f_n^* - frac{npi}{12}f_n = g_n^* $$



Solve the above system of the equations to find $f_n$ and $f_n^*$






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%2f3011031%2fsolving-cauchys-problem-with-a-discontinuous-function%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









    0














    Rewrite as



    $$ f' - 2f = g - 10 $$



    A Fourier method is appropriate here. Since $g$ has a period of $24$, we can assume a series solution of similar periodicity



    $$ f(t) = f_0 + sum_{n=1}^infty left[f_ncosleft(frac{npi}{12}tright) + f_n^*sinleft(frac{npi}{12}tright) right]$$



    Next, decompose $g$ to its Fourier series



    $$ g(t) = g_0 + sum_{n=1}^infty left[g_ncosleft(frac{npi}{12}tright) + g_n^*sinleft(frac{npi}{12}tright) right] $$



    From the usual definitions:



    $$ g_0 = frac{1}{24}int_0^{24} g(t) dt = int_8^{24} 2 dt = frac{4}{3} $$
    $$ g_n = frac{1}{12}int_ 8^{24} 2cosleft(frac{npi}{12}tright) dt = -frac{2}{npi}sin frac{2npi}{3} $$
    $$ g_n^* = frac{1}{12}int_8^{24} 2sinleft(frac{npi}{12}tright)dt = -frac{2}{npi}left[1-cos frac{2npi}{3} right] $$



    Plug in the 2 series and compare coefficients, we get:



    $$ -2f_0 = g_0 - 10 $$
    $$ -2f_n + frac{npi}{12}f_n^* = g_n $$
    $$ -2f_n^* - frac{npi}{12}f_n = g_n^* $$



    Solve the above system of the equations to find $f_n$ and $f_n^*$






    share|cite|improve this answer




























      0














      Rewrite as



      $$ f' - 2f = g - 10 $$



      A Fourier method is appropriate here. Since $g$ has a period of $24$, we can assume a series solution of similar periodicity



      $$ f(t) = f_0 + sum_{n=1}^infty left[f_ncosleft(frac{npi}{12}tright) + f_n^*sinleft(frac{npi}{12}tright) right]$$



      Next, decompose $g$ to its Fourier series



      $$ g(t) = g_0 + sum_{n=1}^infty left[g_ncosleft(frac{npi}{12}tright) + g_n^*sinleft(frac{npi}{12}tright) right] $$



      From the usual definitions:



      $$ g_0 = frac{1}{24}int_0^{24} g(t) dt = int_8^{24} 2 dt = frac{4}{3} $$
      $$ g_n = frac{1}{12}int_ 8^{24} 2cosleft(frac{npi}{12}tright) dt = -frac{2}{npi}sin frac{2npi}{3} $$
      $$ g_n^* = frac{1}{12}int_8^{24} 2sinleft(frac{npi}{12}tright)dt = -frac{2}{npi}left[1-cos frac{2npi}{3} right] $$



      Plug in the 2 series and compare coefficients, we get:



      $$ -2f_0 = g_0 - 10 $$
      $$ -2f_n + frac{npi}{12}f_n^* = g_n $$
      $$ -2f_n^* - frac{npi}{12}f_n = g_n^* $$



      Solve the above system of the equations to find $f_n$ and $f_n^*$






      share|cite|improve this answer


























        0












        0








        0






        Rewrite as



        $$ f' - 2f = g - 10 $$



        A Fourier method is appropriate here. Since $g$ has a period of $24$, we can assume a series solution of similar periodicity



        $$ f(t) = f_0 + sum_{n=1}^infty left[f_ncosleft(frac{npi}{12}tright) + f_n^*sinleft(frac{npi}{12}tright) right]$$



        Next, decompose $g$ to its Fourier series



        $$ g(t) = g_0 + sum_{n=1}^infty left[g_ncosleft(frac{npi}{12}tright) + g_n^*sinleft(frac{npi}{12}tright) right] $$



        From the usual definitions:



        $$ g_0 = frac{1}{24}int_0^{24} g(t) dt = int_8^{24} 2 dt = frac{4}{3} $$
        $$ g_n = frac{1}{12}int_ 8^{24} 2cosleft(frac{npi}{12}tright) dt = -frac{2}{npi}sin frac{2npi}{3} $$
        $$ g_n^* = frac{1}{12}int_8^{24} 2sinleft(frac{npi}{12}tright)dt = -frac{2}{npi}left[1-cos frac{2npi}{3} right] $$



        Plug in the 2 series and compare coefficients, we get:



        $$ -2f_0 = g_0 - 10 $$
        $$ -2f_n + frac{npi}{12}f_n^* = g_n $$
        $$ -2f_n^* - frac{npi}{12}f_n = g_n^* $$



        Solve the above system of the equations to find $f_n$ and $f_n^*$






        share|cite|improve this answer














        Rewrite as



        $$ f' - 2f = g - 10 $$



        A Fourier method is appropriate here. Since $g$ has a period of $24$, we can assume a series solution of similar periodicity



        $$ f(t) = f_0 + sum_{n=1}^infty left[f_ncosleft(frac{npi}{12}tright) + f_n^*sinleft(frac{npi}{12}tright) right]$$



        Next, decompose $g$ to its Fourier series



        $$ g(t) = g_0 + sum_{n=1}^infty left[g_ncosleft(frac{npi}{12}tright) + g_n^*sinleft(frac{npi}{12}tright) right] $$



        From the usual definitions:



        $$ g_0 = frac{1}{24}int_0^{24} g(t) dt = int_8^{24} 2 dt = frac{4}{3} $$
        $$ g_n = frac{1}{12}int_ 8^{24} 2cosleft(frac{npi}{12}tright) dt = -frac{2}{npi}sin frac{2npi}{3} $$
        $$ g_n^* = frac{1}{12}int_8^{24} 2sinleft(frac{npi}{12}tright)dt = -frac{2}{npi}left[1-cos frac{2npi}{3} right] $$



        Plug in the 2 series and compare coefficients, we get:



        $$ -2f_0 = g_0 - 10 $$
        $$ -2f_n + frac{npi}{12}f_n^* = g_n $$
        $$ -2f_n^* - frac{npi}{12}f_n = g_n^* $$



        Solve the above system of the equations to find $f_n$ and $f_n^*$







        share|cite|improve this answer














        share|cite|improve this answer



        share|cite|improve this answer








        edited Nov 25 at 12:12

























        answered Nov 25 at 10:23









        Dylan

        12.1k31026




        12.1k31026






























            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%2f3011031%2fsolving-cauchys-problem-with-a-discontinuous-function%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

            Mont Emei

            Province de Neuquén

            Journaliste