Solving $\frac{dy}{dx}=1+(a_mx^m+a_{m-1}x^{m-1}+...+a_0)y^2$ I have a problem with the following equation,
$\frac{dy}{dx}=1+P_m(x)y^2$
Where $P_m(x)$ is a polynomial function. I have solution for $P_m(x)=x$ using Mathematica, and Prof @Claude Leibovici solved for me the special case when $P_m(x)=x^n$. Regrading to Prof @Claude Leibovici useful answer, I need a much general solution for $P_m(x)=a_mx^m+a_{m-1}x^{m-1}+...+a_0$
The equation can be rewritten by parametrizeing $y=\frac{u}{u'}$ as $u''+P_m(x)u=0$; i want declare that problem i introduced is a simplified form from  such equation!
I need absoulte solution (not approximate) for the case $P_m(x)=a_mx^m+a_{m-1}x^{m-1}+...+a_0$. And its ok if the solution is in special functions (becacuse, actually, its the only way to do it).
Can anyone here help me please?
Thank you guys
 A: Parametrize $y=\frac{u}{u'}$ to get the equation
$$
u''(x)+P(x)u(x)=0.
$$
There are some special cases of this equation that have solutions in special functions, like Airy or Bessel functions, but in general it is not the case that this can be reduced to named and classified equations.
A: First I have to confess that domains of my mathematical  competence are far from differential equations. But I know a book [PZ]. It looks so big and impressive (and even includes a big supplement about special functions), so it should be a book to look for the answer of your question. If the answer will be not found in this book then the chances to find it in an other source look small.
Unfortunately, my search for an answer was not very fruitful. You ask about a solution of a Riccati equation, which, in general is not integrable by quadrature [0.1.4.1]. In Section 0.1.4 are considered particular cases and transformations, but none of them looks helpful for your case. Other Riccati equations integrable by quadrature are listed in Section 1.2. In Section 1.2.2 are listed
equations containing power functions, but the only non-degenerated case among them seems to be the following
1.2.2.11.   $y’_x=(ax^{2n}+bx^{n-1})y^2+c$. The substitution $y=-1/w$ leads to an equation of the form 1.2.2.6 $w’_x=cw^2+ax^{2n}+bx^{n-1}$.
1.2.2.6. $y’_x=ay^2+bx^{2n}+cx^{n-1}$. For the case $n= -1$, see equation 1.2.2.13. For $n\ne –1$, the transformation
$\xi=\frac 1{n+1}x^{n+1}$, $\eta=yx^{-n}$ leads to an equation of the form 1.2.2.38. For the latter equation is only
proposed a substitution leading it to a second-order linear equation of the form 2.1.2.64.
References
[PZ] Andrei D. Polyanin, Valentin F. Zaitsev. Handbook of exact solutions for ordinary differential equations, second edition, Chapman and Hall/CRC, 2003.
A: $$\dfrac{\mathrm dy}{\mathrm dx}=1+P_m(x)y^2,\quad y(0)=y_0.$$
Let
$$y = -\dfrac1z,\tag1$$
then
$$\dfrac1{z^2}\dfrac{\mathrm dz}{\mathrm dx} = 1 + \dfrac{P_m(x)}{z^2}.$$
$$z' - z^2 = P_m(x).\tag2$$
Equation $(2)$ has exact solution in the cases m=0(P=0), m=0(P=a),


m=1(P=a+bx),
$$z(x) = \sqrt[3]b\,\dfrac{c_1\operatorname{Ai'}\left(-\dfrac{a + b x}{\sqrt[3]{b^2}}\right) + \operatorname{Bi'}\left(-\dfrac{a + b x}{\sqrt[3]{b^2}}\right)}{c_1\operatorname{Ai}\left(-\dfrac{a + b x}{\sqrt[3]{b^2}}\right) + \operatorname{Bi}\left(-\dfrac{a + b x}{\sqrt[3]{b^2}}\right)},$$
where $Ai,Bi$ are the Airy functions,
m=2 (P=a+bx+c^2),

where $D_n(z)$ is the parabolic cylinder function.
Also, exact solution exists in the case P=ax^m,

where $J_n(x)$ is the Bessel function of the first kind.
However, existance of the exact solution for the arbitrary polynomial $P_m(x)$ looks impossible.
EDIT
If $P(x) = -a^2+\dfrac bx,$ then WA gives the solution
\begin{align}
&z(x) = -\dfrac1{c_1 x \, \operatorname{U}\left(1-\dfrac b{2a}, 2, 2 a x\right) + x \, \operatorname{_1F_1}\left(1 - \dfrac b{2a}, 2, 2 a x\right)}\\
&\times\Biggl(c_1(1-ax)\, \operatorname{U}\left(1-\dfrac b{2a}, 2, 2 a x\right) + c_1x(b-2a) \, \operatorname{U}\left(2-\dfrac b{2a}, 3, 2 a x\right) \\
& + (1-ax) \operatorname{_1F_1}\left(1 - \dfrac b{2a}, 2, 2 a x\right) + \dfrac12x (2 a - b) \operatorname{_1F_1}\left(2 - \dfrac b{2a}, 3, 2 a x\right)\Biggr),
\end{align}
where $\operatorname{U(a,b,x)}$ is the confluent hypergeometric function of the second kind
and $\operatorname{_1F_1}(a,b,x)$ is the Kummer confluent hypergeometric function.
If $a^2>0,$ then the solution is expressed over reals.
