How can I solve the differential equation $y'+y^{2}=f(x)$?

Solution 1:

As was pointed out by @Sasha, this is a Riccati equation which linearizes after the change of variable $y=\psi'/\psi$. This actually gives you Schroedinger equation $$\psi''=f(x)\psi,$$ with general potential $f(x)$. This is considered unsolvable - if you manage to find general solution, your name will appear in every course of quantum mechanics and ODEs.

On the other hand every known solvable quantum mechanical potential $f(x)$ leads to general solution of your equation. Several examples are:

  • Pöschl-Teller potential $f(x)=A+\frac{B}{\cosh^2 C x}$ (hypergeometric functions)

  • harmonic oscillator $f(x)=Ax^2+Bx+C$, $A\ne 0$ (parabolic cylinder functions)

  • constant electric field $f(x)=Ax+B$, $A\ne 0$ (Airy functions)

  • free case $f(x)=A\ne 0$ (plane waves)

A few more examples can be found here.

Solution 2:

In general case differential equations of the form : $\frac{dy}{dx}=f(x,y)$ can be rewritten as :

$M(x,y)dx+N(x,y)dy=0$

So , we have that :

$(y^2-f(x))dx +1\cdot dy=0$

Since this equation isn't exact it must be non-exact and therefore we have to find out if there exist integrating factor in terms of just one variable ($x$ or $y$) .

But , one can show that such integrating factor doesn't exist , therefore you cannot apply integrating factor method on this differential equation . So , you have to use "Riccati" method which means that particular solution has to be known .

Solution 3:

Interesting. In Maple I tried $y'+y^2 = \sin(x)$, and the solution involves Mathieu functions $S, C, S', C'$.

I tried $y'+y^2=x$, and the solution involves Airy functions Ai, Bi.

I tried $y'+y^2=1/x$, and the solution involves Bessel functions $I_0, I_1, K_0, K_1$.

This is a Riccati equation. For more info, in particular how its solutions are related to solutions of a second-order linear equation, look that up.