1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Second order ODE with RHS = product of two functions

  1. Nov 24, 2012 #1

    CAF123

    User Avatar
    Gold Member

    1. The problem statement, all variables and given/known data
    Find the general solution of the ODE $$ y'' + 16y = 64x \cos x.$$ If ## y(0)=1, y'(0) = 0##, what is the particular solution?

    3. The attempt at a solution

    I am confident I can tackle this question, I really just want to check that my particular integral form is correct. I originally said ##y_p(x) = x(C_1 \cos 4x + C_2 \sin 4x)(ax + b)##, where ##C_1, C_2, a,b ## are constants. However, when I do the first derivative and then the second derivative and then sub this into the ODE, I get two eqns with 4 unknowns. (The 4 unknowns being the constants). So then I tried combining the form so that there was only two constants. So I have either ##x[(C_1 \cos 4x + C_2 \sin 4x)(C_1 x + C_2)]## or ## x[(C_1 x +C_2)\cos 4x + (C_1x +C_2)\sin 4x]## Should I go with the second option?
    Thanks
     
  2. jcsd
  3. Nov 24, 2012 #2

    haruspex

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member
    2016 Award

    Surely for the PI you will need functions like x cos(x), x sin(x).
     
  4. Nov 24, 2012 #3

    CAF123

    User Avatar
    Gold Member

    Sorry, I mistyped the problem. It should be RHS = ##64x \cos 4x##
     
  5. Nov 24, 2012 #4

    Zondrina

    User Avatar
    Homework Helper

    Remember the general solution is made up of your homogeneous solution plus a particular solution, [itex]y= y_c(x) + y_p(x)[/itex].

    So start by solving [itex]L[y] = 0[/itex] for your homogeneous solution [itex]y_c(x)[/itex]. I believe your roots will be ±4i.

    Now you want to solve the non-homogeneous equation [itex]L[y] = 64xcosx[/itex] for the particular solution [itex]y_p(x)[/itex]. You have two ways to go about this, the method or undetermined coefficients or the method of variation of parameters.

    In this case since your polynomial is of relatively low degree, I would choose undetermined coefficients. So your guess at a particular solution should have the form :

    [itex]y_p(x) = (Ax+b)(Csin4x + Dcos4x)[/itex]

    I leave the rest to you now.
     
    Last edited: Nov 24, 2012
  6. Nov 24, 2012 #5

    CAF123

    User Avatar
    Gold Member

    I corrected my initial post. The RHS should read 64x cos4x. I took the particular integral to be x(a cos4x + bsin4x)(cx +d). In the end, I get two eqns , with the 4 unknowns. So what I then tried to do was to give a form incorporating only two constants,(see my first post), but when I tried that I got my apparant constants being functions of x.

    I think the way with 4 constants is correct, but I don't see how you can get solutions for the constants. Many thanks.
     
  7. Nov 24, 2012 #6

    Zondrina

    User Avatar
    Homework Helper

    I edited my last post to reflect your changes.

    Now, what is yp' and yp''? After you find these, plug them back into L[y] = 64xcos4x and solve for your coefficients. What do you get?
     
  8. Nov 24, 2012 #7

    CAF123

    User Avatar
    Gold Member

    I think the particular integral you wrote should be multiplied by x since ±4i are roots of the auxiliary eqn. When I sub in for yp' and yp'' into the ODE, I keep getting each constant as a function of something else. I am going to try it again now. Thanks

    EDIT:The eqns I get in the end are $$ -8A(2Cx+D) + 2CB = 0,\,\,\,2CA + 8B(2Cx +D) = 64x, $$ which is 4 unknowns in 2 eqns, so I can't get a solution for each of the constants.
     
    Last edited: Nov 24, 2012
  9. Nov 24, 2012 #8

    haruspex

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member
    2016 Award

    No, there are four equations there. In order to be true for all x, the different powers of x must vanish independently. Trouble is, you then find there are no solutions.
     
  10. Nov 24, 2012 #9

    haruspex

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member
    2016 Award

    I think the combinations tried have been too restrictive.
    Try (quadratic)*sin 4x + (quadratic)*cos 4x.
     
  11. Nov 25, 2012 #10

    CAF123

    User Avatar
    Gold Member

    Ok, so what I have tried is the following:
    1)##y_p = (Cx^2 +Dx)\cos4x + (Cx^2+Dx)\sin4x##. When I differentiate twice, sub it in to ODE, I get my (apparant) constants being functions of x.
    2) ##y_p = (Cx^2 +Dx)A\cos4x + (Cx^2+Dx)B\sin4x##. This, to me, seems the most plausible form of solution, and after differentiating twice and subbing in, I tried both of the following, still yielding things that I could not solve :frown:
    i)collected terms in cos4x and sin4x, The two eqns I got from that I showed in my last post(@haruspex: How is that 4 eqns?)
    ii) Alternatively, I collected terms in xcos4x, cos4x, x2cos4x, sin4x, xsin4x and x2sin4x. I now get 6 eqns and only 4 unknowns, yet I can't solve the following set of non-linear eqns: (In fact, after some manipulation I feel they look inconsistent)
    ##-16AC = 0##.
    ##-16AD + 16CB = 64##,
    ##-16BC=0##,
    ##2CA+8BD=64x##,
    ##-8DA+2CB=0##,
    ##-16CA-16DB=0##.
    I don't know what to try next. Everything I have tried seems reasonable - I just get to a stage where I can go no further. Any advice?
     
  12. Nov 25, 2012 #11

    HallsofIvy

    User Avatar
    Staff Emeritus
    Science Advisor

    No, you cannot assume cos 4x and sin 4x have the same coefficients. Use [itex](Cx^2+ Dx)cos(4x)+ (Ex^2+ Fx) sin(4x)[/itex] and solve for all four of C, D, E, and F.

     
  13. Nov 25, 2012 #12

    CAF123

    User Avatar
    Gold Member

    Yes, as I said the other method seemed more plausible. I eventually get to the eqns ##DA=1, BD=8x, CB=4, CA=0##. I think these are inconsistent?
    EDIT: Is ##y_p = (Cx^2 + Dx)A\cos4x + (Cx^2+Dx)B\sin4x## ok?
     
  14. Nov 25, 2012 #13

    haruspex

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member
    2016 Award

    Still too restrictive. You are assuming the x2 and x coefficients are in the same ratio for the cos and the sin. Try the C, D, E, F form Halls suggested.
     
  15. Nov 25, 2012 #14

    CAF123

    User Avatar
    Gold Member

    Thanks a lot. I now get solutions and eqns that were a lot easier to solve. Was the reason I couldn't solve my previous set of eqns due to the fact I had too much restriction on the particular integral?
    EDIT: Wait.. Isn't mine and Halls proposed integral effectively the same? If you let, in my form, CA = E, DA = F, CB = G and DB = H, then this is essentially what Halls proposed?
     
    Last edited: Nov 25, 2012
  16. Nov 25, 2012 #15

    haruspex

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member
    2016 Award

    No. With those relationships, E/F = C/D = G/H. In general, there's no reason why E/F = G/H.
    Because you had four unknowns you assumed you had four degrees of freedom, but that is not necessarily the case. E.g. in your version A=B=2, C=D=1 is the same solution as A=B=1, C=D=2.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Second order ODE with RHS = product of two functions
Loading...