I've been working on this differential equation for days now but I can not find a solution. I understand that finding a solution in closed form is difficult to say (assuming there is). What I ask is if there is a substitution (change of variables) that can "transform" this differential equation from the second order to the first order so that it is not too constrained. Thank you for your interest and time.
$$y''(x)+ a\ x\cos y(x)=0 $$
where $a \in \mathbb{R}\ $
Here is a way to make it into a first degree equation. We have $$y''(x)+ ax\cos y(x)=0$$ So we can multiply by $y'(x)$ to get $$y''y'+ ax\cos(y)y'=0$$
Now we can integrate to get $$\int y''y'dx + \int ax\cos(y)y'dx=\int0dx$$ For the first integral, we can set $u=y'$, $du=y''dx$ to get $$\int uy''dx=\int udu =u^2+C=y'(x)^2+C_1$$ For the second rule we use product rule with $f(x)=ax$ and $g'(x)=\cos(y)y'$
So we have $f'(x)=a$ and $g(x)=\sin(y)$
Now we apply integration by parts to obtain $$\int f(x)g'(x)dx=f(x)g(x)-\int f'(x)g(x)dx =f(x)g(x) -\int a g'(x)dx$$ $$=f(x)g(x)-ag(x) + C_2= a(x-1)\sin(y) + C_2$$
Then we have your first order differential equation $$y'(x)^2 +a(x-1)\sin(y(x))=C$$