sympy/sympy — pull request #1858 by Manoj-Kumar-S (2013-03-02 19:56:54+00:00)
Title: Almost Linear Integrals - First implementation.

Solves an almost linear equation.

This is an equation of the form f(x)*g(y)*y' + k(x)*l(y) + m(x)
where l'(y) = g(y).

If we substitute u(y) = l(y), we obtain a linear differential
equation.

Since ode_1st_linear, has already been implemented, and the
coefficients have been modified to the required form in
classify_ode, just passing eq, func, order and match to
ode_1st_linear will give the required output.

Examples
========
>>> from sympy import Function, Derivative, pprint
>>> from sympy.solvers.ode import dsolve, classify_ode
>>> from sympy.abc import x
>>> f = Function('f')
>>> d = f(x).diff(x)
>>> eq = x*f(x)*d + 2*x*f(x)**2 + 1
>>> classify_ode(eq, f(x))
('Bernoulli', 'almost_linear', 'Bernoulli_Integral', 'almost_linear_Integral')
>>> dsolve(eq, f(x), hint='almost_linear')
f(x) == (C1 - 2*Ei(4*x))*exp(-4*x)
>>> pprint(dsolve(eq, f(x), hint='almost_linear'))
-4*x
f(x) = (C1 - 2*Ei(4*x))*e

References
==========
Symbolic Integration - The Stormy Decade by Moses
Table 2

I've added tests this time.