# Solving An Initial Value DE Using Variation of Parameters

1. Sep 19, 2011

### Lancelot59

I need to find a solution to the following problem:

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

I decided to try using variation of parameters. My teacher was unable to show any examples, and I'm having issues understanding the textbook.

From what I see I need to get it onto this form:
$$y'=f(x)y+g(x)$$

I think this is correct
$$\frac{dy}{dx}=\frac{(x+1)^{2}-2y}{x^{2}-1}=\frac{-2}{x^{2}-1}y+\frac{(x+1)^{2}}{x^{2}-1}$$

Now what do I need to do? I'm having trouble understanding the textbook.

2. Sep 19, 2011

### flyingpig

Ah shoot I don't know if I helped, but

(1) SHouldn't you solve the homogenous solution first?

(2) After you did (1), there should be two constraints

3. Sep 19, 2011

### Lancelot59

What is the homogenous solution? What constraints?

4. Sep 20, 2011

### HallsofIvy

Staff Emeritus
Oh, dear. Flying Pig was assuming you were actually taking a course in differential equations. After all, if you mention "variation of parameters", people are going to assume that you know what "variation of parameters" means and that therefore you know what the "associated homogeous equation" is since you must use the solutions to the associated homogenous equation in the variation of parameters method.

The associated homogenous equation for your equation is what you get when you drop all terms that are not multiples of y or its derivative:
$$(x^2- 1)\frac{dy}{dx}+ 2y= 0$$
Can you solve that?

Once you have a solution, $y_0(x)$, to that, "variation of parameters" requires that you seek a function u(x) such that $y(x)= u(x)y_1(x)$.

5. Sep 20, 2011

### Lancelot59

Well I got:

$$y=e^{2arctanh(x)}c_{1}$$
$$c_1=e^{c}$$

But with the initial condition y(0)=0 this doesn't work. C1 would need to be 0 and that can't happen.