# Homework Help: Differential Equation

1. Nov 17, 2008

### Thumper88

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

Consider the differential equation:

$$(x^2 + x) \frac {d^2y} {dx^2} - (x^2 - 2) \frac {dy} {dx} - (x + 2)y = 0$$

Given that $$y = e^x$$ is a solution, what is the general solution of this equation?

2. Relevant equations

?

3. The attempt at a solution

Last edited: Nov 18, 2008
2. Nov 18, 2008

### gabbagabbahey

Since you are already given one solution, this would seem to suggest using the method of reduction of order....so assume an ansatz $y_2(x)=v(x)y_1(x)=v(x)e^x$ where $v(x)$ is an unkown function of $x$...If you use the chain rule to find the first and second derivatives of $y_2(x)$ (they will involve $v(x)$ and its derivatives) and substitute them into your original DE, you can obtain a differential equation for $v(x)$ which should be easier to solve. Then just solve that DE and discard any solutions that make $y_2(x)$ linearly dependent on $y_1(x)$.

3. Nov 18, 2008

### Thumper88

So I have the derivatives (u = v(x)):

$$y_2 = u y_1 = ue^x$$

$$y_2' = uy_1' + y_1u' = ue^x + e^xu'$$

$$y_2'' = uy_1'' + 2u'y_1' + y_1u'' = ue^x + 2u'e^x + e^xu''$$

Putting these into the original DE...

$$(x^2 + x) \frac {d^2y} {dx^2} - (x^2 - 2) \frac {dy} {dx} - (x + 2)y = 0$$

$$(x^2 + x)(ue^x + 2u'e^x + e^xu'') - (x^2 - 2)(ue^x + e^xu') - (x + 2)(ue^x) = 0$$

Not sure where to go with it next...my teacher gave a hint that there will be integration of parts.

4. Nov 18, 2008

### Thumper88

ok, well...to further things a little...

$$3u'x^2e^x + 2u'xe^x - 2u'e^x + u''x^2e^x + u''xe^x = 0$$

Using the variable transformation, $$w = u'$$ and $$w' = u''$$

$$3wx^2e^x + 2wxe^x - 2we^x + w'x^2e^x + w'xe^x = 0$$

Still looks like a mess to me...?

5. Nov 18, 2008

### Thumper88

yea, I'm at a halt here..really not sure what to do next.

6. Nov 18, 2008

### gabbagabbahey

You might want to check your algebra again; I get:

$$u'x^2e^x + 2u'xe^x + 2u'e^x + u''x^2e^x + u''xe^x = 0$$

$$\Rightarrow e^x[u''(x^2+x) +u'(x^2+2x+2)] = 0$$

$$\Rightarrow u''(x^2+x) +u'(x^2+2x+2)=0$$

$$\Rightarrow w'(x^2+x) + w(x^2+2x+2)=0$$

which, when you write $$w'=\frac{dw}{dx}$$, looks like a separable DE for w to me.....you know how to deal with those don't you?

7. Nov 18, 2008

### Thumper88

I redid the algebra by hand and got exactly what you got.

Separating the variables

$$-\frac {1}{w} dw = \frac {(x^2+2x+2)}{(x^2+x)}dx$$

integrating both sides and solving for w I get:

$$w = \frac {((x+1) * e^-x)}{x^2} dx$$

So now u = integral of w dx

8. Nov 18, 2008

### gabbagabbahey

I assume you mean: $$w=\frac{(x+1)e^{-x}}{x^2}$$?....if so, then good...now solve for $u(x)$ using your definition of w(x): $w(x)=u'(x)$....then finally solve for $y_2(x)=u(x)e^x$....what do you get?

9. Nov 18, 2008

### Thumper88

yea...i was editing the equation...still getting used to the code

10. Nov 18, 2008

### Thumper88

$$u(x) = -4 e^{-x}$$

so $$y_2(x) = -4 e^{-x} * e^x = -4$$

correct?

11. Nov 18, 2008

### Thumper88

so would the general solution just be:

$$y(x) = C_1 e^x + C_2$$
Where -4 is included in the constant $$C_2$$.

12. Nov 18, 2008

### gabbagabbahey

nope, I get $$u(x) = \frac{e^{-x}}{x}$$

give or take a constant multiplier.

...why don't you show me your work for integrate wdx?

13. Nov 18, 2008

### Thumper88

$$u(x) = \int w dx$$

$$u(x) = \int \frac {(x+1) e^-x}{x^2} dx = \int \frac {e^{-x}}{x} dx + \int \frac {e^{-x}}{x^2} dx$$

$$\int u dv = uv - \int v du$$

$$\int \frac {e^{-x}}{x} dx$$

$$u = \frac {1}{x}$$ $$du = -\frac {1}{x^2}dx$$

$$dv = e^{-x} dx$$ $$v = -e^{-x}$$

$$\int u v' = \frac {1}{x}(-e^{-x}) - \int -e^{-x} * - \frac {1}{x^2} dx = -2e^{-x}$$

Used same method for $$\int \frac e^{-x}}{x^2}dx$$ with different u du values, and got same answer, adding together got the $$-4e^{-x}$$

14. Nov 18, 2008

### Thumper88

15. Nov 18, 2008

### gabbagabbahey

Do you mean:

$$\int \frac {e^{-x}}{x} dx=\int uv'=\frac{-e^{-x}}{x}- \int \frac{e^{-x}}{x^2}dx$$

....if so, there is no need to evaluate the integral on the right, since you are adding this to your other term:

$$\Rightarrow u(x) = \int \frac {e^{-x}}{x} dx + \int \frac {e^{-x}}{x^2} dx=\left(\frac{-e^{-x}}{x}- \int \frac{e^{-x}}{x^2}dx \right)+ \int \frac {e^{-x}}{x^2} dx=\frac{-e^{-x}}{x}$$

...I'm having a hard time seeing where your 4e^-x came from, but this is the way you should have done it.

16. Nov 18, 2008

### Thumper88

17. Nov 18, 2008

### gabbagabbahey

oh, lol....that's why I don't like using calculators

18. Nov 18, 2008

### Thumper88

been a while since I've done any integration by parts...

ok...so with
$$u(x) = - \frac {e^{-x}}{x}$$

$$y_2(x) = - \frac {e^{-x}}{x} * e^x = -\frac {1}{x}$$

Sooo...

$$y(x) = C_1 e^x + C_2 (-x^{-1})$$

19. Nov 18, 2008

### Thumper88

that is correct, right? just checking, thanks for all the help!

20. Nov 18, 2008

### gabbagabbahey

Looks good to me

....although your prof might prefer that you make sure y1 and y2 are linearly independent by checking the Wronskian.

21. Nov 18, 2008

### Thumper88

I can do that...lol. Thanks a lot.