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: Differential equation with power series

  1. Apr 22, 2016 #1
    1. The problem statement, all variables and given/known data
    Solve y''+(cosx)y=0 with power series (centered at 0)

    2. Relevant equations
    y(x) = Σ anxn

    3. The attempt at a solution
    I would just like for someone to check my work:

    I first computed (cosx)y like this:

    (cosx)y = (1-x2/2!+x4/4!+ ...)*(a0+a1x+a2x2 +...)

    Then I computed y'' as follows:

    y'' = 2a2+6a3x+12a4x2+...

    I assembled everything (y''+ycosx = 0):

    (a0+2a2)+(6a3+a1)x+(12a4+a2-a0/2)x2+... = 0

    Finally I computed the constants:

    a0+2a2=0 => a2=-a0/2
    6a3+a1=0 => a3=-a1/6
    12a4+a2-a0/2)x2=0 => a4=a0/12
    and so on for a couple of more terms.

    My final answer is then:

    y(x) = a0(1-x2/2+x4/12-x6/80+...)+a1(x-x3/6+x5/30+...)

    Does this make sense? Is there a 'less-messy' way of doing this?
  2. jcsd
  3. Apr 22, 2016 #2

    Dr Transport

    User Avatar
    Science Advisor
    Gold Member

    you need to shift indices for your [itex] y'' [/itex], you can't start with [itex] a_2 [/itex]
  4. Apr 22, 2016 #3
    Why? a2 in y'' is the same constant as in y, it wouldn't make sense to rename it a0 and start from there, would it? the first two terms in y'' are

    (0)a0 + (0)a1

    that's why i started at a2
  5. Apr 22, 2016 #4
    Yes, y(x) is the general solution of the differential equation represented as a power series. After finding the constants a2,a3,a4, etc I replaced them in y(x) and factored out the undetermined coefficients a0 and a1. Can you elaborate on what I did wrong?
  6. Apr 22, 2016 #5
    Could you please elaborate on why you say it's wrong?
  7. Apr 22, 2016 #6
    Yeah, and I did not understand your answer. I'm asking for help and you just came on here to tell me I was wrong. Fine, I get it. I want to know what you mean by "it should look like this", if you don't want to help me then why did you even bother commenting on my thread?
  8. Apr 22, 2016 #7

    Dr Transport

    User Avatar
    Science Advisor
    Gold Member

    When you find the series solution to a differential equation, your summations need to be the same, [itex] y = \sum_{n=0}^\infty x^n a_n [/itex], when you differentiate, you get [itex] y'' = \sum_{n=2}^\infty x^{n-2} a_n(n)(n-1) [/itex]. The summations are not over the same limits, that is why the answer you provided is incorrect. Shift the index from [itex] n \rightarrow n+2 [/itex] so you end up with [itex] y'' = \sum_{n=0}^\infty x^n a_{n+2}(n+2)(n+1) [/itex], then substitute into the original differential equation and then compare powers of [itex] x] [/itex] to get a recursion relation for the general form.

    Frustrated responses to the commenters won't get you very far on this forum.... I indicated how to start in my original response, you didn't do as either of the respondents advised..... we are not in the business of doing your homework for you.
  9. Apr 22, 2016 #8
    The latter is my solution... the point is to find the coefficients in terms of a0 and a1, right? That's exactly what I did, isn't it? When you solve homogeneous 2nd order differential equations, you assume a solution looks like

    y(x) = ert

    Right? Then you plug it into the DE and solve for "r". That's exactly what I did, but solving using power series, no?
  10. Apr 22, 2016 #9
    Ok, that actually makes sense now, thank you.

    I apologize for sounding frustrated, but the other person's answer wasn't very helpful as he simply replied "it's wrong, it should look like this (...)" without any further input. I didn't understand his answer so I asked for him to elaborate only to be received with the exact same response yet again. It seemed to me like the other person was being arrogant as he insisted that his response was helpful when I clearly did not understand what he meant.

    I don't see the problem with asking someone to elaborate on their suggestions when I don't understand what they are trying to say?
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted