I'm trying to solve numerically the following IVP nonlinear second-order differential equation: $$f''(x)=A\left(1+f'(x)^2\right)^{3/2}+\frac{\left(1+f'(x)^2\right)}{f(x)}$$
where $A$ is a constant and the problem has the initial conditions (IVP) $f(0)=R$ and $f'(0)=0$, where $R$ is also a constant.
I'm used to applying the RK4 method for first-order differential equations, but is it possible to solve it by the RK4 method as well? If so could someone provide me a good reference to understand this specific application for method? I also open to any other useful numerical method that can solve this IVP. Thanks in advance.
I had worked on this problem before and am glad to share it with you.
Recognize the slope $\phi=y'$ and main curvature $\kappa_1:$
$$ \dfrac{y''}{(1+y'^2)^{\frac32}}=A +\dfrac{1}{y\sqrt{1+y'^2}} \tag1 $$
Let $y'= \tan \phi,\text{so that }\cos \phi =\dfrac{ 1}{\sqrt{1+y'^2}} =u \;$
$$\kappa_1= A+ \dfrac{u}{y} \tag2 $$
With proper sign
$$ \kappa_1+\kappa_2 = A = 2 H \tag3 $$
where $\kappa_2$ is second curvature perpendicular to the principal meridional direction.
It is an important surface of constant mean curvature CMC when internal pressure acts on a soap bubble as a minimal surface area of revolution for a given enclosed volume.
Btw It can be formulated using calculus of variations nicely.
Having a constant mean curvature=H, they are also known as CMC Delaunay surfaces.
You can directly integrate to first order ODE. Its alternate form first degree:
$$\dfrac { \sin \phi\; d \phi}{dy}-\dfrac{u}{y} \to -\dfrac { du}{dy}-\dfrac{u}{y} = 2H \tag4 $$
Integrating,
$$ u= - H y+\dfrac{c}{y}=\dfrac{1}{\sqrt{1+y'^2}} \tag 5 $$
$$ \boxed{\cos \phi = \dfrac{c}{y}- H y} \tag 6 $$ is the differential equation of DeLaunay surfaces. Vertical tangent at $ y=\sqrt{c/H}.$
Characteristics of shape:
When $ H= 0, $ it is a Catenary; when $ H=1 , $ it is a Circle.
The meridians $(x,y)$ are calculated numerically from above ODEs and plotted below using RK4 available with
Mathematica. Initial values $ R=1, y_0'= 0$An interesting fact about Unduloids: If a conic rolls on a straight line then the Unduloids form as loci of their foci.
The second order RK4 is handled similar to first order, one more initial condition should be supplied.