# 2nd order ODE's odd and even functions

1. Sep 7, 2013

### ppy

Hi

I have been looking at some lecture notes inc the following example. Solve :
y'' + ω^2y = (some even function)
The particular integral is then found using Fourier series. As the function on the RHS is even this only includes cosine terms.
The complementary function is found from the homogeneous equation and is
y= Acos(ωt) + Bsin(ωt)

The general solution is the P.I. + C.F. My question is ; as the original function is even does that mean the constant B must equal zero in all cases ?

In general for a 2nd order inhomogeneous linear ODE if the function on the RHS is odd or even does that imply anything about the general solution ?

2. Sep 7, 2013

### tiny-tim

hi ppy!
no

if y is a solution of y'' + ω2y = f(t),

then y + Bsinωt will be also, since:

(y + Bsinωt)'' + ω2(y + Bsinωt)

= y'' + ω2y + (Bsinωt)'' + ω2Bsinωt

= f(t) + 0

3. Sep 7, 2013

### ppy

thanks for that.
So when working out the particular integral the odd or even-ness of the function affects the Fourier series ? But for the complementary function it has no effect ?

4. Sep 8, 2013

### tiny-tim

that's right

you can add any complementary solution to your particular solution, and still have a solution …

(that's fairly easy to prove quite generally, by the same method i used above)