2nd Order ODE (Variation of Parameter) Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern)Higher order derivatives: variation of parametersprivate solution after solving nonhomogenous euler equationMethod of Variation of Parameters - Assigning zero works?Using variation of parameters method to solve ODE $y'' + 4y' + 3y = 65cos(2x)$Variation of parameters (issue with the constants)How to Solve this Particular Euler Differential Equation?Why I can not solve this differential equation?Deterministic Variation of Parameters - Differential EquationsInhomogenous Euler-Cauchy ODE with small parameter $epsilon$Second Order ODE $y'' - 2y' + y = e^2x$ by Method of Variation of Parameters

How do living politicians protect their readily obtainable signatures from misuse?

Can you force honesty by using the Speak with Dead and Zone of Truth spells together?

Flight departed from the gate 5 min before scheduled departure time. Refund options

How does light 'choose' between wave and particle behaviour?

Getting out of while loop on console

Nose gear failure in single prop aircraft: belly landing or nose-gear up landing?

Found this skink in my tomato plant bucket. Is he trapped? Or could he leave if he wanted?

A term for a woman complaining about things/begging in a cute/childish way

New Order #6: Easter Egg

Monty Hall Problem-Probability Paradox

Is there hard evidence that the grant peer review system performs significantly better than random?

Should a wizard buy fine inks every time he want to copy spells into his spellbook?

Would color changing eyes affect vision?

AppleTVs create a chatty alternate WiFi network

GDP with Intermediate Production

Is there public access to the Meteor Crater in Arizona?

What does this say in Elvish?

Why datecode is SO IMPORTANT to chip manufacturers?

Tannaka duality for semisimple groups

Why not send Voyager 3 and 4 following up the paths taken by Voyager 1 and 2 to re-transmit signals of later as they fly away from Earth?

How to write capital alpha?

In musical terms, what properties are varied by the human voice to produce different words / syllables?

Does silver oxide react with hydrogen sulfide?

What initially awakened the Balrog?



2nd Order ODE (Variation of Parameter)



Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern)Higher order derivatives: variation of parametersprivate solution after solving nonhomogenous euler equationMethod of Variation of Parameters - Assigning zero works?Using variation of parameters method to solve ODE $y'' + 4y' + 3y = 65cos(2x)$Variation of parameters (issue with the constants)How to Solve this Particular Euler Differential Equation?Why I can not solve this differential equation?Deterministic Variation of Parameters - Differential EquationsInhomogenous Euler-Cauchy ODE with small parameter $epsilon$Second Order ODE $y'' - 2y' + y = e^2x$ by Method of Variation of Parameters










0












$begingroup$


I am given the equation
$$ y''+y = xcos x - cos x $$
with initial values of
$$y(0)=1, y'(0)= 1/4,$$and I believe this needs to be solved using the method of variation of parameters, though I'm unsure, because after solving the characteristic equation $$m^2+1 =0$$ $$m = -i, i$$
I'm left with $$y_h = C_1sin x + C_2cos x,$$and I'm not sure where to move forward from there. I tried taking the Wronskian ($W=1$), and finding $W_1, W_2$ but I'm getting stuck on extremely long integrals to find $u_1, u_2$.



Any help for next steps or an alternative method would be greatly appreciated.










share|cite|improve this question











$endgroup$











  • $begingroup$
    You could also use the methods of undetermined coefficients; have you seen this?
    $endgroup$
    – StackTD
    Apr 2 at 8:29










  • $begingroup$
    @Robert Schwartz. See the continuation of your solving (with the Wronskian) in my answer below.
    $endgroup$
    – JJacquelin
    Apr 2 at 10:40















0












$begingroup$


I am given the equation
$$ y''+y = xcos x - cos x $$
with initial values of
$$y(0)=1, y'(0)= 1/4,$$and I believe this needs to be solved using the method of variation of parameters, though I'm unsure, because after solving the characteristic equation $$m^2+1 =0$$ $$m = -i, i$$
I'm left with $$y_h = C_1sin x + C_2cos x,$$and I'm not sure where to move forward from there. I tried taking the Wronskian ($W=1$), and finding $W_1, W_2$ but I'm getting stuck on extremely long integrals to find $u_1, u_2$.



Any help for next steps or an alternative method would be greatly appreciated.










share|cite|improve this question











$endgroup$











  • $begingroup$
    You could also use the methods of undetermined coefficients; have you seen this?
    $endgroup$
    – StackTD
    Apr 2 at 8:29










  • $begingroup$
    @Robert Schwartz. See the continuation of your solving (with the Wronskian) in my answer below.
    $endgroup$
    – JJacquelin
    Apr 2 at 10:40













0












0








0





$begingroup$


I am given the equation
$$ y''+y = xcos x - cos x $$
with initial values of
$$y(0)=1, y'(0)= 1/4,$$and I believe this needs to be solved using the method of variation of parameters, though I'm unsure, because after solving the characteristic equation $$m^2+1 =0$$ $$m = -i, i$$
I'm left with $$y_h = C_1sin x + C_2cos x,$$and I'm not sure where to move forward from there. I tried taking the Wronskian ($W=1$), and finding $W_1, W_2$ but I'm getting stuck on extremely long integrals to find $u_1, u_2$.



Any help for next steps or an alternative method would be greatly appreciated.










share|cite|improve this question











$endgroup$




I am given the equation
$$ y''+y = xcos x - cos x $$
with initial values of
$$y(0)=1, y'(0)= 1/4,$$and I believe this needs to be solved using the method of variation of parameters, though I'm unsure, because after solving the characteristic equation $$m^2+1 =0$$ $$m = -i, i$$
I'm left with $$y_h = C_1sin x + C_2cos x,$$and I'm not sure where to move forward from there. I tried taking the Wronskian ($W=1$), and finding $W_1, W_2$ but I'm getting stuck on extremely long integrals to find $u_1, u_2$.



