# How to solve a differential equation including $\ddot{x}\dot{x}$ term?how

I have a differential equation like this $$m\ddot{x}\dot{x}+f\dot{x}=p,\quad m>0,f>0,p>0$$ where $m,f,p$ is constant.

How to solve it analytically?

• As a fisrt step put $y=x'$
– N74
Mar 25 '17 at 4:12

Let $v(t)\frac{dx(t)}{dt}$. Then, note that $\frac12\frac{dv^2(t)}{dt}=x'(t)x''(t)$, where $x''(t)=\frac{dv(t)}{dt}$.

Hence, we have

\begin{align} mx'(t)x''(t)&=\frac12m\frac{dv^2(t)}{dt}\\\\ &=-f\frac{dx(t)}{dt}+p\tag 1 \end{align}

Integrating both sides of $(1)$ from $0$ to $t$ yields

\begin{align} \frac12m(v^2(t)-v(0)^2)&=-f\int_0^t \,\frac{dx(t)}{dt'}\,dt'+pt\\\\ &=-f(x(t)-x(0))+pt \end{align}

• I don't think you are right. Where is $p$? And the $f$ is a constant. Mar 25 '17 at 4:39
• @Feynman This is a standard result in classical mechanics; the change is kinetic energy is equal to the work done. If $f$ is constant, then the integral on the right-hand side is $f(x(t)-x(0))$. And $p=fx'(t)$. So, the integral over $t$ of $p$ is also $f(x(t)-x(0))$. Mar 25 '17 at 4:43
• $p$ is also a constant. It is just a different equation. Mar 25 '17 at 4:49
• If $f$ is a constant, and $p=fx'$, then $p$ cannot be constant. Mar 25 '17 at 4:50
• $p$ just is a constant and not a momentum. Mar 25 '17 at 4:52

$$m\ddot{x}\dot{x}+f\dot{x}=p$$ $$\frac{dx}{dt}=y(t)\quad\to\quad m\frac{dy}{dt}y+f\:y=p$$ This is a separable ODE : $$dt=m\frac{y}{p-f\:y}dy$$ Integration $\quad\to\quad t-t_0=-\frac{m}{f^2}\left(f\:y+p\ln|p-f\:y| \right)$

Solving this equation for $y$ requires a special function, the Lambert W(X) function. $$y=\frac{p}{f}+\frac{p}{f} W\left(X \right) \quad\text{where}\quad X=-\frac{1}{p}e^{-1-\frac{f^2}{mp}(t-t_0)}$$ $$x(t)=\int ydt=\int\left(\frac{p}{f}+\frac{p}{f} W\left(-\frac{1}{p}e^{-1-\frac{f^2}{mp}(t-t_0)} \right) \right)dt$$

Using the known integral $$\int W\left(e^\chi \right)d\chi=\frac{1}{2}\left(W\left(e^\chi \right)+1 \right)^2+\text{constant}$$ the above integral leads to

$$\begin{cases} x(t)=\frac{p\:t}{f}-\frac{mp^2}{2f^3}\left(W(X)+1 \right)^2+\text{constant} \\ \text{where }\quad X=-\frac{1}{p}e^{-1-\frac{f^2}{mp}(t-t_0)} \end{cases}$$