# Second Order Non-Linear Differential Equation - AirDrag

I came across a second order non-linear DE. The equation is $m\ddot x$+$(c\dot x)^2$+$kx$=g.

I have no idea where to start to solve this DE, can this even be solved analytically or if I have to approximate it with numerical methods. If so what methods do I have to use?

I tried to solve it for a half-hour and could only rearrange the equation and try a substitution which didn't help. Any help is appreciated

• What is g? Is it gravity? Mar 1 '17 at 9:04

One can express $t$ as a function of $x$, function defined by an integral (no simpler closed form).

There is no closed form for the inverse function $x(t)$.

On practical viewpoint, better use a numerical method for solving.

Here I suggest a numerical approach. I will use Euler's Method for Systems.

You can convert your ODE into a first order system of equations by using the substitution $v=\dot{x}$ since it is an autonomous ODE. Therefore, we obtain: $$\begin{cases} \frac{dx}{dt}=v \\ m\frac{dv}{dt}+c^2\cdot v^2+kx=g \end{cases}$$ $$\begin{cases} \frac{dx}{dt}=v \\ \frac{dv}{dt}=\frac{g}{m}-\frac{k}{m}\cdot x-\frac{c^2}{m}\cdot v^2 \end{cases} \tag{1}$$

In general, given the following system: $$\begin{cases} \frac{dx}{dt}=f(x,v) \\ \frac{dv}{dt}=g(x,v) \end{cases}$$

And an initial condition $(x_0,v_0)$ (In this case $v_0$ is your initial velocity), and a step size $\Delta t$, one may use the following:

$$\begin{cases} t_{n+1}=t_n+\Delta t \\ x_{n+1}=x_n+f(x_n,v_n)\Delta t \\ v_{n+1}=v_n+g(x_n,v_n)\Delta t \end{cases} \tag{2}$$

In your case, we let $f(x_n,v_n)=v_n$ and $g(x_n,v_n)=\frac{g}{m}-\frac{k}{m}\cdot x_n-\frac{c^2}{m}\cdot {v_n}^2$.