# Seperation of Variables to find exact solution

1. Dec 2, 2011

### robcru1

Can anyone help me please or point me in the right direction, I am needing to find an exact solution for this equation by using seperation of variables and compare them to answers i have calculated for Euler's method & Euler-Cauchy method. The equation is dx/dt=x^2/(t+1) when x(0)=1 and t=time from 0 to 0.5 in 0.1 increments.
Any pointers would be great thanks.
Robcru1

2. Dec 2, 2011

### HallsofIvy

Staff Emeritus
Well, you titled this "Separation of Variables" so apparently you know you can write this as $x^{-2} dx= (t+1)^{-1}dt$ and integrate. If the right side is giving you trouble, let u= t+1.

3. Dec 2, 2011

### robcru1

Wow quick response.
Yes i get that, what i am struggling with is where to go from this point and what it is i am actually trying to figure out i have previously rewritten it as ∫1/x^2 dx/dt dt=∫1/t+1 dt
which got me to ∫1/x^2 dx =∫1/t+1 dt
= ln(x^2) = ln(t+1)+C
Then i get stuck & confused
is this correct?

4. Dec 3, 2011

### robcru1

Can anyone assist me with this issue, its beginning to bug me now and i seem to be getting nowhere.
Thanks a lot

5. Dec 3, 2011

### HallsofIvy

Staff Emeritus
I'm, sorry, I had kind of thought (apparently foolishly) that, if you are asking about differential equations, you would know how to do basic integrals.

The integral of $x^n$ is $x^{n+1}/(n+1)+ C$.

Last edited: Dec 3, 2011
6. Dec 3, 2011

### robcru1

Yes i do know that.
I am trying to find the exact solution for x based on the time steps of t from 0 (0.1) 0.5
are you saying what i have done so far i wrong? Can you point me down the correct path please.

7. Dec 3, 2011

### HallsofIvy

Staff Emeritus
Then why did you write that non-sense about the solution being "ln(x^2) = ln(t+1)+C"?

Also, the solution to a differential equation depends upon continuous change in the independent variable. You cannot have an "exact" solution with "time steps of t from 0 (0.1) 0.5".

8. Dec 3, 2011

### robcru1

My appologise for coming across as an idiot.
My original problem was to calculate answers for x^2/(t+1) for time steps 0 (0.1) 0.5 using both eulers method & euler-cauchy method and compare these results against an exact solution using seperation of variables, i presumed i would need to calculate an exact solution at the same time intervals.
i have done the euler & euler-cauchy calculations and just need to carry out my comparison and tabulate it, this is where i am struggling.
I am just trying to get some understanding and method behind what i need to do to achieve this.
If my posts are NON-SENSE then please point me in as to where and which way to progress.
Many thanks

Robcru1

9. Dec 4, 2011

### robcru1

Can anyone help me any further with this please
My original equation was:- dx/dt=x^2/(t+1)
What i have so far is:-
∫x^-2dx=∫(t+1)^-1dt
x^-1/-1=∫(t+1)
Any help is appreciated

10. Dec 5, 2011

### bigfooted

As already pointed out, in general,
$\int\frac{1}{f(x)}dx \neq \ln{|f(x|})$

However, it is true that:
$\int\frac{1}{t+c}dt=\ln{|t+c|}$ where c is a constant.

The equation given by HallsofIvy is of course not valid for the special case where n=-1.

So, after integrating, you get..? The only thing left then is to rewrite the equation into the form x=f(t).
I suggest (re)reading a calculus book to clear the fog.