Given a second order differential equation, write an equivalent system of first order equations with transformations. 
Given a second order differential equation 

$$y''+f(y)y'+g(y)=0,$$
write an equivalent system of first order equations with transformations 
$$x_{1}=y,x_{2}=y'+\int_{0}^{y}f(s)ds.$$
This is what I did:
$$x_{1}'=y'=x_{2}-\int_{0}^{y}f(s)ds=x_{2}-\int_{0}^{x_{1}}f(s)ds$$
$$x_{2}'=y''+f(y)=-f(y)y'-g(y)+f(y)=f(y)(1-y')-g(y)=f(x_{1})(1-x_{2}+\int_{0}^{x_{1}}f(s)ds)-g(x_{1})$$
I feel like this answer is wrong though, because I am not sure if I'm doing the standard procedure.
 A: Given a second-order, generally non-linear, ordinary differential equaition of the form
$y'' + f(y)y' + g(y) = 0, \tag 1$
and the specified transformation of variables
$x_1 = y, \tag 2$
$x_2 = y' + \displaystyle \int_0^y f(s) \; ds, \tag 3$
we need to find $x_1'$ and $x_2'$; we start with the obvious
$x_1' = y', \tag 4$
and writing (3) in the form
$y' = x_2 - \displaystyle \int_0^y f(s) \; ds, \tag 5$
we further transform (4) to
$x_1' = x_2 - \displaystyle \int_0^y f(s) \; ds = x_2 - \displaystyle \int_0^{x_1} f(s) \; ds; \tag 6$
turning now to $x_2'$, we differentiate (3), 
applying the Leibniz integral rule to
$\displaystyle \int_0^y f(s) \; ds, \tag 7$
and find
$x_2' = y'' + f(y)y'; \tag 8$
we then write (1) in the form
$y'' = -f(y)y' - g(y) \tag 9$
and substitute this into (8) to obtain
$x_2' = y'' + f(y)y'$
$= -f(y)y' - g(y) + f(y)y' = -g(y) = -g(x_1); \tag{10}$
then the system (6), (10) is the transformed version of (1).
Going the other way:
we start with (6),
$x_1' = x_2 - \displaystyle \int_0^{x_1} f(s) \; ds, \tag 9$
and (10),
$x_2' = -g(x_1); \tag{10}$
using (2) and (3), and th Leibniz rule again,
$y'' = x_1'' = x_2' - f(x_1)x_1'$
$= -g(x_1) - f(x_1)x_1' = -g(y) - f(y)y', \tag{11}$
that is,
$y'' + f(y)y' + g(y) = 0, \tag{12}$
our original equation (1).
Given a second order differential equation, write an equivalent system of first order equations with transformations.
