# Existence of general solution, 2nd order ODE

1. May 22, 2015

### popopopd

2nd order ODE has a form y''+p(x)y'+q(x)y=f(x)

and if we assume f(x)=/=0 for every x, then y''+p(x)y'+q(x)y=/=0

so in this case we can't specify general solution of 2nd order ode?

2. May 23, 2015

### HallsofIvy

I am a bit puzzled by what you mean by "existence of general solution" or "specify general solution". Perhaps I am not understanding your question but if we take p(x)= 0, q(x)= -1, $f(x)= x^2+ 1$ (which is never 0) then your equation is $y''- y= x^2+ 1$ which has general solution $y(x)= Ae^x+ Be^{-x}- x^2- 3$.

Oh! Perhaps you are thinking of the standard method for solving a "linear non-homogeneous differential equation". We first find the general solution to the "associated homogeneous solution" by dropping f(x), which, here, gives y''+ p(x)y'+ y= 0, to get the general solution to that equation, then add a specific function that satisfies the entire equation. That is, as I said, the "associated homogeneous equation", NOT the original equation. The fact that f(x) cannot be 0 is irrelevant.

3. May 23, 2015

### PWiz

So then is the solution that is finally obtained after adding the "specific" function" a general solution?

4. May 23, 2015

### HallsofIvy

Yes, it is the general solution to the entire non-homogeneous equation.

5. May 23, 2015

### PWiz

Do non-homogeneous linear 2nd order ODEs have fundamental sets of solutions?

6. May 23, 2015

### HallsofIvy

What, exactly, is your definition of "fundamental set of solutions"? If you mean "two solution, y1 and y2, such that any solution is a linear combination of y1 and y2", or, in more abstract terms "two solutions that form a 'basis' for the space of solutions", the answer is "no" because the set of all solutions to a non-homogenous equation does NOT form a linear vector space. In particular, the sum of two solution is NOT again a solution and a constant times a solution is NOT a solution.

