# Differential Equation help!

schattenjaeger
y''-(2xy')/(1-x^2)+(2y)/(1-x^2)=0, we know that y1(x)=x is one solution, find the other
(starting at y2'' I'll let the multiplication and y1 be assumed)
so y2=u*y1
y2'=u'*y1+u*y1'
y2''=u''y+2u'y'+uy''

plug all that crap into the original and separate the variables and it simplifies too
u''/u'=-[2y'/y-2x/(1-x^2)]

which is what we expect it too, so I'm pretty sure I'm right up to here, then we integrate both sides

lnu'=-2lny+ln(1-x^2)+c1, plug x back into y, and exponentiate both sides
u'=x^-2(1-x^2)*C
so integrate again
u=-c(x^2+1)/x

y2=u*y = -(x^2+1)*x (I set c = x to cancel out that one x in the denominator)

but this is totally not what the book got

schattenjaeger
Well I get the right answer if I immediately substitute in y1=x, but I don't see why that's necessary

Homework Helper
schattenjaeger said:
lnu'=-2lny+ln(1-x^2)+c1, plug x back into y, and exponentiate both sides
u'=x^-2(1-x^2)*C
so integrate again
u=-c(x^2+1)/x

$$\int \frac{dx}{x^2(1-x^2)}=-\frac{1}{x}+\frac{1}{2}ln\left(\frac{1+x}{1-x}\right)+c_2$$

I used partial fractions. Anyway, I got the above quotient as opposed to your product. I worked it a different way.

Edit: Oh yea, know how they got the y1(x)=x other than guessing? I suspect if you were to solve it using power series, one solution would be x.

Last edited:
Homework Helper
saltydog said:
Edit: Oh yea, know how they got the y1(x)=x other than guessing? I suspect if you were to solve it using power series, one solution would be x.
I suggest factoring the equation into
$$\left[\frac{1}{x} \ \frac{d}{dx}-\frac{2}{1-x^2}\right]\left[x\frac{d}{dx}-1\right]y=0$$
then a first solution is the solution of
$$\left[x\frac{d}{dx}-1\right]y=0$$
which is the given solution x
then a second solution is the solution of
$$\left[x\frac{d}{dx}-1\right]y=\frac{1}{1-x^2}$$
since
$$\left[\frac{1}{x} \ \frac{d}{dx}-\frac{2}{1-x^2}\right]\frac{1}{1-x^2}=0$$

Last edited:
Homework Helper
schattenjaeger said:
Well I get the right answer if I immediately substitute in y1=x, but I don't see why that's necessary

It's not necessary but it's an intelligent thing to do because it simplifies the calculations and makes it less likely that you will make a mistake.
Your formula for u"/u' is wrong.

Homework Helper
lurflurf said:
I suggest factoring the equation into
$$\left[\frac{1}{x} \ \frac{d}{dx}-\frac{2}{1-x^2}\right]\left[x\frac{d}{dx}-1\right]y=0$$
then a first solution is the solution of
$$\left[x\frac{d}{dx}-1\right]y=0$$
which is the given solution x
then a second solution is the solution of
$$\left[x\frac{d}{dx}-1\right]y=\frac{1}{1-x^2}$$
since
$$\left[\frac{1}{x} \ \frac{d}{dx}-\frac{2}{1-x^2}\right]\frac{1}{1-x^2}=0$$

Jesus Lurflurf. That is exquisitely elegant at least in my mind. You guys don't have to agree with me or nothing. Could you explain what led you to factoring the equation that way?

If you don't mind I'd like to just fill in a few things to help me, and perhaps others, understand your method:

$$y^{''}-\frac{2xy^{'}}{1-x^2}+\frac{2y}{1-x^2}=0$$

So factoring as two differential operators as you indicated in the form:

$$D_1\left[D_2(y)\right]=0$$

as:

$$\left[\frac{1}{x}\frac{d}{dx}-\frac{2}{1-x^2}\right]\left[(x\frac{d}{dx}-1)y\right]=0$$

Just a quick check that this is correct (nothing personal):

First operate on y with $D_2$

This gives:

$$xy^{'}-y$$

Next operate on that equation by $D_1$ or:

$$\left[\frac{1}{x}\frac{d}{dx}-\frac{2}{1-x^2}\right](xy^{'}-y)}$$

This gives:

$$\frac{1}{x}\left(xy^{''}+y^{'}\right)-\frac{y^{'}}{x}-\frac{2xy^{'}}{1-x^2}+\frac{2y}{1-x^2}$$

Which of course reduces to the original ODE.

So I interpret this operator equation sequentially starting from the far right. That is, the first solution as Lurflurf suggested:

$$\left[x\frac{d}{dx}-1\right]y=0$$

I mean, just look at it and the solution looks like x. That's one solution. Now for the second: we wish $D_1$ to operate on a function such that the results are zero, that is:

$$\left[\frac{1}{x}\frac{d}{dx}-\frac{2}{1-x^2}\right]G=0$$

or:

$$G^{'}-\frac{2x}{1-x^2}G=0$$

Solving for G(x) I obtain:

$$G(x)=\frac{c_1}{1-x^2}$$

Now this is an important part: G(x) now has to satisfy the inner differential operator:

$$\left[x\frac{d}{dx}-1\right]y=\frac{c_1}{1-x^2}$$

Which can then be solved for y.

Alright, I'm never gonna' learn this stuf. Last edited:
schattenjaeger
Ok ok, I'm seeing what I did wrong, I think. Another point though, there's a problem similar to this one where y1=x*sin(x) is given, if you plug it in right away, well, you end up with LOTS of terms and it gets fairly muddled, so would that be a good time to just leave it in terms of y1 and y1' and all that?

Homework Helper
Just for the record, I'd like to finish this one. schattenjaeger, I'll assume you did this already so I'm not doing your homework for you. Above, I calculated:

$$G(x)=\frac{c_1}{1-x^2}$$

and equated the inner differential operator to this function:

$$\left[x\frac{d}{dx}-1\right]y=\frac{c_1}{1-x^2}$$

or:

$$xy^{'}-y=\frac{c_1}{1-x^2}$$

rearranging:

$$y^{'}-\frac{1}{x}y=\frac{c_1}{x(1-x^2)}$$

solving for the integration factor and applying it to both sides results in:

$$d\left(\frac{y}{x}\right)=\frac{c_1}{x^2(1-x^2)}$$

Integrating and simplifying:

$$y=c_1x\left(-\frac{1}{x}+\frac{1}{2}ln\left[\frac{1+x}{1-x}\right]+c_2\right)$$

or:

$$y=c_1\left[\frac{x}{2}ln\left(\frac{1+x}{1-x}\right)-1\right]+c_2x$$

Last edited: