66.2.28 problem Problem 40(a)

Internal problem ID [13848]
Book : Differential equations and the calculus of variations by L. ElSGOLTS. MIR PUBLISHERS, MOSCOW, Third printing 1977.
Section : Chapter 2, DIFFERENTIAL EQUATIONS OF THE SECOND ORDER AND HIGHER. Problems page 172
Problem number : Problem 40(a)
Date solved : Wednesday, March 05, 2025 at 10:19:33 PM
CAS classification : [[_2nd_order, _missing_x], [_2nd_order, _reducible, _mu_x_y1]]

\begin{align*} m x^{\prime \prime }&=f \left (x\right ) \end{align*}

Maple. Time used: 0.036 (sec). Leaf size: 62
ode:=m*diff(diff(x(t),t),t) = f(x(t)); 
dsolve(ode,x(t), singsol=all);
 
\begin{align*} m \left (\int _{}^{x \left (t \right )}\frac {1}{\sqrt {m \left (c_{1} m +2 \left (\int f \left (\textit {\_b} \right )d \textit {\_b} \right )\right )}}d \textit {\_b} \right )-t -c_{2} &= 0 \\ -m \left (\int _{}^{x \left (t \right )}\frac {1}{\sqrt {m \left (c_{1} m +2 \left (\int f \left (\textit {\_b} \right )d \textit {\_b} \right )\right )}}d \textit {\_b} \right )-t -c_{2} &= 0 \\ \end{align*}
Mathematica. Time used: 0.04 (sec). Leaf size: 44
ode=m*D[x[t],{t,2}]==f[x[t]]; 
ic={}; 
DSolve[{ode,ic},x[t],t,IncludeSingularSolutions->True]
 
\[ \text {Solve}\left [\int _1^{x(t)}\frac {1}{\sqrt {c_1+2 \int _1^{K[2]}\frac {f(K[1])}{m}dK[1]}}dK[2]{}^2=(t+c_2){}^2,x(t)\right ] \]
Sympy
from sympy import * 
t = symbols("t") 
m = symbols("m") 
x = Function("x") 
f = Function("f") 
ode = Eq(m*Derivative(x(t), (t, 2)) - f(x(t)),0) 
ics = {} 
dsolve(ode,func=x(t),ics=ics)
 
Timed Out