Any help for next steps or an alternative method would be greatly appreciated.







ordinary-differential-equations homogeneous-equation






share|cite|improve this question















share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








edited Apr 2 at 8:59









Dylan

14.6k31127




14.6k31127










asked Apr 2 at 8:27









Robert SchwartzRobert Schwartz

62




62











  • $begingroup$
    You could also use the methods of undetermined coefficients; have you seen this?
    $endgroup$
    – StackTD
    Apr 2 at 8:29










  • $begingroup$
    @Robert Schwartz. See the continuation of your solving (with the Wronskian) in my answer below.
    $endgroup$
    – JJacquelin
    Apr 2 at 10:40
















  • $begingroup$
    You could also use the methods of undetermined coefficients; have you seen this?
    $endgroup$
    – StackTD
    Apr 2 at 8:29










  • $begingroup$
    @Robert Schwartz. See the continuation of your solving (with the Wronskian) in my answer below.
    $endgroup$
    – JJacquelin
    Apr 2 at 10:40















$begingroup$
You could also use the methods of undetermined coefficients; have you seen this?
$endgroup$
– StackTD
Apr 2 at 8:29




$begingroup$
You could also use the methods of undetermined coefficients; have you seen this?
$endgroup$
– StackTD
Apr 2 at 8:29












$begingroup$
@Robert Schwartz. See the continuation of your solving (with the Wronskian) in my answer below.
$endgroup$
– JJacquelin
Apr 2 at 10:40




$begingroup$
@Robert Schwartz. See the continuation of your solving (with the Wronskian) in my answer below.
$endgroup$
– JJacquelin
Apr 2 at 10:40










5 Answers
5






active

oldest

votes


















2












$begingroup$


I believe this needs to be solved using the method of variation of parameters, though I'm unsure, (...) but I'm getting stuck on extremely long integrals



Any help for next steps or an alternative method would be greatly appreciated.




Alternatively, using the method of undetermined coefficients, you would propose a particular solution of the form:
$$y_p=(Ax+B)sin x + (Cx+D)cos x$$
but since (a part of) this solution is already contained in the homogeneous solution, you alter this to:
$$beginaligny_p
& =(Ax+B)colorredxsin x + (Cx+D)colorredxcos x \
& =(Ax^2+Bx)sin x + (Cx^2+Dx)cos x
endalign$$

Substitution of this proposed particular solution into the differential equation leads to a linear system of four equations in the four unknowns $A,B,C,D$; no messy integrals.






share|cite|improve this answer











$endgroup$












  • $begingroup$
    Once I have the particular solution $y_p$, what should my next steps be for solving the equation with the initial values?
    $endgroup$
    – Robert Schwartz
    Apr 2 at 9:01










  • $begingroup$
    Use the initial values to determine the $C_1$ and $C_2$ of the homogeneous solution; it doesn't matter how you found a particular solution.
    $endgroup$
    – StackTD
    Apr 2 at 9:03










  • $begingroup$
    I ended up solving for $y_g=y_h+y_p=(1/4x-1/2)xsinx-(1/4)xcosx+cosx+(1/4)sinx$
    $endgroup$
    – Robert Schwartz
    Apr 2 at 9:23










  • $begingroup$
    In the part of the particular solution, you should get $tfrac14xcos x$ (without the minus) and that would cause the $tfrac14sin x$ to disappear.
    $endgroup$
    – StackTD
    Apr 2 at 9:27


















1












$begingroup$

$$y ″ + y = (x-1)cos(x) $$



They are several methods to solve it.



The method of variation of parameters (involving Wronskian) is not the simplest in the present case. Nevertheless, since it is the method that the OP want, we will use this method.



Solving the associated homogeneous equation $y ″ + y = 0$ leads to the two linearly independent solutions $u_1=sin(x)$ and $u_2=cos(x)$ .



The Wronskian of these two functions is
$$W=left|left|beginmatrix
sin(x) & cos(x) \
cos(x) & -sin(x) \
endmatrixright|right|=-1$$

The solution of the non-homogeneous ODE is on the form :
$$y(x)=A(x)u_1(x)+B(x)u_2(x)$$
With $R(x)=(x-1)cos(x)$ the non-homogeneous term.
$$A(x)=-int frac1Wu_2(x) R(x)dx=int (x-1)cos^2(x)dx$$
$$B(x)=int frac1Wu_1(x) R(x)dx=-int (x-1)cos(x)sin(x)dx$$
$$A(x)= frac14 x^2-frac12 x-frac12(x-1)sin(x)cos(x)+frac14 cos^2(x)+C_1$$
$$B(x)=frac14 x-frac12(x-1)cos^2(x)-frac14sin(x)cos(x)+C_2$$
$y(x)=left(frac14 x^2-frac12 x-frac12(x-1)sin(x)cos(x)+frac14 cos^2(x)+C_1 right)sin(x)+left(frac14 x-frac12(x-1)cos^2(x)-frac14sin(x)cos(x)+C_2 right)cos(x)$



After simplification :
$$boxedy(x)=C_1sin(x)+C'_2cos(x)+frac14 x^2sin(x)-frac12 xsin(x)+frac14 xcos(x)$$
$C'_2=C_2-frac12$






share|cite|improve this answer











