# Second order DE from my midtearm

1. Jun 26, 2011

### Danny B

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

Consider the ODE:

y''+p(x)y'+q(x)y=g(x)

It is given that the functions y=x$^{2}$, y=x and y$\equiv$1
are solutions of the equation.
Find the general solution of the equation.

2. Relevant equations

3. The attempt at a solution

Well, given the three solutions, and taking into account that they are mutually linearly independent, I would say that any couple of these functions will give me a set that forms the general solution.

If i take y=x and y$\equiv$1, I get the general solution:

y(x)=c1+c2*x

Now, I know that x$^{2}$ is also a solution, but it can't be derived from the general solution, so obviously I'm doing something wrong.

I also thought of the possibility that y=1 is a singular solution and the general solution is:

y(x)=c1*x+c2*x^2

does this makes sense?

This is a question from my midterm and i still can't figure it out. So... help?

2. Jun 26, 2011

### tiny-tim

Welcome to PF!

Hi Danny B! Welcome to PF!

(try using the X2 and X2 icons just above the Reply box )

Each of those three are particular solutions …

Hint: what relation is there between any two particular solutions (ie any two solutions)?

3. Jun 27, 2011

### Danny B

Thank you.

I think I got it now.

My mistake was to use the principle of superposition with a non-homogeneous equation.

So the general solution should be:

(Considering that any difference of the particular solutions is a homogeneous solution)

y$_{(x)}$=c$_{1}$(x-1)+c$_{2}$(x$^{2}$-1)+Y$_{p}$

But how do I choose Y$_{p}$?

Can I just use any of the three particular solutions?

4. Jun 27, 2011

### tiny-tim

Hi Danny B!

Let's write it out in full, so you can see how it works …

the general solution can be written in three ways

A(x2 - 1) + B(x - 1) + 1

A(x2 - x) + x + B(1 - x)

x2 + A(x - x2) + B(1 - x2)​

the homogeneous general solution can be written in three ways

A(x2 - 1) + B(x - 1)

A(x2 - x) + B(1 - x)

A(x - x2) + B(1 - x2)​

now you need to spend ten minutes convincing yourself that they're the same!

he he

5. Jun 27, 2011

### Danny B

Thanks a lot!

You've been a great help!