Differential equation with power series

  • #1

Homework Statement


Solve y''+(cosx)y=0 with power series (centered at 0)

Homework Equations


y(x) = Σ anxn

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 +...)
=a0+a1x+(a2-a0/2)x2+(a3-a1/2)x3+...

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?
 

Answers and Replies

  • #2
Dr Transport
Science Advisor
Gold Member
2,458
593
you need to shift indices for your [itex] y'' [/itex], you can't start with [itex] a_2 [/itex]
 
  • #3
you need to shift indices for your [itex] y'' [/itex], you can't start with [itex] a_2 [/itex]
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
 
  • #4
No, it does not make sense. You started with ##y(x) = a_0 + a_1 x + a_2 x^2 + \cdots##, so that is what you should end up with.
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?
 
  • #5
You wrote y(x) = a0(1-x2/2+x4/12-x6/80+...)+a1(x-x3/6+x5/30+...), and that is wrong.
Could you please elaborate on why you say it's wrong?
 
  • #6
Already answered in post #3.
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?
 
  • #7
Dr Transport
Science Advisor
Gold Member
2,458
593
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.
 
  • #8
You asked directly if your answer made sense, and I answered directly that it did not, and I explained (briefly) why it did not.

Are you honestly telling me that you cannot see the difference between
[tex] y(x) = \sum a_n x^n = a_0 + a_1 x + a_2 x^2 + \cdots [/tex]
and
[tex] y(x) = a_0(1-x^2/2+x^4/12-x^6/80+\cdots)+a_1(x-x^3/6+x^5/30+\cdots)+ \cdots \; ?[/tex]
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?
 
  • #9
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.
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?
 

Related Threads on Differential equation with power series

Replies
0
Views
2K
Replies
2
Views
999
Replies
10
Views
3K
Replies
13
Views
1K
Replies
29
Views
13K
Replies
7
Views
540
  • Last Post
Replies
3
Views
1K
Replies
5
Views
2K
Replies
1
Views
1K
Top