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!

Homework Help: Solving DE with Nonpolynomial Coefficient

  1. Jul 29, 2009 #1
    I need help solving the rest of an example problem in my book, please.

    1. The problem statement, all variables and given/known data

    Solve y'' + (cos[x])y = 0

    2. Relevant equations

    [tex]y = \sum_{n=0}^\infty c_{n} x^{n}[/tex]
    [tex] y' = \sum_{n=1}^\infty c_{n-1}x^{n-1} [/tex]
    [tex]y'' = \sum_{n=0}^\infty n(n-1)c_{n} x^{n-2}[/tex]

    3. The attempt at a solution

    [tex] y'' + (cos(x))y = \sum_{n=0}^\infty n(n-1)c_n x^{n-2} + (1 - \frac{x^2}{2!} + \frac{x^4}{4!} - \frac{x^6}{6!} + ...)\sum_{n=0}^\infty c_n x^n [/tex]

    [tex] = 2c_{2}+6c_{3}x+12c_{4}x^{2}+20c_{5}x^{3} + ... = (1 - \frac{x^2}{2!} + \frac{x^4}{4!} + ...)(c_{0}+c_{1}x+c_{2}x^{2}+c_{3}x^{3}+...) [/tex]

    [tex] = 2c_{2}+c_{0}+(6c_{3}+c_{1})x + (12c_{4}+c_{2}- \frac{1}{2} c_{0})x^{2} + (20c_{5}+c_{3}- \frac{1}{2} c_{1})x^{3} + ... = 0 [/tex]

    It follows that

    [tex]2c_{2} + c_{0} = 0 [/tex]
    [tex]6c_{3} + c_{1} = 0[/tex]
    [tex]12c_{4} + c_{2} - \frac{1}{2} c_{0} = 0[/tex]
    [tex]20c_{5} _ c_{3} - \frac{1}{2} c_{0} = 0[/tex]

    and so on. this gives [itex]c_{2} = -\frac{1}{2}c_{0}, c_{3} = -\frac{1}{6}c_{1}, c_{4} = \frac{1}{12}c_{0}, c_{5} = \frac{1}{30}c_{1}, .....[/itex] By grouping terms we arrive at the general solution [itex] y = c_{0}y_{1}(x) + c_{1}y_{2}(x)[/itex], where

    [tex]y_{1} = 1 - \frac {1}{2}x^{2} + \frac{1}{12}x^{4} - ...[/tex] and [tex] y_{2}(x) = x - \frac {1}{6}x^{3} + \frac{1}{30}x^{5}... [/tex]

    Ok, I'm not exactly sure how to present this question as I'm not quite sure I know what I don't udnerstand... I believe I understand how they are factoring the like terms ([itex] x, x^{2},x^{3} [/itex] etc.) up to the point where they are [itex] - \frac{1}{2}c_{0} [/itex] how are they multiplying the Maclaurin series [itex] cos(x) [/itex] term by the y series?

    Can anyone this to me please?

    PS: First time using latex, I'm sorry if I messed anything up...
    PS again: In y' and y'' that's is suppose to be [itex] x^{n-1} [/itex] and [itex] x^{n-2} [/itex] respectively. It seems I can't fix it for some reason.
    Last edited: Jul 29, 2009
  2. jcsd
  3. Jul 29, 2009 #2
    Seems I'm just stupid and didn't realize you just multiple the power series of cos(x) and y together to form a new series...

    So, on to my next question. How does the book "arrive at the general solution [itex] y = c_{0}y_{1}(x) + c_{1}y_{2}(x) [/itex] " ? And how does it determine [itex] y_{1} [/itex] and [itex]y_{2}[/itex] from that?
  4. Jul 30, 2009 #3
    That's because this equation is a form of Matthieu's Differential Equation. Look up "Matthieu Differential Equation" in Wolfram's MathWorld. I find it interesting your book asked you to solve it.
  5. Jul 30, 2009 #4


    User Avatar
    Science Advisor

    The set of all solutions to any second order, linear, homogeneous, equation forms a vector space of dimension two. That means, if you can find two independent solutions (that form a basis for the space) you can write any solution as a linear combination of the two solutions. That's all "[itex]y(x)= c_1y_1(x)+ c_2y_2(x)[/itex]" means.

    As to how you find [itex]y_1[/itex] and [itex]y_2[/itex], that depends heavily on exactly what the coefficients are. Try nickmai123's suggestion
  6. Jul 30, 2009 #5
    I read over the the Wolfram page on Matthieu Differential Equation and it's all pretty much Greek to me. This is an example problem in my book on how to solve a non-polynomial DE, but if I can't figure out how to work the example I certainly can't work the other problems.

    I understand why the solution will be in the form of [itex]y(x)= c_1y_1(x)+ c_2y_2(x)[/itex], but I don't understand how they solved for [tex]c_{1}[/itex] and [tex]c_{2}[/itex].

    From what I can determine, the goal is to come ot a point in which you can describe the coefficients in terms of [itex]c_{1}[/itex] and [itex]c_{2}[/itex]. Right?
    So how do I know how far I need to write out the summation before I start combining terms? And from there, how do I determine [itex]y_{1}[/itex] and [itex]y_{2}[/itex]? Such as, where does the 1 come from in [itex]y_{1}[/itex] ?

    I'm trying my best here, but it seems the book just leaves out a ton of steps and information in this example problem. I just don't get it at all.
  7. Jul 30, 2009 #6
    Okay, I think I'm making some headway. if I'm understanding this correctly, the book is calculating [itex] c_{1}, c_{2},c_{3},c_{4},c_{5}[/itex] first with the assumption that [itex]c_{0} = 1 ; c_{1} = 0[/itex] then with the assumption that [itex]c_{0} = 0 ; c_{1} = 1[/itex]. The 1 is coming from the fact that the book is assigning the value of 0 to [itex]c_{1}[/itex] and 1 to [itex]c_{0}[/itex] therefore [itex] 1*x^{0} = 1[/itex]. And in [itex]y_{2}[/itex] the first x can be explained by assigning the value of 0 to [itex]c_{0}[/itex] and 1 to [itex]c_{1}[/itex] therefore [itex] 1*x^{1} = 1[/itex]. Am i correct in all of this? I sure hope so...
  8. Jul 30, 2009 #7
    Haha this problem involves wayyyy too much series arithmetic.

    Wait, so the attempted solution is yours or did you get that out of the book? I'm just checking b/c if it's out of the book then we know that what they got for y1 and y2 is what you're supposed to get.

    EDIT: Nevermind, I read what you said and this is the book's solutions. That's good since now I know where to begin helping you.
  9. Jul 30, 2009 #8
    No, your book doesn't begin by assuming those values. Here's now they get from the series to the solutions in terms of [tex]c_{0}[/tex] and [tex]c_{1}[/tex].

    [tex]2c_{2} + c_{0} = 0[/tex]
    [tex]6c_{3} + c_{1} = 0[/tex]
    [tex]12c_{4} + c_{2} - \frac{1}{2} c_{0} = 0[/tex]
    [tex]20c_{5} + c_{3} - \frac{1}{2} c_{0} = 0[/tex]

    Once they get there, they solve for c2 and c3 in terms of c0 and c1. Then they take the those new definitions of what c 2 and c3 are and plug them in to the bottom 2 equations. For example, 12c4 + (-1/2 c0) - 1/2 c0 = 0. You solve for c4.

    After you do all of that, you take your new definitions of c2, c3, c4, and c5 and plug them back into your equation. Then factoring out c0 and c1, you get it into the form [tex]y=c_{0}y_{1} + c_{1}y_{2}[/tex]

    I hope that explains it. If not I can type up the math of it all. it's just a lot of work that I don't exactly feel like doing haha.
  10. Jul 31, 2009 #9
    Oh! Okay! I see what's going on here much better now. You're right, it is a ton of arithmetic. I don't understand why anyone would do this by hand when Mathematica exists, but clearly my instructor wants us to.
    Now, will this method work for any non-poly DE in the same form? Such as [itex] y'' + e^{x}y = 0 [/itex]. It should, right? Just follow the same idea, get those 4 equations, solve for [itex]c_{0}[/itex] and [itex]c_{1} [/itex] then plug back in and solve for [itex]c_{4}[/itex] and [itex]c_{5} [/itex] then plug all of that back in to the original equation, factor out [itex]c_{0}[/itex] and [itex]c_{1} [/itex] and you've got [tex]y=c_{0}y_{1} + c_{1}y_{2}[/tex]. Correct?

    Thanks a ton!
  11. Jul 31, 2009 #10
    Yes it will work. Do what they did, and don't work with the summation notations. Expand each of the 3 series, y'', y, and e^x, to the first 5 terms. Then you'll have to FOIL those 5 terms for y and e^x. That's the hairy part. Once you've got that, it's downhill from there.

    Well, for the example you provided, Mathematica would give you the solution to Matthieu's Differential Equation, which is not what you were looking for. For the problem you are now working, it gives you the Bessel Functions as solutions.
  12. Jul 31, 2009 #11
    Excellent, that's just what I wanted to hear!

    I don't think I know enough about differential equations or Mathematica to understand Matthieu's Differential Equation or the Bessel Functions (is that he name of the functions that are the solutions?) yet, but I can definitely get Mathematica to do all the arithmetic. From there solving for the constants isn't a big deal.

Share this great discussion with others via Reddit, Google+, Twitter, or Facebook