Solving the first-order non-linear differential equation $y' = y^2 - 2 x$ I am trying to solve this Cauchy's problem:
$$
y' = y^2 - 2x
$$
with condition $y(0) = 2$
It's very similar to Bernoulli equation
$$
y' + a(x)y = b(x)y^2$$
however doesn't contain $a(x)y$. I also tried substitution like $y = tx$. but it hasn't helped, because i've got this
$$
t'x + t = (tx)^2 + 2x
$$
I've tried using computer algebra resourses, and it gave me solution in closed form which looks very awfull  with Bessel function of first kind and Gamma function. So let's make it easier, is there any way to find a series $y(x) = \sum a_n x^n$ that formally solve this differential equation (i calculated some first coeffitients, but i can't solve infinite system of linear equations on coeffitients and i can't find a good formula for $a_n$)?
 A: This equation is a Riccati equation; applying a standard technique linearizes the equation and, in our case, lets us express the general solution compactly in terms of the Airy functions (see below).
Write $y$ as the negative logarithmic derivative of some function $u$---$$y = -\frac{d}{dx}\log u,$$
---which transforms our equation to the second-order, linear equation
$$u'' - 2 x u = 0.$$
Changing variables to $t = 2^{1/3} x$ then yields the Airy equation,
$$u''(t) - t u(t) = 0.$$
A preferred basis of its solution space is given by the Airy functions, $(\operatorname{Ai}(t), \operatorname{Bi}(t))$ (both functions can be expressed as improper Riemann integrals of elementary functions), so any solution $u(x)$ of our transformed equation has the form
$$u(x) = \alpha \operatorname{Ai}(2^{1/3} x) + \beta \operatorname{Bi}(2^{1 / 3} x)$$
for some real coefficients $\alpha, \beta$. Notice that replacing coefficients $(\alpha, \beta)$ with $(\lambda \alpha, \lambda \beta)$, $\lambda \neq 0$, in our expression for $u(x)$ yields the same function $y(x)$, and substituting shows that every such $y(x)$ solve the equation, so our (one-dimensional!) solution space for $y(x)$ is parametrized by the projective line $\Bbb R \Bbb P^2$.
In summary, the general solution to our original equation is
$$\color{#bf0000}{\boxed{y(x) = -\frac{d}{dx} \log [\alpha \operatorname{Ai}(2^{1/3} x) + \beta \operatorname{Bi}(2^{1/3} x)] , \qquad [\alpha : \beta] \in \Bbb R \Bbb P^2}}.$$
The particular solution satisfying $y(0) = 2$ is given by the unpleasant parameter choice
$$[\alpha : \beta] = \left[\sqrt{3}\left(2^{1/3} 3^{5/6} \Gamma\left(\frac{2}{3}\right)^2 + 4 \pi\right) : 2^{1/3} 3^{5/6} \Gamma\left(\frac{2}{3}\right)^2 - 4 \pi\right] ,$$
where $\Gamma$ as usual denotes the gamma function.
The power series solution satisfying the general initial condition $y(0) = C$ begins $$y(x) = C + C^2 x + (C^3 - 1) x^2 + \cdots ,$$
but I don't know a general formula for the coefficients offhand.