$endgroup$




















    0












    $begingroup$

    Your equation is of the form $(D^2+1) y = x cos x - cos x$. If you apply the differential operator $(D^2+1)^2$, you get the equation $(D^2+1)^3 y = 0$, that has the solution $y = (ax^2+bx+c) cos x + (dx^2+e x + f)sin x$. This indicates that a particular solution can take the form $y_p = (ax^2+bx) cos x + (d x^2 + e x)sin x$. Plugging the function into the equation you can compute the coefficients and get
    $$
    y_p(x)=frac 14 x cos x + (frac 14 x^2-frac 12 x) sin x
    $$



    The general solution is then given by



    $$
    y(x)=y_h(x)+y_p(x)
    $$






    share|cite|improve this answer









    $endgroup$




















      0












      $begingroup$

      We have that



      $$
      y = y_h + y_p
      $$



      with



      $$
      y_h = c_1 cos x+c_2 sin x
      $$



      Making $y_p = c_1(x) cos x+c_2(x) sin x$ and substituting into the particular we have



      $$
      (c_1''(x)+2c_2'(x)-x+1)cos x+(c_2''(x)-2c_1'(x))sin x = 0
      $$



      then choosing $c_1(x), c_2(x)$ such that



      $$
      c_1''(x)+2c_2'(x)-x+1 = 0\
      c_2''(x)-2c_1'(x) = 0
      $$



      and after solving for $c_1(x), c_2(x)$ we have



      $$
      y = (c_1 + c_1(x))cos x+(c_2 + c_2(x))sin x
      $$



      NOTE



      This kind of problem can be easily solved with the help of the Laplace transform.






      share|cite|improve this answer









      $endgroup$




















        0












        $begingroup$

        Trying to find the solution by variation of parameters one proceeds with the parametrization of the general solution as
        $$
        y(x)=c_1(x)cos(x)+c_2(x)sin(x).
        $$

        In the first derivative one fixes the relation between $c_1$ and $c_2$ by demanding




        $$
        c_1'(x)cos(x)+c_2'(x)sin(x)=0
        $$




        The remaining terms of the first derivative are
        $$
        y'(x)=-c_1(x)sin(x)+c_2(x)cos(x).
        $$

        Then insert the second derivative into the ODE which gives




        $$
        -c_1'(x)sin(x)+c_2'(x)cos(x)=(x-1)cos(x).
        $$




        Now isolating the derivatives can be done via the trigonometric identity $cos^2(x)+sin^2(x)=1$ to find
        beginalign
        c_1'(x)&=-(x-1)cos(x)sin(x),\
        c_2'(x)&=(x-1)cos^2(x).
        endalign

        This can now be integrated via the double-angle identities and partial integration.



        Another way to look at this is to write the linear system in matrix form
        $$
        pmatrixcos x&sin x\-sin x&cos x
        pmatrixc_1'(x)\c_2'(x)
        =
        pmatrix0\(x-1)cos x
        $$

        where the system matrix can be identified with the Wronski-matrix of the fundamental system $(cos x, sin x)$. The Wronskian determinant is $1$, so that solving the system proceeds by multiplying with the transpose matrix, giving the same derivatives.






        share|cite|improve this answer











        $endgroup$













          Your Answer








          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%2f3171618%2f2nd-order-ode-variation-of-parameter%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          5 Answers
          5






          active

          oldest

          votes








          5 Answers
          5






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          2












          $begingroup$


          I believe this needs to be solved using the method of variation of parameters, though I'm unsure, (...) but I'm getting stuck on extremely long integrals



          Any help for next steps or an alternative method would be greatly appreciated.




          Alternatively, using the method of undetermined coefficients, you would propose a particular solution of the form:
          $$y_p=(Ax+B)sin x + (Cx+D)cos x$$
          but since (a part of) this solution is already contained in the homogeneous solution, you alter this to:
          $$beginaligny_p
          & =(Ax+B)colorredxsin x + (Cx+D)colorredxcos x \
          & =(Ax^2+Bx)sin x + (Cx^2+Dx)cos x
          endalign$$

          Substitution of this proposed particular solution into the differential equation leads to a linear system of four equations in the four unknowns $A,B,C,D$; no messy integrals.






          share|cite|improve this answer











          $endgroup$












          • $begingroup$
            Once I have the particular solution $y_p$, what should my next steps be for solving the equation with the initial values?
            $endgroup$
            – Robert Schwartz
            Apr 2 at 9:01










          • $begingroup$
            Use the initial values to determine the $C_1$ and $C_2$ of the homogeneous solution; it doesn't matter how you found a particular solution.
            $endgroup$
            – StackTD
            Apr 2 at 9:03










          • $begingroup$
            I ended up solving for $y_g=y_h+y_p=(1/4x-1/2)xsinx-(1/4)xcosx+cosx+(1/4)sinx$
            $endgroup$
            – Robert Schwartz
            Apr 2 at 9:23










          • $begingroup$
            In the part of the particular solution, you should get $tfrac14xcos x$ (without the minus) and that would cause the $tfrac14sin x$ to disappear.
            $endgroup$
            – StackTD
            Apr 2 at 9:27















          2












          $begingroup$


          I believe this needs to be solved using the method of variation of parameters, though I'm unsure, (...) but I'm getting stuck on extremely long integrals



          Any help for next steps or an alternative method would be greatly appreciated.




          Alternatively, using the method of undetermined coefficients, you would propose a particular solution of the form:
          $$y_p=(Ax+B)sin x + (Cx+D)cos x$$
          but since (a part of) this solution is already contained in the homogeneous solution, you alter this to:
          $$beginaligny_p
          & =(Ax+B)colorredxsin x + (Cx+D)colorredxcos x \
          & =(Ax^2+Bx)sin x + (Cx^2+Dx)cos x
          endalign$$

          Substitution of this proposed particular solution into the differential equation leads to a linear system of four equations in the four unknowns $A,B,C,D$; no messy integrals.






          share|cite|improve this answer











          $endgroup$












          • $begingroup$
            Once I have the particular solution $y_p$, what should my next steps be for solving the equation with the initial values?
            $endgroup$
            – Robert Schwartz
            Apr 2 at 9:01










          • $begingroup$
            Use the initial values to determine the $C_1$ and $C_2$ of the homogeneous solution; it doesn't matter how you found a particular solution.
            $endgroup$
            – StackTD
            Apr 2 at 9:03










          • $begingroup$
            I ended up solving for $y_g=y_h+y_p=(1/4x-1/2)xsinx-(1/4)xcosx+cosx+(1/4)sinx$
            $endgroup$
            – Robert Schwartz
            Apr 2 at 9:23










          • $begingroup$
            In the part of the particular solution, you should get $tfrac14xcos x$ (without the minus) and that would cause the $tfrac14sin x$ to disappear.
            $endgroup$
            – StackTD
            Apr 2 at 9:27













          2












          2








          2





          $begingroup$


          I believe this needs to be solved using the method of variation of parameters, though I'm unsure, (...) but I'm getting stuck on extremely long integrals



          Any help for next steps or an alternative method would be greatly appreciated.




          Alternatively, using the method of undetermined coefficients, you would propose a particular solution of the form:
          $$y_p=(Ax+B)sin x + (Cx+D)cos x$$
          but since (a part of) this solution is already contained in the homogeneous solution, you alter this to:
          $$beginaligny_p
          & =(Ax+B)colorredxsin x + (Cx+D)colorredxcos x \
          & =(Ax^2+Bx)sin x + (Cx^2+Dx)cos x
          endalign$$

          Substitution of this proposed particular solution into the differential equation leads to a linear system of four equations in the four unknowns $A,B,C,D$; no messy integrals.






          share|cite|improve this answer











          $endgroup$




          I believe this needs to be solved using the method of variation of parameters, though I'm unsure, (...) but I'm getting stuck on extremely long integrals



          Any help for next steps or an alternative method would be greatly appreciated.




          Alternatively, using the method of undetermined coefficients, you would propose a particular solution of the form:
          $$y_p=(Ax+B)sin x + (Cx+D)cos x$$
          but since (a part of) this solution is already contained in the homogeneous solution, you alter this to:
          $$beginaligny_p
          & =(Ax+B)colorredxsin x + (Cx+D)colorredxcos x \
          & =(Ax^2+Bx)sin x + (Cx^2+Dx)cos x
          endalign$$

          Substitution of this proposed particular solution into the differential equation leads to a linear system of four equations in the four unknowns $A,B,C,D$; no messy integrals.







          share|cite|improve this answer














          share|cite|improve this answer



          share|cite|improve this answer








          edited Apr 2 at 8:45

























          answered Apr 2 at 8:34









          StackTDStackTD

          24.3k2254




          24.3k2254











          • $begingroup$
            Once I have the particular solution $y_p$, what should my next steps be for solving the equation with the initial values?
            $endgroup$
            – Robert Schwartz
            Apr 2 at 9:01










          • $begingroup$
            Use the initial values to determine the $C_1$ and $C_2$ of the homogeneous solution; it doesn't matter how you found a particular solution.
            $endgroup$
            – StackTD
            Apr 2 at 9:03










          • $begingroup$
            I ended up solving for $y_g=y_h+y_p=(1/4x-1/2)xsinx-(1/4)xcosx+cosx+(1/4)sinx$
            $endgroup$
            – Robert Schwartz
            Apr 2 at 9:23










          • $begingroup$
            In the part of the particular solution, you should get $tfrac14xcos x$ (without the minus) and that would cause the $tfrac14sin x$ to disappear.
            $endgroup$
            – StackTD
            Apr 2 at 9:27
















          • $begingroup$
            Once I have the particular solution $y_p$, what should my next steps be for solving the equation with the initial values?
            $endgroup$
            – Robert Schwartz
            Apr 2 at 9:01










          • $begingroup$
            Use the initial values to determine the $C_1$ and $C_2$ of the homogeneous solution; it doesn't matter how you found a particular solution.
            $endgroup$
            – StackTD
            Apr 2 at 9:03










          • $begingroup$
            I ended up solving for $y_g=y_h+y_p=(1/4x-1/2)xsinx-(1/4)xcosx+cosx+(1/4)sinx$
            $endgroup$
            – Robert Schwartz
            Apr 2 at 9:23










          • $begingroup$
            In the part of the particular solution, you should get $tfrac14xcos x$ (without the minus) and that would cause the $tfrac14sin x$ to disappear.
            $endgroup$
            – StackTD
            Apr 2 at 9:27















          $begingroup$
          Once I have the particular solution $y_p$, what should my next steps be for solving the equation with the initial values?
          $endgroup$
          – Robert Schwartz
          Apr 2 at 9:01




          $begingroup$
          Once I have the particular solution $y_p$, what should my next steps be for solving the equation with the initial values?
          $endgroup$
          – Robert Schwartz
          Apr 2 at 9:01












          $begingroup$
          Use the initial values to determine the $C_1$ and $C_2$ of the homogeneous solution; it doesn't matter how you found a particular solution.
          $endgroup$
          – StackTD
          Apr 2 at 9:03




          $begingroup$
          Use the initial values to determine the $C_1$ and $C_2$ of the homogeneous solution; it doesn't matter how you found a particular solution.
          $endgroup$
          – StackTD
          Apr 2 at 9:03












          $begingroup$
          I ended up solving for $y_g=y_h+y_p=(1/4x-1/2)xsinx-(1/4)xcosx+cosx+(1/4)sinx$
          $endgroup$
          – Robert Schwartz
          Apr 2 at 9:23




          $begingroup$
          I ended up solving for $y_g=y_h+y_p=(1/4x-1/2)xsinx-(1/4)xcosx+cosx+(1/4)sinx$
          $endgroup$
          – Robert Schwartz
          Apr 2 at 9:23












          $begingroup$
          In the part of the particular solution, you should get $tfrac14xcos x$ (without the minus) and that would cause the $tfrac14sin x$ to disappear.
          $endgroup$
          – StackTD
          Apr 2 at 9:27




          $begingroup$
          In the part of the particular solution, you should get $tfrac14xcos x$ (without the minus) and that would cause the $tfrac14sin x$ to disappear.
          $endgroup$
          – StackTD
          Apr 2 at 9:27











          1












          $begingroup$

          $$y ″ + y = (x-1)cos(x) $$



          They are several methods to solve it.



          The method of variation of parameters (involving Wronskian) is not the simplest in the present case. Nevertheless, since it is the method that the OP want, we will use this method.



          Solving the associated homogeneous equation $y ″ + y = 0$ leads to the two linearly independent solutions $u_1=sin(x)$ and $u_2=cos(x)$ .



          The Wronskian of these two functions is
          $$W=left|left|beginmatrix
          sin(x) & cos(x) \
          cos(x) & -sin(x) \
          endmatrixright|right|=-1$$

          The solution of the non-homogeneous ODE is on the form :
          $$y(x)=A(x)u_1(x)+B(x)u_2(x)$$
          With $R(x)=(x-1)cos(x)$ the non-homogeneous term.
          $$A(x)=-int frac1Wu_2(x) R(x)dx=int (x-1)cos^2(x)dx$$
          $$B(x)=int frac1Wu_1(x) R(x)dx=-int (x-1)cos(x)sin(x)dx$$
          $$A(x)= frac14 x^2-frac12 x-frac12(x-1)sin(x)cos(x)+frac14 cos^2(x)+C_1$$
          $$B(x)=frac14 x-frac12(x-1)cos^2(x)-frac14sin(x)cos(x)+C_2$$
          $y(x)=left(frac14 x^2-frac12 x-frac12(x-1)sin(x)cos(x)+frac14 cos^2(x)+C_1 right)sin(x)+left(frac14 x-frac12(x-1)cos^2(x)-frac14sin(x)cos(x)+C_2 right)cos(x)$



          After simplification :
          $$boxedy(x)=C_1sin(x)+C'_2cos(x)+frac14 x^2sin(x)-frac12 xsin(x)+frac14 xcos(x)$$
          $C'_2=C_2-frac12$






          share|cite|improve this answer











          $endgroup$

















            1












            $begingroup$

            $$y ″ + y = (x-1)cos(x) $$



            They are several methods to solve it.



            The method of variation of parameters (involving Wronskian) is not the simplest in the present case. Nevertheless, since it is the method that the OP want, we will use this method.



            Solving the associated homogeneous equation $y ″ + y = 0$ leads to the two linearly independent solutions $u_1=sin(x)$ and $u_2=cos(x)$ .



            The Wronskian of these two functions is
            $$W=left|left|beginmatrix
            sin(x) & cos(x) \
            cos(x) & -sin(x) \
            endmatrixright|right|=-1$$

            The solution of the non-homogeneous ODE is on the form :
            $$y(x)=A(x)u_1(x)+B(x)u_2(x)$$
            With $R(x)=(x-1)cos(x)$ the non-homogeneous term.
            $$A(x)=-int frac1Wu_2(x) R(x)dx=int (x-1)cos^2(x)dx$$
            $$B(x)=int frac1Wu_1(x) R(x)dx=-int (x-1)cos(x)sin(x)dx$$
            $$A(x)= frac14 x^2-frac12 x-frac12(x-1)sin(x)cos(x)+frac14 cos^2(x)+C_1$$
            $$B(x)=frac14 x-frac12(x-1)cos^2(x)-frac14sin(x)cos(x)+C_2$$
            $y(x)=left(frac14 x^2-frac12 x-frac12(x-1)sin(x)cos(x)+frac14 cos^2(x)+C_1 right)sin(x)+left(frac14 x-frac12(x-1)cos^2(x)-frac14sin(x)cos(x)+C_2 right)cos(x)$



            After simplification :
            $$boxedy(x)=C_1sin(x)+C'_2cos(x)+frac14 x^2sin(x)-frac12 xsin(x)+frac14 xcos(x)$$
            $C'_2=C_2-frac12$






            share|cite|improve this answer











            $endgroup$















              1












              1








              1





              $begingroup$

              $$y ″ + y = (x-1)cos(x) $$



              They are several methods to solve it.



              The method of variation of parameters (involving Wronskian) is not the simplest in the present case. Nevertheless, since it is the method that the OP want, we will use this method.



              Solving the associated homogeneous equation $y ″ + y = 0$ leads to the two linearly independent solutions $u_1=sin(x)$ and $u_2=cos(x)$ .



              The Wronskian of these two functions is
              $$W=left|left|beginmatrix
              sin(x) & cos(x) \
              cos(x) & -sin(x) \
              endmatrixright|right|=-1$$

              The solution of the non-homogeneous ODE is on the form :
              $$y(x)=A(x)u_1(x)+B(x)u_2(x)$$
              With $R(x)=(x-1)cos(x)$ the non-homogeneous term.
              $$A(x)=-int frac1Wu_2(x) R(x)dx=int (x-1)cos^2(x)dx$$
              $$B(x)=int frac1Wu_1(x) R(x)dx=-int (x-1)cos(x)sin(x)dx$$
              $$A(x)= frac14 x^2-frac12 x-frac12(x-1)sin(x)cos(x)+frac14 cos^2(x)+C_1$$
              $$B(x)=frac14 x-frac12(x-1)cos^2(x)-frac14sin(x)cos(x)+C_2$$
              $y(x)=left(frac14 x^2-frac12 x-frac12(x-1)sin(x)cos(x)+frac14 cos^2(x)+C_1 right)sin(x)+left(frac14 x-frac12(x-1)cos^2(x)-frac14sin(x)cos(x)+C_2 right)cos(x)$



              After simplification :
              $$boxedy(x)=C_1sin(x)+C'_2cos(x)+frac14 x^2sin(x)-frac12 xsin(x)+frac14 xcos(x)$$
              $C'_2=C_2-frac12$






              share|cite|improve this answer











              $endgroup$



              $$y ″ + y = (x-1)cos(x) $$



              They are several methods to solve it.



              The method of variation of parameters (involving Wronskian) is not the simplest in the present case. Nevertheless, since it is the method that the OP want, we will use this method.



              Solving the associated homogeneous equation $y ″ + y = 0$ leads to the two linearly independent solutions $u_1=sin(x)$ and $u_2=cos(x)$ .



              The Wronskian of these two functions is
              $$W=left|left|beginmatrix
              sin(x) & cos(x) \
              cos(x) & -sin(x) \
              endmatrixright|right|=-1$$

              The solution of the non-homogeneous ODE is on the form :
              $$y(x)=A(x)u_1(x)+B(x)u_2(x)$$
              With $R(x)=(x-1)cos(x)$ the non-homogeneous term.
              $$A(x)=-int frac1Wu_2(x) R(x)dx=int (x-1)cos^2(x)dx$$
              $$B(x)=int frac1Wu_1(x) R(x)dx=-int (x-1)cos(x)sin(x)dx$$
              $$A(x)= frac14 x^2-frac12 x-frac12(x-1)sin(x)cos(x)+frac14 cos^2(x)+C_1$$
              $$B(x)=frac14 x-frac12(x-1)cos^2(x)-frac14sin(x)cos(x)+C_2$$
              $y(x)=left(frac14 x^2-frac12 x-frac12(x-1)sin(x)cos(x)+frac14 cos^2(x)+C_1 right)sin(x)+left(frac14 x-frac12(x-1)cos^2(x)-frac14sin(x)cos(x)+C_2 right)cos(x)$



              After simplification :
              $$boxedy(x)=C_1sin(x)+C'_2cos(x)+frac14 x^2sin(x)-frac12 xsin(x)+frac14 xcos(x)$$
              $C'_2=C_2-frac12$







              share|cite|improve this answer














              share|cite|improve this answer



              share|cite|improve this answer








              edited Apr 2 at 10:45

























              answered Apr 2 at 10:37









              JJacquelinJJacquelin

              45.8k21858




              45.8k21858





















                  0












                  $begingroup$

                  Your equation is of the form $(D^2+1) y = x cos x - cos x$. If you apply the differential operator $(D^2+1)^2$, you get the equation $(D^2+1)^3 y = 0$, that has the solution $y = (ax^2+bx+c) cos x + (dx^2+e x + f)sin x$. This indicates that a particular solution can take the form $y_p = (ax^2+bx) cos x + (d x^2 + e x)sin x$. Plugging the function into the equation you can compute the coefficients and get
                  $$
                  y_p(x)=frac 14 x cos x + (frac 14 x^2-frac 12 x) sin x
                  $$



                  The general solution is then given by



                  $$
                  y(x)=y_h(x)+y_p(x)
                  $$






                  share|cite|improve this answer









                  $endgroup$

















                    0












                    $begingroup$

                    Your equation is of the form $(D^2+1) y = x cos x - cos x$. If you apply the differential operator $(D^2+1)^2$, you get the equation $(D^2+1)^3 y = 0$, that has the solution $y = (ax^2+bx+c) cos x + (dx^2+e x + f)sin x$. This indicates that a particular solution can take the form $y_p = (ax^2+bx) cos x + (d x^2 + e x)sin x$. Plugging the function into the equation you can compute the coefficients and get
                    $$
                    y_p(x)=frac 14 x cos x + (frac 14 x^2-frac 12 x) sin x
                    $$



                    The general solution is then given by



                    $$
                    y(x)=y_h(x)+y_p(x)
                    $$






                    share|cite|improve this answer









                    $endgroup$















                      0












                      0








                      0





                      $begingroup$

                      Your equation is of the form $(D^2+1) y = x cos x - cos x$. If you apply the differential operator $(D^2+1)^2$, you get the equation $(D^2+1)^3 y = 0$, that has the solution $y = (ax^2+bx+c) cos x + (dx^2+e x + f)sin x$. This indicates that a particular solution can take the form $y_p = (ax^2+bx) cos x + (d x^2 + e x)sin x$. Plugging the function into the equation you can compute the coefficients and get
                      $$
                      y_p(x)=frac 14 x cos x + (frac 14 x^2-frac 12 x) sin x
                      $$



                      The general solution is then given by



                      $$
                      y(x)=y_h(x)+y_p(x)
                      $$






                      share|cite|improve this answer









                      $endgroup$



                      Your equation is of the form $(D^2+1) y = x cos x - cos x$. If you apply the differential operator $(D^2+1)^2$, you get the equation $(D^2+1)^3 y = 0$, that has the solution $y = (ax^2+bx+c) cos x + (dx^2+e x + f)sin x$. This indicates that a particular solution can take the form $y_p = (ax^2+bx) cos x + (d x^2 + e x)sin x$. Plugging the function into the equation you can compute the coefficients and get
                      $$
                      y_p(x)=frac 14 x cos x + (frac 14 x^2-frac 12 x) sin x
                      $$



                      The general solution is then given by



                      $$
                      y(x)=y_h(x)+y_p(x)
                      $$







                      share|cite|improve this answer












                      share|cite|improve this answer



                      share|cite|improve this answer










                      answered Apr 2 at 8:50









                      PierreCarrePierreCarre

                      2,2781215




                      2,2781215





















                          0












                          $begingroup$

                          We have that



                          $$
                          y = y_h + y_p
                          $$



                          with



                          $$
                          y_h = c_1 cos x+c_2 sin x
                          $$



                          Making $y_p = c_1(x) cos x+c_2(x) sin x$ and substituting into the particular we have



                          $$
                          (c_1''(x)+2c_2'(x)-x+1)cos x+(c_2''(x)-2c_1'(x))sin x = 0
                          $$



                          then choosing $c_1(x), c_2(x)$ such that



                          $$
                          c_1''(x)+2c_2'(x)-x+1 = 0\
                          c_2''(x)-2c_1'(x) = 0
                          $$



                          and after solving for $c_1(x), c_2(x)$ we have



                          $$
                          y = (c_1 + c_1(x))cos x+(c_2 + c_2(x))sin x
                          $$



                          NOTE



                          This kind of problem can be easily solved with the help of the Laplace transform.






                          share|cite|improve this answer









                          $endgroup$

















                            0












                            $begingroup$

                            We have that



                            $$
                            y = y_h + y_p
                            $$



                            with



                            $$
                            y_h = c_1 cos x+c_2 sin x
                            $$



                            Making $y_p = c_1(x) cos x+c_2(x) sin x$ and substituting into the particular we have



                            $$
                            (c_1''(x)+2c_2'(x)-x+1)cos x+(c_2''(x)-2c_1'(x))sin x = 0
                            $$



                            then choosing $c_1(x), c_2(x)$ such that



                            $$
                            c_1''(x)+2c_2'(x)-x+1 = 0\
                            c_2''(x)-2c_1'(x) = 0
                            $$



                            and after solving for $c_1(x), c_2(x)$ we have



                            $$
                            y = (c_1 + c_1(x))cos x+(c_2 + c_2(x))sin x
                            $$



                            NOTE



                            This kind of problem can be easily solved with the help of the Laplace transform.






                            share|cite|improve this answer









                            $endgroup$















                              0












                              0








                              0





                              $begingroup$

                              We have that



                              $$
                              y = y_h + y_p
                              $$



                              with



                              $$
                              y_h = c_1 cos x+c_2 sin x
                              $$



                              Making $y_p = c_1(x) cos x+c_2(x) sin x$ and substituting into the particular we have



                              $$
                              (c_1''(x)+2c_2'(x)-x+1)cos x+(c_2''(x)-2c_1'(x))sin x = 0
                              $$



                              then choosing $c_1(x), c_2(x)$ such that



                              $$
                              c_1''(x)+2c_2'(x)-x+1 = 0\
                              c_2''(x)-2c_1'(x) = 0
                              $$



                              and after solving for $c_1(x), c_2(x)$ we have



                              $$
                              y = (c_1 + c_1(x))cos x+(c_2 + c_2(x))sin x
                              $$



                              NOTE



                              This kind of problem can be easily solved with the help of the Laplace transform.






                              share|cite|improve this answer









                              $endgroup$



                              We have that



                              $$
                              y = y_h + y_p
                              $$



                              with



                              $$
                              y_h = c_1 cos x+c_2 sin x
                              $$



                              Making $y_p = c_1(x) cos x+c_2(x) sin x$ and substituting into the particular we have



                              $$
                              (c_1''(x)+2c_2'(x)-x+1)cos x+(c_2''(x)-2c_1'(x))sin x = 0
                              $$



                              then choosing $c_1(x), c_2(x)$ such that



                              $$
                              c_1''(x)+2c_2'(x)-x+1 = 0\
                              c_2''(x)-2c_1'(x) = 0
                              $$



                              and after solving for $c_1(x), c_2(x)$ we have



                              $$
                              y = (c_1 + c_1(x))cos x+(c_2 + c_2(x))sin x
                              $$



                              NOTE



                              This kind of problem can be easily solved with the help of the Laplace transform.







                              share|cite|improve this answer












                              share|cite|improve this answer



                              share|cite|improve this answer










                              answered Apr 2 at 8:59









                              CesareoCesareo

                              10k3518




                              10k3518





















                                  0












                                  $begingroup$

                                  Trying to find the solution by variation of parameters one proceeds with the parametrization of the general solution as
                                  $$
                                  y(x)=c_1(x)cos(x)+c_2(x)sin(x).
                                  $$

                                  In the first derivative one fixes the relation between $c_1$ and $c_2$ by demanding




                                  $$
                                  c_1'(x)cos(x)+c_2'(x)sin(x)=0
                                  $$




                                  The remaining terms of the first derivative are
                                  $$
                                  y'(x)=-c_1(x)sin(x)+c_2(x)cos(x).
                                  $$

                                  Then insert the second derivative into the ODE which gives




                                  $$
                                  -c_1'(x)sin(x)+c_2'(x)cos(x)=(x-1)cos(x).
                                  $$




                                  Now isolating the derivatives can be done via the trigonometric identity $cos^2(x)+sin^2(x)=1$ to find
                                  beginalign
                                  c_1'(x)&=-(x-1)cos(x)sin(x),\
                                  c_2'(x)&=(x-1)cos^2(x).
                                  endalign

                                  This can now be integrated via the double-angle identities and partial integration.



                                  Another way to look at this is to write the linear system in matrix form
                                  $$
                                  pmatrixcos x&sin x\-sin x&cos x
                                  pmatrixc_1'(x)\c_2'(x)
                                  =
                                  pmatrix0\(x-1)cos x
                                  $$

                                  where the system matrix can be identified with the Wronski-matrix of the fundamental system $(cos x, sin x)$. The Wronskian determinant is $1$, so that solving the system proceeds by multiplying with the transpose matrix, giving the same derivatives.






                                  share|cite|improve this answer











                                  $endgroup$

















                                    0












                                    $begingroup$

                                    Trying to find the solution by variation of parameters one proceeds with the parametrization of the general solution as
                                    $$
                                    y(x)=c_1(x)cos(x)+c_2(x)sin(x).
                                    $$

                                    In the first derivative one fixes the relation between $c_1$ and $c_2$ by demanding




                                    $$
                                    c_1'(x)cos(x)+c_2'(x)sin(x)=0
                                    $$




                                    The remaining terms of the first derivative are
                                    $$
                                    y'(x)=-c_1(x)sin(x)+c_2(x)cos(x).
                                    $$

                                    Then insert the second derivative into the ODE which gives




                                    $$
                                    -c_1'(x)sin(x)+c_2'(x)cos(x)=(x-1)cos(x).
                                    $$




                                    Now isolating the derivatives can be done via the trigonometric identity $cos^2(x)+sin^2(x)=1$ to find
                                    beginalign
                                    c_1'(x)&=-(x-1)cos(x)sin(x),\
                                    c_2'(x)&=(x-1)cos^2(x).
                                    endalign

                                    This can now be integrated via the double-angle identities and partial integration.



                                    Another way to look at this is to write the linear system in matrix form
                                    $$
                                    pmatrixcos x&sin x\-sin x&cos x
                                    pmatrixc_1'(x)\c_2'(x)
                                    =
                                    pmatrix0\(x-1)cos x
                                    $$

                                    where the system matrix can be identified with the Wronski-matrix of the fundamental system $(cos x, sin x)$. The Wronskian determinant is $1$, so that solving the system proceeds by multiplying with the transpose matrix, giving the same derivatives.






                                    share|cite|improve this answer











                                    $endgroup$















                                      0












                                      0








                                      0





                                      $begingroup$

                                      Trying to find the solution by variation of parameters one proceeds with the parametrization of the general solution as
                                      $$
                                      y(x)=c_1(x)cos(x)+c_2(x)sin(x).
                                      $$

                                      In the first derivative one fixes the relation between $c_1$ and $c_2$ by demanding




                                      $$
                                      c_1'(x)cos(x)+c_2'(x)sin(x)=0
                                      $$




                                      The remaining terms of the first derivative are
                                      $$
                                      y'(x)=-c_1(x)sin(x)+c_2(x)cos(x).
                                      $$

                                      Then insert the second derivative into the ODE which gives




                                      $$
                                      -c_1'(x)sin(x)+c_2'(x)cos(x)=(x-1)cos(x).
                                      $$




                                      Now isolating the derivatives can be done via the trigonometric identity $cos^2(x)+sin^2(x)=1$ to find
                                      beginalign
                                      c_1'(x)&=-(x-1)cos(x)sin(x),\
                                      c_2'(x)&=(x-1)cos^2(x).
                                      endalign

                                      This can now be integrated via the double-angle identities and partial integration.



                                      Another way to look at this is to write the linear system in matrix form
                                      $$
                                      pmatrixcos x&sin x\-sin x&cos x
                                      pmatrixc_1'(x)\c_2'(x)
                                      =
                                      pmatrix0\(x-1)cos x
                                      $$

                                      where the system matrix can be identified with the Wronski-matrix of the fundamental system $(cos x, sin x)$. The Wronskian determinant is $1$, so that solving the system proceeds by multiplying with the transpose matrix, giving the same derivatives.






                                      share|cite|improve this answer











                                      $endgroup$



                                      Trying to find the solution by variation of parameters one proceeds with the parametrization of the general solution as
                                      $$
                                      y(x)=c_1(x)cos(x)+c_2(x)sin(x).
                                      $$

                                      In the first derivative one fixes the relation between $c_1$ and $c_2$ by demanding




                                      $$
                                      c_1'(x)cos(x)+c_2'(x)sin(x)=0
                                      $$




                                      The remaining terms of the first derivative are
                                      $$
                                      y'(x)=-c_1(x)sin(x)+c_2(x)cos(x).
                                      $$

                                      Then insert the second derivative into the ODE which gives




                                      $$
                                      -c_1'(x)sin(x)+c_2'(x)cos(x)=(x-1)cos(x).
                                      $$




                                      Now isolating the derivatives can be done via the trigonometric identity $cos^2(x)+sin^2(x)=1$ to find
                                      beginalign
                                      c_1'(x)&=-(x-1)cos(x)sin(x),\
                                      c_2'(x)&=(x-1)cos^2(x).
                                      endalign

                                      This can now be integrated via the double-angle identities and partial integration.



                                      Another way to look at this is to write the linear system in matrix form
                                      $$
                                      pmatrixcos x&sin x\-sin x&cos x
                                      pmatrixc_1'(x)\c_2'(x)
                                      =
                                      pmatrix0\(x-1)cos x
                                      $$

                                      where the system matrix can be identified with the Wronski-matrix of the fundamental system $(cos x, sin x)$. The Wronskian determinant is $1$, so that solving the system proceeds by multiplying with the transpose matrix, giving the same derivatives.







                                      share|cite|improve this answer














                                      share|cite|improve this answer



                                      share|cite|improve this answer








                                      edited Apr 2 at 12:29

























                                      answered Apr 2 at 9:54









                                      LutzLLutzL

                                      60.9k42157




                                      60.9k42157



























                                          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%2f3171618%2f2nd-order-ode-variation-of-parameter%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

                                          Boston (Lincolnshire) Stedsbyld | Berne yn Boston | NavigaasjemenuBoston Borough CouncilBoston, Lincolnshire

                                          Trouble understanding the speech of overseas colleaguesHow can I better understand manager or clients with strong accents?Adding more movement and speech at the fundamental level to a highly-sedentary job?Difficulty in understanding Manager's accent(language and communication)How to adjust yourself where your colleagues are not understanding to you?Understanding manager's expectationsForeigner and colleagues using slangHaving difficulty understanding meetingsHow do you breathe when giving a speech?Trouble Waking Up for Emergencies (On-Call)Problems with colleaguesColleagues feeling insecure when I do my work

                                          Ballerup Komuun Stääden an saarpen | Futnuuten | Luke uk diar | Nawigatsjuunwww.ballerup.dkwww.statistikbanken.dk: Tabelle BEF44 (Folketal pr. 1. januar fordelt på byer)Commonskategorii: Ballerup Komuun55° 44′ N, 12° 22′ O