# Solving the differential equation of an object oscillating in water.

1. Apr 14, 2014

### RYANDTRAVERS

I have a differential equation to solve below on the motion of an object oscillating in water with a restoring force equal to -Aρgx and a damping force equal to -kv^2.
ma+kv^2+Aρgx=0
K, A, ρ and g are constants and I need to solve the equation for x. a (acceleration). v (velocity). x (displacement from the equilibrium position).
I need a bit of help on this one because I dont know whether it would need a substitution to eliminate v^2.

2. Apr 14, 2014

### the_wolfman

Your differential equation is of the form

$x'' = f(x,x')$

where primes indicate derivatives wrt to time. When ever the independent variable (in this case time) does not appear explicitly in f, then try the substitution

$x' = z$.

Using the chain rule you can show that
$x'' = z\frac{dz}{dx} = \frac{1}{2} \frac{d\left(z^2\right)}{dx}$.

Thus the substation converts a second order nonlinear equation into a first order nonlinear equation.

In your case, you can solve the resulting equation by using an integrating factor.