If you have, for example, two solutions, y1 and y2, to the differential equation y''+ py'+ qy= f(x) the y= ay1+ by2, put into that equation, we get (ay1''+ by2")+ p(ay1'+ by2')+ q(ay1+ by2)= a(y1''+ py'+ qy)+ b(y2''+ py2'+ qy2)= af(x)+ bf(x)= (a+ b)f(x) NOT f(x).

However, if y1 and y2 are both solutions to the associated homogeneous equation, y''+ py'+ qy= 0, and y3 is a solution to the entire equation, y''+ py'+ qy= f(x), then for any numbers, a and b, ay1+ by2+ y3 satisfies the entire equation:
(ay1+ by2+ y3)''+ p(ay1+ by2+ y3)'+ q(ay1+ by2+ y3)= a(y1''+ py1'+ qy')+ b(y2''+ py2'+ qy2)+ (y3''+ py3'+ qy3)= a(0)+ b(0)+ f(x)= f(x).

Further, if y1 and y2 are any two solutions to the entire equation, then y1- y2 is a solution to the associated homogenous equation: if y1 satisfies y1''+ p(x)y1'+ q(x)y1= f(x) and y2 satisfies y2''+ p(x)y2'+ q(x)y2= f(x) then (y1- y2)''+ p(x)(y1- y2)'+ q(x)(y1- y2)= (y1''+ p(x)y1'+ q(x)y1)- (y2''+ p(x)y2'+ q(x)y2)= (f(x))- (f(x))= 0. So if y_p is any one particular solution to the entire equation, and y is another then y- y_p= y_h where y_h is a solution to the associated homogeneous equation so that y= y_h+ y_p.

7. May 23, 2015

### PWiz

By a fundamental set of solutions, I meant whether linear non-homogeneous 2nd order ODEs have non-zero values for the Wronskian of the solutions.

8. May 24, 2015

### popopopd

hmm, I am a little confused at this part of Linear ODE. general solution can be found when the equation is y''+ p(x)y'+ y= 0. so I understood this way.

y''+ p(x)y'+ y= f(x), and if f(x)=0 for some x, then
y''+ p(x)y'+ y= 0 is included in the non-homo 2nd linear ode.

so y''+ p(x)y'+ y= 0 is included in y''+ p(x)y'+ y= f(x) as general solution because the given equation will surely be y''+ p(x)y'+ y= 0 for some x, and solution for this plus the solution for the rest f(x) accounts for particular solution.

if this is not true, then why do we add general solution to particular solution? whats the justification and proof?

9. May 24, 2015

### HallsofIvy

Have you seen the proof that the set of all solutions to an nth order homogeneous linear equation form an n dimensional vector space? That is the fundamental concept behind all such problems!

We can think of a 1 dimensional vector space as a line through the origin of a coordinate system, a 2 dimensional vector space as a plane containing the origin, etc. A "linear manifold" would be a line, plane, etc. that does NOT contain the origin. Such a thing is NOT a vector space because the sum of two "objects" in it is not again in it- addition is not "closed". For example, the graph of y= 3x is a line that contains the origin. Two points on that line are (a, 3a) and (b, 3b). The sum of those two is (a+ b, 3a+ 3b)= (a+ b, 3(a+ b)), again on the line so this set is "closed under addition". Multiplying (a, 3a) by the number p gives (pa, p(3a))= (pa, 3(pa)), again on the line. The points on this line form a "vector space" with that addition and scalar multiplication.

The graph of y= 3x+ 2 is a line that does not contain the origin. The points (a, 3a+ 2) and (b, 3b+ 2) are on that line. Their sum is (a+ b, 3a+ 3b+ 2)= (a+ b. 3(a+ b)+ 2) which is NOT on that line. Similarly, p time (3a, 3a+ 2) gives (p(3a), p(3a)+ 3p) NOT on that line. But if, instead of adding like this, we define sum of (a, 3a+ 1) and (b, 3b+ 1) to be (a+ b, 3(a+ b)+ 1) (geometrically this would be "go from (a, 3a+ 1) and (b, 3b+ 1) to (a, 3a), (b, 3b) on the parallel line through the origin, moving along the mutual perpendicular to those parallel lines, add those, then go back to the original line") we can define an addition of such things (and a similar "scalar multiplication").

We do the same kind of thing with linear differential equations. The set of all solutions to a linear, nth order, homogeneous differential equation form a vector space with the usual sum of functions and multiplication by numbers. If y1 and y2 both satisfy y''+ p(x)y'+ y= 0 so does ay1+ by2 for any numbers a and b: (ay1+ by2)''+ p(x)(ay1+ by2)'+ q(x)(ay1+ by2)= a(y1''+ p(x)y1'+ q(x)y1)+ b(y2''+ p(x)y2'+ q(x)y2)= a(0)+ b(0)= 0.

If, rather, y1 and y2 satisfy y''+ p(x)y'+ q(x)y= f(x), with f(x) NOT 0, ay1+ by2 does not satisfy the equation: (ay1+ by2)''+ p(x)(ay1+ by2)'+ q(x)(ay1+ by2)= a(y1''+ p(x)y1'+ q(x)y1)+ b(y2''+ p(x)y2'+ q(x)y2)= a(f(x)+ b(f(x))= (a+ b)f(x) NOT f(x). Instead suppose y1 and y2 satisfy y''+ p(x)y'+ y= 0 and y3 satisfies y''+ p(x)y'+ y= f(x). Then ay1+ by2+ y3 satisfies y''+ p(x)y'+ q(x)y= f(x) for any a, b: (ay1+ by2+ y3)"+ p(x)(ay1+ by2+ y3)'+ q(x)(y1+ y2+ y3)= (ay1''+ ap(x)y1'+ aq(x)y1)+ (by2''+ bp(x)y2'+ bq(x)y2)+ (y3''+ p(x)y3'+ q(x)y3)= a(0)+ b(0)+ f(x)= f(x).

Further if y1 and y2(x) are solutions to the entire equation, y''+ p(x)y'+ q(x)y= f(x), then y3= y1- y2 satisfies y''+ p(x)y'+ q(x)y= 0 (I will leave that "as an exercise for the reader"). So y1= y3+ y2- a function that satisfies the "associated homogenous equation" plus a function that satisfies the entire equation.

10. May 25, 2015

### PWiz

Excellent explanation! I really think that these derivations should be provided in class right after introducing any kind of solutions method so that the student can appreciate the ingenuity behind the generalization immediately.

11. May 28, 2015

### popopopd

isn't it 3(a+b)+4?

I really appreciate you for explanation. so, y1 and y2 general solutions are algebraic so they can form a vector space (when homogeneous since it needs to pass through origin), and particular answer is thought to be translation with respect to the given origin by function f(x).

very interesting.

12. Jun 4, 2015

### popopopd

hi, could you explain me why nth order linear ode must have n number of general solutions?

is it because we are given with n number of initial conditions to find the general solution, and if so,

y_g= ay1(x0)+by2(x0)+cy3(x0) ... nyn(x0)=y0
y_g'=ay1'(x0)+by2'(x0)+cy3(x0)' ... nyn(x0)=y'0
.....

and in this condition we can have maximum of n number of solutions because each solution satisfies one specific initial condition)

13. Jun 5, 2015

### popopopd

for example,

y_g= ay1(x0)+by2(x0)+cy3(x0) ... nyn(x0)=y0 , cy3(x0)=y0 and the rest are 0
y_g'=ay1'(x0)+by2'(x0)+cy3(x0)' ... nyn(x0)=y'0, by3(x0)=y'0 and the rest are 0 and so on

14. Jun 7, 2015

### HallsofIvy

No. we had the points (a, 3a+ 2) and (b, 3b) (without the added "2"). 3a+ 2+ 3b= 3(a+ b)+ 2.

15. Jun 7, 2015