TITLE: How to approximate this nonlinear ODE?
QUESTION [0 upvotes]: I need try to approximate this nonlinear ODE
$\left( \frac{d^2}{dx^2}y(x) \right)\left( 1+4(y(x))^2 \right)+8x\left( \frac{d}{dx}y(x) \right)^2-4(y(x))\left( \frac{d}{dx}y(x) \right)^2+2(9.81)(y(x))=0$
But, i could not find a method to achieve it. I appreciate your help in this problem.

REPLY [2 votes]: Starting from the ODE $(1+4y^2)y''+4(2x-y)(y')^2+2gy = 0$ ($g := 9.81$), we define the vector-valued function $\boldsymbol{y} := (y,y')^{\top}$. We then obtain a first-order ODE for $\boldsymbol{y}$:
\begin{equation}
\boldsymbol{y}' = \left( \begin{array}{c}
y'\\
y''
\end{array}
\right) = \left( \begin{array}{c}
y'\\
-\frac{4(2x-y)(y')^2+2gy}{1+4y^2}
\end{array}
\right) =: \boldsymbol{f}(x,\boldsymbol{y}).
\end{equation}
If you also know some initial value $\boldsymbol{y}(x_0) = \boldsymbol{y}_0$, you can then use a Runge-Kutta method, for example, to solve this system of ODEs numerically.
The numerical solution $(x_i,\boldsymbol{y}_i)$ will contain approximations for $y(x_i)$ and for $y'(x_i)$ at the points $x_i$, $i=1,2,\dots$
{"set_name": "stack_exchange", "score": 0, "question_id": 3098116}