How find this ODE solution $f''(x)=f(x)(1+2\tan^2{x})$ Question:

Find the ODE solution:
  $$f''(x)=f(x)(1+2\tan^2{x})$$
such $f(0)=0$

My idea: let $y=f(x)$
 then
$$y''=y(1+2\tan^2{x})$$
$$\Longrightarrow \dfrac{y''}{y}=1+2\tan^2{x}$$
and I found  use wolf :http://www.wolframalpha.com/input/?i=y%27%27%3Dy%281%2B2tan%5E2x%29&dataset=
Now How can you find this solution? by hand? Thank you
 A: Let $y(x)=\sec{(x)}\,v(x)$. Differentiating,
$$y'=\sec{(x)}\,v'+\sec{(x)}\tan{(x)}\,v=\sec{(x)}\left(v'+\tan{(x)}\,v\right),$$
and,
$$y''=\sec{(x)}\left(v''+2\tan{(x)}\,v'+(1+2\tan^2{x})v\right).$$
Substituting the derivatives above into the ODE for $y(x)$, $y''=(1+2\tan^2{x})y$, we arrive at an ODE for $v(x)$:
$$\sec{(x)}\left(v''+2\tan{(x)}\,v'+(1+2\tan^2{x})v\right)=\sec{(x)}(1+2\tan^2{x})v\\
\implies v''+2\tan{(x)}\,v'+(1+2\tan^2{x})v=(1+2\tan^2{x})v\\
\implies v''+2\tan{(x)}\,v'=0.$$
The general solution to the IVP $v''+2\tan{(x)}\,v'=0, v(0)=0$ is easily found to be
$$v'(x)=c_1\cos^2{(x)}\\
\implies v(x)=\frac12c_1(x+\sin{(x)}\cos{(x)}).$$
Hence,
$$\begin{align}
y(x)&=\sec{(x)}\,v(x)\\
&=\frac12c_1\sec{(x)}\,(x+\sin{(x)}\cos{(x)})\\
&=\frac12c_1(x\sec{(x)}+\sin{(x)}).
\end{align}$$
A: My idea:
This is a 2nd order variable coefficients ODE. We can solve it by the inspiration of constant coefficients ODE that guess $y=Ce^{f(x)}$. Plug it in your ODE we obtain:
$$
Cf''(x)e^{f(x)}+C(f'(x))^2e^{f(x)}=Ce^{f(x)}(1+2\tan(x)^2)\\
f''(x)+(f'(x))^2=1+2\tan(x)^2\qquad (1)
$$
Once $f(x)$ have been solved, the problem have been solved also. Note that $(1)$ can be solve by Bernoulli's Equation by the substitution $f'(x)=u(x)$. Then $(1)$ is rewritten by:
$$
u'(x)+u(x)^2=1+2\tan(x)^2\qquad(2)
$$
This is an inhomogeneous Bernoulli's Equation and I think it is not difficult to solve it. 
Moreover, a particular solution of $(2)$ is $u(x)=\tan(x)$. And the complementary solution of it can be solved by a fixed method (see Bernoulli's Differential Equation).
A: Maple 18 gets a slightly nicer solution:
$$f \left( x \right) ={\frac {{\it \_C1}}{\cos \left( x \right) }}+{
\frac {{\it \_C2}\, \left( i\cos \left( x \right) \sin \left( x
 \right) +\ln  \left( \cos \left( x \right) +i\sin \left( x \right) 
 \right)  \right) }{\cos \left( x \right) }}
$$
Writing $\ln(\cos(x) + i\sin(x))$ as $ix$, and absorbing the $i$ into the constant $\_C2$, the second solution becomes
$ \sin(x) + x \sec(x)$.
