# Find the general solution of the differential equation

1. Feb 12, 2014

### Umayer

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

The equation:

$$\frac{dx}{dt}=\frac{t^2+1}{x+2}.$$

Where the initial value is: x(0) = -2.

2. Relevant equations

I believe you have to use the method of seperations of variables.

3. The attempt at a solution

So I multiplied both sides with x+2. Then I integrated both sides with respect to t.

$$(x+2)\frac{dx}{dt}=t^2+1$$

$$\int(x+2)\frac{dx}{dt}\,dt=\int (t^2+1)\,dt$$

$$\int(x+2)\,dx=\int (t^2+1)\,dt$$

$$\frac{x^2}{2}+2x=\frac{t^3}{3}+t+C$$

(Note: I've added the two constants of both sides into one constant.)

Then, I multiplied everything with 2.

$$x^2+4x=\frac{2}{3}t^3+2t+C'$$

Where C'=2C

Now I'm not so sure how I should go further then this. Any help would be nice.

2. Feb 12, 2014

### jackarms

It's correct so far -- if you have to solve for x, I think completing the square would work nicely.

3. Feb 12, 2014

### ehild

Use the initial condition to find the constant C'.

ehild

4. Feb 12, 2014

### pasmith

$x^2 + 4x = (x + 2)^2 - 4$.

You might ask "what sign goes before the square root?", and normally the answer would be "use the ODE to work out whether $x'(0)$ is positive or negative", but in this case the ODE tells you that $x'(0)$ is undefined ...

5. Feb 12, 2014

### Umayer

Thanks allot guys I've found the answer.

6. Feb 12, 2014

### Ray Vickson

Just as a matter of interest: what is your solution? (This IVP is a bit tricky!)

7. Feb 13, 2014

### Umayer

$$x = \pm\sqrt{\frac{2}{3}t^3+2t} -2$$

The constant is zero. It is tricky indeed.