We have a gradient ODE:
$\frac{dx}{dt}=\frac{df}{dx}$
where $f=-x^2$
I want the condition to be met on a given system:
$x''+x'=0$
I.e. initial ODE turns into a dynamic system:
$\begin{cases} \frac{dx}{dt}=\frac{df}{dx} \\ x''+x'=0 \end{cases}$
But, in order to solve such a system, an auxiliary variable is needed (for example, $y$).
What are the ways to introduce it into this dynamic system?
Remark: I did it like this. I added an auxiliary variable $u$ and got this system of equations:
$\begin{cases} \frac{dx}{dt}=\frac{df}{dx} + u + u' \\ x''+x'=0 \end{cases}$
Then he numerically solved such a system.
Here the problem is such that for a numerical solution it is required to know the value of the first derivative of the variable $x$, i.e. $x'(0)=?$, but we assume that it is unknown and cannot be obtained in any way.
Moreover, it is required to know it exactly, because otherwise the system stops converging to the maximum / minimum point.
!I don’t know how to overcome this problem!