# Non linear ODE

1. Apr 15, 2014

### metamathphys

Hello I am trying to solve this ODE

dx/dt=(f(x)+g(t))^(1/2)

I have been recalling what I learn in my ODE course and looking at my old textbook but I did not find what method is appropiate to try...any suggestions?

Thank you very much!

2. Apr 16, 2014

### MathematicalPhysicist

You can take another derivative wrt t to get:

d^2 x/dt^2 = [f'(x)dx/dt+g'(t)]/2(dx/dt) = f'(x)/2 + g'(t)dt/dx/2

Now try to solve d^2 x /dt^2 =f'(x)/2 and d^2 x / dt^2 =g'(t)/(2dx/dt)

Seperately, and then by superposition you get a solution for the ODE.
the second equation you can write the solution explicitly d(dx/dt)^2/dt = g'(t) by integration you get:
(dx/dt)^2 =g(t)+C
dx/dt = sqrt(g(t)+C) ....

I believe you get the picture now.

3. Apr 16, 2014

### the_wolfman

Sorry, but this is wrong. The equation you get when you differentiate wrt t is
$\frac{dx}{dt}\frac{d^2x}{dt^2}-\frac{1}{2}\frac{df\left(x\right)}{dx}\frac{dx}{dt}=\frac{1}{2}\frac{dg\left(t\right)}{dt}$

The first term is nonlinear. The second term is also nonlinear, except for special cases of f(x). Thus this equation is nonlinear, and superposition does not hold!

4. Apr 16, 2014

### D H

Staff Emeritus
That too is wrong. A correct expression for the second derivative with respect to time is $2\ddot x(t) = f'(x) + g'(x)$

That said, I don't think that this will help in general.

What might help is solving for t as a function of x yielding $t=\int (f(x)+g(x))^{-1/2}\,dx$ and then finding the inverse function that yields x as a function of t.

Last edited: Apr 16, 2014
5. Apr 16, 2014

### metamathphys

First of all I wish to thank you all for taking some time looking at my post.

My first comment concerns all of those who suggest taking another time derivative. I do not agree with your results if I take another derivative what I get is:

$\frac{d^2x}{dt^2}=\frac{f'(x)\frac{dx}{dt}+\frac{dg}{dt}}{2\sqrt{f+g}}[\itex] Which does not look any easier...I do not know about any equation that simplifies when you perform higher derivatives. Regarding the comment of D H If I knew t as a function of x then I would be done no? All I had left to do is invert the relation to have x as a function of t and that all. So your method requires knowing the solution to the problem so I don't see how this can be of any help maybe I am misunderstanding something if it is so please show explicitly how to do it with some easy example 6. Apr 16, 2014 ### the_wolfman Actually its not. In the original problem statement g is a function of t, not a function of x. If g was a function of x, then you would be correct. Its the same thing. We are using the original equation ([itex]\frac{dx}{dt} = \sqrt{f(x)+g(t)}$) to simplify the denominator:
$\frac{d^2x}{dt^2}=\frac{f'(x)\frac{dx}{dt}+\frac{dg}{dt}}{2\sqrt{f+g}}=\frac{f'(x)\frac{dx}{dt}+\frac{dg}{dt}}{2\frac{dx}{dt}}$

For the record, I recommend trying to directly solve the first order ode:

$\frac{dx}{dt} = \sqrt{f(x)+g(t)}$.

You might get lucky by taking more derivatives but I doubt it. In general first order nonlinear ODEs are the easiest to solve. Higher order non-linear ODEs get progressively harder to solve.

I also don't know if a general solution to this equation exists for arbitrary f and g. Do you know what f and g are.

7. Apr 16, 2014

### D H

Staff Emeritus
Stupid me. You are correct. I didn't read the OP properly.

Of course not. There certainly must exist some function x(t) defined over some subinterval over which $f(x)$ and $g(t)$ are bounded and continuous. However, good luck finding that x(t) in general. There's no guarantee that $\frac{dx}{dt} = f(t)$ has a solution in the elementary functions, let alone $\frac{dx}{dt} = \sqrt{f(x)+g(t)}$.

That is a key question.

8. Apr 16, 2014

### MathematicalPhysicist

Yes, I believe you may be right, this trick of the derivative of square root seemed like it may work here.

So what's the context metamathphys?

9. Apr 16, 2014

### MathematicalPhysicist

Well, I can look at it as an equation of energy which is not constant of time.

I.e dx/dt is the velocity and we have v^2-f(x)=g(t) (or Lagrangian depending on the plus minus sign). So it's actually an equation of an energy which is not necessarily constant with time.

How to solve this analytically, I am afraid I don't know, but I guess some special function is in order...