How to get the solution to these differential equations I would like to get from
$$
\tan(x) = \frac{y''}{y'} + y'
$$
The answer is
$$
y = \ln(c_1\tanh^{-1}(\tan(\frac{x}{2}))+c_2)
$$
The other equation is
$$
\sec(x) = \frac{y''}{y'}+y'
$$
The answer is 
$$
y = \ln(c_1\ln(e^{4\tanh^{-1}(\tan(\frac{x}{2}))}+1)+c_2)
$$
I have no idea where to begin, Any advice would be nice.
 A: If we write $$y(x) := \log u(x),$$ then the first equation (after some work) reduces to
$$\frac{y''}{y'} + y' = \frac{u''}{u'} = (\log (u'))'.$$ So, integrating both sides of, e.g., the first equation, which we now write as
$$\tan x = (\log (u'))'$$
gives
$$\log \sec x = \log (u') + C,$$
or
$$u' = C_1 \sec x.$$
Integrating again gives
$$u = C_1 \log(\sec x + \tan x) + C_2,$$
which immediately gives solutions $y$.
A: dividing by $y^\prime$ turns $ {y^{\prime \prime} \over y^{\prime}} + y^{\prime} = f(x)$  into $ {y^{\prime \prime} \over {y^{\prime}}^2} + 1 = \frac{f}{y^{\prime}}$ which is 
$$-\frac{d(1/y^{\prime})}{dx} + 1 =\frac{f}{y^\prime}$$ make a change of variable $u =  1/y^\prime$ so that $${du \over dx} = 1 - uf$$ we will try variation of parameters, i.e. $$ u = Ae^{-\int_0^x f(t)dt} \mbox{where $A$ is a function of $x$ to be determined.}$$ substituting this in the equation for $u$ gives 
$$ e^{-\int_0^x f(t)dt } \frac{dA}{dx }- e^{-\int_0^x f(t)dt }Af = 1 - Ae^{-\int_0^x f(t)dt }f$$ so that $$ A = \int_0^x e^{-\int_0^x f(t)dt }dx + C, u = e^{-\int_0^x f(t)dt }\left( \int_0^x e^{-\int_0^x f(t)dt }dx + C \right)$$
one can now substitute $ \tan x \mbox{ and } \sec x$  for $f.$
A: let $y=ln(z)$
then $y'=\frac1z z'$
and $y''=\frac{-1}{z^2}(z')^2+\frac1z z''$
so $\frac {y''}{y'}=\frac{-1}z z' +\frac{z''}{z'}$
sub all in to ODE you end up with $\tan(x) = \frac{z''}{z'}$ 
now let $Q=\frac1{z'}$
then $Q'=\frac{-1}{(z')^2}z''=\frac{-1}{z'} \frac{z''}{z'}=-Q\frac{z''}{z'}$
so $\frac{z''}{z'}=\frac{-Q'}{Q}$
so our ODE now becomes $\tan(x)=\frac{-Q'}{Q}$
which is simply $\frac1Q dQ=- \tan(x)dx$
so $ln(Q)=-ln(\sec(x))+c=ln( \cos(x))+c$
so $Q=e^{ln(\cos(x))+c}=A \cos(x)$
sub this in to $Q=A \cos(x)=\frac1{z'}$
which is same as $dz=C_1 \sec(x)dx$
so $z=C_1(ln(\sec(x)+ \tan(x)))+C_2$
ao $y=ln (C_1(ln(\sec(x)+ \tan(x)))+C_2)$
perhaps if we pick different substitution we get the answer that you have but i don't know how and this method works for second ODE too
we start this here $\frac1Q dQ=- \sec(x)dx$
Then $ln(Q)=ln(\sec(x)+\tan(x))+c$
which is same as $Q=A(\sec(x)+\tan(x))$
so $Q=\frac1{z'}=A(\sec(x)+\tan(x))$
so $dz=C_1 \frac{ \cos(x)}{1+\sin(x)} dx$
which is $z=ln(C_1(ln(1+\sin(x)))+c_2$
so $y=ln(ln(C_1(ln(1+\sin(x)))+c_2)$
